
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) COLORS#0 ← ((byte*)) (word/dword/signed dword) 55296
  (byte) FILL#0 ← (byte/word/signed word/dword/signed dword) 230
  (byte) numpoints#0 ← (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte[]) XPOS#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 6, (byte/signed byte/word/signed word/dword/signed dword) 34, (byte/signed byte/word/signed word/dword/signed dword) 21, (byte/signed byte/word/signed word/dword/signed dword) 31 }
  (byte[]) YPOS#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 14, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 22 }
  (byte[]) COLS#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7 }
  to:@5
main: scope:[main]  from @5
  (byte) numpoints#22 ← phi( @5/(byte) numpoints#24 )
  (byte*) COLORS#5 ← phi( @5/(byte*) COLORS#7 )
  (byte) FILL#3 ← phi( @5/(byte) FILL#4 )
  (byte*) SCREEN#3 ← phi( @5/(byte*) SCREEN#4 )
  call initscreen 
  to:main::@3
main::@3: scope:[main]  from main
  (byte) numpoints#20 ← phi( main/(byte) numpoints#22 )
  (byte*) COLORS#3 ← phi( main/(byte*) COLORS#5 )
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@5
  (byte) numpoints#19 ← phi( main::@3/(byte) numpoints#20 main::@5/(byte) numpoints#21 )
  (byte*) COLORS#2 ← phi( main::@3/(byte*) COLORS#3 main::@5/(byte*) COLORS#4 )
  call render 
  to:main::@4
main::@4: scope:[main]  from main::@1
  (byte) numpoints#23 ← phi( main::@1/(byte) numpoints#19 )
  (byte*) COLORS#6 ← phi( main::@1/(byte*) COLORS#2 )
  call animate 
  to:main::@5
main::@5: scope:[main]  from main::@4
  (byte) numpoints#21 ← phi( main::@4/(byte) numpoints#23 )
  (byte*) COLORS#4 ← phi( main::@4/(byte*) COLORS#6 )
  if(true) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@5
  return 
  to:@return
animate: scope:[animate]  from main::@4
  (byte/signed word/word/dword/signed dword~) animate::$0 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte/signed word/word/dword/signed dword~) animate::$0
  (bool~) animate::$1 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 40
  (bool~) animate::$2 ← ! (bool~) animate::$1
  if((bool~) animate::$2) goto animate::@1
  to:animate::@7
animate::@1: scope:[animate]  from animate animate::@7
  (byte/signed word/word/dword/signed dword~) animate::$3 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte/signed word/word/dword/signed dword~) animate::$3
  (bool~) animate::$4 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 25
  (bool~) animate::$5 ← ! (bool~) animate::$4
  if((bool~) animate::$5) goto animate::@2
  to:animate::@8
animate::@7: scope:[animate]  from animate
  *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:animate::@1
animate::@2: scope:[animate]  from animate::@1 animate::@8
  (byte/signed word/word/dword/signed dword~) animate::$6 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6
  (bool~) animate::$7 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) == (byte/word/signed word/dword/signed dword) 255
  (bool~) animate::$8 ← ! (bool~) animate::$7
  if((bool~) animate::$8) goto animate::@3
  to:animate::@9
animate::@8: scope:[animate]  from animate::@1
  *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:animate::@2
animate::@3: scope:[animate]  from animate::@2 animate::@9
  (byte/signed word/word/dword/signed dword~) animate::$9 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9
  (bool~) animate::$10 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) == (byte/signed byte/word/signed word/dword/signed dword) 25
  (bool~) animate::$11 ← ! (bool~) animate::$10
  if((bool~) animate::$11) goto animate::@4
  to:animate::@10
animate::@9: scope:[animate]  from animate::@2
  *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 40
  to:animate::@3
animate::@4: scope:[animate]  from animate::@10 animate::@3
  (byte/signed word/word/dword/signed dword~) animate::$12 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$12
  (bool~) animate::$13 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) == (byte/word/signed word/dword/signed dword) 255
  (bool~) animate::$14 ← ! (bool~) animate::$13
  if((bool~) animate::$14) goto animate::@5
  to:animate::@11
animate::@10: scope:[animate]  from animate::@3
  *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:animate::@4
animate::@5: scope:[animate]  from animate::@4
  to:animate::@return
animate::@11: scope:[animate]  from animate::@4
  *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed byte/word/signed word/dword/signed dword) 25
  (byte/signed word/word/dword/signed dword~) animate::$15 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) + (byte/signed byte/word/signed word/dword/signed dword) 7
  *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$15
  (bool~) animate::$16 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) >= (byte/signed byte/word/signed word/dword/signed dword) 40
  (bool~) animate::$17 ← ! (bool~) animate::$16
  if((bool~) animate::$17) goto animate::@6
  to:animate::@12
animate::@6: scope:[animate]  from animate::@11
  to:animate::@return
animate::@12: scope:[animate]  from animate::@11
  (byte/signed word/word/dword/signed dword~) animate::$18 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 40
  *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$18
  to:animate::@return
animate::@return: scope:[animate]  from animate::@12 animate::@5 animate::@6
  return 
  to:@return
initscreen: scope:[initscreen]  from main
  (byte) FILL#2 ← phi( main/(byte) FILL#3 )
  (byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#3 )
  (byte*) initscreen::screen#0 ← (byte*) SCREEN#1
  to:initscreen::@1
initscreen::@1: scope:[initscreen]  from initscreen initscreen::@1
  (byte*) SCREEN#2 ← phi( initscreen/(byte*) SCREEN#1 initscreen::@1/(byte*) SCREEN#2 )
  (byte*) initscreen::screen#2 ← phi( initscreen/(byte*) initscreen::screen#0 initscreen::@1/(byte*) initscreen::screen#1 )
  (byte) FILL#1 ← phi( initscreen/(byte) FILL#2 initscreen::@1/(byte) FILL#1 )
  *((byte*) initscreen::screen#2) ← (byte) FILL#1
  (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#2
  (byte*~) initscreen::$0 ← (byte*) SCREEN#2 + (word/signed word/dword/signed dword) 1000
  (bool~) initscreen::$1 ← (byte*) initscreen::screen#1 < (byte*~) initscreen::$0
  if((bool~) initscreen::$1) goto initscreen::@1
  to:initscreen::@return
initscreen::@return: scope:[initscreen]  from initscreen::@1
  return 
  to:@return
render: scope:[render]  from main::@1
  (byte) numpoints#17 ← phi( main::@1/(byte) numpoints#19 )
  (byte*) COLORS#1 ← phi( main::@1/(byte*) COLORS#2 )
  (byte*) render::colline#0 ← (byte*) COLORS#1
  (byte) render::y#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:render::@1
render::@1: scope:[render]  from render render::@3
  (byte) numpoints#15 ← phi( render/(byte) numpoints#17 render::@3/(byte) numpoints#18 )
  (byte*) render::colline#5 ← phi( render/(byte*) render::colline#0 render::@3/(byte*) render::colline#1 )
  (byte) render::y#4 ← phi( render/(byte) render::y#0 render::@3/(byte) render::y#1 )
  (byte) render::x#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:render::@2
render::@2: scope:[render]  from render::@1 render::@5
  (byte) numpoints#14 ← phi( render::@1/(byte) numpoints#15 render::@5/(byte) numpoints#16 )
  (byte*) render::colline#4 ← phi( render::@1/(byte*) render::colline#5 render::@5/(byte*) render::colline#2 )
  (byte) render::y#2 ← phi( render::@1/(byte) render::y#4 render::@5/(byte) render::y#5 )
  (byte) render::x#2 ← phi( render::@1/(byte) render::x#0 render::@5/(byte) render::x#1 )
  (byte) findcol::x#0 ← (byte) render::x#2
  (byte) findcol::y#0 ← (byte) render::y#2
  call findcol 
  (byte) findcol::return#0 ← (byte) findcol::return#2
  to:render::@5
render::@5: scope:[render]  from render::@2
  (byte) numpoints#16 ← phi( render::@2/(byte) numpoints#14 )
  (byte) render::y#5 ← phi( render::@2/(byte) render::y#2 )
  (byte) render::x#3 ← phi( render::@2/(byte) render::x#2 )
  (byte*) render::colline#2 ← phi( render::@2/(byte*) render::colline#4 )
  (byte) findcol::return#4 ← phi( render::@2/(byte) findcol::return#0 )
  (byte~) render::$0 ← (byte) findcol::return#4
  (byte) render::col#0 ← (byte~) render::$0
  *((byte*) render::colline#2 + (byte) render::x#3) ← (byte) render::col#0
  (byte) render::x#1 ← (byte) render::x#3 + rangenext(0,39)
  (bool~) render::$1 ← (byte) render::x#1 != rangelast(0,39)
  if((bool~) render::$1) goto render::@2
  to:render::@3
render::@3: scope:[render]  from render::@5
  (byte) numpoints#18 ← phi( render::@5/(byte) numpoints#16 )
  (byte) render::y#3 ← phi( render::@5/(byte) render::y#5 )
  (byte*) render::colline#3 ← phi( render::@5/(byte*) render::colline#2 )
  (byte*~) render::$2 ← (byte*) render::colline#3 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (byte*) render::colline#1 ← (byte*~) render::$2
  (byte) render::y#1 ← (byte) render::y#3 + rangenext(0,24)
  (bool~) render::$3 ← (byte) render::y#1 != rangelast(0,24)
  if((bool~) render::$3) goto render::@1
  to:render::@return
render::@return: scope:[render]  from render::@3
  return 
  to:@return
findcol: scope:[findcol]  from render::@2
  (byte) numpoints#12 ← phi( render::@2/(byte) numpoints#14 )
  (byte) findcol::y#8 ← phi( render::@2/(byte) findcol::y#0 )
  (byte) findcol::x#5 ← phi( render::@2/(byte) findcol::x#0 )
  (byte) findcol::mindiff#0 ← (byte/word/signed word/dword/signed dword) 255
  (byte) findcol::mincol#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) findcol::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:findcol::@1
findcol::@1: scope:[findcol]  from findcol findcol::@8
  (byte) findcol::mincol#11 ← phi( findcol/(byte) findcol::mincol#0 findcol::@8/(byte) findcol::mincol#3 )
  (byte) numpoints#10 ← phi( findcol/(byte) numpoints#12 findcol::@8/(byte) numpoints#1 )
  (byte) findcol::mindiff#9 ← phi( findcol/(byte) findcol::mindiff#0 findcol::@8/(byte) findcol::mindiff#11 )
  (byte) findcol::y#5 ← phi( findcol/(byte) findcol::y#8 findcol::@8/(byte) findcol::y#9 )
  (byte) findcol::x#1 ← phi( findcol/(byte) findcol::x#5 findcol::@8/(byte) findcol::x#6 )
  (byte) findcol::i#2 ← phi( findcol/(byte) findcol::i#0 findcol::@8/(byte) findcol::i#1 )
  (byte) findcol::xp#0 ← *((byte[]) XPOS#0 + (byte) findcol::i#2)
  (byte) findcol::yp#0 ← *((byte[]) YPOS#0 + (byte) findcol::i#2)
  (bool~) findcol::$0 ← (byte) findcol::x#1 == (byte) findcol::xp#0
  (bool~) findcol::$1 ← ! (bool~) findcol::$0
  if((bool~) findcol::$1) goto findcol::@2
  to:findcol::@9
findcol::@2: scope:[findcol]  from findcol::@1 findcol::@3
  (byte) findcol::mincol#10 ← phi( findcol::@1/(byte) findcol::mincol#11 findcol::@3/(byte) findcol::mincol#12 )
  (byte) numpoints#9 ← phi( findcol::@1/(byte) numpoints#10 findcol::@3/(byte) numpoints#11 )
  (byte) findcol::i#11 ← phi( findcol::@1/(byte) findcol::i#2 findcol::@3/(byte) findcol::i#12 )
  (byte) findcol::mindiff#8 ← phi( findcol::@1/(byte) findcol::mindiff#9 findcol::@3/(byte) findcol::mindiff#10 )
  (byte) findcol::yp#7 ← phi( findcol::@1/(byte) findcol::yp#0 findcol::@3/(byte) findcol::yp#8 )
  (byte) findcol::y#10 ← phi( findcol::@1/(byte) findcol::y#5 findcol::@3/(byte) findcol::y#11 )
  (byte) findcol::xp#1 ← phi( findcol::@1/(byte) findcol::xp#0 findcol::@3/(byte) findcol::xp#4 )
  (byte) findcol::x#2 ← phi( findcol::@1/(byte) findcol::x#1 findcol::@3/(byte) findcol::x#7 )
  (bool~) findcol::$4 ← (byte) findcol::x#2 < (byte) findcol::xp#1
  if((bool~) findcol::$4) goto findcol::@4
  to:findcol::@12
findcol::@9: scope:[findcol]  from findcol::@1
  (byte) findcol::mincol#13 ← phi( findcol::@1/(byte) findcol::mincol#11 )
  (byte) numpoints#13 ← phi( findcol::@1/(byte) numpoints#10 )
  (byte) findcol::i#13 ← phi( findcol::@1/(byte) findcol::i#2 )
  (byte) findcol::mindiff#12 ← phi( findcol::@1/(byte) findcol::mindiff#9 )
  (byte) findcol::xp#5 ← phi( findcol::@1/(byte) findcol::xp#0 )
  (byte) findcol::x#8 ← phi( findcol::@1/(byte) findcol::x#1 )
  (byte) findcol::yp#1 ← phi( findcol::@1/(byte) findcol::yp#0 )
  (byte) findcol::y#1 ← phi( findcol::@1/(byte) findcol::y#5 )
  (bool~) findcol::$2 ← (byte) findcol::y#1 == (byte) findcol::yp#1
  (bool~) findcol::$3 ← ! (bool~) findcol::$2
  if((bool~) findcol::$3) goto findcol::@3
  to:findcol::@10
findcol::@3: scope:[findcol]  from findcol::@9
  (byte) findcol::mincol#12 ← phi( findcol::@9/(byte) findcol::mincol#13 )
  (byte) numpoints#11 ← phi( findcol::@9/(byte) numpoints#13 )
  (byte) findcol::i#12 ← phi( findcol::@9/(byte) findcol::i#13 )
  (byte) findcol::mindiff#10 ← phi( findcol::@9/(byte) findcol::mindiff#12 )
  (byte) findcol::yp#8 ← phi( findcol::@9/(byte) findcol::yp#1 )
  (byte) findcol::y#11 ← phi( findcol::@9/(byte) findcol::y#1 )
  (byte) findcol::xp#4 ← phi( findcol::@9/(byte) findcol::xp#5 )
  (byte) findcol::x#7 ← phi( findcol::@9/(byte) findcol::x#8 )
  to:findcol::@2
findcol::@10: scope:[findcol]  from findcol::@9
  (byte) findcol::return#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:findcol::@return
findcol::@return: scope:[findcol]  from findcol::@10 findcol::@17
  (byte) findcol::return#5 ← phi( findcol::@10/(byte) findcol::return#1 findcol::@17/(byte) findcol::return#3 )
  (byte) findcol::return#2 ← (byte) findcol::return#5
  return 
  to:@return
findcol::@4: scope:[findcol]  from findcol::@2
  (byte) findcol::mincol#9 ← phi( findcol::@2/(byte) findcol::mincol#10 )
  (byte) numpoints#8 ← phi( findcol::@2/(byte) numpoints#9 )
  (byte) findcol::i#10 ← phi( findcol::@2/(byte) findcol::i#11 )
  (byte) findcol::mindiff#7 ← phi( findcol::@2/(byte) findcol::mindiff#8 )
  (byte) findcol::yp#6 ← phi( findcol::@2/(byte) findcol::yp#7 )
  (byte) findcol::y#7 ← phi( findcol::@2/(byte) findcol::y#10 )
  (byte) findcol::x#3 ← phi( findcol::@2/(byte) findcol::x#2 )
  (byte) findcol::xp#2 ← phi( findcol::@2/(byte) findcol::xp#1 )
  (byte~) findcol::$6 ← (byte) findcol::xp#2 - (byte) findcol::x#3
  (byte) findcol::diff#0 ← (byte~) findcol::$6
  to:findcol::@5
findcol::@12: scope:[findcol]  from findcol::@2
  (byte) findcol::mincol#8 ← phi( findcol::@2/(byte) findcol::mincol#10 )
  (byte) numpoints#7 ← phi( findcol::@2/(byte) numpoints#9 )
  (byte) findcol::i#9 ← phi( findcol::@2/(byte) findcol::i#11 )
  (byte) findcol::mindiff#6 ← phi( findcol::@2/(byte) findcol::mindiff#8 )
  (byte) findcol::yp#5 ← phi( findcol::@2/(byte) findcol::yp#7 )
  (byte) findcol::y#6 ← phi( findcol::@2/(byte) findcol::y#10 )
  (byte) findcol::xp#3 ← phi( findcol::@2/(byte) findcol::xp#1 )
  (byte) findcol::x#4 ← phi( findcol::@2/(byte) findcol::x#2 )
  (byte~) findcol::$5 ← (byte) findcol::x#4 - (byte) findcol::xp#3
  (byte) findcol::diff#1 ← (byte~) findcol::$5
  to:findcol::@5
findcol::@5: scope:[findcol]  from findcol::@12 findcol::@4
  (byte) findcol::mincol#7 ← phi( findcol::@12/(byte) findcol::mincol#8 findcol::@4/(byte) findcol::mincol#9 )
  (byte) findcol::x#13 ← phi( findcol::@12/(byte) findcol::x#4 findcol::@4/(byte) findcol::x#3 )
  (byte) numpoints#6 ← phi( findcol::@12/(byte) numpoints#7 findcol::@4/(byte) numpoints#8 )
  (byte) findcol::i#8 ← phi( findcol::@12/(byte) findcol::i#9 findcol::@4/(byte) findcol::i#10 )
  (byte) findcol::mindiff#5 ← phi( findcol::@12/(byte) findcol::mindiff#6 findcol::@4/(byte) findcol::mindiff#7 )
  (byte) findcol::diff#8 ← phi( findcol::@12/(byte) findcol::diff#1 findcol::@4/(byte) findcol::diff#0 )
  (byte) findcol::yp#2 ← phi( findcol::@12/(byte) findcol::yp#5 findcol::@4/(byte) findcol::yp#6 )
  (byte) findcol::y#2 ← phi( findcol::@12/(byte) findcol::y#6 findcol::@4/(byte) findcol::y#7 )
  (bool~) findcol::$7 ← (byte) findcol::y#2 < (byte) findcol::yp#2
  if((bool~) findcol::$7) goto findcol::@6
  to:findcol::@14
findcol::@6: scope:[findcol]  from findcol::@5
  (byte) findcol::mincol#6 ← phi( findcol::@5/(byte) findcol::mincol#7 )
  (byte) findcol::x#12 ← phi( findcol::@5/(byte) findcol::x#13 )
  (byte) numpoints#5 ← phi( findcol::@5/(byte) numpoints#6 )
  (byte) findcol::i#7 ← phi( findcol::@5/(byte) findcol::i#8 )
  (byte) findcol::mindiff#4 ← phi( findcol::@5/(byte) findcol::mindiff#5 )
  (byte) findcol::diff#4 ← phi( findcol::@5/(byte) findcol::diff#8 )
  (byte) findcol::y#3 ← phi( findcol::@5/(byte) findcol::y#2 )
  (byte) findcol::yp#3 ← phi( findcol::@5/(byte) findcol::yp#2 )
  (byte~) findcol::$10 ← (byte) findcol::yp#3 - (byte) findcol::y#3
  (byte~) findcol::$11 ← (byte) findcol::diff#4 + (byte~) findcol::$10
  (byte) findcol::diff#2 ← (byte~) findcol::$11
  to:findcol::@7
findcol::@14: scope:[findcol]  from findcol::@5
  (byte) findcol::mincol#5 ← phi( findcol::@5/(byte) findcol::mincol#7 )
  (byte) findcol::x#11 ← phi( findcol::@5/(byte) findcol::x#13 )
  (byte) numpoints#4 ← phi( findcol::@5/(byte) numpoints#6 )
  (byte) findcol::i#6 ← phi( findcol::@5/(byte) findcol::i#8 )
  (byte) findcol::mindiff#3 ← phi( findcol::@5/(byte) findcol::mindiff#5 )
  (byte) findcol::diff#5 ← phi( findcol::@5/(byte) findcol::diff#8 )
  (byte) findcol::yp#4 ← phi( findcol::@5/(byte) findcol::yp#2 )
  (byte) findcol::y#4 ← phi( findcol::@5/(byte) findcol::y#2 )
  (byte~) findcol::$8 ← (byte) findcol::y#4 - (byte) findcol::yp#4
  (byte~) findcol::$9 ← (byte) findcol::diff#5 + (byte~) findcol::$8
  (byte) findcol::diff#3 ← (byte~) findcol::$9
  to:findcol::@7
findcol::@7: scope:[findcol]  from findcol::@14 findcol::@6
  (byte) findcol::y#13 ← phi( findcol::@14/(byte) findcol::y#4 findcol::@6/(byte) findcol::y#3 )
  (byte) findcol::mincol#4 ← phi( findcol::@14/(byte) findcol::mincol#5 findcol::@6/(byte) findcol::mincol#6 )
  (byte) findcol::x#10 ← phi( findcol::@14/(byte) findcol::x#11 findcol::@6/(byte) findcol::x#12 )
  (byte) numpoints#3 ← phi( findcol::@14/(byte) numpoints#4 findcol::@6/(byte) numpoints#5 )
  (byte) findcol::i#5 ← phi( findcol::@14/(byte) findcol::i#6 findcol::@6/(byte) findcol::i#7 )
  (byte) findcol::mindiff#2 ← phi( findcol::@14/(byte) findcol::mindiff#3 findcol::@6/(byte) findcol::mindiff#4 )
  (byte) findcol::diff#6 ← phi( findcol::@14/(byte) findcol::diff#3 findcol::@6/(byte) findcol::diff#2 )
  (bool~) findcol::$12 ← (byte) findcol::diff#6 < (byte) findcol::mindiff#2
  (bool~) findcol::$13 ← ! (bool~) findcol::$12
  if((bool~) findcol::$13) goto findcol::@8
  to:findcol::@16
findcol::@8: scope:[findcol]  from findcol::@16 findcol::@7
  (byte) findcol::mindiff#11 ← phi( findcol::@16/(byte) findcol::mindiff#1 findcol::@7/(byte) findcol::mindiff#2 )
  (byte) findcol::y#9 ← phi( findcol::@16/(byte) findcol::y#12 findcol::@7/(byte) findcol::y#13 )
  (byte) findcol::mincol#3 ← phi( findcol::@16/(byte) findcol::mincol#1 findcol::@7/(byte) findcol::mincol#4 )
  (byte) findcol::x#6 ← phi( findcol::@16/(byte) findcol::x#9 findcol::@7/(byte) findcol::x#10 )
  (byte) numpoints#1 ← phi( findcol::@16/(byte) numpoints#2 findcol::@7/(byte) numpoints#3 )
  (byte) findcol::i#3 ← phi( findcol::@16/(byte) findcol::i#4 findcol::@7/(byte) findcol::i#5 )
  (byte) findcol::i#1 ← ++ (byte) findcol::i#3
  (bool~) findcol::$14 ← (byte) findcol::i#1 < (byte) numpoints#1
  if((bool~) findcol::$14) goto findcol::@1
  to:findcol::@17
findcol::@16: scope:[findcol]  from findcol::@7
  (byte) findcol::y#12 ← phi( findcol::@7/(byte) findcol::y#13 )
  (byte) findcol::x#9 ← phi( findcol::@7/(byte) findcol::x#10 )
  (byte) numpoints#2 ← phi( findcol::@7/(byte) numpoints#3 )
  (byte) findcol::i#4 ← phi( findcol::@7/(byte) findcol::i#5 )
  (byte) findcol::diff#7 ← phi( findcol::@7/(byte) findcol::diff#6 )
  (byte) findcol::mindiff#1 ← (byte) findcol::diff#7
  (byte) findcol::mincol#1 ← *((byte[]) COLS#0 + (byte) findcol::i#4)
  to:findcol::@8
findcol::@17: scope:[findcol]  from findcol::@8
  (byte) findcol::mincol#2 ← phi( findcol::@8/(byte) findcol::mincol#3 )
  (byte) findcol::return#3 ← (byte) findcol::mincol#2
  to:findcol::@return
@5: scope:[]  from @begin
  (byte) numpoints#24 ← phi( @begin/(byte) numpoints#0 )
  (byte*) COLORS#7 ← phi( @begin/(byte*) COLORS#0 )
  (byte) FILL#4 ← phi( @begin/(byte) FILL#0 )
  (byte*) SCREEN#4 ← phi( @begin/(byte*) SCREEN#0 )
  call main 
  to:@6
@6: scope:[]  from @5
  to:@end
@end: scope:[]  from @6

SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @begin
(label) @end
(byte*) COLORS
(byte*) COLORS#0
(byte*) COLORS#1
(byte*) COLORS#2
(byte*) COLORS#3
(byte*) COLORS#4
(byte*) COLORS#5
(byte*) COLORS#6
(byte*) COLORS#7
(byte[]) COLS
(byte[]) COLS#0
(byte) FILL
(byte) FILL#0
(byte) FILL#1
(byte) FILL#2
(byte) FILL#3
(byte) FILL#4
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) SCREEN#1
(byte*) SCREEN#2
(byte*) SCREEN#3
(byte*) SCREEN#4
(byte[]) XPOS
(byte[]) XPOS#0
(byte[]) YPOS
(byte[]) YPOS#0
(void()) animate()
(byte/signed word/word/dword/signed dword~) animate::$0
(bool~) animate::$1
(bool~) animate::$10
(bool~) animate::$11
(byte/signed word/word/dword/signed dword~) animate::$12
(bool~) animate::$13
(bool~) animate::$14
(byte/signed word/word/dword/signed dword~) animate::$15
(bool~) animate::$16
(bool~) animate::$17
(byte/signed word/word/dword/signed dword~) animate::$18
(bool~) animate::$2
(byte/signed word/word/dword/signed dword~) animate::$3
(bool~) animate::$4
(bool~) animate::$5
(byte/signed word/word/dword/signed dword~) animate::$6
(bool~) animate::$7
(bool~) animate::$8
(byte/signed word/word/dword/signed dword~) animate::$9
(label) animate::@1
(label) animate::@10
(label) animate::@11
(label) animate::@12
(label) animate::@2
(label) animate::@3
(label) animate::@4
(label) animate::@5
(label) animate::@6
(label) animate::@7
(label) animate::@8
(label) animate::@9
(label) animate::@return
(byte()) findcol((byte) findcol::x , (byte) findcol::y)
(bool~) findcol::$0
(bool~) findcol::$1
(byte~) findcol::$10
(byte~) findcol::$11
(bool~) findcol::$12
(bool~) findcol::$13
(bool~) findcol::$14
(bool~) findcol::$2
(bool~) findcol::$3
(bool~) findcol::$4
(byte~) findcol::$5
(byte~) findcol::$6
(bool~) findcol::$7
(byte~) findcol::$8
(byte~) findcol::$9
(label) findcol::@1
(label) findcol::@10
(label) findcol::@12
(label) findcol::@14
(label) findcol::@16
(label) findcol::@17
(label) findcol::@2
(label) findcol::@3
(label) findcol::@4
(label) findcol::@5
(label) findcol::@6
(label) findcol::@7
(label) findcol::@8
(label) findcol::@9
(label) findcol::@return
(byte) findcol::diff
(byte) findcol::diff#0
(byte) findcol::diff#1
(byte) findcol::diff#2
(byte) findcol::diff#3
(byte) findcol::diff#4
(byte) findcol::diff#5
(byte) findcol::diff#6
(byte) findcol::diff#7
(byte) findcol::diff#8
(byte) findcol::i
(byte) findcol::i#0
(byte) findcol::i#1
(byte) findcol::i#10
(byte) findcol::i#11
(byte) findcol::i#12
(byte) findcol::i#13
(byte) findcol::i#2
(byte) findcol::i#3
(byte) findcol::i#4
(byte) findcol::i#5
(byte) findcol::i#6
(byte) findcol::i#7
(byte) findcol::i#8
(byte) findcol::i#9
(byte) findcol::mincol
(byte) findcol::mincol#0
(byte) findcol::mincol#1
(byte) findcol::mincol#10
(byte) findcol::mincol#11
(byte) findcol::mincol#12
(byte) findcol::mincol#13
(byte) findcol::mincol#2
(byte) findcol::mincol#3
(byte) findcol::mincol#4
(byte) findcol::mincol#5
(byte) findcol::mincol#6
(byte) findcol::mincol#7
(byte) findcol::mincol#8
(byte) findcol::mincol#9
(byte) findcol::mindiff
(byte) findcol::mindiff#0
(byte) findcol::mindiff#1
(byte) findcol::mindiff#10
(byte) findcol::mindiff#11
(byte) findcol::mindiff#12
(byte) findcol::mindiff#2
(byte) findcol::mindiff#3
(byte) findcol::mindiff#4
(byte) findcol::mindiff#5
(byte) findcol::mindiff#6
(byte) findcol::mindiff#7
(byte) findcol::mindiff#8
(byte) findcol::mindiff#9
(byte) findcol::return
(byte) findcol::return#0
(byte) findcol::return#1
(byte) findcol::return#2
(byte) findcol::return#3
(byte) findcol::return#4
(byte) findcol::return#5
(byte) findcol::x
(byte) findcol::x#0
(byte) findcol::x#1
(byte) findcol::x#10
(byte) findcol::x#11
(byte) findcol::x#12
(byte) findcol::x#13
(byte) findcol::x#2
(byte) findcol::x#3
(byte) findcol::x#4
(byte) findcol::x#5
(byte) findcol::x#6
(byte) findcol::x#7
(byte) findcol::x#8
(byte) findcol::x#9
(byte) findcol::xp
(byte) findcol::xp#0
(byte) findcol::xp#1
(byte) findcol::xp#2
(byte) findcol::xp#3
(byte) findcol::xp#4
(byte) findcol::xp#5
(byte) findcol::y
(byte) findcol::y#0
(byte) findcol::y#1
(byte) findcol::y#10
(byte) findcol::y#11
(byte) findcol::y#12
(byte) findcol::y#13
(byte) findcol::y#2
(byte) findcol::y#3
(byte) findcol::y#4
(byte) findcol::y#5
(byte) findcol::y#6
(byte) findcol::y#7
(byte) findcol::y#8
(byte) findcol::y#9
(byte) findcol::yp
(byte) findcol::yp#0
(byte) findcol::yp#1
(byte) findcol::yp#2
(byte) findcol::yp#3
(byte) findcol::yp#4
(byte) findcol::yp#5
(byte) findcol::yp#6
(byte) findcol::yp#7
(byte) findcol::yp#8
(void()) initscreen()
(byte*~) initscreen::$0
(bool~) initscreen::$1
(label) initscreen::@1
(label) initscreen::@return
(byte*) initscreen::screen
(byte*) initscreen::screen#0
(byte*) initscreen::screen#1
(byte*) initscreen::screen#2
(void()) main()
(label) main::@1
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@return
(byte) numpoints
(byte) numpoints#0
(byte) numpoints#1
(byte) numpoints#10
(byte) numpoints#11
(byte) numpoints#12
(byte) numpoints#13
(byte) numpoints#14
(byte) numpoints#15
(byte) numpoints#16
(byte) numpoints#17
(byte) numpoints#18
(byte) numpoints#19
(byte) numpoints#2
(byte) numpoints#20
(byte) numpoints#21
(byte) numpoints#22
(byte) numpoints#23
(byte) numpoints#24
(byte) numpoints#3
(byte) numpoints#4
(byte) numpoints#5
(byte) numpoints#6
(byte) numpoints#7
(byte) numpoints#8
(byte) numpoints#9
(void()) render()
(byte~) render::$0
(bool~) render::$1
(byte*~) render::$2
(bool~) render::$3
(label) render::@1
(label) render::@2
(label) render::@3
(label) render::@5
(label) render::@return
(byte) render::col
(byte) render::col#0
(byte*) render::colline
(byte*) render::colline#0
(byte*) render::colline#1
(byte*) render::colline#2
(byte*) render::colline#3
(byte*) render::colline#4
(byte*) render::colline#5
(byte) render::x
(byte) render::x#0
(byte) render::x#1
(byte) render::x#2
(byte) render::x#3
(byte) render::y
(byte) render::y#0
(byte) render::y#1
(byte) render::y#2
(byte) render::y#3
(byte) render::y#4
(byte) render::y#5

Culled Empty Block (label) animate::@5
Culled Empty Block (label) animate::@6
Culled Empty Block (label) @6
Successful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not [20] (bool~) animate::$2 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) != (byte/signed byte/word/signed word/dword/signed dword) 40 from [19] (bool~) animate::$1 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 40
Inversing boolean not [25] (bool~) animate::$5 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) != (byte/signed byte/word/signed word/dword/signed dword) 25 from [24] (bool~) animate::$4 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 25
Inversing boolean not [31] (bool~) animate::$8 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) != (byte/word/signed word/dword/signed dword) 255 from [30] (bool~) animate::$7 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) == (byte/word/signed word/dword/signed dword) 255
Inversing boolean not [37] (bool~) animate::$11 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) != (byte/signed byte/word/signed word/dword/signed dword) 25 from [36] (bool~) animate::$10 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) == (byte/signed byte/word/signed word/dword/signed dword) 25
Inversing boolean not [43] (bool~) animate::$14 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) != (byte/word/signed word/dword/signed dword) 255 from [42] (bool~) animate::$13 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) == (byte/word/signed word/dword/signed dword) 255
Inversing boolean not [50] (bool~) animate::$17 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) < (byte/signed byte/word/signed word/dword/signed dword) 40 from [49] (bool~) animate::$16 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) >= (byte/signed byte/word/signed word/dword/signed dword) 40
Inversing boolean not [96] (bool~) findcol::$1 ← (byte) findcol::x#1 != (byte) findcol::xp#0 from [95] (bool~) findcol::$0 ← (byte) findcol::x#1 == (byte) findcol::xp#0
Inversing boolean not [103] (bool~) findcol::$3 ← (byte) findcol::y#1 != (byte) findcol::yp#1 from [102] (bool~) findcol::$2 ← (byte) findcol::y#1 == (byte) findcol::yp#1
Inversing boolean not [129] (bool~) findcol::$13 ← (byte) findcol::diff#6 >= (byte) findcol::mindiff#2 from [128] (bool~) findcol::$12 ← (byte) findcol::diff#6 < (byte) findcol::mindiff#2
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) COLORS#3 = (byte*) COLORS#5 
Alias (byte) numpoints#20 = (byte) numpoints#22 
Alias (byte*) COLORS#2 = (byte*) COLORS#6 (byte*) COLORS#4 
Alias (byte) numpoints#19 = (byte) numpoints#23 (byte) numpoints#21 
Alias (byte) findcol::return#0 = (byte) findcol::return#4 
Alias (byte*) render::colline#2 = (byte*) render::colline#4 (byte*) render::colline#3 
Alias (byte) render::x#2 = (byte) render::x#3 
Alias (byte) render::y#2 = (byte) render::y#5 (byte) render::y#3 
Alias (byte) numpoints#14 = (byte) numpoints#16 (byte) numpoints#18 
Alias (byte) render::col#0 = (byte~) render::$0 
Alias (byte*) render::colline#1 = (byte*~) render::$2 
Alias (byte) findcol::y#1 = (byte) findcol::y#5 (byte) findcol::y#11 
Alias (byte) findcol::yp#0 = (byte) findcol::yp#1 (byte) findcol::yp#8 
Alias (byte) findcol::x#1 = (byte) findcol::x#8 (byte) findcol::x#7 
Alias (byte) findcol::xp#0 = (byte) findcol::xp#5 (byte) findcol::xp#4 
Alias (byte) findcol::mindiff#10 = (byte) findcol::mindiff#12 (byte) findcol::mindiff#9 
Alias (byte) findcol::i#12 = (byte) findcol::i#13 (byte) findcol::i#2 
Alias (byte) numpoints#10 = (byte) numpoints#13 (byte) numpoints#11 
Alias (byte) findcol::mincol#11 = (byte) findcol::mincol#13 (byte) findcol::mincol#12 
Alias (byte) findcol::return#2 = (byte) findcol::return#5 
Alias (byte) findcol::xp#1 = (byte) findcol::xp#2 (byte) findcol::xp#3 
Alias (byte) findcol::x#2 = (byte) findcol::x#3 (byte) findcol::x#4 
Alias (byte) findcol::y#10 = (byte) findcol::y#7 (byte) findcol::y#6 
Alias (byte) findcol::yp#5 = (byte) findcol::yp#6 (byte) findcol::yp#7 
Alias (byte) findcol::mindiff#6 = (byte) findcol::mindiff#7 (byte) findcol::mindiff#8 
Alias (byte) findcol::i#10 = (byte) findcol::i#11 (byte) findcol::i#9 
Alias (byte) numpoints#7 = (byte) numpoints#8 (byte) numpoints#9 
Alias (byte) findcol::mincol#10 = (byte) findcol::mincol#9 (byte) findcol::mincol#8 
Alias (byte) findcol::diff#0 = (byte~) findcol::$6 
Alias (byte) findcol::diff#1 = (byte~) findcol::$5 
Alias (byte) findcol::yp#2 = (byte) findcol::yp#3 (byte) findcol::yp#4 
Alias (byte) findcol::y#2 = (byte) findcol::y#3 (byte) findcol::y#4 
Alias (byte) findcol::diff#4 = (byte) findcol::diff#8 (byte) findcol::diff#5 
Alias (byte) findcol::mindiff#3 = (byte) findcol::mindiff#4 (byte) findcol::mindiff#5 
Alias (byte) findcol::i#6 = (byte) findcol::i#7 (byte) findcol::i#8 
Alias (byte) numpoints#4 = (byte) numpoints#5 (byte) numpoints#6 
Alias (byte) findcol::x#11 = (byte) findcol::x#12 (byte) findcol::x#13 
Alias (byte) findcol::mincol#5 = (byte) findcol::mincol#6 (byte) findcol::mincol#7 
Alias (byte) findcol::diff#2 = (byte~) findcol::$11 
Alias (byte) findcol::diff#3 = (byte~) findcol::$9 
Alias (byte) findcol::diff#6 = (byte) findcol::diff#7 (byte) findcol::mindiff#1 
Alias (byte) findcol::i#4 = (byte) findcol::i#5 
Alias (byte) numpoints#2 = (byte) numpoints#3 
Alias (byte) findcol::x#10 = (byte) findcol::x#9 
Alias (byte) findcol::y#12 = (byte) findcol::y#13 
Alias (byte) findcol::mincol#2 = (byte) findcol::mincol#3 (byte) findcol::return#3 
Alias (byte*) SCREEN#0 = (byte*) SCREEN#4 
Alias (byte) FILL#0 = (byte) FILL#4 
Alias (byte*) COLORS#0 = (byte*) COLORS#7 
Alias (byte) numpoints#0 = (byte) numpoints#24 
Successful SSA optimization Pass2AliasElimination
Alias (byte) findcol::x#1 = (byte) findcol::x#2 (byte) findcol::x#11 (byte) findcol::x#10 (byte) findcol::x#6 
Alias (byte) findcol::xp#0 = (byte) findcol::xp#1 
Alias (byte) findcol::y#1 = (byte) findcol::y#10 (byte) findcol::y#2 (byte) findcol::y#12 (byte) findcol::y#9 
Alias (byte) findcol::yp#0 = (byte) findcol::yp#5 (byte) findcol::yp#2 
Alias (byte) findcol::mindiff#10 = (byte) findcol::mindiff#6 (byte) findcol::mindiff#3 (byte) findcol::mindiff#2 
Alias (byte) findcol::i#10 = (byte) findcol::i#12 (byte) findcol::i#6 (byte) findcol::i#4 (byte) findcol::i#3 
Alias (byte) numpoints#1 = (byte) numpoints#7 (byte) numpoints#10 (byte) numpoints#4 (byte) numpoints#2 
Alias (byte) findcol::mincol#10 = (byte) findcol::mincol#11 (byte) findcol::mincol#5 (byte) findcol::mincol#4 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) COLORS#2
Self Phi Eliminated (byte) numpoints#19
Self Phi Eliminated (byte) FILL#1
Self Phi Eliminated (byte*) SCREEN#2
Self Phi Eliminated (byte) render::y#2
Self Phi Eliminated (byte*) render::colline#2
Self Phi Eliminated (byte) numpoints#14
Self Phi Eliminated (byte) findcol::x#1
Self Phi Eliminated (byte) findcol::y#1
Self Phi Eliminated (byte) numpoints#1
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#0
Redundant Phi (byte) FILL#3 (byte) FILL#0
Redundant Phi (byte*) COLORS#3 (byte*) COLORS#0
Redundant Phi (byte) numpoints#20 (byte) numpoints#0
Redundant Phi (byte*) COLORS#2 (byte*) COLORS#3
Redundant Phi (byte) numpoints#19 (byte) numpoints#20
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#3
Redundant Phi (byte) FILL#2 (byte) FILL#3
Redundant Phi (byte) FILL#1 (byte) FILL#2
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#1
Redundant Phi (byte*) COLORS#1 (byte*) COLORS#2
Redundant Phi (byte) numpoints#17 (byte) numpoints#19
Redundant Phi (byte) render::y#2 (byte) render::y#4
Redundant Phi (byte*) render::colline#2 (byte*) render::colline#5
Redundant Phi (byte) numpoints#14 (byte) numpoints#15
Redundant Phi (byte) findcol::x#5 (byte) findcol::x#0
Redundant Phi (byte) findcol::y#8 (byte) findcol::y#0
Redundant Phi (byte) numpoints#12 (byte) numpoints#14
Redundant Phi (byte) findcol::x#1 (byte) findcol::x#5
Redundant Phi (byte) findcol::y#1 (byte) findcol::y#8
Redundant Phi (byte) numpoints#1 (byte) numpoints#12
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) animate::$2 [21] if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1
Simple Condition (bool~) animate::$5 [26] if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2
Simple Condition (bool~) animate::$8 [32] if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3
Simple Condition (bool~) animate::$11 [38] if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4
Simple Condition (bool~) animate::$14 [44] if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return
Simple Condition (bool~) animate::$17 [51] if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return
Simple Condition (bool~) initscreen::$1 [62] if((byte*) initscreen::screen#1<(byte*~) initscreen::$0) goto initscreen::@1
Simple Condition (bool~) render::$1 [80] if((byte) render::x#1!=rangelast(0,39)) goto render::@2
Simple Condition (bool~) render::$3 [86] if((byte) render::y#1!=rangelast(0,24)) goto render::@1
Simple Condition (bool~) findcol::$1 [97] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2
Simple Condition (bool~) findcol::$4 [100] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4
Simple Condition (bool~) findcol::$3 [104] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@3
Simple Condition (bool~) findcol::$7 [118] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6
Simple Condition (bool~) findcol::$13 [130] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@8
Simple Condition (bool~) findcol::$14 [134] if((byte) findcol::i#1<(byte) numpoints#15) goto findcol::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte*) COLORS#0 = ((byte*))55296
Constant (const byte) FILL#0 = 230
Constant (const byte) numpoints#0 = 6
Constant (const byte[]) XPOS#0 = { 5, 15, 6, 34, 21, 31 }
Constant (const byte[]) YPOS#0 = { 5, 8, 14, 2, 17, 22 }
Constant (const byte[]) COLS#0 = { 1, 2, 3, 4, 5, 7 }
Constant (const byte) render::y#0 = 0
Constant (const byte) render::x#0 = 0
Constant (const byte) findcol::mindiff#0 = 255
Constant (const byte) findcol::mincol#0 = 0
Constant (const byte) findcol::i#0 = 0
Constant (const byte) findcol::return#1 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) initscreen::screen#0 = SCREEN#0
Constant (const byte*) initscreen::$0 = SCREEN#0+1000
Constant (const byte*) render::colline#0 = COLORS#0
Successful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in *(XPOS#0+0)
Consolidated array index constant in *(XPOS#0+0)
Consolidated array index constant in *(XPOS#0+0)
Consolidated array index constant in *(YPOS#0+0)
Consolidated array index constant in *(YPOS#0+0)
Consolidated array index constant in *(YPOS#0+0)
Consolidated array index constant in *(XPOS#0+0)
Consolidated array index constant in *(XPOS#0+1)
Consolidated array index constant in *(XPOS#0+1)
Consolidated array index constant in *(XPOS#0+1)
Consolidated array index constant in *(YPOS#0+0)
Consolidated array index constant in *(YPOS#0+2)
Consolidated array index constant in *(YPOS#0+2)
Consolidated array index constant in *(YPOS#0+2)
Consolidated array index constant in *(XPOS#0+1)
Consolidated array index constant in *(YPOS#0+3)
Consolidated array index constant in *(YPOS#0+3)
Consolidated array index constant in *(YPOS#0+3)
Consolidated array index constant in *(YPOS#0+2)
Consolidated array index constant in *(YPOS#0+3)
Consolidated array index constant in *(XPOS#0+3)
Consolidated array index constant in *(XPOS#0+3)
Consolidated array index constant in *(XPOS#0+3)
Consolidated array index constant in *(XPOS#0+3)
Consolidated array index constant in *(XPOS#0+3)
Successful SSA optimization Pass2ConstantAdditionElimination
if() condition always true - replacing block destination [3] if(true) goto main::@1
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Resolved ranged next value render::x#1 ← ++ render::x#2 to ++
Resolved ranged comparison value if(render::x#1!=rangelast(0,39)) goto render::@2 to (byte/signed byte/word/signed word/dword/signed dword) 40
Resolved ranged next value render::y#1 ← ++ render::y#4 to ++
Resolved ranged comparison value if(render::y#1!=rangelast(0,24)) goto render::@1 to (byte/signed byte/word/signed word/dword/signed dword) 25
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@5
Culled Empty Block (label) findcol::@3
Culled Empty Block (label) findcol::@10
Culled Empty Block (label) findcol::@17
Successful SSA optimization Pass2CullEmptyBlocks
Self Phi Eliminated (byte) numpoints#15
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte) numpoints#15 (const byte) numpoints#0
Successful SSA optimization Pass2RedundantPhiElimination
Inlining constant with var siblings (const byte*) initscreen::screen#0
Inlining constant with var siblings (const byte) render::y#0
Inlining constant with var siblings (const byte) render::x#0
Inlining constant with var siblings (const byte*) render::colline#0
Inlining constant with var siblings (const byte) findcol::mindiff#0
Inlining constant with var siblings (const byte) findcol::mincol#0
Inlining constant with var siblings (const byte) findcol::i#0
Inlining constant with var siblings (const byte) findcol::return#1
Constant inlined findcol::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined render::colline#0 = (const byte*) COLORS#0
Constant inlined render::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined initscreen::screen#0 = (const byte*) SCREEN#0
Constant inlined findcol::return#1 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined render::y#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined findcol::mincol#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined findcol::mindiff#0 = (byte/word/signed word/dword/signed dword) 255
Constant inlined initscreen::$0 = (const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000
Successful SSA optimization Pass2ConstantInlining
Simplifying constant plus zero XPOS#0+0
Simplifying constant plus zero XPOS#0+0
Simplifying constant plus zero XPOS#0+0
Simplifying constant plus zero YPOS#0+0
Simplifying constant plus zero YPOS#0+0
Simplifying constant plus zero YPOS#0+0
Simplifying constant plus zero XPOS#0+0
Simplifying constant plus zero YPOS#0+0
Added new block during phi lifting render::@6(between render::@3 and render::@1)
Added new block during phi lifting render::@7(between render::@5 and render::@2)
Added new block during phi lifting findcol::@19(between findcol::@8 and findcol::@1)
Added new block during phi lifting findcol::@20(between findcol::@8 and findcol::@return)
Added new block during phi lifting findcol::@21(between findcol::@7 and findcol::@8)
Added new block during phi lifting initscreen::@3(between initscreen::@1 and initscreen::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of render
Adding NOP phi() at start of findcol
Adding NOP phi() at start of initscreen
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to initscreen:5 render:7 animate:9 
Calls in [render] to findcol:41 

Created 12 initial phi equivalence classes
Coalesced [51] render::y#6 ← render::y#1
Coalesced [52] render::colline#6 ← render::colline#1
Coalesced [53] render::x#4 ← render::x#1
Coalesced [64] findcol::diff#9 ← findcol::diff#1
Coalesced [69] findcol::diff#11 ← findcol::diff#3
Coalesced [73] findcol::mincol#15 ← findcol::mincol#1
Coalesced [74] findcol::mindiff#14 ← findcol::diff#6
Coalesced [78] findcol::return#6 ← findcol::mincol#2
Coalesced [79] findcol::i#14 ← findcol::i#1
Not coalescing [80] findcol::mindiff#13 ← findcol::mindiff#11
Coalesced [81] findcol::mincol#14 ← findcol::mincol#2
Coalesced (already) [82] findcol::mincol#16 ← findcol::mincol#10
Not coalescing [83] findcol::mindiff#15 ← findcol::mindiff#10
Coalesced [86] findcol::diff#12 ← findcol::diff#2
Coalesced [88] findcol::diff#10 ← findcol::diff#0
Coalesced [95] initscreen::screen#3 ← initscreen::screen#1
Coalesced down to 9 phi equivalence classes
Culled Empty Block (label) render::@6
Culled Empty Block (label) render::@7
Culled Empty Block (label) findcol::@20
Culled Empty Block (label) initscreen::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of render
Adding NOP phi() at start of findcol
Adding NOP phi() at start of initscreen

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@5
@5: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @5
  [3] phi()
main: scope:[main]  from @5
  [4] phi()
  [5] call initscreen 
  to:main::@1
main::@1: scope:[main]  from main main::@4
  [6] phi()
  [7] call render 
  to:main::@4
main::@4: scope:[main]  from main::@1
  [8] phi()
  [9] call animate 
  to:main::@1
animate: scope:[animate]  from main::@4
  [10] (byte/signed word/word/dword/signed dword~) animate::$0 ← *((const byte[]) XPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1
  [11] *((const byte[]) XPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$0
  [12] if(*((const byte[]) XPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1
  to:animate::@7
animate::@7: scope:[animate]  from animate
  [13] *((const byte[]) XPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:animate::@1
animate::@1: scope:[animate]  from animate animate::@7
  [14] (byte/signed word/word/dword/signed dword~) animate::$3 ← *((const byte[]) YPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1
  [15] *((const byte[]) YPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$3
  [16] if(*((const byte[]) YPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2
  to:animate::@8
animate::@8: scope:[animate]  from animate::@1
  [17] *((const byte[]) YPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:animate::@2
animate::@2: scope:[animate]  from animate::@1 animate::@8
  [18] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1
  [19] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6
  [20] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3
  to:animate::@9
animate::@9: scope:[animate]  from animate::@2
  [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 40
  to:animate::@3
animate::@3: scope:[animate]  from animate::@2 animate::@9
  [22] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1
  [23] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9
  [24] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4
  to:animate::@10
animate::@10: scope:[animate]  from animate::@3
  [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:animate::@4
animate::@4: scope:[animate]  from animate::@10 animate::@3
  [26] (byte/signed word/word/dword/signed dword~) animate::$12 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 1
  [27] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$12
  [28] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return
  to:animate::@11
animate::@11: scope:[animate]  from animate::@4
  [29] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed byte/word/signed word/dword/signed dword) 25
  [30] (byte/signed word/word/dword/signed dword~) animate::$15 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + (byte/signed byte/word/signed word/dword/signed dword) 7
  [31] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$15
  [32] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return
  to:animate::@12
animate::@12: scope:[animate]  from animate::@11
  [33] (byte/signed word/word/dword/signed dword~) animate::$18 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 40
  [34] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$18
  to:animate::@return
animate::@return: scope:[animate]  from animate::@11 animate::@12 animate::@4
  [35] return 
  to:@return
render: scope:[render]  from main::@1
  [36] phi()
  to:render::@1
render::@1: scope:[render]  from render render::@3
  [37] (byte*) render::colline#5 ← phi( render/(const byte*) COLORS#0 render::@3/(byte*) render::colline#1 )
  [37] (byte) render::y#4 ← phi( render/(byte/signed byte/word/signed word/dword/signed dword) 0 render::@3/(byte) render::y#1 )
  to:render::@2
render::@2: scope:[render]  from render::@1 render::@5
  [38] (byte) render::x#2 ← phi( render::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 render::@5/(byte) render::x#1 )
  [39] (byte) findcol::x#0 ← (byte) render::x#2
  [40] (byte) findcol::y#0 ← (byte) render::y#4
  [41] call findcol 
  [42] (byte) findcol::return#0 ← (byte) findcol::return#2
  to:render::@5
render::@5: scope:[render]  from render::@2
  [43] (byte) render::col#0 ← (byte) findcol::return#0
  [44] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0
  [45] (byte) render::x#1 ← ++ (byte) render::x#2
  [46] if((byte) render::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render::@2
  to:render::@3
render::@3: scope:[render]  from render::@5
  [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte/signed byte/word/signed word/dword/signed dword) 40
  [48] (byte) render::y#1 ← ++ (byte) render::y#4
  [49] if((byte) render::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto render::@1
  to:render::@return
render::@return: scope:[render]  from render::@3
  [50] return 
  to:@return
findcol: scope:[findcol]  from render::@2
  [51] phi()
  to:findcol::@1
findcol::@1: scope:[findcol]  from findcol findcol::@19
  [52] (byte) findcol::mincol#10 ← phi( findcol/(byte/signed byte/word/signed word/dword/signed dword) 0 findcol::@19/(byte) findcol::mincol#2 )
  [52] (byte) findcol::mindiff#10 ← phi( findcol/(byte/word/signed word/dword/signed dword) 255 findcol::@19/(byte~) findcol::mindiff#13 )
  [52] (byte) findcol::i#10 ← phi( findcol/(byte/signed byte/word/signed word/dword/signed dword) 0 findcol::@19/(byte) findcol::i#1 )
  [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#10)
  [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#10)
  [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2
  to:findcol::@9
findcol::@9: scope:[findcol]  from findcol::@1
  [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@2
  to:findcol::@return
findcol::@return: scope:[findcol]  from findcol::@8 findcol::@9
  [57] (byte) findcol::return#2 ← phi( findcol::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 findcol::@8/(byte) findcol::mincol#2 )
  [58] return 
  to:@return
findcol::@2: scope:[findcol]  from findcol::@1 findcol::@9
  [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4
  to:findcol::@12
findcol::@12: scope:[findcol]  from findcol::@2
  [60] (byte) findcol::diff#1 ← (byte) findcol::x#0 - (byte) findcol::xp#0
  to:findcol::@5
findcol::@5: scope:[findcol]  from findcol::@12 findcol::@4
  [61] (byte) findcol::diff#4 ← phi( findcol::@12/(byte) findcol::diff#1 findcol::@4/(byte) findcol::diff#0 )
  [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6
  to:findcol::@14
findcol::@14: scope:[findcol]  from findcol::@5
  [63] (byte~) findcol::$8 ← (byte) findcol::y#0 - (byte) findcol::yp#0
  [64] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$8
  to:findcol::@7
findcol::@7: scope:[findcol]  from findcol::@14 findcol::@6
  [65] (byte) findcol::diff#6 ← phi( findcol::@14/(byte) findcol::diff#3 findcol::@6/(byte) findcol::diff#2 )
  [66] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@21
  to:findcol::@16
findcol::@16: scope:[findcol]  from findcol::@7
  [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#10)
  to:findcol::@8
findcol::@8: scope:[findcol]  from findcol::@16 findcol::@21
  [68] (byte) findcol::mindiff#11 ← phi( findcol::@16/(byte) findcol::diff#6 findcol::@21/(byte~) findcol::mindiff#15 )
  [68] (byte) findcol::mincol#2 ← phi( findcol::@16/(byte) findcol::mincol#1 findcol::@21/(byte) findcol::mincol#10 )
  [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#10
  [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@19
  to:findcol::@return
findcol::@19: scope:[findcol]  from findcol::@8
  [71] (byte~) findcol::mindiff#13 ← (byte) findcol::mindiff#11
  to:findcol::@1
findcol::@21: scope:[findcol]  from findcol::@7
  [72] (byte~) findcol::mindiff#15 ← (byte) findcol::mindiff#10
  to:findcol::@8
findcol::@6: scope:[findcol]  from findcol::@5
  [73] (byte~) findcol::$10 ← (byte) findcol::yp#0 - (byte) findcol::y#0
  [74] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$10
  to:findcol::@7
findcol::@4: scope:[findcol]  from findcol::@2
  [75] (byte) findcol::diff#0 ← (byte) findcol::xp#0 - (byte) findcol::x#0
  to:findcol::@5
initscreen: scope:[initscreen]  from main
  [76] phi()
  to:initscreen::@1
initscreen::@1: scope:[initscreen]  from initscreen initscreen::@1
  [77] (byte*) initscreen::screen#2 ← phi( initscreen/(const byte*) SCREEN#0 initscreen::@1/(byte*) initscreen::screen#1 )
  [78] *((byte*) initscreen::screen#2) ← (const byte) FILL#0
  [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#2
  [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto initscreen::@1
  to:initscreen::@return
initscreen::@return: scope:[initscreen]  from initscreen::@1
  [81] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) COLORS
(byte[]) COLS
(byte) FILL
(byte*) SCREEN
(byte[]) XPOS
(byte[]) YPOS
(void()) animate()
(byte/signed word/word/dword/signed dword~) animate::$0 4.0
(byte/signed word/word/dword/signed dword~) animate::$12 4.0
(byte/signed word/word/dword/signed dword~) animate::$15 4.0
(byte/signed word/word/dword/signed dword~) animate::$18 4.0
(byte/signed word/word/dword/signed dword~) animate::$3 4.0
(byte/signed word/word/dword/signed dword~) animate::$6 4.0
(byte/signed word/word/dword/signed dword~) animate::$9 4.0
(byte()) findcol((byte) findcol::x , (byte) findcol::y)
(byte~) findcol::$10 20002.0
(byte~) findcol::$8 20002.0
(byte) findcol::diff
(byte) findcol::diff#0 20002.0
(byte) findcol::diff#1 20002.0
(byte) findcol::diff#2 20002.0
(byte) findcol::diff#3 20002.0
(byte) findcol::diff#4 10001.0
(byte) findcol::diff#6 13334.666666666666
(byte) findcol::i
(byte) findcol::i#1 10001.0
(byte) findcol::i#10 2631.842105263158
(byte) findcol::mincol
(byte) findcol::mincol#1 20002.0
(byte) findcol::mincol#10 1176.5882352941176
(byte) findcol::mincol#2 10001.0
(byte) findcol::mindiff
(byte) findcol::mindiff#10 1875.1875
(byte) findcol::mindiff#11 10001.0
(byte~) findcol::mindiff#13 20002.0
(byte~) findcol::mindiff#15 20002.0
(byte) findcol::return
(byte) findcol::return#0 2002.0
(byte) findcol::return#2 3667.333333333333
(byte) findcol::x
(byte) findcol::x#0 1640.2
(byte) findcol::xp
(byte) findcol::xp#0 10001.0
(byte) findcol::y
(byte) findcol::y#0 1708.5416666666665
(byte) findcol::yp
(byte) findcol::yp#0 6250.625
(void()) initscreen()
(byte*) initscreen::screen
(byte*) initscreen::screen#1 16.5
(byte*) initscreen::screen#2 16.5
(void()) main()
(byte) numpoints
(void()) render()
(byte) render::col
(byte) render::col#0 2002.0
(byte*) render::colline
(byte*) render::colline#1 67.33333333333333
(byte*) render::colline#5 120.29999999999998
(byte) render::x
(byte) render::x#1 1501.5
(byte) render::x#2 572.0
(byte) render::y
(byte) render::y#1 151.5
(byte) render::y#4 109.36363636363637

Initial phi equivalence classes
[ render::y#4 render::y#1 ]
[ render::colline#5 render::colline#1 ]
[ render::x#2 render::x#1 ]
[ findcol::i#10 findcol::i#1 ]
[ findcol::mindiff#10 findcol::mindiff#13 ]
[ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ]
[ findcol::diff#4 findcol::diff#1 findcol::diff#0 ]
[ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ]
[ initscreen::screen#2 initscreen::screen#1 ]
Added variable animate::$0 to zero page equivalence class [ animate::$0 ]
Added variable animate::$3 to zero page equivalence class [ animate::$3 ]
Added variable animate::$6 to zero page equivalence class [ animate::$6 ]
Added variable animate::$9 to zero page equivalence class [ animate::$9 ]
Added variable animate::$12 to zero page equivalence class [ animate::$12 ]
Added variable animate::$15 to zero page equivalence class [ animate::$15 ]
Added variable animate::$18 to zero page equivalence class [ animate::$18 ]
Added variable findcol::x#0 to zero page equivalence class [ findcol::x#0 ]
Added variable findcol::y#0 to zero page equivalence class [ findcol::y#0 ]
Added variable findcol::return#0 to zero page equivalence class [ findcol::return#0 ]
Added variable render::col#0 to zero page equivalence class [ render::col#0 ]
Added variable findcol::xp#0 to zero page equivalence class [ findcol::xp#0 ]
Added variable findcol::yp#0 to zero page equivalence class [ findcol::yp#0 ]
Added variable findcol::$8 to zero page equivalence class [ findcol::$8 ]
Added variable findcol::$10 to zero page equivalence class [ findcol::$10 ]
Complete equivalence classes
[ render::y#4 render::y#1 ]
[ render::colline#5 render::colline#1 ]
[ render::x#2 render::x#1 ]
[ findcol::i#10 findcol::i#1 ]
[ findcol::mindiff#10 findcol::mindiff#13 ]
[ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ]
[ findcol::diff#4 findcol::diff#1 findcol::diff#0 ]
[ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ]
[ initscreen::screen#2 initscreen::screen#1 ]
[ animate::$0 ]
[ animate::$3 ]
[ animate::$6 ]
[ animate::$9 ]
[ animate::$12 ]
[ animate::$15 ]
[ animate::$18 ]
[ findcol::x#0 ]
[ findcol::y#0 ]
[ findcol::return#0 ]
[ render::col#0 ]
[ findcol::xp#0 ]
[ findcol::yp#0 ]
[ findcol::$8 ]
[ findcol::$10 ]
Allocated zp ZP_BYTE:2 [ render::y#4 render::y#1 ]
Allocated zp ZP_WORD:3 [ render::colline#5 render::colline#1 ]
Allocated zp ZP_BYTE:5 [ render::x#2 render::x#1 ]
Allocated zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ]
Allocated zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ]
Allocated zp ZP_BYTE:8 [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ]
Allocated zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ]
Allocated zp ZP_BYTE:10 [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ]
Allocated zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ]
Allocated zp ZP_BYTE:13 [ animate::$0 ]
Allocated zp ZP_BYTE:14 [ animate::$3 ]
Allocated zp ZP_BYTE:15 [ animate::$6 ]
Allocated zp ZP_BYTE:16 [ animate::$9 ]
Allocated zp ZP_BYTE:17 [ animate::$12 ]
Allocated zp ZP_BYTE:18 [ animate::$15 ]
Allocated zp ZP_BYTE:19 [ animate::$18 ]
Allocated zp ZP_BYTE:20 [ findcol::x#0 ]
Allocated zp ZP_BYTE:21 [ findcol::y#0 ]
Allocated zp ZP_BYTE:22 [ findcol::return#0 ]
Allocated zp ZP_BYTE:23 [ render::col#0 ]
Allocated zp ZP_BYTE:24 [ findcol::xp#0 ]
Allocated zp ZP_BYTE:25 [ findcol::yp#0 ]
Allocated zp ZP_BYTE:26 [ findcol::$8 ]
Allocated zp ZP_BYTE:27 [ findcol::$10 ]

INITIAL ASM
//SEG0 File Comments
// The screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label SCREEN = $400
  .label COLORS = $d800
  .const FILL = $e6
  // The total number of voronoi points
  .const numpoints = 6
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
  jmp b5
//SEG5 @5
b5:
//SEG6 [2] call main 
//SEG7 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
  jsr main
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call initscreen 
  //SEG12 [76] phi from main to initscreen [phi:main->initscreen]
  initscreen_from_main:
    jsr initscreen
  //SEG13 [6] phi from main main::@4 to main::@1 [phi:main/main::@4->main::@1]
  b1_from_main:
  b1_from_b4:
    jmp b1
  //SEG14 main::@1
  b1:
  //SEG15 [7] call render 
  //SEG16 [36] phi from main::@1 to render [phi:main::@1->render]
  render_from_b1:
    jsr render
  //SEG17 [8] phi from main::@1 to main::@4 [phi:main::@1->main::@4]
  b4_from_b1:
    jmp b4
  //SEG18 main::@4
  b4:
  //SEG19 [9] call animate 
    jsr animate
    jmp b1_from_b4
}
//SEG20 animate
animate: {
    .label _0 = $d
    .label _3 = $e
    .label _6 = $f
    .label _9 = $10
    .label _12 = $11
    .label _15 = $12
    .label _18 = $13
  //SEG21 [10] (byte/signed word/word/dword/signed dword~) animate::$0 ← *((const byte[]) XPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=_deref_pbuc1_plus_1 
    ldy XPOS
    iny
    sty _0
  //SEG22 [11] *((const byte[]) XPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$0 -- _deref_pbuc1=vbuz1 
    lda _0
    sta XPOS
  //SEG23 [12] if(*((const byte[]) XPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda XPOS
    cmp #$28
    bne b1
    jmp b7
  //SEG24 animate::@7
  b7:
  //SEG25 [13] *((const byte[]) XPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta XPOS
    jmp b1
  //SEG26 animate::@1
  b1:
  //SEG27 [14] (byte/signed word/word/dword/signed dword~) animate::$3 ← *((const byte[]) YPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=_deref_pbuc1_plus_1 
    ldy YPOS
    iny
    sty _3
  //SEG28 [15] *((const byte[]) YPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$3 -- _deref_pbuc1=vbuz1 
    lda _3
    sta YPOS
  //SEG29 [16] if(*((const byte[]) YPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda YPOS
    cmp #$19
    bne b2
    jmp b8
  //SEG30 animate::@8
  b8:
  //SEG31 [17] *((const byte[]) YPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS
    jmp b2
  //SEG32 animate::@2
  b2:
  //SEG33 [18] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=_deref_pbuc1_minus_1 
    ldx XPOS+1
    dex
    stx _6
  //SEG34 [19] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6 -- _deref_pbuc1=vbuz1 
    lda _6
    sta XPOS+1
  //SEG35 [20] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda XPOS+1
    cmp #$ff
    bne b3
    jmp b9
  //SEG36 animate::@9
  b9:
  //SEG37 [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 40 -- _deref_pbuc1=vbuc2 
    lda #$28
    sta XPOS+1
    jmp b3
  //SEG38 animate::@3
  b3:
  //SEG39 [22] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=_deref_pbuc1_plus_1 
    ldy YPOS+2
    iny
    sty _9
  //SEG40 [23] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9 -- _deref_pbuc1=vbuz1 
    lda _9
    sta YPOS+2
  //SEG41 [24] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda YPOS+2
    cmp #$19
    bne b4
    jmp b10
  //SEG42 animate::@10
  b10:
  //SEG43 [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS+2
    jmp b4
  //SEG44 animate::@4
  b4:
  //SEG45 [26] (byte/signed word/word/dword/signed dword~) animate::$12 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=_deref_pbuc1_minus_1 
    ldx YPOS+3
    dex
    stx _12
  //SEG46 [27] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$12 -- _deref_pbuc1=vbuz1 
    lda _12
    sta YPOS+3
  //SEG47 [28] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda YPOS+3
    cmp #$ff
    bne breturn
    jmp b11
  //SEG48 animate::@11
  b11:
  //SEG49 [29] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed byte/word/signed word/dword/signed dword) 25 -- _deref_pbuc1=vbuc2 
    lda #$19
    sta YPOS+3
  //SEG50 [30] (byte/signed word/word/dword/signed dword~) animate::$15 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=_deref_pbuc1_plus_vbuc2 
    lda XPOS+3
    clc
    adc #7
    sta _15
  //SEG51 [31] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$15 -- _deref_pbuc1=vbuz1 
    lda _15
    sta XPOS+3
  //SEG52 [32] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return -- _deref_pbuc1_lt_vbuc2_then_la1 
    lda XPOS+3
    cmp #$28
    bcc breturn
    jmp b12
  //SEG53 animate::@12
  b12:
  //SEG54 [33] (byte/signed word/word/dword/signed dword~) animate::$18 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 40 -- vbuz1=_deref_pbuc1_minus_vbuc2 
    lda XPOS+3
    sec
    sbc #$28
    sta _18
  //SEG55 [34] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$18 -- _deref_pbuc1=vbuz1 
    lda _18
    sta XPOS+3
    jmp breturn
  //SEG56 animate::@return
  breturn:
  //SEG57 [35] return 
    rts
}
//SEG58 render
render: {
    .label col = $17
    .label x = 5
    .label colline = 3
    .label y = 2
  //SEG59 [37] phi from render to render::@1 [phi:render->render::@1]
  b1_from_render:
  //SEG60 [37] phi (byte*) render::colline#5 = (const byte*) COLORS#0 [phi:render->render::@1#0] -- pbuz1=pbuc1 
    lda #<COLORS
    sta colline
    lda #>COLORS
    sta colline+1
  //SEG61 [37] phi (byte) render::y#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render->render::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b1
  //SEG62 [37] phi from render::@3 to render::@1 [phi:render::@3->render::@1]
  b1_from_b3:
  //SEG63 [37] phi (byte*) render::colline#5 = (byte*) render::colline#1 [phi:render::@3->render::@1#0] -- register_copy 
  //SEG64 [37] phi (byte) render::y#4 = (byte) render::y#1 [phi:render::@3->render::@1#1] -- register_copy 
    jmp b1
  //SEG65 render::@1
  b1:
  //SEG66 [38] phi from render::@1 to render::@2 [phi:render::@1->render::@2]
  b2_from_b1:
  //SEG67 [38] phi (byte) render::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render::@1->render::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta x
    jmp b2
  //SEG68 [38] phi from render::@5 to render::@2 [phi:render::@5->render::@2]
  b2_from_b5:
  //SEG69 [38] phi (byte) render::x#2 = (byte) render::x#1 [phi:render::@5->render::@2#0] -- register_copy 
    jmp b2
  //SEG70 render::@2
  b2:
  //SEG71 [39] (byte) findcol::x#0 ← (byte) render::x#2 -- vbuz1=vbuz2 
    lda x
    sta findcol.x
  //SEG72 [40] (byte) findcol::y#0 ← (byte) render::y#4 -- vbuz1=vbuz2 
    lda y
    sta findcol.y
  //SEG73 [41] call findcol 
  //SEG74 [51] phi from render::@2 to findcol [phi:render::@2->findcol]
  findcol_from_b2:
    jsr findcol
  //SEG75 [42] (byte) findcol::return#0 ← (byte) findcol::return#2 -- vbuz1=vbuz2 
    lda findcol.return_2
    sta findcol.return
    jmp b5
  //SEG76 render::@5
  b5:
  //SEG77 [43] (byte) render::col#0 ← (byte) findcol::return#0 -- vbuz1=vbuz2 
    lda findcol.return
    sta col
  //SEG78 [44] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0 -- pbuz1_derefidx_vbuz2=vbuz3 
    lda col
    ldy x
    sta (colline),y
  //SEG79 [45] (byte) render::x#1 ← ++ (byte) render::x#2 -- vbuz1=_inc_vbuz1 
    inc x
  //SEG80 [46] if((byte) render::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda x
    cmp #$28
    bne b2_from_b5
    jmp b3
  //SEG81 render::@3
  b3:
  //SEG82 [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda colline
    clc
    adc #$28
    sta colline
    bcc !+
    inc colline+1
  !:
  //SEG83 [48] (byte) render::y#1 ← ++ (byte) render::y#4 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG84 [49] if((byte) render::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto render::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #$19
    bne b1_from_b3
    jmp breturn
  //SEG85 render::@return
  breturn:
  //SEG86 [50] return 
    rts
}
//SEG87 findcol
// findcol(byte zeropage($14) x, byte zeropage($15) y)
findcol: {
    .label _8 = $1a
    .label _10 = $1b
    .label x = $14
    .label y = $15
    .label return = $16
    .label xp = $18
    .label yp = $19
    .label return_2 = 8
    .label diff = 9
    .label diff_2 = $a
    .label diff_3 = $a
    .label i = 6
    .label mincol = 8
    .label diff_6 = $a
    .label mindiff = 7
    .label mindiff_11 = $a
    .label mindiff_15 = $a
  //SEG88 [52] phi from findcol to findcol::@1 [phi:findcol->findcol::@1]
  b1_from_findcol:
  //SEG89 [52] phi (byte) findcol::mincol#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol->findcol::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta mincol
  //SEG90 [52] phi (byte) findcol::mindiff#10 = (byte/word/signed word/dword/signed dword) 255 [phi:findcol->findcol::@1#1] -- vbuz1=vbuc1 
    lda #$ff
    sta mindiff
  //SEG91 [52] phi (byte) findcol::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol->findcol::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG92 findcol::@1
  b1:
  //SEG93 [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#10) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda XPOS,y
    sta xp
  //SEG94 [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#10) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda YPOS,y
    sta yp
  //SEG95 [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2 -- vbuz1_neq_vbuz2_then_la1 
    lda x
    cmp xp
    bne b2
    jmp b9
  //SEG96 findcol::@9
  b9:
  //SEG97 [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@2 -- vbuz1_neq_vbuz2_then_la1 
    lda y
    cmp yp
    bne b2
  //SEG98 [57] phi from findcol::@9 to findcol::@return [phi:findcol::@9->findcol::@return]
  breturn_from_b9:
  //SEG99 [57] phi (byte) findcol::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol::@9->findcol::@return#0] -- vbuz1=vbuc1 
    lda #0
    sta return_2
    jmp breturn
  //SEG100 findcol::@return
  breturn:
  //SEG101 [58] return 
    rts
  //SEG102 findcol::@2
  b2:
  //SEG103 [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 -- vbuz1_lt_vbuz2_then_la1 
    lda x
    cmp xp
    bcc b4
    jmp b12
  //SEG104 findcol::@12
  b12:
  //SEG105 [60] (byte) findcol::diff#1 ← (byte) findcol::x#0 - (byte) findcol::xp#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda x
    sec
    sbc xp
    sta diff
  //SEG106 [61] phi from findcol::@12 findcol::@4 to findcol::@5 [phi:findcol::@12/findcol::@4->findcol::@5]
  b5_from_b12:
  b5_from_b4:
  //SEG107 [61] phi (byte) findcol::diff#4 = (byte) findcol::diff#1 [phi:findcol::@12/findcol::@4->findcol::@5#0] -- register_copy 
    jmp b5
  //SEG108 findcol::@5
  b5:
  //SEG109 [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 -- vbuz1_lt_vbuz2_then_la1 
    lda y
    cmp yp
    bcc b6
    jmp b14
  //SEG110 findcol::@14
  b14:
  //SEG111 [63] (byte~) findcol::$8 ← (byte) findcol::y#0 - (byte) findcol::yp#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda y
    sec
    sbc yp
    sta _8
  //SEG112 [64] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$8 -- vbuz1=vbuz2_plus_vbuz3 
    lda diff
    clc
    adc _8
    sta diff_3
  //SEG113 [65] phi from findcol::@14 findcol::@6 to findcol::@7 [phi:findcol::@14/findcol::@6->findcol::@7]
  b7_from_b14:
  b7_from_b6:
  //SEG114 [65] phi (byte) findcol::diff#6 = (byte) findcol::diff#3 [phi:findcol::@14/findcol::@6->findcol::@7#0] -- register_copy 
    jmp b7
  //SEG115 findcol::@7
  b7:
  //SEG116 [66] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@21 -- vbuz1_ge_vbuz2_then_la1 
    lda diff_6
    cmp mindiff
    bcs b21
    jmp b16
  //SEG117 findcol::@16
  b16:
  //SEG118 [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#10) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda COLS,y
    sta mincol
  //SEG119 [68] phi from findcol::@16 findcol::@21 to findcol::@8 [phi:findcol::@16/findcol::@21->findcol::@8]
  b8_from_b16:
  b8_from_b21:
  //SEG120 [68] phi (byte) findcol::mindiff#11 = (byte) findcol::diff#6 [phi:findcol::@16/findcol::@21->findcol::@8#0] -- register_copy 
  //SEG121 [68] phi (byte) findcol::mincol#2 = (byte) findcol::mincol#1 [phi:findcol::@16/findcol::@21->findcol::@8#1] -- register_copy 
    jmp b8
  //SEG122 findcol::@8
  b8:
  //SEG123 [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#10 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG124 [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@19 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #numpoints
    bcc b19
  //SEG125 [57] phi from findcol::@8 to findcol::@return [phi:findcol::@8->findcol::@return]
  breturn_from_b8:
  //SEG126 [57] phi (byte) findcol::return#2 = (byte) findcol::mincol#2 [phi:findcol::@8->findcol::@return#0] -- register_copy 
    jmp breturn
  //SEG127 findcol::@19
  b19:
  //SEG128 [71] (byte~) findcol::mindiff#13 ← (byte) findcol::mindiff#11 -- vbuz1=vbuz2 
    lda mindiff_11
    sta mindiff
  //SEG129 [52] phi from findcol::@19 to findcol::@1 [phi:findcol::@19->findcol::@1]
  b1_from_b19:
  //SEG130 [52] phi (byte) findcol::mincol#10 = (byte) findcol::mincol#2 [phi:findcol::@19->findcol::@1#0] -- register_copy 
  //SEG131 [52] phi (byte) findcol::mindiff#10 = (byte~) findcol::mindiff#13 [phi:findcol::@19->findcol::@1#1] -- register_copy 
  //SEG132 [52] phi (byte) findcol::i#10 = (byte) findcol::i#1 [phi:findcol::@19->findcol::@1#2] -- register_copy 
    jmp b1
  //SEG133 findcol::@21
  b21:
  //SEG134 [72] (byte~) findcol::mindiff#15 ← (byte) findcol::mindiff#10 -- vbuz1=vbuz2 
    lda mindiff
    sta mindiff_15
    jmp b8_from_b21
  //SEG135 findcol::@6
  b6:
  //SEG136 [73] (byte~) findcol::$10 ← (byte) findcol::yp#0 - (byte) findcol::y#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda yp
    sec
    sbc y
    sta _10
  //SEG137 [74] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$10 -- vbuz1=vbuz2_plus_vbuz3 
    lda diff
    clc
    adc _10
    sta diff_2
    jmp b7_from_b6
  //SEG138 findcol::@4
  b4:
  //SEG139 [75] (byte) findcol::diff#0 ← (byte) findcol::xp#0 - (byte) findcol::x#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda xp
    sec
    sbc x
    sta diff
    jmp b5_from_b4
}
//SEG140 initscreen
initscreen: {
    .label screen = $b
  //SEG141 [77] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1]
  b1_from_initscreen:
  //SEG142 [77] phi (byte*) initscreen::screen#2 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta screen
    lda #>SCREEN
    sta screen+1
    jmp b1
  //SEG143 [77] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1]
  b1_from_b1:
  //SEG144 [77] phi (byte*) initscreen::screen#2 = (byte*) initscreen::screen#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy 
    jmp b1
  //SEG145 initscreen::@1
  b1:
  //SEG146 [78] *((byte*) initscreen::screen#2) ← (const byte) FILL#0 -- _deref_pbuz1=vbuc1 
    lda #FILL
    ldy #0
    sta (screen),y
  //SEG147 [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#2 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
  //SEG148 [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto initscreen::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda screen+1
    cmp #>SCREEN+$3e8
    bcc b1_from_b1
    bne !+
    lda screen
    cmp #<SCREEN+$3e8
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG149 initscreen::@return
  breturn:
  //SEG150 [81] return 
    rts
}
  // Points to create the Voronoi from
  XPOS: .byte 5, $f, 6, $22, $15, $1f
  YPOS: .byte 5, 8, $e, 2, $11, $16
  COLS: .byte 1, 2, 3, 4, 5, 7

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [12] if(*((const byte[]) XPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte[]) XPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [16] if(*((const byte[]) YPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte[]) YPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [20] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 40 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [24] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [28] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [29] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [30] (byte/signed word/word/dword/signed dword~) animate::$15 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + (byte/signed byte/word/signed word/dword/signed dword) 7 [ animate::$15 ] ( main:2::animate:9 [ animate::$15 ] ) always clobbers reg byte a 
Statement [32] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [33] (byte/signed word/word/dword/signed dword~) animate::$18 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 40 [ animate::$18 ] ( main:2::animate:9 [ animate::$18 ] ) always clobbers reg byte a 
Statement [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ render::y#4 render::colline#1 ] ( main:2::render:7 [ render::y#4 render::colline#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ render::y#4 render::y#1 ]
Statement [60] (byte) findcol::diff#1 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ render::x#2 render::x#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ findcol::x#0 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ findcol::y#0 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ findcol::yp#0 ]
Statement [63] (byte~) findcol::$8 ← (byte) findcol::y#0 - (byte) findcol::yp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$8 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$8 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ]
Statement [64] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$8 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ) always clobbers reg byte a 
Statement [73] (byte~) findcol::$10 ← (byte) findcol::yp#0 - (byte) findcol::y#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$10 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$10 ] ) always clobbers reg byte a 
Statement [74] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ) always clobbers reg byte a 
Statement [75] (byte) findcol::diff#0 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ) always clobbers reg byte a 
Statement [78] *((byte*) initscreen::screen#2) ← (const byte) FILL#0 [ initscreen::screen#2 ] ( main:2::initscreen:5 [ initscreen::screen#2 ] ) always clobbers reg byte a reg byte y 
Statement [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto initscreen::@1 [ initscreen::screen#1 ] ( main:2::initscreen:5 [ initscreen::screen#1 ] ) always clobbers reg byte a 
Statement [12] if(*((const byte[]) XPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte[]) XPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [16] if(*((const byte[]) YPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte[]) YPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [20] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 40 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [24] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [28] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [29] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [30] (byte/signed word/word/dword/signed dword~) animate::$15 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + (byte/signed byte/word/signed word/dword/signed dword) 7 [ animate::$15 ] ( main:2::animate:9 [ animate::$15 ] ) always clobbers reg byte a 
Statement [32] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [33] (byte/signed word/word/dword/signed dword~) animate::$18 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 40 [ animate::$18 ] ( main:2::animate:9 [ animate::$18 ] ) always clobbers reg byte a 
Statement [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ render::y#4 render::colline#1 ] ( main:2::render:7 [ render::y#4 render::colline#1 ] ) always clobbers reg byte a 
Statement [60] (byte) findcol::diff#1 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ) always clobbers reg byte a 
Statement [63] (byte~) findcol::$8 ← (byte) findcol::y#0 - (byte) findcol::yp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$8 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$8 ] ) always clobbers reg byte a 
Statement [64] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$8 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ) always clobbers reg byte a 
Statement [73] (byte~) findcol::$10 ← (byte) findcol::yp#0 - (byte) findcol::y#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$10 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$10 ] ) always clobbers reg byte a 
Statement [74] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ) always clobbers reg byte a 
Statement [75] (byte) findcol::diff#0 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ) always clobbers reg byte a 
Statement [78] *((byte*) initscreen::screen#2) ← (const byte) FILL#0 [ initscreen::screen#2 ] ( main:2::initscreen:5 [ initscreen::screen#2 ] ) always clobbers reg byte a reg byte y 
Statement [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto initscreen::@1 [ initscreen::screen#1 ] ( main:2::initscreen:5 [ initscreen::screen#1 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ render::y#4 render::y#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] : zp ZP_WORD:3 , 
Potential registers zp ZP_BYTE:5 [ render::x#2 render::x#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] : zp ZP_BYTE:7 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:8 [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] : zp ZP_WORD:11 , 
Potential registers zp ZP_BYTE:13 [ animate::$0 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:14 [ animate::$3 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:15 [ animate::$6 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:16 [ animate::$9 ] : zp ZP_BYTE:16 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:17 [ animate::$12 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:18 [ animate::$15 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:19 [ animate::$18 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ findcol::x#0 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:21 [ findcol::y#0 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:22 [ findcol::return#0 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:23 [ render::col#0 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:24 [ findcol::xp#0 ] : zp ZP_BYTE:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:25 [ findcol::yp#0 ] : zp ZP_BYTE:25 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:26 [ findcol::$8 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:27 [ findcol::$10 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [findcol] 83,341.67: zp ZP_BYTE:10 [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] 50,005: zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] 34,846.92: zp ZP_BYTE:8 [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] 21,877.19: zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] 20,002: zp ZP_BYTE:26 [ findcol::$8 ] 20,002: zp ZP_BYTE:27 [ findcol::$10 ] 12,632.84: zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] 10,001: zp ZP_BYTE:24 [ findcol::xp#0 ] 6,250.62: zp ZP_BYTE:25 [ findcol::yp#0 ] 2,002: zp ZP_BYTE:22 [ findcol::return#0 ] 1,708.54: zp ZP_BYTE:21 [ findcol::y#0 ] 1,640.2: zp ZP_BYTE:20 [ findcol::x#0 ] 
Uplift Scope [render] 2,073.5: zp ZP_BYTE:5 [ render::x#2 render::x#1 ] 2,002: zp ZP_BYTE:23 [ render::col#0 ] 260.86: zp ZP_BYTE:2 [ render::y#4 render::y#1 ] 187.63: zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] 
Uplift Scope [initscreen] 33: zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] 
Uplift Scope [animate] 4: zp ZP_BYTE:13 [ animate::$0 ] 4: zp ZP_BYTE:14 [ animate::$3 ] 4: zp ZP_BYTE:15 [ animate::$6 ] 4: zp ZP_BYTE:16 [ animate::$9 ] 4: zp ZP_BYTE:17 [ animate::$12 ] 4: zp ZP_BYTE:18 [ animate::$15 ] 4: zp ZP_BYTE:19 [ animate::$18 ] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [findcol] best 2033929 combination reg byte y [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] reg byte y [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] reg byte x [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] zp ZP_BYTE:26 [ findcol::$8 ] zp ZP_BYTE:27 [ findcol::$10 ] zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] zp ZP_BYTE:24 [ findcol::xp#0 ] zp ZP_BYTE:25 [ findcol::yp#0 ] zp ZP_BYTE:22 [ findcol::return#0 ] zp ZP_BYTE:21 [ findcol::y#0 ] zp ZP_BYTE:20 [ findcol::x#0 ] 
Limited combination testing to 100 combinations of 2239488 possible.
Uplifting [render] best 2027929 combination zp ZP_BYTE:5 [ render::x#2 render::x#1 ] reg byte a [ render::col#0 ] zp ZP_BYTE:2 [ render::y#4 render::y#1 ] zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] 
Uplifting [initscreen] best 2027929 combination zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] 
Uplifting [animate] best 2027909 combination reg byte x [ animate::$0 ] reg byte x [ animate::$3 ] reg byte a [ animate::$6 ] reg byte a [ animate::$9 ] zp ZP_BYTE:17 [ animate::$12 ] zp ZP_BYTE:18 [ animate::$15 ] zp ZP_BYTE:19 [ animate::$18 ] 
Limited combination testing to 100 combinations of 16384 possible.
Uplifting [main] best 2027909 combination 
Uplifting [] best 2027909 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ]
Uplifting [findcol] best 2027909 combination zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ findcol::$8 ]
Uplifting [findcol] best 2007909 combination reg byte a [ findcol::$8 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ findcol::$10 ]
Uplifting [findcol] best 1987909 combination reg byte a [ findcol::$10 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ]
Uplifting [findcol] best 1987909 combination zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:24 [ findcol::xp#0 ]
Uplifting [findcol] best 1987909 combination zp ZP_BYTE:24 [ findcol::xp#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ findcol::yp#0 ]
Uplifting [findcol] best 1987909 combination zp ZP_BYTE:25 [ findcol::yp#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ render::x#2 render::x#1 ]
Uplifting [render] best 1987909 combination zp ZP_BYTE:5 [ render::x#2 render::x#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:22 [ findcol::return#0 ]
Uplifting [findcol] best 1983909 combination reg byte a [ findcol::return#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ findcol::y#0 ]
Uplifting [findcol] best 1983909 combination zp ZP_BYTE:21 [ findcol::y#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ findcol::x#0 ]
Uplifting [findcol] best 1983909 combination zp ZP_BYTE:20 [ findcol::x#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ render::y#4 render::y#1 ]
Uplifting [render] best 1983909 combination zp ZP_BYTE:2 [ render::y#4 render::y#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:17 [ animate::$12 ]
Uplifting [animate] best 1983903 combination reg byte x [ animate::$12 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ animate::$15 ]
Uplifting [animate] best 1983897 combination reg byte a [ animate::$15 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:19 [ animate::$18 ]
Uplifting [animate] best 1983891 combination reg byte a [ animate::$18 ] 
Coalescing zero page register with common assignment [ zp ZP_BYTE:2 [ render::y#4 render::y#1 ] ] with [ zp ZP_BYTE:21 [ findcol::y#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:5 [ render::x#2 render::x#1 ] ] with [ zp ZP_BYTE:20 [ findcol::x#0 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] ] with [ zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] ]
Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:8 [ findcol::xp#0 ]
Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:9 [ findcol::yp#0 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// The screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label SCREEN = $400
  .label COLORS = $d800
  .const FILL = $e6
  // The total number of voronoi points
  .const numpoints = 6
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
  jmp b5
//SEG5 @5
b5:
//SEG6 [2] call main 
//SEG7 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
  jsr main
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call initscreen 
  //SEG12 [76] phi from main to initscreen [phi:main->initscreen]
  initscreen_from_main:
    jsr initscreen
  //SEG13 [6] phi from main main::@4 to main::@1 [phi:main/main::@4->main::@1]
  b1_from_main:
  b1_from_b4:
    jmp b1
  //SEG14 main::@1
  b1:
  //SEG15 [7] call render 
  //SEG16 [36] phi from main::@1 to render [phi:main::@1->render]
  render_from_b1:
    jsr render
  //SEG17 [8] phi from main::@1 to main::@4 [phi:main::@1->main::@4]
  b4_from_b1:
    jmp b4
  //SEG18 main::@4
  b4:
  //SEG19 [9] call animate 
    jsr animate
    jmp b1_from_b4
}
//SEG20 animate
animate: {
  //SEG21 [10] (byte/signed word/word/dword/signed dword~) animate::$0 ← *((const byte[]) XPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx XPOS
    inx
  //SEG22 [11] *((const byte[]) XPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$0 -- _deref_pbuc1=vbuxx 
    stx XPOS
  //SEG23 [12] if(*((const byte[]) XPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda XPOS
    cmp #$28
    bne b1
    jmp b7
  //SEG24 animate::@7
  b7:
  //SEG25 [13] *((const byte[]) XPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta XPOS
    jmp b1
  //SEG26 animate::@1
  b1:
  //SEG27 [14] (byte/signed word/word/dword/signed dword~) animate::$3 ← *((const byte[]) YPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx YPOS
    inx
  //SEG28 [15] *((const byte[]) YPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$3 -- _deref_pbuc1=vbuxx 
    stx YPOS
  //SEG29 [16] if(*((const byte[]) YPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda YPOS
    cmp #$19
    bne b2
    jmp b8
  //SEG30 animate::@8
  b8:
  //SEG31 [17] *((const byte[]) YPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS
    jmp b2
  //SEG32 animate::@2
  b2:
  //SEG33 [18] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=_deref_pbuc1_minus_1 
    lda XPOS+1
    sec
    sbc #1
  //SEG34 [19] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6 -- _deref_pbuc1=vbuaa 
    sta XPOS+1
  //SEG35 [20] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda XPOS+1
    cmp #$ff
    bne b3
    jmp b9
  //SEG36 animate::@9
  b9:
  //SEG37 [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 40 -- _deref_pbuc1=vbuc2 
    lda #$28
    sta XPOS+1
    jmp b3
  //SEG38 animate::@3
  b3:
  //SEG39 [22] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=_deref_pbuc1_plus_1 
    lda YPOS+2
    clc
    adc #1
  //SEG40 [23] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9 -- _deref_pbuc1=vbuaa 
    sta YPOS+2
  //SEG41 [24] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda YPOS+2
    cmp #$19
    bne b4
    jmp b10
  //SEG42 animate::@10
  b10:
  //SEG43 [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS+2
    jmp b4
  //SEG44 animate::@4
  b4:
  //SEG45 [26] (byte/signed word/word/dword/signed dword~) animate::$12 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=_deref_pbuc1_minus_1 
    ldx YPOS+3
    dex
  //SEG46 [27] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$12 -- _deref_pbuc1=vbuxx 
    stx YPOS+3
  //SEG47 [28] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda YPOS+3
    cmp #$ff
    bne breturn
    jmp b11
  //SEG48 animate::@11
  b11:
  //SEG49 [29] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed byte/word/signed word/dword/signed dword) 25 -- _deref_pbuc1=vbuc2 
    lda #$19
    sta YPOS+3
  //SEG50 [30] (byte/signed word/word/dword/signed dword~) animate::$15 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=_deref_pbuc1_plus_vbuc2 
    lda XPOS+3
    clc
    adc #7
  //SEG51 [31] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$15 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
  //SEG52 [32] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return -- _deref_pbuc1_lt_vbuc2_then_la1 
    lda XPOS+3
    cmp #$28
    bcc breturn
    jmp b12
  //SEG53 animate::@12
  b12:
  //SEG54 [33] (byte/signed word/word/dword/signed dword~) animate::$18 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 40 -- vbuaa=_deref_pbuc1_minus_vbuc2 
    lda XPOS+3
    sec
    sbc #$28
  //SEG55 [34] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$18 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
    jmp breturn
  //SEG56 animate::@return
  breturn:
  //SEG57 [35] return 
    rts
}
//SEG58 render
render: {
    .label x = 5
    .label colline = 3
    .label y = 2
  //SEG59 [37] phi from render to render::@1 [phi:render->render::@1]
  b1_from_render:
  //SEG60 [37] phi (byte*) render::colline#5 = (const byte*) COLORS#0 [phi:render->render::@1#0] -- pbuz1=pbuc1 
    lda #<COLORS
    sta colline
    lda #>COLORS
    sta colline+1
  //SEG61 [37] phi (byte) render::y#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render->render::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b1
  //SEG62 [37] phi from render::@3 to render::@1 [phi:render::@3->render::@1]
  b1_from_b3:
  //SEG63 [37] phi (byte*) render::colline#5 = (byte*) render::colline#1 [phi:render::@3->render::@1#0] -- register_copy 
  //SEG64 [37] phi (byte) render::y#4 = (byte) render::y#1 [phi:render::@3->render::@1#1] -- register_copy 
    jmp b1
  //SEG65 render::@1
  b1:
  //SEG66 [38] phi from render::@1 to render::@2 [phi:render::@1->render::@2]
  b2_from_b1:
  //SEG67 [38] phi (byte) render::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render::@1->render::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta x
    jmp b2
  //SEG68 [38] phi from render::@5 to render::@2 [phi:render::@5->render::@2]
  b2_from_b5:
  //SEG69 [38] phi (byte) render::x#2 = (byte) render::x#1 [phi:render::@5->render::@2#0] -- register_copy 
    jmp b2
  //SEG70 render::@2
  b2:
  //SEG71 [39] (byte) findcol::x#0 ← (byte) render::x#2
  //SEG72 [40] (byte) findcol::y#0 ← (byte) render::y#4
  //SEG73 [41] call findcol 
  //SEG74 [51] phi from render::@2 to findcol [phi:render::@2->findcol]
  findcol_from_b2:
    jsr findcol
  //SEG75 [42] (byte) findcol::return#0 ← (byte) findcol::return#2 -- vbuaa=vbuxx 
    txa
    jmp b5
  //SEG76 render::@5
  b5:
  //SEG77 [43] (byte) render::col#0 ← (byte) findcol::return#0
  //SEG78 [44] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy x
    sta (colline),y
  //SEG79 [45] (byte) render::x#1 ← ++ (byte) render::x#2 -- vbuz1=_inc_vbuz1 
    inc x
  //SEG80 [46] if((byte) render::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda x
    cmp #$28
    bne b2_from_b5
    jmp b3
  //SEG81 render::@3
  b3:
  //SEG82 [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda colline
    clc
    adc #$28
    sta colline
    bcc !+
    inc colline+1
  !:
  //SEG83 [48] (byte) render::y#1 ← ++ (byte) render::y#4 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG84 [49] if((byte) render::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto render::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #$19
    bne b1_from_b3
    jmp breturn
  //SEG85 render::@return
  breturn:
  //SEG86 [50] return 
    rts
}
//SEG87 findcol
// findcol(byte zeropage(5) x, byte zeropage(2) y)
findcol: {
    .label x = 5
    .label y = 2
    .label xp = 8
    .label yp = 9
    .label i = 6
    .label mindiff = 7
  //SEG88 [52] phi from findcol to findcol::@1 [phi:findcol->findcol::@1]
  b1_from_findcol:
  //SEG89 [52] phi (byte) findcol::mincol#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol->findcol::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG90 [52] phi (byte) findcol::mindiff#10 = (byte/word/signed word/dword/signed dword) 255 [phi:findcol->findcol::@1#1] -- vbuz1=vbuc1 
    lda #$ff
    sta mindiff
  //SEG91 [52] phi (byte) findcol::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol->findcol::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG92 findcol::@1
  b1:
  //SEG93 [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#10) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda XPOS,y
    sta xp
  //SEG94 [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#10) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda YPOS,y
    sta yp
  //SEG95 [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2 -- vbuz1_neq_vbuz2_then_la1 
    lda x
    cmp xp
    bne b2
    jmp b9
  //SEG96 findcol::@9
  b9:
  //SEG97 [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@2 -- vbuz1_neq_vbuz2_then_la1 
    lda y
    cmp yp
    bne b2
  //SEG98 [57] phi from findcol::@9 to findcol::@return [phi:findcol::@9->findcol::@return]
  breturn_from_b9:
  //SEG99 [57] phi (byte) findcol::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol::@9->findcol::@return#0] -- vbuxx=vbuc1 
    ldx #0
    jmp breturn
  //SEG100 findcol::@return
  breturn:
  //SEG101 [58] return 
    rts
  //SEG102 findcol::@2
  b2:
  //SEG103 [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 -- vbuz1_lt_vbuz2_then_la1 
    lda x
    cmp xp
    bcc b4
    jmp b12
  //SEG104 findcol::@12
  b12:
  //SEG105 [60] (byte) findcol::diff#1 ← (byte) findcol::x#0 - (byte) findcol::xp#0 -- vbuyy=vbuz1_minus_vbuz2 
    lda x
    sec
    sbc xp
    tay
  //SEG106 [61] phi from findcol::@12 findcol::@4 to findcol::@5 [phi:findcol::@12/findcol::@4->findcol::@5]
  b5_from_b12:
  b5_from_b4:
  //SEG107 [61] phi (byte) findcol::diff#4 = (byte) findcol::diff#1 [phi:findcol::@12/findcol::@4->findcol::@5#0] -- register_copy 
    jmp b5
  //SEG108 findcol::@5
  b5:
  //SEG109 [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 -- vbuz1_lt_vbuz2_then_la1 
    lda y
    cmp yp
    bcc b6
    jmp b14
  //SEG110 findcol::@14
  b14:
  //SEG111 [63] (byte~) findcol::$8 ← (byte) findcol::y#0 - (byte) findcol::yp#0 -- vbuaa=vbuz1_minus_vbuz2 
    lda y
    sec
    sbc yp
  //SEG112 [64] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$8 -- vbuyy=vbuyy_plus_vbuaa 
    sty $ff
    clc
    adc $ff
    tay
  //SEG113 [65] phi from findcol::@14 findcol::@6 to findcol::@7 [phi:findcol::@14/findcol::@6->findcol::@7]
  b7_from_b14:
  b7_from_b6:
  //SEG114 [65] phi (byte) findcol::diff#6 = (byte) findcol::diff#3 [phi:findcol::@14/findcol::@6->findcol::@7#0] -- register_copy 
    jmp b7
  //SEG115 findcol::@7
  b7:
  //SEG116 [66] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@21 -- vbuyy_ge_vbuz1_then_la1 
    cpy mindiff
    bcs b21
    jmp b16
  //SEG117 findcol::@16
  b16:
  //SEG118 [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#10) -- vbuxx=pbuc1_derefidx_vbuz1 
    ldx i
    lda COLS,x
    tax
  //SEG119 [68] phi from findcol::@16 findcol::@21 to findcol::@8 [phi:findcol::@16/findcol::@21->findcol::@8]
  b8_from_b16:
  b8_from_b21:
  //SEG120 [68] phi (byte) findcol::mindiff#11 = (byte) findcol::diff#6 [phi:findcol::@16/findcol::@21->findcol::@8#0] -- register_copy 
  //SEG121 [68] phi (byte) findcol::mincol#2 = (byte) findcol::mincol#1 [phi:findcol::@16/findcol::@21->findcol::@8#1] -- register_copy 
    jmp b8
  //SEG122 findcol::@8
  b8:
  //SEG123 [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#10 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG124 [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@19 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #numpoints
    bcc b19
  //SEG125 [57] phi from findcol::@8 to findcol::@return [phi:findcol::@8->findcol::@return]
  breturn_from_b8:
  //SEG126 [57] phi (byte) findcol::return#2 = (byte) findcol::mincol#2 [phi:findcol::@8->findcol::@return#0] -- register_copy 
    jmp breturn
  //SEG127 findcol::@19
  b19:
  //SEG128 [71] (byte~) findcol::mindiff#13 ← (byte) findcol::mindiff#11 -- vbuz1=vbuyy 
    sty mindiff
  //SEG129 [52] phi from findcol::@19 to findcol::@1 [phi:findcol::@19->findcol::@1]
  b1_from_b19:
  //SEG130 [52] phi (byte) findcol::mincol#10 = (byte) findcol::mincol#2 [phi:findcol::@19->findcol::@1#0] -- register_copy 
  //SEG131 [52] phi (byte) findcol::mindiff#10 = (byte~) findcol::mindiff#13 [phi:findcol::@19->findcol::@1#1] -- register_copy 
  //SEG132 [52] phi (byte) findcol::i#10 = (byte) findcol::i#1 [phi:findcol::@19->findcol::@1#2] -- register_copy 
    jmp b1
  //SEG133 findcol::@21
  b21:
  //SEG134 [72] (byte~) findcol::mindiff#15 ← (byte) findcol::mindiff#10 -- vbuyy=vbuz1 
    ldy mindiff
    jmp b8_from_b21
  //SEG135 findcol::@6
  b6:
  //SEG136 [73] (byte~) findcol::$10 ← (byte) findcol::yp#0 - (byte) findcol::y#0 -- vbuaa=vbuz1_minus_vbuz2 
    lda yp
    sec
    sbc y
  //SEG137 [74] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$10 -- vbuyy=vbuyy_plus_vbuaa 
    sty $ff
    clc
    adc $ff
    tay
    jmp b7_from_b6
  //SEG138 findcol::@4
  b4:
  //SEG139 [75] (byte) findcol::diff#0 ← (byte) findcol::xp#0 - (byte) findcol::x#0 -- vbuyy=vbuz1_minus_vbuz2 
    lda xp
    sec
    sbc x
    tay
    jmp b5_from_b4
}
//SEG140 initscreen
initscreen: {
    .label screen = 3
  //SEG141 [77] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1]
  b1_from_initscreen:
  //SEG142 [77] phi (byte*) initscreen::screen#2 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta screen
    lda #>SCREEN
    sta screen+1
    jmp b1
  //SEG143 [77] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1]
  b1_from_b1:
  //SEG144 [77] phi (byte*) initscreen::screen#2 = (byte*) initscreen::screen#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy 
    jmp b1
  //SEG145 initscreen::@1
  b1:
  //SEG146 [78] *((byte*) initscreen::screen#2) ← (const byte) FILL#0 -- _deref_pbuz1=vbuc1 
    lda #FILL
    ldy #0
    sta (screen),y
  //SEG147 [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#2 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
  //SEG148 [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto initscreen::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda screen+1
    cmp #>SCREEN+$3e8
    bcc b1_from_b1
    bne !+
    lda screen
    cmp #<SCREEN+$3e8
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG149 initscreen::@return
  breturn:
  //SEG150 [81] return 
    rts
}
  // Points to create the Voronoi from
  XPOS: .byte 5, $f, 6, $22, $15, $1f
  YPOS: .byte 5, 8, $e, 2, $11, $16
  COLS: .byte 1, 2, 3, 4, 5, 7

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b5
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp b7
Removing instruction jmp b1
Removing instruction jmp b8
Removing instruction jmp b2
Removing instruction jmp b9
Removing instruction jmp b3
Removing instruction jmp b10
Removing instruction jmp b4
Removing instruction jmp b11
Removing instruction jmp b12
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b5
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b9
Removing instruction jmp breturn
Removing instruction jmp b12
Removing instruction jmp b5
Removing instruction jmp b14
Removing instruction jmp b7
Removing instruction jmp b16
Removing instruction jmp b8
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction lda XPOS with TXA
Replacing instruction lda YPOS with TXA
Removing instruction lda XPOS+1
Removing instruction lda YPOS+2
Replacing instruction lda YPOS+3 with TXA
Removing instruction lda XPOS+3
Replacing instruction lda #0 with TXA
Removing instruction ldy i
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b4 with b1
Replacing label b2_from_b5 with b2
Replacing label b1_from_b3 with b1
Replacing label b8_from_b21 with b8
Replacing label b7_from_b6 with b7
Replacing label b5_from_b4 with b5
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction b5_from_bbegin:
Removing instruction b5:
Removing instruction main_from_b5:
Removing instruction bend_from_b5:
Removing instruction b1_from_main:
Removing instruction b1_from_b4:
Removing instruction render_from_b1:
Removing instruction b4_from_b1:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b5:
Removing instruction findcol_from_b2:
Removing instruction b5_from_b12:
Removing instruction b5_from_b4:
Removing instruction b7_from_b14:
Removing instruction b7_from_b6:
Removing instruction b8_from_b16:
Removing instruction b8_from_b21:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction initscreen_from_main:
Removing instruction b4:
Removing instruction b7:
Removing instruction b8:
Removing instruction b9:
Removing instruction b10:
Removing instruction b11:
Removing instruction b12:
Removing instruction b1_from_render:
Removing instruction b5:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b1_from_findcol:
Removing instruction b9:
Removing instruction breturn_from_b9:
Removing instruction b12:
Removing instruction b14:
Removing instruction b16:
Removing instruction breturn_from_b8:
Removing instruction b1_from_b19:
Removing instruction b1_from_initscreen:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda XPOS+3
Removing instruction lda x
Removing instruction lda y
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @5
(label) @begin
(label) @end
(byte*) COLORS
(const byte*) COLORS#0 COLORS = ((byte*))(word/dword/signed dword) 55296
(byte[]) COLS
(const byte[]) COLS#0 COLS = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7 }
(byte) FILL
(const byte) FILL#0 FILL = (byte/word/signed word/dword/signed dword) 230
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte[]) XPOS
(const byte[]) XPOS#0 XPOS = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 6, (byte/signed byte/word/signed word/dword/signed dword) 34, (byte/signed byte/word/signed word/dword/signed dword) 21, (byte/signed byte/word/signed word/dword/signed dword) 31 }
(byte[]) YPOS
(const byte[]) YPOS#0 YPOS = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 14, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 22 }
(void()) animate()
(byte/signed word/word/dword/signed dword~) animate::$0 reg byte x 4.0
(byte/signed word/word/dword/signed dword~) animate::$12 reg byte x 4.0
(byte/signed word/word/dword/signed dword~) animate::$15 reg byte a 4.0
(byte/signed word/word/dword/signed dword~) animate::$18 reg byte a 4.0
(byte/signed word/word/dword/signed dword~) animate::$3 reg byte x 4.0
(byte/signed word/word/dword/signed dword~) animate::$6 reg byte a 4.0
(byte/signed word/word/dword/signed dword~) animate::$9 reg byte a 4.0
(label) animate::@1
(label) animate::@10
(label) animate::@11
(label) animate::@12
(label) animate::@2
(label) animate::@3
(label) animate::@4
(label) animate::@7
(label) animate::@8
(label) animate::@9
(label) animate::@return
(byte()) findcol((byte) findcol::x , (byte) findcol::y)
(byte~) findcol::$10 reg byte a 20002.0
(byte~) findcol::$8 reg byte a 20002.0
(label) findcol::@1
(label) findcol::@12
(label) findcol::@14
(label) findcol::@16
(label) findcol::@19
(label) findcol::@2
(label) findcol::@21
(label) findcol::@4
(label) findcol::@5
(label) findcol::@6
(label) findcol::@7
(label) findcol::@8
(label) findcol::@9
(label) findcol::@return
(byte) findcol::diff
(byte) findcol::diff#0 reg byte y 20002.0
(byte) findcol::diff#1 reg byte y 20002.0
(byte) findcol::diff#2 reg byte y 20002.0
(byte) findcol::diff#3 reg byte y 20002.0
(byte) findcol::diff#4 reg byte y 10001.0
(byte) findcol::diff#6 reg byte y 13334.666666666666
(byte) findcol::i
(byte) findcol::i#1 i zp ZP_BYTE:6 10001.0
(byte) findcol::i#10 i zp ZP_BYTE:6 2631.842105263158
(byte) findcol::mincol
(byte) findcol::mincol#1 reg byte x 20002.0
(byte) findcol::mincol#10 reg byte x 1176.5882352941176
(byte) findcol::mincol#2 reg byte x 10001.0
(byte) findcol::mindiff
(byte) findcol::mindiff#10 mindiff zp ZP_BYTE:7 1875.1875
(byte) findcol::mindiff#11 reg byte y 10001.0
(byte~) findcol::mindiff#13 mindiff zp ZP_BYTE:7 20002.0
(byte~) findcol::mindiff#15 reg byte y 20002.0
(byte) findcol::return
(byte) findcol::return#0 reg byte a 2002.0
(byte) findcol::return#2 reg byte x 3667.333333333333
(byte) findcol::x
(byte) findcol::x#0 x zp ZP_BYTE:5 1640.2
(byte) findcol::xp
(byte) findcol::xp#0 xp zp ZP_BYTE:8 10001.0
(byte) findcol::y
(byte) findcol::y#0 y zp ZP_BYTE:2 1708.5416666666665
(byte) findcol::yp
(byte) findcol::yp#0 yp zp ZP_BYTE:9 6250.625
(void()) initscreen()
(label) initscreen::@1
(label) initscreen::@return
(byte*) initscreen::screen
(byte*) initscreen::screen#1 screen zp ZP_WORD:3 16.5
(byte*) initscreen::screen#2 screen zp ZP_WORD:3 16.5
(void()) main()
(label) main::@1
(label) main::@4
(byte) numpoints
(const byte) numpoints#0 numpoints = (byte/signed byte/word/signed word/dword/signed dword) 6
(void()) render()
(label) render::@1
(label) render::@2
(label) render::@3
(label) render::@5
(label) render::@return
(byte) render::col
(byte) render::col#0 reg byte a 2002.0
(byte*) render::colline
(byte*) render::colline#1 colline zp ZP_WORD:3 67.33333333333333
(byte*) render::colline#5 colline zp ZP_WORD:3 120.29999999999998
(byte) render::x
(byte) render::x#1 x zp ZP_BYTE:5 1501.5
(byte) render::x#2 x zp ZP_BYTE:5 572.0
(byte) render::y
(byte) render::y#1 y zp ZP_BYTE:2 151.5
(byte) render::y#4 y zp ZP_BYTE:2 109.36363636363637

zp ZP_BYTE:2 [ render::y#4 render::y#1 findcol::y#0 ]
zp ZP_WORD:3 [ render::colline#5 render::colline#1 initscreen::screen#2 initscreen::screen#1 ]
zp ZP_BYTE:5 [ render::x#2 render::x#1 findcol::x#0 ]
zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ]
zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ]
reg byte x [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ]
reg byte y [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ]
reg byte y [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ]
reg byte x [ animate::$0 ]
reg byte x [ animate::$3 ]
reg byte a [ animate::$6 ]
reg byte a [ animate::$9 ]
reg byte x [ animate::$12 ]
reg byte a [ animate::$15 ]
reg byte a [ animate::$18 ]
reg byte a [ findcol::return#0 ]
reg byte a [ render::col#0 ]
zp ZP_BYTE:8 [ findcol::xp#0 ]
zp ZP_BYTE:9 [ findcol::yp#0 ]
reg byte a [ findcol::$8 ]
reg byte a [ findcol::$10 ]


FINAL ASSEMBLER
Score: 1628771

//SEG0 File Comments
// The screen
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label SCREEN = $400
  .label COLORS = $d800
  .const FILL = $e6
  // The total number of voronoi points
  .const numpoints = 6
//SEG3 @begin
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
//SEG5 @5
//SEG6 [2] call main 
//SEG7 [4] phi from @5 to main [phi:@5->main]
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
//SEG9 @end
//SEG10 main
main: {
  //SEG11 [5] call initscreen 
  //SEG12 [76] phi from main to initscreen [phi:main->initscreen]
    jsr initscreen
  //SEG13 [6] phi from main main::@4 to main::@1 [phi:main/main::@4->main::@1]
  //SEG14 main::@1
  b1:
  //SEG15 [7] call render 
  //SEG16 [36] phi from main::@1 to render [phi:main::@1->render]
    jsr render
  //SEG17 [8] phi from main::@1 to main::@4 [phi:main::@1->main::@4]
  //SEG18 main::@4
  //SEG19 [9] call animate 
    jsr animate
    jmp b1
}
//SEG20 animate
animate: {
  //SEG21 [10] (byte/signed word/word/dword/signed dword~) animate::$0 ← *((const byte[]) XPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx XPOS
    inx
  //SEG22 [11] *((const byte[]) XPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$0 -- _deref_pbuc1=vbuxx 
    stx XPOS
  //SEG23 [12] if(*((const byte[]) XPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    txa
    cmp #$28
    bne b1
  //SEG24 animate::@7
  //SEG25 [13] *((const byte[]) XPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta XPOS
  //SEG26 animate::@1
  b1:
  //SEG27 [14] (byte/signed word/word/dword/signed dword~) animate::$3 ← *((const byte[]) YPOS#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx YPOS
    inx
  //SEG28 [15] *((const byte[]) YPOS#0) ← (byte/signed word/word/dword/signed dword~) animate::$3 -- _deref_pbuc1=vbuxx 
    stx YPOS
  //SEG29 [16] if(*((const byte[]) YPOS#0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    txa
    cmp #$19
    bne b2
  //SEG30 animate::@8
  //SEG31 [17] *((const byte[]) YPOS#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS
  //SEG32 animate::@2
  b2:
  //SEG33 [18] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=_deref_pbuc1_minus_1 
    lda XPOS+1
    sec
    sbc #1
  //SEG34 [19] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6 -- _deref_pbuc1=vbuaa 
    sta XPOS+1
  //SEG35 [20] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    cmp #$ff
    bne b3
  //SEG36 animate::@9
  //SEG37 [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 40 -- _deref_pbuc1=vbuc2 
    lda #$28
    sta XPOS+1
  //SEG38 animate::@3
  b3:
  //SEG39 [22] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=_deref_pbuc1_plus_1 
    lda YPOS+2
    clc
    adc #1
  //SEG40 [23] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9 -- _deref_pbuc1=vbuaa 
    sta YPOS+2
  //SEG41 [24] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    cmp #$19
    bne b4
  //SEG42 animate::@10
  //SEG43 [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS+2
  //SEG44 animate::@4
  b4:
  //SEG45 [26] (byte/signed word/word/dword/signed dword~) animate::$12 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=_deref_pbuc1_minus_1 
    ldx YPOS+3
    dex
  //SEG46 [27] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$12 -- _deref_pbuc1=vbuxx 
    stx YPOS+3
  //SEG47 [28] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return -- _deref_pbuc1_neq_vbuc2_then_la1 
    txa
    cmp #$ff
    bne breturn
  //SEG48 animate::@11
  //SEG49 [29] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed byte/word/signed word/dword/signed dword) 25 -- _deref_pbuc1=vbuc2 
    lda #$19
    sta YPOS+3
  //SEG50 [30] (byte/signed word/word/dword/signed dword~) animate::$15 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=_deref_pbuc1_plus_vbuc2 
    lda XPOS+3
    clc
    adc #7
  //SEG51 [31] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$15 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
  //SEG52 [32] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return -- _deref_pbuc1_lt_vbuc2_then_la1 
    cmp #$28
    bcc breturn
  //SEG53 animate::@12
  //SEG54 [33] (byte/signed word/word/dword/signed dword~) animate::$18 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) - (byte/signed byte/word/signed word/dword/signed dword) 40 -- vbuaa=_deref_pbuc1_minus_vbuc2 
    sec
    sbc #$28
  //SEG55 [34] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte/signed word/word/dword/signed dword~) animate::$18 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
  //SEG56 animate::@return
  breturn:
  //SEG57 [35] return 
    rts
}
//SEG58 render
render: {
    .label x = 5
    .label colline = 3
    .label y = 2
  //SEG59 [37] phi from render to render::@1 [phi:render->render::@1]
  //SEG60 [37] phi (byte*) render::colline#5 = (const byte*) COLORS#0 [phi:render->render::@1#0] -- pbuz1=pbuc1 
    lda #<COLORS
    sta colline
    lda #>COLORS
    sta colline+1
  //SEG61 [37] phi (byte) render::y#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render->render::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta y
  //SEG62 [37] phi from render::@3 to render::@1 [phi:render::@3->render::@1]
  //SEG63 [37] phi (byte*) render::colline#5 = (byte*) render::colline#1 [phi:render::@3->render::@1#0] -- register_copy 
  //SEG64 [37] phi (byte) render::y#4 = (byte) render::y#1 [phi:render::@3->render::@1#1] -- register_copy 
  //SEG65 render::@1
  b1:
  //SEG66 [38] phi from render::@1 to render::@2 [phi:render::@1->render::@2]
  //SEG67 [38] phi (byte) render::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render::@1->render::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta x
  //SEG68 [38] phi from render::@5 to render::@2 [phi:render::@5->render::@2]
  //SEG69 [38] phi (byte) render::x#2 = (byte) render::x#1 [phi:render::@5->render::@2#0] -- register_copy 
  //SEG70 render::@2
  b2:
  //SEG71 [39] (byte) findcol::x#0 ← (byte) render::x#2
  //SEG72 [40] (byte) findcol::y#0 ← (byte) render::y#4
  //SEG73 [41] call findcol 
  //SEG74 [51] phi from render::@2 to findcol [phi:render::@2->findcol]
    jsr findcol
  //SEG75 [42] (byte) findcol::return#0 ← (byte) findcol::return#2 -- vbuaa=vbuxx 
    txa
  //SEG76 render::@5
  //SEG77 [43] (byte) render::col#0 ← (byte) findcol::return#0
  //SEG78 [44] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy x
    sta (colline),y
  //SEG79 [45] (byte) render::x#1 ← ++ (byte) render::x#2 -- vbuz1=_inc_vbuz1 
    inc x
  //SEG80 [46] if((byte) render::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda x
    cmp #$28
    bne b2
  //SEG81 render::@3
  //SEG82 [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda colline
    clc
    adc #$28
    sta colline
    bcc !+
    inc colline+1
  !:
  //SEG83 [48] (byte) render::y#1 ← ++ (byte) render::y#4 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG84 [49] if((byte) render::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto render::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #$19
    bne b1
  //SEG85 render::@return
  //SEG86 [50] return 
    rts
}
//SEG87 findcol
// findcol(byte zeropage(5) x, byte zeropage(2) y)
findcol: {
    .label x = 5
    .label y = 2
    .label xp = 8
    .label yp = 9
    .label i = 6
    .label mindiff = 7
  //SEG88 [52] phi from findcol to findcol::@1 [phi:findcol->findcol::@1]
  //SEG89 [52] phi (byte) findcol::mincol#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol->findcol::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG90 [52] phi (byte) findcol::mindiff#10 = (byte/word/signed word/dword/signed dword) 255 [phi:findcol->findcol::@1#1] -- vbuz1=vbuc1 
    lda #$ff
    sta mindiff
  //SEG91 [52] phi (byte) findcol::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol->findcol::@1#2] -- vbuz1=vbuc1 
    txa
    sta i
  //SEG92 findcol::@1
  b1:
  //SEG93 [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#10) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda XPOS,y
    sta xp
  //SEG94 [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#10) -- vbuz1=pbuc1_derefidx_vbuz2 
    lda YPOS,y
    sta yp
  //SEG95 [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2 -- vbuz1_neq_vbuz2_then_la1 
    lda x
    cmp xp
    bne b2
  //SEG96 findcol::@9
  //SEG97 [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@2 -- vbuz1_neq_vbuz2_then_la1 
    lda y
    cmp yp
    bne b2
  //SEG98 [57] phi from findcol::@9 to findcol::@return [phi:findcol::@9->findcol::@return]
  //SEG99 [57] phi (byte) findcol::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:findcol::@9->findcol::@return#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG100 findcol::@return
  breturn:
  //SEG101 [58] return 
    rts
  //SEG102 findcol::@2
  b2:
  //SEG103 [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 -- vbuz1_lt_vbuz2_then_la1 
    lda x
    cmp xp
    bcc b4
  //SEG104 findcol::@12
  //SEG105 [60] (byte) findcol::diff#1 ← (byte) findcol::x#0 - (byte) findcol::xp#0 -- vbuyy=vbuz1_minus_vbuz2 
    sec
    sbc xp
    tay
  //SEG106 [61] phi from findcol::@12 findcol::@4 to findcol::@5 [phi:findcol::@12/findcol::@4->findcol::@5]
  //SEG107 [61] phi (byte) findcol::diff#4 = (byte) findcol::diff#1 [phi:findcol::@12/findcol::@4->findcol::@5#0] -- register_copy 
  //SEG108 findcol::@5
  b5:
  //SEG109 [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 -- vbuz1_lt_vbuz2_then_la1 
    lda y
    cmp yp
    bcc b6
  //SEG110 findcol::@14
  //SEG111 [63] (byte~) findcol::$8 ← (byte) findcol::y#0 - (byte) findcol::yp#0 -- vbuaa=vbuz1_minus_vbuz2 
    sec
    sbc yp
  //SEG112 [64] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$8 -- vbuyy=vbuyy_plus_vbuaa 
    sty $ff
    clc
    adc $ff
    tay
  //SEG113 [65] phi from findcol::@14 findcol::@6 to findcol::@7 [phi:findcol::@14/findcol::@6->findcol::@7]
  //SEG114 [65] phi (byte) findcol::diff#6 = (byte) findcol::diff#3 [phi:findcol::@14/findcol::@6->findcol::@7#0] -- register_copy 
  //SEG115 findcol::@7
  b7:
  //SEG116 [66] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@21 -- vbuyy_ge_vbuz1_then_la1 
    cpy mindiff
    bcs b21
  //SEG117 findcol::@16
  //SEG118 [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#10) -- vbuxx=pbuc1_derefidx_vbuz1 
    ldx i
    lda COLS,x
    tax
  //SEG119 [68] phi from findcol::@16 findcol::@21 to findcol::@8 [phi:findcol::@16/findcol::@21->findcol::@8]
  //SEG120 [68] phi (byte) findcol::mindiff#11 = (byte) findcol::diff#6 [phi:findcol::@16/findcol::@21->findcol::@8#0] -- register_copy 
  //SEG121 [68] phi (byte) findcol::mincol#2 = (byte) findcol::mincol#1 [phi:findcol::@16/findcol::@21->findcol::@8#1] -- register_copy 
  //SEG122 findcol::@8
  b8:
  //SEG123 [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#10 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG124 [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@19 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #numpoints
    bcc b19
  //SEG125 [57] phi from findcol::@8 to findcol::@return [phi:findcol::@8->findcol::@return]
  //SEG126 [57] phi (byte) findcol::return#2 = (byte) findcol::mincol#2 [phi:findcol::@8->findcol::@return#0] -- register_copy 
    jmp breturn
  //SEG127 findcol::@19
  b19:
  //SEG128 [71] (byte~) findcol::mindiff#13 ← (byte) findcol::mindiff#11 -- vbuz1=vbuyy 
    sty mindiff
  //SEG129 [52] phi from findcol::@19 to findcol::@1 [phi:findcol::@19->findcol::@1]
  //SEG130 [52] phi (byte) findcol::mincol#10 = (byte) findcol::mincol#2 [phi:findcol::@19->findcol::@1#0] -- register_copy 
  //SEG131 [52] phi (byte) findcol::mindiff#10 = (byte~) findcol::mindiff#13 [phi:findcol::@19->findcol::@1#1] -- register_copy 
  //SEG132 [52] phi (byte) findcol::i#10 = (byte) findcol::i#1 [phi:findcol::@19->findcol::@1#2] -- register_copy 
    jmp b1
  //SEG133 findcol::@21
  b21:
  //SEG134 [72] (byte~) findcol::mindiff#15 ← (byte) findcol::mindiff#10 -- vbuyy=vbuz1 
    ldy mindiff
    jmp b8
  //SEG135 findcol::@6
  b6:
  //SEG136 [73] (byte~) findcol::$10 ← (byte) findcol::yp#0 - (byte) findcol::y#0 -- vbuaa=vbuz1_minus_vbuz2 
    lda yp
    sec
    sbc y
  //SEG137 [74] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$10 -- vbuyy=vbuyy_plus_vbuaa 
    sty $ff
    clc
    adc $ff
    tay
    jmp b7
  //SEG138 findcol::@4
  b4:
  //SEG139 [75] (byte) findcol::diff#0 ← (byte) findcol::xp#0 - (byte) findcol::x#0 -- vbuyy=vbuz1_minus_vbuz2 
    lda xp
    sec
    sbc x
    tay
    jmp b5
}
//SEG140 initscreen
initscreen: {
    .label screen = 3
  //SEG141 [77] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1]
  //SEG142 [77] phi (byte*) initscreen::screen#2 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta screen
    lda #>SCREEN
    sta screen+1
  //SEG143 [77] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1]
  //SEG144 [77] phi (byte*) initscreen::screen#2 = (byte*) initscreen::screen#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy 
  //SEG145 initscreen::@1
  b1:
  //SEG146 [78] *((byte*) initscreen::screen#2) ← (const byte) FILL#0 -- _deref_pbuz1=vbuc1 
    lda #FILL
    ldy #0
    sta (screen),y
  //SEG147 [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#2 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
  //SEG148 [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto initscreen::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda screen+1
    cmp #>SCREEN+$3e8
    bcc b1
    bne !+
    lda screen
    cmp #<SCREEN+$3e8
    bcc b1
  !:
  //SEG149 initscreen::@return
  //SEG150 [81] return 
    rts
}
  // Points to create the Voronoi from
  XPOS: .byte 5, $f, 6, $22, $15, $1f
  YPOS: .byte 5, 8, $e, 2, $11, $16
  COLS: .byte 1, 2, 3, 4, 5, 7

