Identified constant variable (byte*) SCREEN
Identified constant variable (byte*) COLORS
Identified constant variable (byte) FILL
Identified constant variable (byte) numpoints
Culled Empty Block (label) main::@2
Culled Empty Block (label) @1
Culled Empty Block (label) animate::@5
Culled Empty Block (label) animate::@12
Culled Empty Block (label) @2
Culled Empty Block (label) initscreen::@4
Culled Empty Block (label) initscreen::@3
Culled Empty Block (label) initscreen::@5
Culled Empty Block (label) initscreen::@6
Culled Empty Block (label) @3
Culled Empty Block (label) render::@4
Culled Empty Block (label) @4
Culled Empty Block (label) findcol::@11
Culled Empty Block (label) findcol::@12
Culled Empty Block (label) findcol::@5
Culled Empty Block (label) findcol::@15
Culled Empty Block (label) findcol::@17
Culled Empty Block (label) findcol::@19
Culled Empty Block (label) findcol::@21
Culled Empty Block (label) findcol::@22

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  (byte*) COLORS#0 ← ((byte*)) (number) $d800
  (byte) FILL#0 ← (number) $e6
  (byte) numpoints#0 ← (number) 6
  (byte[]) XPOS#0 ← { (number) 5, (number) $f, (number) 6, (number) $22, (number) $15, (number) $1f }
  (byte[]) YPOS#0 ← { (number) 5, (number) 8, (number) $e, (number) 2, (number) $11, (number) $16 }
  (byte[]) COLS#0 ← { (number) 1, (number) 2, (number) 3, (number) 4, (number) 5, (number) 7 }
  to:@5
main: scope:[main]  from @5
  call initscreen 
  to:main::@3
main::@3: scope:[main]  from main
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@5
  call render 
  to:main::@4
main::@4: scope:[main]  from main::@1
  call animate 
  to:main::@5
main::@5: scope:[main]  from main::@4
  if(true) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@5
  return 
  to:@return
animate: scope:[animate]  from main::@4
  (number~) animate::$0 ← *((byte[]) XPOS#0 + (number) 0) + (number) 1
  *((byte[]) XPOS#0 + (number) 0) ← (number~) animate::$0
  (bool~) animate::$1 ← *((byte[]) XPOS#0 + (number) 0) == (number) $28
  (bool~) animate::$2 ← ! (bool~) animate::$1
  if((bool~) animate::$2) goto animate::@1
  to:animate::@6
animate::@1: scope:[animate]  from animate animate::@6
  (number~) animate::$3 ← *((byte[]) YPOS#0 + (number) 0) + (number) 1
  *((byte[]) YPOS#0 + (number) 0) ← (number~) animate::$3
  (bool~) animate::$4 ← *((byte[]) YPOS#0 + (number) 0) == (number) $19
  (bool~) animate::$5 ← ! (bool~) animate::$4
  if((bool~) animate::$5) goto animate::@2
  to:animate::@7
animate::@6: scope:[animate]  from animate
  *((byte[]) XPOS#0 + (number) 0) ← (number) 0
  to:animate::@1
animate::@2: scope:[animate]  from animate::@1 animate::@7
  (number~) animate::$6 ← *((byte[]) XPOS#0 + (number) 1) - (number) 1
  *((byte[]) XPOS#0 + (number) 1) ← (number~) animate::$6
  (bool~) animate::$7 ← *((byte[]) XPOS#0 + (number) 1) == (number) $ff
  (bool~) animate::$8 ← ! (bool~) animate::$7
  if((bool~) animate::$8) goto animate::@3
  to:animate::@8
animate::@7: scope:[animate]  from animate::@1
  *((byte[]) YPOS#0 + (number) 0) ← (number) 0
  to:animate::@2
animate::@3: scope:[animate]  from animate::@2 animate::@8
  (number~) animate::$9 ← *((byte[]) YPOS#0 + (number) 2) + (number) 1
  *((byte[]) YPOS#0 + (number) 2) ← (number~) animate::$9
  (bool~) animate::$10 ← *((byte[]) YPOS#0 + (number) 2) == (number) $19
  (bool~) animate::$11 ← ! (bool~) animate::$10
  if((bool~) animate::$11) goto animate::@4
  to:animate::@9
animate::@8: scope:[animate]  from animate::@2
  *((byte[]) XPOS#0 + (number) 1) ← (number) $28
  to:animate::@3
animate::@4: scope:[animate]  from animate::@3 animate::@9
  (number~) animate::$12 ← *((byte[]) YPOS#0 + (number) 3) - (number) 1
  *((byte[]) YPOS#0 + (number) 3) ← (number~) animate::$12
  (bool~) animate::$13 ← *((byte[]) YPOS#0 + (number) 3) == (number) $ff
  (bool~) animate::$14 ← ! (bool~) animate::$13
  if((bool~) animate::$14) goto animate::@return
  to:animate::@10
animate::@9: scope:[animate]  from animate::@3
  *((byte[]) YPOS#0 + (number) 2) ← (number) 0
  to:animate::@4
animate::@10: scope:[animate]  from animate::@4
  *((byte[]) YPOS#0 + (number) 3) ← (number) $19
  (number~) animate::$15 ← *((byte[]) XPOS#0 + (number) 3) + (number) 7
  *((byte[]) XPOS#0 + (number) 3) ← (number~) animate::$15
  (bool~) animate::$16 ← *((byte[]) XPOS#0 + (number) 3) >= (number) $28
  (bool~) animate::$17 ← ! (bool~) animate::$16
  if((bool~) animate::$17) goto animate::@return
  to:animate::@11
animate::@11: scope:[animate]  from animate::@10
  (number~) animate::$18 ← *((byte[]) XPOS#0 + (number) 3) - (number) $28
  *((byte[]) XPOS#0 + (number) 3) ← (number~) animate::$18
  to:animate::@return
animate::@return: scope:[animate]  from animate::@10 animate::@11 animate::@4
  return 
  to:@return
initscreen: scope:[initscreen]  from main
  (byte*) initscreen::screen#0 ← (byte*) SCREEN#0
  to:initscreen::@1
initscreen::@1: scope:[initscreen]  from initscreen initscreen::@2
  (byte*) initscreen::screen#2 ← phi( initscreen/(byte*) initscreen::screen#0 initscreen::@2/(byte*) initscreen::screen#1 )
  (byte*~) initscreen::$0 ← (byte*) SCREEN#0 + (number) $3e8
  (bool~) initscreen::$1 ← (byte*) initscreen::screen#2 < (byte*~) initscreen::$0
  if((bool~) initscreen::$1) goto initscreen::@2
  to:initscreen::@return
initscreen::@2: scope:[initscreen]  from initscreen::@1
  (byte*) initscreen::screen#3 ← phi( initscreen::@1/(byte*) initscreen::screen#2 )
  *((byte*) initscreen::screen#3) ← (byte) FILL#0
  (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#3
  to:initscreen::@1
initscreen::@return: scope:[initscreen]  from initscreen::@1
  return 
  to:@return
render: scope:[render]  from main::@1
  (byte*) render::colline#0 ← (byte*) COLORS#0
  (byte) render::y#0 ← (byte) 0
  to:render::@1
render::@1: scope:[render]  from render render::@3
  (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) 0
  to:render::@2
render::@2: scope:[render]  from render::@1 render::@5
  (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#3
  to:render::@5
render::@5: scope:[render]  from render::@2
  (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,$27)
  (bool~) render::$1 ← (byte) render::x#1 != rangelast(0,$27)
  if((bool~) render::$1) goto render::@2
  to:render::@3
render::@3: scope:[render]  from render::@5
  (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 + (number) $28
  (byte*) render::colline#1 ← (byte*~) render::$2
  (byte) render::y#1 ← (byte) render::y#3 + rangenext(0,$18)
  (bool~) render::$3 ← (byte) render::y#1 != rangelast(0,$18)
  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) findcol::y#10 ← phi( render::@2/(byte) findcol::y#0 )
  (byte) findcol::x#7 ← phi( render::@2/(byte) findcol::x#0 )
  (byte) findcol::mindiff#0 ← (number) $ff
  (byte) findcol::mincol#0 ← (number) 0
  (byte) findcol::i#0 ← (number) 0
  to:findcol::@1
findcol::@1: scope:[findcol]  from findcol findcol::@10
  (byte) findcol::mindiff#11 ← phi( findcol/(byte) findcol::mindiff#0 findcol::@10/(byte) findcol::mindiff#12 )
  (byte) findcol::y#8 ← phi( findcol/(byte) findcol::y#10 findcol::@10/(byte) findcol::y#11 )
  (byte) findcol::mincol#3 ← phi( findcol/(byte) findcol::mincol#0 findcol::@10/(byte) findcol::mincol#4 )
  (byte) findcol::x#5 ← phi( findcol/(byte) findcol::x#7 findcol::@10/(byte) findcol::x#8 )
  (byte) findcol::i#2 ← phi( findcol/(byte) findcol::i#0 findcol::@10/(byte) findcol::i#1 )
  (bool~) findcol::$0 ← (byte) findcol::i#2 < (byte) numpoints#0
  if((bool~) findcol::$0) goto findcol::@2
  to:findcol::@3
findcol::@2: scope:[findcol]  from findcol::@1
  (byte) findcol::mincol#13 ← phi( findcol::@1/(byte) findcol::mincol#3 )
  (byte) findcol::mindiff#10 ← phi( findcol::@1/(byte) findcol::mindiff#11 )
  (byte) findcol::y#5 ← phi( findcol::@1/(byte) findcol::y#8 )
  (byte) findcol::x#1 ← phi( findcol::@1/(byte) findcol::x#5 )
  (byte) findcol::i#3 ← phi( findcol::@1/(byte) findcol::i#2 )
  (byte) findcol::xp#0 ← *((byte[]) XPOS#0 + (byte) findcol::i#3)
  (byte) findcol::yp#0 ← *((byte[]) YPOS#0 + (byte) findcol::i#3)
  (bool~) findcol::$1 ← (byte) findcol::x#1 == (byte) findcol::xp#0
  (bool~) findcol::$2 ← ! (bool~) findcol::$1
  if((bool~) findcol::$2) goto findcol::@4
  to:findcol::@13
findcol::@3: scope:[findcol]  from findcol::@1
  (byte) findcol::mincol#2 ← phi( findcol::@1/(byte) findcol::mincol#3 )
  (byte) findcol::return#1 ← (byte) findcol::mincol#2
  to:findcol::@return
findcol::@4: scope:[findcol]  from findcol::@13 findcol::@2
  (byte) findcol::mincol#11 ← phi( findcol::@13/(byte) findcol::mincol#12 findcol::@2/(byte) findcol::mincol#13 )
  (byte) findcol::i#12 ← phi( findcol::@13/(byte) findcol::i#13 findcol::@2/(byte) findcol::i#3 )
  (byte) findcol::mindiff#8 ← phi( findcol::@13/(byte) findcol::mindiff#9 findcol::@2/(byte) findcol::mindiff#10 )
  (byte) findcol::yp#7 ← phi( findcol::@13/(byte) findcol::yp#1 findcol::@2/(byte) findcol::yp#0 )
  (byte) findcol::y#9 ← phi( findcol::@13/(byte) findcol::y#1 findcol::@2/(byte) findcol::y#5 )
  (byte) findcol::xp#1 ← phi( findcol::@13/(byte) findcol::xp#4 findcol::@2/(byte) findcol::xp#0 )
  (byte) findcol::x#2 ← phi( findcol::@13/(byte) findcol::x#6 findcol::@2/(byte) findcol::x#1 )
  (byte) findcol::diff#0 ← (byte) 0
  (bool~) findcol::$5 ← (byte) findcol::x#2 < (byte) findcol::xp#1
  if((bool~) findcol::$5) goto findcol::@6
  to:findcol::@16
findcol::@13: scope:[findcol]  from findcol::@2
  (byte) findcol::mincol#12 ← phi( findcol::@2/(byte) findcol::mincol#13 )
  (byte) findcol::i#13 ← phi( findcol::@2/(byte) findcol::i#3 )
  (byte) findcol::mindiff#9 ← phi( findcol::@2/(byte) findcol::mindiff#10 )
  (byte) findcol::xp#4 ← phi( findcol::@2/(byte) findcol::xp#0 )
  (byte) findcol::x#6 ← phi( findcol::@2/(byte) findcol::x#1 )
  (byte) findcol::yp#1 ← phi( findcol::@2/(byte) findcol::yp#0 )
  (byte) findcol::y#1 ← phi( findcol::@2/(byte) findcol::y#5 )
  (bool~) findcol::$3 ← (byte) findcol::y#1 == (byte) findcol::yp#1
  (bool~) findcol::$4 ← ! (bool~) findcol::$3
  if((bool~) findcol::$4) goto findcol::@4
  to:findcol::@14
findcol::@14: scope:[findcol]  from findcol::@13
  (byte) findcol::return#2 ← (number) 0
  to:findcol::@return
findcol::@return: scope:[findcol]  from findcol::@14 findcol::@3
  (byte) findcol::return#5 ← phi( findcol::@14/(byte) findcol::return#2 findcol::@3/(byte) findcol::return#1 )
  (byte) findcol::return#3 ← (byte) findcol::return#5
  return 
  to:@return
findcol::@6: scope:[findcol]  from findcol::@4
  (byte) findcol::mincol#10 ← phi( findcol::@4/(byte) findcol::mincol#11 )
  (byte) findcol::i#11 ← phi( findcol::@4/(byte) findcol::i#12 )
  (byte) findcol::mindiff#7 ← phi( findcol::@4/(byte) findcol::mindiff#8 )
  (byte) findcol::yp#6 ← phi( findcol::@4/(byte) findcol::yp#7 )
  (byte) findcol::y#7 ← phi( findcol::@4/(byte) findcol::y#9 )
  (byte) findcol::x#3 ← phi( findcol::@4/(byte) findcol::x#2 )
  (byte) findcol::xp#2 ← phi( findcol::@4/(byte) findcol::xp#1 )
  (byte~) findcol::$7 ← (byte) findcol::xp#2 - (byte) findcol::x#3
  (byte) findcol::diff#1 ← (byte~) findcol::$7
  to:findcol::@7
findcol::@16: scope:[findcol]  from findcol::@4
  (byte) findcol::mincol#9 ← phi( findcol::@4/(byte) findcol::mincol#11 )
  (byte) findcol::i#10 ← phi( findcol::@4/(byte) findcol::i#12 )
  (byte) findcol::mindiff#6 ← phi( findcol::@4/(byte) findcol::mindiff#8 )
  (byte) findcol::yp#5 ← phi( findcol::@4/(byte) findcol::yp#7 )
  (byte) findcol::y#6 ← phi( findcol::@4/(byte) findcol::y#9 )
  (byte) findcol::xp#3 ← phi( findcol::@4/(byte) findcol::xp#1 )
  (byte) findcol::x#4 ← phi( findcol::@4/(byte) findcol::x#2 )
  (byte~) findcol::$6 ← (byte) findcol::x#4 - (byte) findcol::xp#3
  (byte) findcol::diff#2 ← (byte~) findcol::$6
  to:findcol::@7
findcol::@7: scope:[findcol]  from findcol::@16 findcol::@6
  (byte) findcol::mincol#8 ← phi( findcol::@16/(byte) findcol::mincol#9 findcol::@6/(byte) findcol::mincol#10 )
  (byte) findcol::x#13 ← phi( findcol::@16/(byte) findcol::x#4 findcol::@6/(byte) findcol::x#3 )
  (byte) findcol::i#9 ← phi( findcol::@16/(byte) findcol::i#10 findcol::@6/(byte) findcol::i#11 )
  (byte) findcol::mindiff#5 ← phi( findcol::@16/(byte) findcol::mindiff#6 findcol::@6/(byte) findcol::mindiff#7 )
  (byte) findcol::diff#9 ← phi( findcol::@16/(byte) findcol::diff#2 findcol::@6/(byte) findcol::diff#1 )
  (byte) findcol::yp#2 ← phi( findcol::@16/(byte) findcol::yp#5 findcol::@6/(byte) findcol::yp#6 )
  (byte) findcol::y#2 ← phi( findcol::@16/(byte) findcol::y#6 findcol::@6/(byte) findcol::y#7 )
  (bool~) findcol::$8 ← (byte) findcol::y#2 < (byte) findcol::yp#2
  if((bool~) findcol::$8) goto findcol::@8
  to:findcol::@18
findcol::@8: scope:[findcol]  from findcol::@7
  (byte) findcol::mincol#7 ← phi( findcol::@7/(byte) findcol::mincol#8 )
  (byte) findcol::x#12 ← phi( findcol::@7/(byte) findcol::x#13 )
  (byte) findcol::i#8 ← phi( findcol::@7/(byte) findcol::i#9 )
  (byte) findcol::mindiff#4 ← phi( findcol::@7/(byte) findcol::mindiff#5 )
  (byte) findcol::diff#5 ← phi( findcol::@7/(byte) findcol::diff#9 )
  (byte) findcol::y#3 ← phi( findcol::@7/(byte) findcol::y#2 )
  (byte) findcol::yp#3 ← phi( findcol::@7/(byte) findcol::yp#2 )
  (byte~) findcol::$11 ← (byte) findcol::yp#3 - (byte) findcol::y#3
  (byte~) findcol::$12 ← (byte) findcol::diff#5 + (byte~) findcol::$11
  (byte) findcol::diff#3 ← (byte~) findcol::$12
  to:findcol::@9
findcol::@18: scope:[findcol]  from findcol::@7
  (byte) findcol::mincol#6 ← phi( findcol::@7/(byte) findcol::mincol#8 )
  (byte) findcol::x#11 ← phi( findcol::@7/(byte) findcol::x#13 )
  (byte) findcol::i#7 ← phi( findcol::@7/(byte) findcol::i#9 )
  (byte) findcol::mindiff#3 ← phi( findcol::@7/(byte) findcol::mindiff#5 )
  (byte) findcol::diff#6 ← phi( findcol::@7/(byte) findcol::diff#9 )
  (byte) findcol::yp#4 ← phi( findcol::@7/(byte) findcol::yp#2 )
  (byte) findcol::y#4 ← phi( findcol::@7/(byte) findcol::y#2 )
  (byte~) findcol::$9 ← (byte) findcol::y#4 - (byte) findcol::yp#4
  (byte~) findcol::$10 ← (byte) findcol::diff#6 + (byte~) findcol::$9
  (byte) findcol::diff#4 ← (byte~) findcol::$10
  to:findcol::@9
findcol::@9: scope:[findcol]  from findcol::@18 findcol::@8
  (byte) findcol::y#13 ← phi( findcol::@18/(byte) findcol::y#4 findcol::@8/(byte) findcol::y#3 )
  (byte) findcol::mincol#5 ← phi( findcol::@18/(byte) findcol::mincol#6 findcol::@8/(byte) findcol::mincol#7 )
  (byte) findcol::x#10 ← phi( findcol::@18/(byte) findcol::x#11 findcol::@8/(byte) findcol::x#12 )
  (byte) findcol::i#6 ← phi( findcol::@18/(byte) findcol::i#7 findcol::@8/(byte) findcol::i#8 )
  (byte) findcol::mindiff#2 ← phi( findcol::@18/(byte) findcol::mindiff#3 findcol::@8/(byte) findcol::mindiff#4 )
  (byte) findcol::diff#7 ← phi( findcol::@18/(byte) findcol::diff#4 findcol::@8/(byte) findcol::diff#3 )
  (bool~) findcol::$13 ← (byte) findcol::diff#7 < (byte) findcol::mindiff#2
  (bool~) findcol::$14 ← ! (bool~) findcol::$13
  if((bool~) findcol::$14) goto findcol::@10
  to:findcol::@20
findcol::@10: scope:[findcol]  from findcol::@20 findcol::@9
  (byte) findcol::mindiff#12 ← phi( findcol::@20/(byte) findcol::mindiff#1 findcol::@9/(byte) findcol::mindiff#2 )
  (byte) findcol::y#11 ← phi( findcol::@20/(byte) findcol::y#12 findcol::@9/(byte) findcol::y#13 )
  (byte) findcol::mincol#4 ← phi( findcol::@20/(byte) findcol::mincol#1 findcol::@9/(byte) findcol::mincol#5 )
  (byte) findcol::x#8 ← phi( findcol::@20/(byte) findcol::x#9 findcol::@9/(byte) findcol::x#10 )
  (byte) findcol::i#4 ← phi( findcol::@20/(byte) findcol::i#5 findcol::@9/(byte) findcol::i#6 )
  (byte) findcol::i#1 ← ++ (byte) findcol::i#4
  to:findcol::@1
findcol::@20: scope:[findcol]  from findcol::@9
  (byte) findcol::y#12 ← phi( findcol::@9/(byte) findcol::y#13 )
  (byte) findcol::x#9 ← phi( findcol::@9/(byte) findcol::x#10 )
  (byte) findcol::i#5 ← phi( findcol::@9/(byte) findcol::i#6 )
  (byte) findcol::diff#8 ← phi( findcol::@9/(byte) findcol::diff#7 )
  (byte) findcol::mindiff#1 ← (byte) findcol::diff#8
  (byte) findcol::mincol#1 ← *((byte[]) COLS#0 + (byte) findcol::i#5)
  to:findcol::@10
@5: scope:[]  from @begin
  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[]) COLS
(byte[]) COLS#0
(byte) FILL
(byte) FILL#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte[]) XPOS
(byte[]) XPOS#0
(byte[]) YPOS
(byte[]) YPOS#0
(void()) animate()
(number~) animate::$0
(bool~) animate::$1
(bool~) animate::$10
(bool~) animate::$11
(number~) animate::$12
(bool~) animate::$13
(bool~) animate::$14
(number~) animate::$15
(bool~) animate::$16
(bool~) animate::$17
(number~) animate::$18
(bool~) animate::$2
(number~) animate::$3
(bool~) animate::$4
(bool~) animate::$5
(number~) animate::$6
(bool~) animate::$7
(bool~) animate::$8
(number~) animate::$9
(label) animate::@1
(label) animate::@10
(label) animate::@11
(label) animate::@2
(label) animate::@3
(label) animate::@4
(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
(byte~) findcol::$12
(bool~) findcol::$13
(bool~) findcol::$14
(bool~) findcol::$2
(bool~) findcol::$3
(bool~) findcol::$4
(bool~) findcol::$5
(byte~) findcol::$6
(byte~) findcol::$7
(bool~) findcol::$8
(byte~) findcol::$9
(label) findcol::@1
(label) findcol::@10
(label) findcol::@13
(label) findcol::@14
(label) findcol::@16
(label) findcol::@18
(label) findcol::@2
(label) findcol::@20
(label) findcol::@3
(label) findcol::@4
(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::diff#9
(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::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
(void()) initscreen()
(byte*~) initscreen::$0
(bool~) initscreen::$1
(label) initscreen::@1
(label) initscreen::@2
(label) initscreen::@return
(byte*) initscreen::screen
(byte*) initscreen::screen#0
(byte*) initscreen::screen#1
(byte*) initscreen::screen#2
(byte*) initscreen::screen#3
(void()) main()
(label) main::@1
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@return
(byte) numpoints
(byte) numpoints#0
(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

Adding number conversion cast (unumber) $e6 in (byte) FILL#0 ← (number) $e6
Adding number conversion cast (unumber) 6 in (byte) numpoints#0 ← (number) 6
Adding number conversion cast (unumber) 1 in (number~) animate::$0 ← *((byte[]) XPOS#0 + (number) 0) + (number) 1
Adding number conversion cast (unumber) animate::$0 in (number~) animate::$0 ← *((byte[]) XPOS#0 + (number) 0) + (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (unumber~) animate::$0 ← *((byte[]) XPOS#0 + (number) 0) + (unumber)(number) 1
Adding number conversion cast (unumber) 0 in *((byte[]) XPOS#0 + (number) 0) ← (unumber~) animate::$0
Adding number conversion cast (unumber) $28 in (bool~) animate::$1 ← *((byte[]) XPOS#0 + (number) 0) == (number) $28
Adding number conversion cast (unumber) 0 in (bool~) animate::$1 ← *((byte[]) XPOS#0 + (number) 0) == (unumber)(number) $28
Adding number conversion cast (unumber) 1 in (number~) animate::$3 ← *((byte[]) YPOS#0 + (number) 0) + (number) 1
Adding number conversion cast (unumber) animate::$3 in (number~) animate::$3 ← *((byte[]) YPOS#0 + (number) 0) + (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (unumber~) animate::$3 ← *((byte[]) YPOS#0 + (number) 0) + (unumber)(number) 1
Adding number conversion cast (unumber) 0 in *((byte[]) YPOS#0 + (number) 0) ← (unumber~) animate::$3
Adding number conversion cast (unumber) $19 in (bool~) animate::$4 ← *((byte[]) YPOS#0 + (number) 0) == (number) $19
Adding number conversion cast (unumber) 0 in (bool~) animate::$4 ← *((byte[]) YPOS#0 + (number) 0) == (unumber)(number) $19
Adding number conversion cast (unumber) 0 in *((byte[]) XPOS#0 + (number) 0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte[]) XPOS#0 + (number) 0) ← ((unumber)) (number) 0
Adding number conversion cast (unumber) 1 in (number~) animate::$6 ← *((byte[]) XPOS#0 + (number) 1) - (number) 1
Adding number conversion cast (unumber) animate::$6 in (number~) animate::$6 ← *((byte[]) XPOS#0 + (number) 1) - (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (unumber~) animate::$6 ← *((byte[]) XPOS#0 + (number) 1) - (unumber)(number) 1
Adding number conversion cast (unumber) 1 in *((byte[]) XPOS#0 + (number) 1) ← (unumber~) animate::$6
Adding number conversion cast (unumber) $ff in (bool~) animate::$7 ← *((byte[]) XPOS#0 + (number) 1) == (number) $ff
Adding number conversion cast (unumber) 1 in (bool~) animate::$7 ← *((byte[]) XPOS#0 + (number) 1) == (unumber)(number) $ff
Adding number conversion cast (unumber) 0 in *((byte[]) YPOS#0 + (number) 0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte[]) YPOS#0 + (number) 0) ← ((unumber)) (number) 0
Adding number conversion cast (unumber) 1 in (number~) animate::$9 ← *((byte[]) YPOS#0 + (number) 2) + (number) 1
Adding number conversion cast (unumber) animate::$9 in (number~) animate::$9 ← *((byte[]) YPOS#0 + (number) 2) + (unumber)(number) 1
Adding number conversion cast (unumber) 2 in (unumber~) animate::$9 ← *((byte[]) YPOS#0 + (number) 2) + (unumber)(number) 1
Adding number conversion cast (unumber) 2 in *((byte[]) YPOS#0 + (number) 2) ← (unumber~) animate::$9
Adding number conversion cast (unumber) $19 in (bool~) animate::$10 ← *((byte[]) YPOS#0 + (number) 2) == (number) $19
Adding number conversion cast (unumber) 2 in (bool~) animate::$10 ← *((byte[]) YPOS#0 + (number) 2) == (unumber)(number) $19
Adding number conversion cast (unumber) $28 in *((byte[]) XPOS#0 + (number) 1) ← (number) $28
Adding number conversion cast (unumber) 1 in *((byte[]) XPOS#0 + (number) 1) ← ((unumber)) (number) $28
Adding number conversion cast (unumber) 1 in (number~) animate::$12 ← *((byte[]) YPOS#0 + (number) 3) - (number) 1
Adding number conversion cast (unumber) animate::$12 in (number~) animate::$12 ← *((byte[]) YPOS#0 + (number) 3) - (unumber)(number) 1
Adding number conversion cast (unumber) 3 in (unumber~) animate::$12 ← *((byte[]) YPOS#0 + (number) 3) - (unumber)(number) 1
Adding number conversion cast (unumber) 3 in *((byte[]) YPOS#0 + (number) 3) ← (unumber~) animate::$12
Adding number conversion cast (unumber) $ff in (bool~) animate::$13 ← *((byte[]) YPOS#0 + (number) 3) == (number) $ff
Adding number conversion cast (unumber) 3 in (bool~) animate::$13 ← *((byte[]) YPOS#0 + (number) 3) == (unumber)(number) $ff
Adding number conversion cast (unumber) 0 in *((byte[]) YPOS#0 + (number) 2) ← (number) 0
Adding number conversion cast (unumber) 2 in *((byte[]) YPOS#0 + (number) 2) ← ((unumber)) (number) 0
Adding number conversion cast (unumber) $19 in *((byte[]) YPOS#0 + (number) 3) ← (number) $19
Adding number conversion cast (unumber) 3 in *((byte[]) YPOS#0 + (number) 3) ← ((unumber)) (number) $19
Adding number conversion cast (unumber) 7 in (number~) animate::$15 ← *((byte[]) XPOS#0 + (number) 3) + (number) 7
Adding number conversion cast (unumber) animate::$15 in (number~) animate::$15 ← *((byte[]) XPOS#0 + (number) 3) + (unumber)(number) 7
Adding number conversion cast (unumber) 3 in (unumber~) animate::$15 ← *((byte[]) XPOS#0 + (number) 3) + (unumber)(number) 7
Adding number conversion cast (unumber) 3 in *((byte[]) XPOS#0 + (number) 3) ← (unumber~) animate::$15
Adding number conversion cast (unumber) $28 in (bool~) animate::$16 ← *((byte[]) XPOS#0 + (number) 3) >= (number) $28
Adding number conversion cast (unumber) 3 in (bool~) animate::$16 ← *((byte[]) XPOS#0 + (number) 3) >= (unumber)(number) $28
Adding number conversion cast (unumber) $28 in (number~) animate::$18 ← *((byte[]) XPOS#0 + (number) 3) - (number) $28
Adding number conversion cast (unumber) animate::$18 in (number~) animate::$18 ← *((byte[]) XPOS#0 + (number) 3) - (unumber)(number) $28
Adding number conversion cast (unumber) 3 in (unumber~) animate::$18 ← *((byte[]) XPOS#0 + (number) 3) - (unumber)(number) $28
Adding number conversion cast (unumber) 3 in *((byte[]) XPOS#0 + (number) 3) ← (unumber~) animate::$18
Adding number conversion cast (unumber) $3e8 in (byte*~) initscreen::$0 ← (byte*) SCREEN#0 + (number) $3e8
Adding number conversion cast (unumber) $28 in (byte*~) render::$2 ← (byte*) render::colline#3 + (number) $28
Adding number conversion cast (unumber) $ff in (byte) findcol::mindiff#0 ← (number) $ff
Adding number conversion cast (unumber) 0 in (byte) findcol::mincol#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) findcol::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) findcol::return#2 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) XPOS#0 ← (byte[]){ (byte)(number) 5, (byte)(number) $f, (byte)(number) 6, (byte)(number) $22, (byte)(number) $15, (byte)(number) $1f }
Added casts to value list in (byte[]) YPOS#0 ← (byte[]){ (byte)(number) 5, (byte)(number) 8, (byte)(number) $e, (byte)(number) 2, (byte)(number) $11, (byte)(number) $16 }
Added casts to value list in (byte[]) COLS#0 ← (byte[]){ (byte)(number) 1, (byte)(number) 2, (byte)(number) 3, (byte)(number) 4, (byte)(number) 5, (byte)(number) 7 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) COLORS#0 ← (byte*)(number) $d800
Inlining cast (byte) FILL#0 ← (unumber)(number) $e6
Inlining cast (byte) numpoints#0 ← (unumber)(number) 6
Inlining cast *((byte[]) XPOS#0 + (unumber)(number) 0) ← (unumber)(number) 0
Inlining cast *((byte[]) YPOS#0 + (unumber)(number) 0) ← (unumber)(number) 0
Inlining cast *((byte[]) XPOS#0 + (unumber)(number) 1) ← (unumber)(number) $28
Inlining cast *((byte[]) YPOS#0 + (unumber)(number) 2) ← (unumber)(number) 0
Inlining cast *((byte[]) YPOS#0 + (unumber)(number) 3) ← (unumber)(number) $19
Inlining cast (byte) findcol::mindiff#0 ← (unumber)(number) $ff
Inlining cast (byte) findcol::mincol#0 ← (unumber)(number) 0
Inlining cast (byte) findcol::i#0 ← (unumber)(number) 0
Inlining cast (byte) findcol::return#2 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast $e6
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast $f
Simplifying constant integer cast 6
Simplifying constant integer cast $22
Simplifying constant integer cast $15
Simplifying constant integer cast $1f
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast $e
Simplifying constant integer cast 2
Simplifying constant integer cast $11
Simplifying constant integer cast $16
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $19
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast $19
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 3
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast $19
Simplifying constant integer cast 3
Simplifying constant integer cast 3
Simplifying constant integer cast 7
Simplifying constant integer cast 3
Simplifying constant integer cast 3
Simplifying constant integer cast $28
Simplifying constant integer cast 3
Simplifying constant integer cast $28
Simplifying constant integer cast 3
Simplifying constant integer cast $3e8
Simplifying constant integer cast $28
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $e6
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 3
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) animate::$0 ← *((byte[]) XPOS#0 + (byte) 0) + (byte) 1
Inferred type updated to byte in (unumber~) animate::$3 ← *((byte[]) YPOS#0 + (byte) 0) + (byte) 1
Inferred type updated to byte in (unumber~) animate::$6 ← *((byte[]) XPOS#0 + (byte) 1) - (byte) 1
Inferred type updated to byte in (unumber~) animate::$9 ← *((byte[]) YPOS#0 + (byte) 2) + (byte) 1
Inferred type updated to byte in (unumber~) animate::$12 ← *((byte[]) YPOS#0 + (byte) 3) - (byte) 1
Inferred type updated to byte in (unumber~) animate::$15 ← *((byte[]) XPOS#0 + (byte) 3) + (byte) 7
Inferred type updated to byte in (unumber~) animate::$18 ← *((byte[]) XPOS#0 + (byte) 3) - (byte) $28
Inversing boolean not [15] (bool~) animate::$2 ← *((byte[]) XPOS#0 + (byte) 0) != (byte) $28 from [14] (bool~) animate::$1 ← *((byte[]) XPOS#0 + (byte) 0) == (byte) $28
Inversing boolean not [20] (bool~) animate::$5 ← *((byte[]) YPOS#0 + (byte) 0) != (byte) $19 from [19] (bool~) animate::$4 ← *((byte[]) YPOS#0 + (byte) 0) == (byte) $19
Inversing boolean not [26] (bool~) animate::$8 ← *((byte[]) XPOS#0 + (byte) 1) != (byte) $ff from [25] (bool~) animate::$7 ← *((byte[]) XPOS#0 + (byte) 1) == (byte) $ff
Inversing boolean not [32] (bool~) animate::$11 ← *((byte[]) YPOS#0 + (byte) 2) != (byte) $19 from [31] (bool~) animate::$10 ← *((byte[]) YPOS#0 + (byte) 2) == (byte) $19
Inversing boolean not [38] (bool~) animate::$14 ← *((byte[]) YPOS#0 + (byte) 3) != (byte) $ff from [37] (bool~) animate::$13 ← *((byte[]) YPOS#0 + (byte) 3) == (byte) $ff
Inversing boolean not [45] (bool~) animate::$17 ← *((byte[]) XPOS#0 + (byte) 3) < (byte) $28 from [44] (bool~) animate::$16 ← *((byte[]) XPOS#0 + (byte) 3) >= (byte) $28
Inversing boolean not [93] (bool~) findcol::$2 ← (byte) findcol::x#1 != (byte) findcol::xp#0 from [92] (bool~) findcol::$1 ← (byte) findcol::x#1 == (byte) findcol::xp#0
Inversing boolean not [103] (bool~) findcol::$4 ← (byte) findcol::y#1 != (byte) findcol::yp#1 from [102] (bool~) findcol::$3 ← (byte) findcol::y#1 == (byte) findcol::yp#1
Inversing boolean not [128] (bool~) findcol::$14 ← (byte) findcol::diff#7 >= (byte) findcol::mindiff#2 from [127] (bool~) findcol::$13 ← (byte) findcol::diff#7 < (byte) findcol::mindiff#2
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) initscreen::screen#2 = (byte*) initscreen::screen#3 
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) render::col#0 = (byte~) render::$0 
Alias (byte*) render::colline#1 = (byte*~) render::$2 
Alias (byte) findcol::i#13 = (byte) findcol::i#3 (byte) findcol::i#2 
Alias (byte) findcol::x#1 = (byte) findcol::x#5 (byte) findcol::x#6 
Alias (byte) findcol::y#1 = (byte) findcol::y#5 (byte) findcol::y#8 
Alias (byte) findcol::mindiff#10 = (byte) findcol::mindiff#11 (byte) findcol::mindiff#9 
Alias (byte) findcol::mincol#12 = (byte) findcol::mincol#13 (byte) findcol::mincol#3 (byte) findcol::mincol#2 (byte) findcol::return#1 
Alias (byte) findcol::yp#0 = (byte) findcol::yp#1 
Alias (byte) findcol::xp#0 = (byte) findcol::xp#4 
Alias (byte) findcol::return#3 = (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#6 = (byte) findcol::y#7 (byte) findcol::y#9 
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#12 
Alias (byte) findcol::mincol#10 = (byte) findcol::mincol#11 (byte) findcol::mincol#9 
Alias (byte) findcol::diff#1 = (byte~) findcol::$7 
Alias (byte) findcol::diff#2 = (byte~) findcol::$6 
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#5 = (byte) findcol::diff#9 (byte) findcol::diff#6 
Alias (byte) findcol::mindiff#3 = (byte) findcol::mindiff#4 (byte) findcol::mindiff#5 
Alias (byte) findcol::i#7 = (byte) findcol::i#8 (byte) findcol::i#9 
Alias (byte) findcol::x#11 = (byte) findcol::x#12 (byte) findcol::x#13 
Alias (byte) findcol::mincol#6 = (byte) findcol::mincol#7 (byte) findcol::mincol#8 
Alias (byte) findcol::diff#3 = (byte~) findcol::$12 
Alias (byte) findcol::diff#4 = (byte~) findcol::$10 
Alias (byte) findcol::diff#7 = (byte) findcol::diff#8 (byte) findcol::mindiff#1 
Alias (byte) findcol::i#5 = (byte) findcol::i#6 
Alias (byte) findcol::x#10 = (byte) findcol::x#9 
Alias (byte) findcol::y#12 = (byte) findcol::y#13 
Successful SSA optimization Pass2AliasElimination
Alias (byte) findcol::x#1 = (byte) findcol::x#2 (byte) findcol::x#11 (byte) findcol::x#10 (byte) findcol::x#8 
Alias (byte) findcol::xp#0 = (byte) findcol::xp#1 
Alias (byte) findcol::y#1 = (byte) findcol::y#6 (byte) findcol::y#2 (byte) findcol::y#12 (byte) findcol::y#11 
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#13 (byte) findcol::i#7 (byte) findcol::i#5 (byte) findcol::i#4 
Alias (byte) findcol::mincol#10 = (byte) findcol::mincol#12 (byte) findcol::mincol#6 (byte) findcol::mincol#5 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) render::y#2 (byte) render::y#4
Identical Phi Values (byte*) render::colline#2 (byte*) render::colline#5
Identical Phi Values (byte) findcol::x#7 (byte) findcol::x#0
Identical Phi Values (byte) findcol::y#10 (byte) findcol::y#0
Identical Phi Values (byte) findcol::x#1 (byte) findcol::x#7
Identical Phi Values (byte) findcol::y#1 (byte) findcol::y#10
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) animate::$2 [16] if(*((byte[]) XPOS#0 + (byte) 0)!=(byte) $28) goto animate::@1
Simple Condition (bool~) animate::$5 [21] if(*((byte[]) YPOS#0 + (byte) 0)!=(byte) $19) goto animate::@2
Simple Condition (bool~) animate::$8 [27] if(*((byte[]) XPOS#0 + (byte) 1)!=(byte) $ff) goto animate::@3
Simple Condition (bool~) animate::$11 [33] if(*((byte[]) YPOS#0 + (byte) 2)!=(byte) $19) goto animate::@4
Simple Condition (bool~) animate::$14 [39] if(*((byte[]) YPOS#0 + (byte) 3)!=(byte) $ff) goto animate::@return
Simple Condition (bool~) animate::$17 [46] if(*((byte[]) XPOS#0 + (byte) 3)<(byte) $28) goto animate::@return
Simple Condition (bool~) initscreen::$1 [54] if((byte*) initscreen::screen#2<(byte*~) initscreen::$0) goto initscreen::@2
Simple Condition (bool~) render::$1 [74] if((byte) render::x#1!=rangelast(0,$27)) goto render::@2
Simple Condition (bool~) render::$3 [80] if((byte) render::y#1!=rangelast(0,$18)) goto render::@1
Simple Condition (bool~) findcol::$0 [88] if((byte) findcol::i#10<(byte) numpoints#0) goto findcol::@2
Simple Condition (bool~) findcol::$2 [94] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@4
Simple Condition (bool~) findcol::$5 [100] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@6
Simple Condition (bool~) findcol::$4 [104] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@4
Simple Condition (bool~) findcol::$8 [117] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@8
Simple Condition (bool~) findcol::$14 [129] if((byte) findcol::diff#7>=(byte) findcol::mindiff#10) goto findcol::@10
Successful SSA optimization Pass2ConditionalJumpSimplification
Identified constant from value list (byte[]) { (byte) 5, (byte) $f, (byte) 6, (byte) $22, (byte) $15, (byte) $1f }
Identified constant from value list (byte[]) { (byte) 5, (byte) 8, (byte) $e, (byte) 2, (byte) $11, (byte) $16 }
Identified constant from value list (byte[]) { (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 7 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) COLORS#0 = (byte*) 55296
Constant (const byte) FILL#0 = $e6
Constant (const byte) numpoints#0 = 6
Constant (const byte[]) XPOS#0 = { 5, $f, 6, $22, $15, $1f }
Constant (const byte[]) YPOS#0 = { 5, 8, $e, 2, $11, $16 }
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 = $ff
Constant (const byte) findcol::mincol#0 = 0
Constant (const byte) findcol::i#0 = 0
Constant (const byte) findcol::diff#0 = 0
Constant (const byte) findcol::return#2 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) initscreen::screen#0 = SCREEN#0
Constant (const byte*) render::colline#0 = COLORS#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [10] if(true) goto main::@1
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [72] render::x#1 ← ++ render::x#2 to ++
Resolved ranged comparison value [74] if(render::x#1!=rangelast(0,$27)) goto render::@2 to (number) $28
Resolved ranged next value [78] render::y#1 ← ++ render::y#4 to ++
Resolved ranged comparison value [80] if(render::y#1!=rangelast(0,$18)) goto render::@1 to (number) $19
Simplifying expression containing zero XPOS#0 in [12] (byte~) animate::$0 ← *((const byte[]) XPOS#0 + (byte) 0) + (byte) 1
Simplifying expression containing zero XPOS#0 in [13] *((const byte[]) XPOS#0 + (byte) 0) ← (byte~) animate::$0
Simplifying expression containing zero XPOS#0 in [16] if(*((const byte[]) XPOS#0 + (byte) 0)!=(byte) $28) goto animate::@1
Simplifying expression containing zero YPOS#0 in [17] (byte~) animate::$3 ← *((const byte[]) YPOS#0 + (byte) 0) + (byte) 1
Simplifying expression containing zero YPOS#0 in [18] *((const byte[]) YPOS#0 + (byte) 0) ← (byte~) animate::$3
Simplifying expression containing zero YPOS#0 in [21] if(*((const byte[]) YPOS#0 + (byte) 0)!=(byte) $19) goto animate::@2
Simplifying expression containing zero XPOS#0 in [22] *((const byte[]) XPOS#0 + (byte) 0) ← (byte) 0
Simplifying expression containing zero YPOS#0 in [28] *((const byte[]) YPOS#0 + (byte) 0) ← (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) findcol::diff#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Successful SSA optimization Pass2LoopHeadConstantIdentification
Adding number conversion cast (unumber) $28 in if((byte) render::x#1!=(number) $28) goto render::@2
Adding number conversion cast (unumber) $19 in if((byte) render::y#1!=(number) $19) goto render::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $28
Simplifying constant integer cast $19
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $19
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) findcol::i#1 = (byte) findcol::i#10 
Alias (byte) findcol::mincol#10 = (byte) findcol::mincol#4 
Alias (byte) findcol::mindiff#10 = (byte) findcol::mindiff#12 
Alias (byte) findcol::i#14 = (byte) findcol::i#24 
Alias (byte) findcol::mincol#22 = (byte) findcol::mincol#23 
Alias (byte) findcol::mindiff#20 = (byte) findcol::mindiff#21 
Alias (byte) findcol::i#21 = (byte) findcol::i#22 (byte) findcol::i#23 
Alias (byte) findcol::mincol#19 = (byte) findcol::mincol#20 (byte) findcol::mincol#21 
Alias (byte) findcol::mindiff#17 = (byte) findcol::mindiff#18 (byte) findcol::mindiff#19 
Alias (byte) findcol::i#18 = (byte) findcol::i#19 (byte) findcol::i#20 
Alias (byte) findcol::mincol#16 = (byte) findcol::mincol#17 (byte) findcol::mincol#18 
Alias (byte) findcol::mindiff#14 = (byte) findcol::mindiff#15 (byte) findcol::mindiff#16 
Alias (byte) findcol::i#16 = (byte) findcol::i#17 
Successful SSA optimization Pass2AliasElimination
Alias (byte) findcol::i#14 = (byte) findcol::i#21 (byte) findcol::i#18 (byte) findcol::i#16 (byte) findcol::i#15 
Alias (byte) findcol::mincol#15 = (byte) findcol::mincol#19 (byte) findcol::mincol#22 (byte) findcol::mincol#16 
Alias (byte) findcol::mindiff#13 = (byte) findcol::mindiff#17 (byte) findcol::mindiff#20 (byte) findcol::mindiff#14 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) findcol::i#25 (const byte) findcol::i#0
Identical Phi Values (byte) findcol::mincol#24 (const byte) findcol::mincol#0
Identical Phi Values (byte) findcol::mindiff#22 (const byte) findcol::mindiff#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [30] (byte*~) initscreen::$0 ← (const byte*) SCREEN#0 + (word) $3e8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) initscreen::$0 = SCREEN#0+$3e8
Successful SSA optimization Pass2ConstantIdentification
Removing PHI-reference to removed block (findcol::@1_1) in block findcol::@3
if() condition always true - replacing block destination [82] if((const byte) findcol::i#0<(const byte) numpoints#0) goto findcol::@2
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization Pass2LoopHeadConstantIdentification
Alias (byte*) initscreen::screen#1 = (byte*) initscreen::screen#2 
Alias (byte) findcol::mincol#10 = (byte) findcol::mincol#14 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) initscreen::screen#5 (const byte*) initscreen::screen#0
Successful SSA optimization Pass2IdenticalPhiElimination
if() condition always true - replacing block destination [75] if((const byte*) initscreen::screen#0<(const byte*) initscreen::$0) goto initscreen::@2
Successful SSA optimization Pass2ConstantIfs
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#2
Constant inlined findcol::i#0 = (byte) 0
Constant inlined findcol::return#2 = (byte) 0
Constant inlined render::colline#0 = (const byte*) COLORS#0
Constant inlined render::x#0 = (byte) 0
Constant inlined initscreen::screen#0 = (const byte*) SCREEN#0
Constant inlined render::y#0 = (byte) 0
Constant inlined findcol::mincol#0 = (byte) 0
Constant inlined findcol::mindiff#0 = (byte) $ff
Constant inlined initscreen::$0 = (const byte*) SCREEN#0+(word) $3e8
Successful SSA optimization Pass2ConstantInlining
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+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
Added new block during phi lifting initscreen::@7(between initscreen::@1 and initscreen::@2)
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::@23(between findcol::@1 and findcol::@2)
Added new block during phi lifting findcol::@24(between findcol::@9 and findcol::@10)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of render
Adding NOP phi() at start of findcol
Adding NOP phi() at start of findcol::@1_1
Adding NOP phi() at start of findcol::@14
Adding NOP phi() at start of initscreen
Adding NOP phi() at start of initscreen::@1_1
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to initscreen:6 render:9 animate:11 
Calls in [render] to findcol:44 

Created 12 initial phi equivalence classes
Coalesced [54] render::y#6 ← render::y#1
Coalesced [55] render::colline#6 ← render::colline#1
Coalesced [56] render::x#4 ← render::x#1
Coalesced [69] findcol::diff#10 ← findcol::diff#2
Coalesced [74] findcol::diff#12 ← findcol::diff#4
Coalesced [78] findcol::mincol#26 ← findcol::mincol#1
Coalesced [79] findcol::mindiff#24 ← findcol::diff#7
Coalesced [83] findcol::return#6 ← findcol::mincol#10
Coalesced [84] findcol::i#26 ← findcol::i#1
Coalesced [85] findcol::mincol#25 ← findcol::mincol#10
Not coalescing [86] findcol::mindiff#23 ← findcol::mindiff#10
Coalesced (already) [87] findcol::mincol#27 ← findcol::mincol#15
Not coalescing [88] findcol::mindiff#25 ← findcol::mindiff#13
Coalesced [91] findcol::diff#13 ← findcol::diff#3
Coalesced [93] findcol::diff#11 ← findcol::diff#1
Coalesced [101] initscreen::screen#6 ← initscreen::screen#1
Coalesced down to 9 phi equivalence classes
Culled Empty Block (label) @6
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@5
Culled Empty Block (label) render::@6
Culled Empty Block (label) render::@7
Culled Empty Block (label) findcol::@1_1
Culled Empty Block (label) findcol::@14
Culled Empty Block (label) findcol::@3
Culled Empty Block (label) initscreen::@1_1
Culled Empty Block (label) initscreen::@7
Renumbering block @5 to @1
Renumbering block main::@4 to main::@2
Renumbering block animate::@6 to animate::@5
Renumbering block animate::@7 to animate::@6
Renumbering block animate::@8 to animate::@7
Renumbering block animate::@9 to animate::@8
Renumbering block animate::@10 to animate::@9
Renumbering block animate::@11 to animate::@10
Renumbering block render::@5 to render::@4
Renumbering block findcol::@4 to findcol::@3
Renumbering block findcol::@6 to findcol::@4
Renumbering block findcol::@7 to findcol::@5
Renumbering block findcol::@8 to findcol::@6
Renumbering block findcol::@9 to findcol::@7
Renumbering block findcol::@10 to findcol::@8
Renumbering block findcol::@13 to findcol::@9
Renumbering block findcol::@16 to findcol::@10
Renumbering block findcol::@18 to findcol::@11
Renumbering block findcol::@20 to findcol::@12
Renumbering block findcol::@23 to findcol::@13
Renumbering block findcol::@24 to findcol::@14
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
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::@2
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:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()
main: scope:[main]  from @1
  [4] phi()
  [5] call initscreen 
  to:main::@1
main::@1: scope:[main]  from main main::@2
  [6] phi()
  [7] call render 
  to:main::@2
main::@2: scope:[main]  from main::@1
  [8] phi()
  [9] call animate 
  to:main::@1
animate: scope:[animate]  from main::@2
  [10] (byte~) animate::$0 ← *((const byte[]) XPOS#0) + (byte) 1
  [11] *((const byte[]) XPOS#0) ← (byte~) animate::$0
  [12] if(*((const byte[]) XPOS#0)!=(byte) $28) goto animate::@1
  to:animate::@5
animate::@5: scope:[animate]  from animate
  [13] *((const byte[]) XPOS#0) ← (byte) 0
  to:animate::@1
animate::@1: scope:[animate]  from animate animate::@5
  [14] (byte~) animate::$3 ← *((const byte[]) YPOS#0) + (byte) 1
  [15] *((const byte[]) YPOS#0) ← (byte~) animate::$3
  [16] if(*((const byte[]) YPOS#0)!=(byte) $19) goto animate::@2
  to:animate::@6
animate::@6: scope:[animate]  from animate::@1
  [17] *((const byte[]) YPOS#0) ← (byte) 0
  to:animate::@2
animate::@2: scope:[animate]  from animate::@1 animate::@6
  [18] (byte~) animate::$6 ← *((const byte[]) XPOS#0+(byte) 1) - (byte) 1
  [19] *((const byte[]) XPOS#0+(byte) 1) ← (byte~) animate::$6
  [20] if(*((const byte[]) XPOS#0+(byte) 1)!=(byte) $ff) goto animate::@3
  to:animate::@7
animate::@7: scope:[animate]  from animate::@2
  [21] *((const byte[]) XPOS#0+(byte) 1) ← (byte) $28
  to:animate::@3
animate::@3: scope:[animate]  from animate::@2 animate::@7
  [22] (byte~) animate::$9 ← *((const byte[]) YPOS#0+(byte) 2) + (byte) 1
  [23] *((const byte[]) YPOS#0+(byte) 2) ← (byte~) animate::$9
  [24] if(*((const byte[]) YPOS#0+(byte) 2)!=(byte) $19) goto animate::@4
  to:animate::@8
animate::@8: scope:[animate]  from animate::@3
  [25] *((const byte[]) YPOS#0+(byte) 2) ← (byte) 0
  to:animate::@4
animate::@4: scope:[animate]  from animate::@3 animate::@8
  [26] (byte~) animate::$12 ← *((const byte[]) YPOS#0+(byte) 3) - (byte) 1
  [27] *((const byte[]) YPOS#0+(byte) 3) ← (byte~) animate::$12
  [28] if(*((const byte[]) YPOS#0+(byte) 3)!=(byte) $ff) goto animate::@return
  to:animate::@9
animate::@9: scope:[animate]  from animate::@4
  [29] *((const byte[]) YPOS#0+(byte) 3) ← (byte) $19
  [30] (byte~) animate::$15 ← *((const byte[]) XPOS#0+(byte) 3) + (byte) 7
  [31] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$15
  [32] if(*((const byte[]) XPOS#0+(byte) 3)<(byte) $28) goto animate::@return
  to:animate::@10
animate::@10: scope:[animate]  from animate::@9
  [33] (byte~) animate::$18 ← *((const byte[]) XPOS#0+(byte) 3) - (byte) $28
  [34] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$18
  to:animate::@return
animate::@return: scope:[animate]  from animate::@10 animate::@4 animate::@9
  [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) 0 render::@3/(byte) render::y#1 )
  to:render::@2
render::@2: scope:[render]  from render::@1 render::@4
  [38] (byte) render::x#2 ← phi( render::@1/(byte) 0 render::@4/(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#3
  to:render::@4
render::@4: 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) $28) goto render::@2
  to:render::@3
render::@3: scope:[render]  from render::@4
  [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte) $28
  [48] (byte) render::y#1 ← ++ (byte) render::y#4
  [49] if((byte) render::y#1!=(byte) $19) 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::@2
findcol::@2: scope:[findcol]  from findcol findcol::@13
  [52] (byte) findcol::mindiff#13 ← phi( findcol::@13/(byte~) findcol::mindiff#23 findcol/(byte) $ff )
  [52] (byte) findcol::mincol#15 ← phi( findcol::@13/(byte) findcol::mincol#10 findcol/(byte) 0 )
  [52] (byte) findcol::i#14 ← phi( findcol::@13/(byte) findcol::i#1 findcol/(byte) 0 )
  [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#14)
  [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#14)
  [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@3
  to:findcol::@9
findcol::@9: scope:[findcol]  from findcol::@2
  [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@3
  to:findcol::@return
findcol::@return: scope:[findcol]  from findcol::@1 findcol::@9
  [57] (byte) findcol::return#3 ← phi( findcol::@9/(byte) 0 findcol::@1/(byte) findcol::mincol#10 )
  [58] return 
  to:@return
findcol::@3: scope:[findcol]  from findcol::@2 findcol::@9
  [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4
  to:findcol::@10
findcol::@10: scope:[findcol]  from findcol::@3
  [60] (byte) findcol::diff#2 ← (byte) findcol::x#0 - (byte) findcol::xp#0
  to:findcol::@5
findcol::@5: scope:[findcol]  from findcol::@10 findcol::@4
  [61] (byte) findcol::diff#5 ← phi( findcol::@10/(byte) findcol::diff#2 findcol::@4/(byte) findcol::diff#1 )
  [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6
  to:findcol::@11
findcol::@11: scope:[findcol]  from findcol::@5
  [63] (byte~) findcol::$9 ← (byte) findcol::y#0 - (byte) findcol::yp#0
  [64] (byte) findcol::diff#4 ← (byte) findcol::diff#5 + (byte~) findcol::$9
  to:findcol::@7
findcol::@7: scope:[findcol]  from findcol::@11 findcol::@6
  [65] (byte) findcol::diff#7 ← phi( findcol::@11/(byte) findcol::diff#4 findcol::@6/(byte) findcol::diff#3 )
  [66] if((byte) findcol::diff#7>=(byte) findcol::mindiff#13) goto findcol::@14
  to:findcol::@12
findcol::@12: scope:[findcol]  from findcol::@7
  [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#14)
  to:findcol::@8
findcol::@8: scope:[findcol]  from findcol::@12 findcol::@14
  [68] (byte) findcol::mindiff#10 ← phi( findcol::@12/(byte) findcol::diff#7 findcol::@14/(byte~) findcol::mindiff#25 )
  [68] (byte) findcol::mincol#10 ← phi( findcol::@12/(byte) findcol::mincol#1 findcol::@14/(byte) findcol::mincol#15 )
  [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#14
  to:findcol::@1
findcol::@1: scope:[findcol]  from findcol::@8
  [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@13
  to:findcol::@return
findcol::@13: scope:[findcol]  from findcol::@1
  [71] (byte~) findcol::mindiff#23 ← (byte) findcol::mindiff#10
  to:findcol::@2
findcol::@14: scope:[findcol]  from findcol::@7
  [72] (byte~) findcol::mindiff#25 ← (byte) findcol::mindiff#13
  to:findcol::@8
findcol::@6: scope:[findcol]  from findcol::@5
  [73] (byte~) findcol::$11 ← (byte) findcol::yp#0 - (byte) findcol::y#0
  [74] (byte) findcol::diff#3 ← (byte) findcol::diff#5 + (byte~) findcol::$11
  to:findcol::@7
findcol::@4: scope:[findcol]  from findcol::@3
  [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0
  to:findcol::@5
initscreen: scope:[initscreen]  from main
  [76] phi()
  to:initscreen::@2
initscreen::@2: scope:[initscreen]  from initscreen initscreen::@1
  [77] (byte*) initscreen::screen#4 ← phi( initscreen::@1/(byte*) initscreen::screen#1 initscreen/(const byte*) SCREEN#0 )
  [78] *((byte*) initscreen::screen#4) ← (const byte) FILL#0
  [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#4
  to:initscreen::@1
initscreen::@1: scope:[initscreen]  from initscreen::@2
  [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word) $3e8) goto initscreen::@2
  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~) animate::$0 4.0
(byte~) animate::$12 4.0
(byte~) animate::$15 4.0
(byte~) animate::$18 4.0
(byte~) animate::$3 4.0
(byte~) animate::$6 4.0
(byte~) animate::$9 4.0
(byte()) findcol((byte) findcol::x , (byte) findcol::y)
(byte~) findcol::$11 20002.0
(byte~) findcol::$9 20002.0
(byte) findcol::diff
(byte) findcol::diff#1 20002.0
(byte) findcol::diff#2 20002.0
(byte) findcol::diff#3 20002.0
(byte) findcol::diff#4 20002.0
(byte) findcol::diff#5 10001.0
(byte) findcol::diff#7 13334.666666666666
(byte) findcol::i
(byte) findcol::i#1 10001.0
(byte) findcol::i#14 2631.842105263158
(byte) findcol::mincol
(byte) findcol::mincol#1 20002.0
(byte) findcol::mincol#10 10001.0
(byte) findcol::mincol#15 1176.5882352941176
(byte) findcol::mindiff
(byte) findcol::mindiff#10 10001.0
(byte) findcol::mindiff#13 1875.1875
(byte~) findcol::mindiff#23 20002.0
(byte~) findcol::mindiff#25 20002.0
(byte) findcol::return
(byte) findcol::return#0 2002.0
(byte) findcol::return#3 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#4 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#14 findcol::i#1 ]
[ findcol::mindiff#13 findcol::mindiff#23 ]
[ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ]
[ findcol::diff#5 findcol::diff#2 findcol::diff#1 ]
[ findcol::mindiff#10 findcol::diff#7 findcol::diff#4 findcol::diff#3 findcol::mindiff#25 ]
[ initscreen::screen#4 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::$9 to zero page equivalence class [ findcol::$9 ]
Added variable findcol::$11 to zero page equivalence class [ findcol::$11 ]
Complete equivalence classes
[ render::y#4 render::y#1 ]
[ render::colline#5 render::colline#1 ]
[ render::x#2 render::x#1 ]
[ findcol::i#14 findcol::i#1 ]
[ findcol::mindiff#13 findcol::mindiff#23 ]
[ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ]
[ findcol::diff#5 findcol::diff#2 findcol::diff#1 ]
[ findcol::mindiff#10 findcol::diff#7 findcol::diff#4 findcol::diff#3 findcol::mindiff#25 ]
[ initscreen::screen#4 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::$9 ]
[ findcol::$11 ]
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#14 findcol::i#1 ]
Allocated zp ZP_BYTE:7 [ findcol::mindiff#13 findcol::mindiff#23 ]
Allocated zp ZP_BYTE:8 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ]
Allocated zp ZP_BYTE:9 [ findcol::diff#5 findcol::diff#2 findcol::diff#1 ]
Allocated zp ZP_BYTE:10 [ findcol::mindiff#10 findcol::diff#7 findcol::diff#4 findcol::diff#3 findcol::mindiff#25 ]
Allocated zp ZP_WORD:11 [ initscreen::screen#4 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::$9 ]
Allocated zp ZP_BYTE:27 [ findcol::$11 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
// The screen
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  .label COLORS = $d800
  .const FILL = $e6
  // The total number of voronoi points
  .const numpoints = 6
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // [5] call initscreen 
    // [76] phi from main to initscreen [phi:main->initscreen]
  initscreen_from_main:
    jsr initscreen
    // [6] phi from main main::@2 to main::@1 [phi:main/main::@2->main::@1]
  b1_from_main:
  b1_from_b2:
    jmp b1
    // main::@1
  b1:
    // [7] call render 
    // [36] phi from main::@1 to render [phi:main::@1->render]
  render_from_b1:
    jsr render
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [9] call animate 
    jsr animate
    jmp b1_from_b2
}
  // animate
animate: {
    .label _0 = $d
    .label _3 = $e
    .label _6 = $f
    .label _9 = $10
    .label _12 = $11
    .label _15 = $12
    .label _18 = $13
    // [10] (byte~) animate::$0 ← *((const byte[]) XPOS#0) + (byte) 1 -- vbuz1=_deref_pbuc1_plus_1 
    ldy XPOS
    iny
    sty.z _0
    // [11] *((const byte[]) XPOS#0) ← (byte~) animate::$0 -- _deref_pbuc1=vbuz1 
    lda.z _0
    sta XPOS
    // [12] if(*((const byte[]) XPOS#0)!=(byte) $28) goto animate::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$28
    cmp XPOS
    bne b1
    jmp b5
    // animate::@5
  b5:
    // [13] *((const byte[]) XPOS#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta XPOS
    jmp b1
    // animate::@1
  b1:
    // [14] (byte~) animate::$3 ← *((const byte[]) YPOS#0) + (byte) 1 -- vbuz1=_deref_pbuc1_plus_1 
    ldy YPOS
    iny
    sty.z _3
    // [15] *((const byte[]) YPOS#0) ← (byte~) animate::$3 -- _deref_pbuc1=vbuz1 
    lda.z _3
    sta YPOS
    // [16] if(*((const byte[]) YPOS#0)!=(byte) $19) goto animate::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$19
    cmp YPOS
    bne b2
    jmp b6
    // animate::@6
  b6:
    // [17] *((const byte[]) YPOS#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS
    jmp b2
    // animate::@2
  b2:
    // [18] (byte~) animate::$6 ← *((const byte[]) XPOS#0+(byte) 1) - (byte) 1 -- vbuz1=_deref_pbuc1_minus_1 
    ldx XPOS+1
    dex
    stx.z _6
    // [19] *((const byte[]) XPOS#0+(byte) 1) ← (byte~) animate::$6 -- _deref_pbuc1=vbuz1 
    lda.z _6
    sta XPOS+1
    // [20] if(*((const byte[]) XPOS#0+(byte) 1)!=(byte) $ff) goto animate::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp XPOS+1
    bne b3
    jmp b7
    // animate::@7
  b7:
    // [21] *((const byte[]) XPOS#0+(byte) 1) ← (byte) $28 -- _deref_pbuc1=vbuc2 
    lda #$28
    sta XPOS+1
    jmp b3
    // animate::@3
  b3:
    // [22] (byte~) animate::$9 ← *((const byte[]) YPOS#0+(byte) 2) + (byte) 1 -- vbuz1=_deref_pbuc1_plus_1 
    ldy YPOS+2
    iny
    sty.z _9
    // [23] *((const byte[]) YPOS#0+(byte) 2) ← (byte~) animate::$9 -- _deref_pbuc1=vbuz1 
    lda.z _9
    sta YPOS+2
    // [24] if(*((const byte[]) YPOS#0+(byte) 2)!=(byte) $19) goto animate::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$19
    cmp YPOS+2
    bne b4
    jmp b8
    // animate::@8
  b8:
    // [25] *((const byte[]) YPOS#0+(byte) 2) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS+2
    jmp b4
    // animate::@4
  b4:
    // [26] (byte~) animate::$12 ← *((const byte[]) YPOS#0+(byte) 3) - (byte) 1 -- vbuz1=_deref_pbuc1_minus_1 
    ldx YPOS+3
    dex
    stx.z _12
    // [27] *((const byte[]) YPOS#0+(byte) 3) ← (byte~) animate::$12 -- _deref_pbuc1=vbuz1 
    lda.z _12
    sta YPOS+3
    // [28] if(*((const byte[]) YPOS#0+(byte) 3)!=(byte) $ff) goto animate::@return -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp YPOS+3
    bne breturn
    jmp b9
    // animate::@9
  b9:
    // [29] *((const byte[]) YPOS#0+(byte) 3) ← (byte) $19 -- _deref_pbuc1=vbuc2 
    lda #$19
    sta YPOS+3
    // [30] (byte~) animate::$15 ← *((const byte[]) XPOS#0+(byte) 3) + (byte) 7 -- vbuz1=_deref_pbuc1_plus_vbuc2 
    lda #7
    clc
    adc XPOS+3
    sta.z _15
    // [31] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$15 -- _deref_pbuc1=vbuz1 
    lda.z _15
    sta XPOS+3
    // [32] if(*((const byte[]) XPOS#0+(byte) 3)<(byte) $28) goto animate::@return -- _deref_pbuc1_lt_vbuc2_then_la1 
    lda XPOS+3
    cmp #$28
    bcc breturn
    jmp b10
    // animate::@10
  b10:
    // [33] (byte~) animate::$18 ← *((const byte[]) XPOS#0+(byte) 3) - (byte) $28 -- vbuz1=_deref_pbuc1_minus_vbuc2 
    lda XPOS+3
    sec
    sbc #$28
    sta.z _18
    // [34] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$18 -- _deref_pbuc1=vbuz1 
    lda.z _18
    sta XPOS+3
    jmp breturn
    // animate::@return
  breturn:
    // [35] return 
    rts
}
  // render
render: {
    .label col = $17
    .label x = 5
    .label colline = 3
    .label y = 2
    // [37] phi from render to render::@1 [phi:render->render::@1]
  b1_from_render:
    // [37] phi (byte*) render::colline#5 = (const byte*) COLORS#0 [phi:render->render::@1#0] -- pbuz1=pbuc1 
    lda #<COLORS
    sta.z colline
    lda #>COLORS
    sta.z colline+1
    // [37] phi (byte) render::y#4 = (byte) 0 [phi:render->render::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    jmp b1
    // [37] phi from render::@3 to render::@1 [phi:render::@3->render::@1]
  b1_from_b3:
    // [37] phi (byte*) render::colline#5 = (byte*) render::colline#1 [phi:render::@3->render::@1#0] -- register_copy 
    // [37] phi (byte) render::y#4 = (byte) render::y#1 [phi:render::@3->render::@1#1] -- register_copy 
    jmp b1
    // render::@1
  b1:
    // [38] phi from render::@1 to render::@2 [phi:render::@1->render::@2]
  b2_from_b1:
    // [38] phi (byte) render::x#2 = (byte) 0 [phi:render::@1->render::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z x
    jmp b2
    // [38] phi from render::@4 to render::@2 [phi:render::@4->render::@2]
  b2_from_b4:
    // [38] phi (byte) render::x#2 = (byte) render::x#1 [phi:render::@4->render::@2#0] -- register_copy 
    jmp b2
    // render::@2
  b2:
    // [39] (byte) findcol::x#0 ← (byte) render::x#2 -- vbuz1=vbuz2 
    lda.z x
    sta.z findcol.x
    // [40] (byte) findcol::y#0 ← (byte) render::y#4 -- vbuz1=vbuz2 
    lda.z y
    sta.z findcol.y
    // [41] call findcol 
    // [51] phi from render::@2 to findcol [phi:render::@2->findcol]
  findcol_from_b2:
    jsr findcol
    // [42] (byte) findcol::return#0 ← (byte) findcol::return#3 -- vbuz1=vbuz2 
    lda.z findcol.return_3
    sta.z findcol.return
    jmp b4
    // render::@4
  b4:
    // [43] (byte) render::col#0 ← (byte) findcol::return#0 -- vbuz1=vbuz2 
    lda.z findcol.return
    sta.z col
    // [44] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0 -- pbuz1_derefidx_vbuz2=vbuz3 
    lda.z col
    ldy.z x
    sta (colline),y
    // [45] (byte) render::x#1 ← ++ (byte) render::x#2 -- vbuz1=_inc_vbuz1 
    inc.z x
    // [46] if((byte) render::x#1!=(byte) $28) goto render::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$28
    cmp.z x
    bne b2_from_b4
    jmp b3
    // render::@3
  b3:
    // [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z colline
    sta.z colline
    bcc !+
    inc.z colline+1
  !:
    // [48] (byte) render::y#1 ← ++ (byte) render::y#4 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [49] if((byte) render::y#1!=(byte) $19) goto render::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z y
    bne b1_from_b3
    jmp breturn
    // render::@return
  breturn:
    // [50] return 
    rts
}
  // findcol
// findcol(byte zeropage($14) x, byte zeropage($15) y)
findcol: {
    .label _9 = $1a
    .label _11 = $1b
    .label x = $14
    .label y = $15
    .label return = $16
    .label xp = $18
    .label yp = $19
    .label return_3 = 8
    .label diff = 9
    .label diff_3 = $a
    .label diff_4 = $a
    .label i = 6
    .label mincol = 8
    .label diff_7 = $a
    .label mindiff = $a
    .label mindiff_13 = 7
    .label mindiff_23 = 7
    // [52] phi from findcol to findcol::@2 [phi:findcol->findcol::@2]
  b2_from_findcol:
    // [52] phi (byte) findcol::mindiff#13 = (byte) $ff [phi:findcol->findcol::@2#0] -- vbuz1=vbuc1 
    lda #$ff
    sta.z mindiff_13
    // [52] phi (byte) findcol::mincol#15 = (byte) 0 [phi:findcol->findcol::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta.z mincol
    // [52] phi (byte) findcol::i#14 = (byte) 0 [phi:findcol->findcol::@2#2] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp b2
    // findcol::@2
  b2:
    // [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#14) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z i
    lda XPOS,y
    sta.z xp
    // [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#14) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z i
    lda YPOS,y
    sta.z yp
    // [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@3 -- vbuz1_neq_vbuz2_then_la1 
    lda.z x
    cmp.z xp
    bne b3
    jmp b9
    // findcol::@9
  b9:
    // [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@3 -- vbuz1_neq_vbuz2_then_la1 
    lda.z y
    cmp.z yp
    bne b3
    // [57] phi from findcol::@9 to findcol::@return [phi:findcol::@9->findcol::@return]
  breturn_from_b9:
    // [57] phi (byte) findcol::return#3 = (byte) 0 [phi:findcol::@9->findcol::@return#0] -- vbuz1=vbuc1 
    lda #0
    sta.z return_3
    jmp breturn
    // findcol::@return
  breturn:
    // [58] return 
    rts
    // findcol::@3
  b3:
    // [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 -- vbuz1_lt_vbuz2_then_la1 
    lda.z x
    cmp.z xp
    bcc b4
    jmp b10
    // findcol::@10
  b10:
    // [60] (byte) findcol::diff#2 ← (byte) findcol::x#0 - (byte) findcol::xp#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda.z x
    sec
    sbc.z xp
    sta.z diff
    // [61] phi from findcol::@10 findcol::@4 to findcol::@5 [phi:findcol::@10/findcol::@4->findcol::@5]
  b5_from_b10:
  b5_from_b4:
    // [61] phi (byte) findcol::diff#5 = (byte) findcol::diff#2 [phi:findcol::@10/findcol::@4->findcol::@5#0] -- register_copy 
    jmp b5
    // findcol::@5
  b5:
    // [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 -- vbuz1_lt_vbuz2_then_la1 
    lda.z y
    cmp.z yp
    bcc b6
    jmp b11
    // findcol::@11
  b11:
    // [63] (byte~) findcol::$9 ← (byte) findcol::y#0 - (byte) findcol::yp#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda.z y
    sec
    sbc.z yp
    sta.z _9
    // [64] (byte) findcol::diff#4 ← (byte) findcol::diff#5 + (byte~) findcol::$9 -- vbuz1=vbuz2_plus_vbuz3 
    lda.z diff
    clc
    adc.z _9
    sta.z diff_4
    // [65] phi from findcol::@11 findcol::@6 to findcol::@7 [phi:findcol::@11/findcol::@6->findcol::@7]
  b7_from_b11:
  b7_from_b6:
    // [65] phi (byte) findcol::diff#7 = (byte) findcol::diff#4 [phi:findcol::@11/findcol::@6->findcol::@7#0] -- register_copy 
    jmp b7
    // findcol::@7
  b7:
    // [66] if((byte) findcol::diff#7>=(byte) findcol::mindiff#13) goto findcol::@14 -- vbuz1_ge_vbuz2_then_la1 
    lda.z diff_7
    cmp.z mindiff_13
    bcs b14
    jmp b12
    // findcol::@12
  b12:
    // [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#14) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z i
    lda COLS,y
    sta.z mincol
    // [68] phi from findcol::@12 findcol::@14 to findcol::@8 [phi:findcol::@12/findcol::@14->findcol::@8]
  b8_from_b12:
  b8_from_b14:
    // [68] phi (byte) findcol::mindiff#10 = (byte) findcol::diff#7 [phi:findcol::@12/findcol::@14->findcol::@8#0] -- register_copy 
    // [68] phi (byte) findcol::mincol#10 = (byte) findcol::mincol#1 [phi:findcol::@12/findcol::@14->findcol::@8#1] -- register_copy 
    jmp b8
    // findcol::@8
  b8:
    // [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#14 -- vbuz1=_inc_vbuz1 
    inc.z i
    jmp b1
    // findcol::@1
  b1:
    // [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@13 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #numpoints
    bcc b13
    // [57] phi from findcol::@1 to findcol::@return [phi:findcol::@1->findcol::@return]
  breturn_from_b1:
    // [57] phi (byte) findcol::return#3 = (byte) findcol::mincol#10 [phi:findcol::@1->findcol::@return#0] -- register_copy 
    jmp breturn
    // findcol::@13
  b13:
    // [71] (byte~) findcol::mindiff#23 ← (byte) findcol::mindiff#10 -- vbuz1=vbuz2 
    lda.z mindiff
    sta.z mindiff_23
    // [52] phi from findcol::@13 to findcol::@2 [phi:findcol::@13->findcol::@2]
  b2_from_b13:
    // [52] phi (byte) findcol::mindiff#13 = (byte~) findcol::mindiff#23 [phi:findcol::@13->findcol::@2#0] -- register_copy 
    // [52] phi (byte) findcol::mincol#15 = (byte) findcol::mincol#10 [phi:findcol::@13->findcol::@2#1] -- register_copy 
    // [52] phi (byte) findcol::i#14 = (byte) findcol::i#1 [phi:findcol::@13->findcol::@2#2] -- register_copy 
    jmp b2
    // findcol::@14
  b14:
    // [72] (byte~) findcol::mindiff#25 ← (byte) findcol::mindiff#13 -- vbuz1=vbuz2 
    lda.z mindiff_13
    sta.z mindiff
    jmp b8_from_b14
    // findcol::@6
  b6:
    // [73] (byte~) findcol::$11 ← (byte) findcol::yp#0 - (byte) findcol::y#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda.z yp
    sec
    sbc.z y
    sta.z _11
    // [74] (byte) findcol::diff#3 ← (byte) findcol::diff#5 + (byte~) findcol::$11 -- vbuz1=vbuz2_plus_vbuz3 
    lda.z diff
    clc
    adc.z _11
    sta.z diff_3
    jmp b7_from_b6
    // findcol::@4
  b4:
    // [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda.z xp
    sec
    sbc.z x
    sta.z diff
    jmp b5_from_b4
}
  // initscreen
initscreen: {
    .label screen = $b
    // [77] phi from initscreen to initscreen::@2 [phi:initscreen->initscreen::@2]
  b2_from_initscreen:
    // [77] phi (byte*) initscreen::screen#4 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    jmp b2
    // [77] phi from initscreen::@1 to initscreen::@2 [phi:initscreen::@1->initscreen::@2]
  b2_from_b1:
    // [77] phi (byte*) initscreen::screen#4 = (byte*) initscreen::screen#1 [phi:initscreen::@1->initscreen::@2#0] -- register_copy 
    jmp b2
    // initscreen::@2
  b2:
    // [78] *((byte*) initscreen::screen#4) ← (const byte) FILL#0 -- _deref_pbuz1=vbuc1 
    lda #FILL
    ldy #0
    sta (screen),y
    // [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    jmp b1
    // initscreen::@1
  b1:
    // [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word) $3e8) goto initscreen::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z screen+1
    cmp #>SCREEN+$3e8
    bcc b2_from_b1
    bne !+
    lda.z screen
    cmp #<SCREEN+$3e8
    bcc b2_from_b1
  !:
    jmp breturn
    // initscreen::@return
  breturn:
    // [81] return 
    rts
}
  // File Data
  // 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) $28) goto animate::@1 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte[]) XPOS#0) ← (byte) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [16] if(*((const byte[]) YPOS#0)!=(byte) $19) goto animate::@2 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte[]) YPOS#0) ← (byte) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [20] if(*((const byte[]) XPOS#0+(byte) 1)!=(byte) $ff) goto animate::@3 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte[]) XPOS#0+(byte) 1) ← (byte) $28 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [24] if(*((const byte[]) YPOS#0+(byte) 2)!=(byte) $19) goto animate::@4 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte[]) YPOS#0+(byte) 2) ← (byte) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [28] if(*((const byte[]) YPOS#0+(byte) 3)!=(byte) $ff) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [29] *((const byte[]) YPOS#0+(byte) 3) ← (byte) $19 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [30] (byte~) animate::$15 ← *((const byte[]) XPOS#0+(byte) 3) + (byte) 7 [ animate::$15 ] ( main:2::animate:9 [ animate::$15 ] ) always clobbers reg byte a 
Statement [32] if(*((const byte[]) XPOS#0+(byte) 3)<(byte) $28) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [33] (byte~) animate::$18 ← *((const byte[]) XPOS#0+(byte) 3) - (byte) $28 [ animate::$18 ] ( main:2::animate:9 [ animate::$18 ] ) always clobbers reg byte a 
Statement [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte) $28 [ 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#2 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::yp#0 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#14 findcol::mincol#15 findcol::mindiff#13 findcol::yp#0 findcol::diff#2 ] ) 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#14 findcol::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ findcol::mindiff#13 findcol::mindiff#23 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ findcol::yp#0 ]
Statement [63] (byte~) findcol::$9 ← (byte) findcol::y#0 - (byte) findcol::yp#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$9 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$9 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ findcol::diff#5 findcol::diff#2 findcol::diff#1 ]
Statement [64] (byte) findcol::diff#4 ← (byte) findcol::diff#5 + (byte~) findcol::$9 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#4 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#4 ] ) always clobbers reg byte a 
Statement [73] (byte~) findcol::$11 ← (byte) findcol::yp#0 - (byte) findcol::y#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$11 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$11 ] ) always clobbers reg byte a 
Statement [74] (byte) findcol::diff#3 ← (byte) findcol::diff#5 + (byte~) findcol::$11 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 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#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#3 ] ) always clobbers reg byte a 
Statement [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 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#14 findcol::mincol#15 findcol::mindiff#13 findcol::yp#0 findcol::diff#1 ] ) always clobbers reg byte a 
Statement [78] *((byte*) initscreen::screen#4) ← (const byte) FILL#0 [ initscreen::screen#4 ] ( main:2::initscreen:5 [ initscreen::screen#4 ] ) always clobbers reg byte a reg byte y 
Statement [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word) $3e8) goto initscreen::@2 [ initscreen::screen#1 ] ( main:2::initscreen:5 [ initscreen::screen#1 ] ) always clobbers reg byte a 
Statement [12] if(*((const byte[]) XPOS#0)!=(byte) $28) goto animate::@1 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte[]) XPOS#0) ← (byte) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [16] if(*((const byte[]) YPOS#0)!=(byte) $19) goto animate::@2 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte[]) YPOS#0) ← (byte) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [20] if(*((const byte[]) XPOS#0+(byte) 1)!=(byte) $ff) goto animate::@3 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte[]) XPOS#0+(byte) 1) ← (byte) $28 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [24] if(*((const byte[]) YPOS#0+(byte) 2)!=(byte) $19) goto animate::@4 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte[]) YPOS#0+(byte) 2) ← (byte) 0 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [28] if(*((const byte[]) YPOS#0+(byte) 3)!=(byte) $ff) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [29] *((const byte[]) YPOS#0+(byte) 3) ← (byte) $19 [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [30] (byte~) animate::$15 ← *((const byte[]) XPOS#0+(byte) 3) + (byte) 7 [ animate::$15 ] ( main:2::animate:9 [ animate::$15 ] ) always clobbers reg byte a 
Statement [32] if(*((const byte[]) XPOS#0+(byte) 3)<(byte) $28) goto animate::@return [ ] ( main:2::animate:9 [ ] ) always clobbers reg byte a 
Statement [33] (byte~) animate::$18 ← *((const byte[]) XPOS#0+(byte) 3) - (byte) $28 [ animate::$18 ] ( main:2::animate:9 [ animate::$18 ] ) always clobbers reg byte a 
Statement [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte) $28 [ 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#2 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::yp#0 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#14 findcol::mincol#15 findcol::mindiff#13 findcol::yp#0 findcol::diff#2 ] ) always clobbers reg byte a 
Statement [63] (byte~) findcol::$9 ← (byte) findcol::y#0 - (byte) findcol::yp#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$9 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$9 ] ) always clobbers reg byte a 
Statement [64] (byte) findcol::diff#4 ← (byte) findcol::diff#5 + (byte~) findcol::$9 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#4 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#4 ] ) always clobbers reg byte a 
Statement [73] (byte~) findcol::$11 ← (byte) findcol::yp#0 - (byte) findcol::y#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$11 ] ( main:2::render:7::findcol:41 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#5 findcol::$11 ] ) always clobbers reg byte a 
Statement [74] (byte) findcol::diff#3 ← (byte) findcol::diff#5 + (byte~) findcol::$11 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 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#14 findcol::mincol#15 findcol::mindiff#13 findcol::diff#3 ] ) always clobbers reg byte a 
Statement [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#14 findcol::mincol#15 findcol::mindiff#13 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#14 findcol::mincol#15 findcol::mindiff#13 findcol::yp#0 findcol::diff#1 ] ) always clobbers reg byte a 
Statement [78] *((byte*) initscreen::screen#4) ← (const byte) FILL#0 [ initscreen::screen#4 ] ( main:2::initscreen:5 [ initscreen::screen#4 ] ) always clobbers reg byte a reg byte y 
Statement [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word) $3e8) goto initscreen::@2 [ 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#14 findcol::i#1 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:7 [ findcol::mindiff#13 findcol::mindiff#23 ] : zp ZP_BYTE:7 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:8 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ findcol::diff#5 findcol::diff#2 findcol::diff#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ findcol::mindiff#10 findcol::diff#7 findcol::diff#4 findcol::diff#3 findcol::mindiff#25 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:11 [ initscreen::screen#4 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::$9 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:27 [ findcol::$11 ] : 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#10 findcol::diff#7 findcol::diff#4 findcol::diff#3 findcol::mindiff#25 ] 50,005: zp ZP_BYTE:9 [ findcol::diff#5 findcol::diff#2 findcol::diff#1 ] 34,846.92: zp ZP_BYTE:8 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ] 21,877.19: zp ZP_BYTE:7 [ findcol::mindiff#13 findcol::mindiff#23 ] 20,002: zp ZP_BYTE:26 [ findcol::$9 ] 20,002: zp ZP_BYTE:27 [ findcol::$11 ] 12,632.84: zp ZP_BYTE:6 [ findcol::i#14 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#4 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 2106962 combination reg byte x [ findcol::mindiff#10 findcol::diff#7 findcol::diff#4 findcol::diff#3 findcol::mindiff#25 ] reg byte x [ findcol::diff#5 findcol::diff#2 findcol::diff#1 ] zp ZP_BYTE:8 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ] zp ZP_BYTE:7 [ findcol::mindiff#13 findcol::mindiff#23 ] zp ZP_BYTE:26 [ findcol::$9 ] zp ZP_BYTE:27 [ findcol::$11 ] zp ZP_BYTE:6 [ findcol::i#14 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 2100962 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 2100962 combination zp ZP_WORD:11 [ initscreen::screen#4 initscreen::screen#1 ] 
Uplifting [animate] best 2100942 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 2100942 combination 
Uplifting [] best 2100942 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ]
Uplifting [findcol] best 2100942 combination zp ZP_BYTE:8 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ findcol::mindiff#13 findcol::mindiff#23 ]
Uplifting [findcol] best 2100942 combination zp ZP_BYTE:7 [ findcol::mindiff#13 findcol::mindiff#23 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ findcol::$9 ]
Uplifting [findcol] best 2080942 combination reg byte a [ findcol::$9 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ findcol::$11 ]
Uplifting [findcol] best 2060942 combination reg byte a [ findcol::$11 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ findcol::i#14 findcol::i#1 ]
Uplifting [findcol] best 1880942 combination reg byte y [ findcol::i#14 findcol::i#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:24 [ findcol::xp#0 ]
Uplifting [findcol] best 1835942 combination reg byte x [ findcol::xp#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ findcol::yp#0 ]
Uplifting [findcol] best 1835942 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 1835942 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 1829942 combination reg byte a [ findcol::return#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ findcol::y#0 ]
Uplifting [findcol] best 1829942 combination zp ZP_BYTE:21 [ findcol::y#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ findcol::x#0 ]
Uplifting [findcol] best 1829942 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 1829942 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 1829936 combination reg byte x [ animate::$12 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ animate::$15 ]
Uplifting [animate] best 1829930 combination reg byte a [ animate::$15 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:19 [ animate::$18 ]
Uplifting [animate] best 1829924 combination reg byte a [ animate::$18 ] 
Coalescing zero page register [ zp ZP_BYTE:2 [ render::y#4 render::y#1 ] ] with [ zp ZP_BYTE:21 [ findcol::y#0 ] ] - score: 1
Coalescing zero page register [ 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:11 [ initscreen::screen#4 initscreen::screen#1 ] ] with [ zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] ]
Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:3 [ render::x#2 render::x#1 findcol::x#0 ]
Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:4 [ findcol::mindiff#13 findcol::mindiff#23 ]
Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:5 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ]
Allocated (was zp ZP_WORD:11) zp ZP_WORD:6 [ initscreen::screen#4 initscreen::screen#1 render::colline#5 render::colline#1 ]
Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:8 [ findcol::yp#0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// The screen
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  .label COLORS = $d800
  .const FILL = $e6
  // The total number of voronoi points
  .const numpoints = 6
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // [5] call initscreen 
    // [76] phi from main to initscreen [phi:main->initscreen]
  initscreen_from_main:
    jsr initscreen
    // [6] phi from main main::@2 to main::@1 [phi:main/main::@2->main::@1]
  b1_from_main:
  b1_from_b2:
    jmp b1
    // main::@1
  b1:
    // [7] call render 
    // [36] phi from main::@1 to render [phi:main::@1->render]
  render_from_b1:
    jsr render
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [9] call animate 
    jsr animate
    jmp b1_from_b2
}
  // animate
animate: {
    // [10] (byte~) animate::$0 ← *((const byte[]) XPOS#0) + (byte) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx XPOS
    inx
    // [11] *((const byte[]) XPOS#0) ← (byte~) animate::$0 -- _deref_pbuc1=vbuxx 
    stx XPOS
    // [12] if(*((const byte[]) XPOS#0)!=(byte) $28) goto animate::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$28
    cmp XPOS
    bne b1
    jmp b5
    // animate::@5
  b5:
    // [13] *((const byte[]) XPOS#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta XPOS
    jmp b1
    // animate::@1
  b1:
    // [14] (byte~) animate::$3 ← *((const byte[]) YPOS#0) + (byte) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx YPOS
    inx
    // [15] *((const byte[]) YPOS#0) ← (byte~) animate::$3 -- _deref_pbuc1=vbuxx 
    stx YPOS
    // [16] if(*((const byte[]) YPOS#0)!=(byte) $19) goto animate::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$19
    cmp YPOS
    bne b2
    jmp b6
    // animate::@6
  b6:
    // [17] *((const byte[]) YPOS#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS
    jmp b2
    // animate::@2
  b2:
    // [18] (byte~) animate::$6 ← *((const byte[]) XPOS#0+(byte) 1) - (byte) 1 -- vbuaa=_deref_pbuc1_minus_1 
    lda XPOS+1
    sec
    sbc #1
    // [19] *((const byte[]) XPOS#0+(byte) 1) ← (byte~) animate::$6 -- _deref_pbuc1=vbuaa 
    sta XPOS+1
    // [20] if(*((const byte[]) XPOS#0+(byte) 1)!=(byte) $ff) goto animate::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp XPOS+1
    bne b3
    jmp b7
    // animate::@7
  b7:
    // [21] *((const byte[]) XPOS#0+(byte) 1) ← (byte) $28 -- _deref_pbuc1=vbuc2 
    lda #$28
    sta XPOS+1
    jmp b3
    // animate::@3
  b3:
    // [22] (byte~) animate::$9 ← *((const byte[]) YPOS#0+(byte) 2) + (byte) 1 -- vbuaa=_deref_pbuc1_plus_1 
    lda YPOS+2
    clc
    adc #1
    // [23] *((const byte[]) YPOS#0+(byte) 2) ← (byte~) animate::$9 -- _deref_pbuc1=vbuaa 
    sta YPOS+2
    // [24] if(*((const byte[]) YPOS#0+(byte) 2)!=(byte) $19) goto animate::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$19
    cmp YPOS+2
    bne b4
    jmp b8
    // animate::@8
  b8:
    // [25] *((const byte[]) YPOS#0+(byte) 2) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS+2
    jmp b4
    // animate::@4
  b4:
    // [26] (byte~) animate::$12 ← *((const byte[]) YPOS#0+(byte) 3) - (byte) 1 -- vbuxx=_deref_pbuc1_minus_1 
    ldx YPOS+3
    dex
    // [27] *((const byte[]) YPOS#0+(byte) 3) ← (byte~) animate::$12 -- _deref_pbuc1=vbuxx 
    stx YPOS+3
    // [28] if(*((const byte[]) YPOS#0+(byte) 3)!=(byte) $ff) goto animate::@return -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp YPOS+3
    bne breturn
    jmp b9
    // animate::@9
  b9:
    // [29] *((const byte[]) YPOS#0+(byte) 3) ← (byte) $19 -- _deref_pbuc1=vbuc2 
    lda #$19
    sta YPOS+3
    // [30] (byte~) animate::$15 ← *((const byte[]) XPOS#0+(byte) 3) + (byte) 7 -- vbuaa=_deref_pbuc1_plus_vbuc2 
    lda #7
    clc
    adc XPOS+3
    // [31] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$15 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
    // [32] if(*((const byte[]) XPOS#0+(byte) 3)<(byte) $28) goto animate::@return -- _deref_pbuc1_lt_vbuc2_then_la1 
    lda XPOS+3
    cmp #$28
    bcc breturn
    jmp b10
    // animate::@10
  b10:
    // [33] (byte~) animate::$18 ← *((const byte[]) XPOS#0+(byte) 3) - (byte) $28 -- vbuaa=_deref_pbuc1_minus_vbuc2 
    lda XPOS+3
    sec
    sbc #$28
    // [34] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$18 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
    jmp breturn
    // animate::@return
  breturn:
    // [35] return 
    rts
}
  // render
render: {
    .label x = 3
    .label colline = 6
    .label y = 2
    // [37] phi from render to render::@1 [phi:render->render::@1]
  b1_from_render:
    // [37] phi (byte*) render::colline#5 = (const byte*) COLORS#0 [phi:render->render::@1#0] -- pbuz1=pbuc1 
    lda #<COLORS
    sta.z colline
    lda #>COLORS
    sta.z colline+1
    // [37] phi (byte) render::y#4 = (byte) 0 [phi:render->render::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    jmp b1
    // [37] phi from render::@3 to render::@1 [phi:render::@3->render::@1]
  b1_from_b3:
    // [37] phi (byte*) render::colline#5 = (byte*) render::colline#1 [phi:render::@3->render::@1#0] -- register_copy 
    // [37] phi (byte) render::y#4 = (byte) render::y#1 [phi:render::@3->render::@1#1] -- register_copy 
    jmp b1
    // render::@1
  b1:
    // [38] phi from render::@1 to render::@2 [phi:render::@1->render::@2]
  b2_from_b1:
    // [38] phi (byte) render::x#2 = (byte) 0 [phi:render::@1->render::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z x
    jmp b2
    // [38] phi from render::@4 to render::@2 [phi:render::@4->render::@2]
  b2_from_b4:
    // [38] phi (byte) render::x#2 = (byte) render::x#1 [phi:render::@4->render::@2#0] -- register_copy 
    jmp b2
    // render::@2
  b2:
    // [39] (byte) findcol::x#0 ← (byte) render::x#2
    // [40] (byte) findcol::y#0 ← (byte) render::y#4
    // [41] call findcol 
    // [51] phi from render::@2 to findcol [phi:render::@2->findcol]
  findcol_from_b2:
    jsr findcol
    // [42] (byte) findcol::return#0 ← (byte) findcol::return#3 -- vbuaa=vbuz1 
    lda.z findcol.return
    jmp b4
    // render::@4
  b4:
    // [43] (byte) render::col#0 ← (byte) findcol::return#0
    // [44] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy.z x
    sta (colline),y
    // [45] (byte) render::x#1 ← ++ (byte) render::x#2 -- vbuz1=_inc_vbuz1 
    inc.z x
    // [46] if((byte) render::x#1!=(byte) $28) goto render::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$28
    cmp.z x
    bne b2_from_b4
    jmp b3
    // render::@3
  b3:
    // [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z colline
    sta.z colline
    bcc !+
    inc.z colline+1
  !:
    // [48] (byte) render::y#1 ← ++ (byte) render::y#4 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [49] if((byte) render::y#1!=(byte) $19) goto render::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z y
    bne b1_from_b3
    jmp breturn
    // render::@return
  breturn:
    // [50] return 
    rts
}
  // findcol
// findcol(byte zeropage(3) x, byte zeropage(2) y)
findcol: {
    .label x = 3
    .label y = 2
    .label yp = 8
    .label return = 5
    .label mincol = 5
    .label mindiff = 4
    // [52] phi from findcol to findcol::@2 [phi:findcol->findcol::@2]
  b2_from_findcol:
    // [52] phi (byte) findcol::mindiff#13 = (byte) $ff [phi:findcol->findcol::@2#0] -- vbuz1=vbuc1 
    lda #$ff
    sta.z mindiff
    // [52] phi (byte) findcol::mincol#15 = (byte) 0 [phi:findcol->findcol::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta.z mincol
    // [52] phi (byte) findcol::i#14 = (byte) 0 [phi:findcol->findcol::@2#2] -- vbuyy=vbuc1 
    ldy #0
    jmp b2
    // findcol::@2
  b2:
    // [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#14) -- vbuxx=pbuc1_derefidx_vbuyy 
    ldx XPOS,y
    // [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#14) -- vbuz1=pbuc1_derefidx_vbuyy 
    lda YPOS,y
    sta.z yp
    // [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@3 -- vbuz1_neq_vbuxx_then_la1 
    cpx.z x
    bne b3
    jmp b9
    // findcol::@9
  b9:
    // [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@3 -- vbuz1_neq_vbuz2_then_la1 
    lda.z y
    cmp.z yp
    bne b3
    // [57] phi from findcol::@9 to findcol::@return [phi:findcol::@9->findcol::@return]
  breturn_from_b9:
    // [57] phi (byte) findcol::return#3 = (byte) 0 [phi:findcol::@9->findcol::@return#0] -- vbuz1=vbuc1 
    lda #0
    sta.z return
    jmp breturn
    // findcol::@return
  breturn:
    // [58] return 
    rts
    // findcol::@3
  b3:
    // [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 -- vbuz1_lt_vbuxx_then_la1 
    txa
    cmp.z x
    beq !+
    bcs b4
  !:
    jmp b10
    // findcol::@10
  b10:
    // [60] (byte) findcol::diff#2 ← (byte) findcol::x#0 - (byte) findcol::xp#0 -- vbuxx=vbuz1_minus_vbuxx 
    txa
    eor #$ff
    sec
    adc.z x
    tax
    // [61] phi from findcol::@10 findcol::@4 to findcol::@5 [phi:findcol::@10/findcol::@4->findcol::@5]
  b5_from_b10:
  b5_from_b4:
    // [61] phi (byte) findcol::diff#5 = (byte) findcol::diff#2 [phi:findcol::@10/findcol::@4->findcol::@5#0] -- register_copy 
    jmp b5
    // findcol::@5
  b5:
    // [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 -- vbuz1_lt_vbuz2_then_la1 
    lda.z y
    cmp.z yp
    bcc b6
    jmp b11
    // findcol::@11
  b11:
    // [63] (byte~) findcol::$9 ← (byte) findcol::y#0 - (byte) findcol::yp#0 -- vbuaa=vbuz1_minus_vbuz2 
    lda.z y
    sec
    sbc.z yp
    // [64] (byte) findcol::diff#4 ← (byte) findcol::diff#5 + (byte~) findcol::$9 -- vbuxx=vbuxx_plus_vbuaa 
    stx.z $ff
    clc
    adc.z $ff
    tax
    // [65] phi from findcol::@11 findcol::@6 to findcol::@7 [phi:findcol::@11/findcol::@6->findcol::@7]
  b7_from_b11:
  b7_from_b6:
    // [65] phi (byte) findcol::diff#7 = (byte) findcol::diff#4 [phi:findcol::@11/findcol::@6->findcol::@7#0] -- register_copy 
    jmp b7
    // findcol::@7
  b7:
    // [66] if((byte) findcol::diff#7>=(byte) findcol::mindiff#13) goto findcol::@14 -- vbuxx_ge_vbuz1_then_la1 
    cpx.z mindiff
    bcs b14
    jmp b12
    // findcol::@12
  b12:
    // [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#14) -- vbuz1=pbuc1_derefidx_vbuyy 
    lda COLS,y
    sta.z mincol
    // [68] phi from findcol::@12 findcol::@14 to findcol::@8 [phi:findcol::@12/findcol::@14->findcol::@8]
  b8_from_b12:
  b8_from_b14:
    // [68] phi (byte) findcol::mindiff#10 = (byte) findcol::diff#7 [phi:findcol::@12/findcol::@14->findcol::@8#0] -- register_copy 
    // [68] phi (byte) findcol::mincol#10 = (byte) findcol::mincol#1 [phi:findcol::@12/findcol::@14->findcol::@8#1] -- register_copy 
    jmp b8
    // findcol::@8
  b8:
    // [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#14 -- vbuyy=_inc_vbuyy 
    iny
    jmp b1
    // findcol::@1
  b1:
    // [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@13 -- vbuyy_lt_vbuc1_then_la1 
    cpy #numpoints
    bcc b13
    // [57] phi from findcol::@1 to findcol::@return [phi:findcol::@1->findcol::@return]
  breturn_from_b1:
    // [57] phi (byte) findcol::return#3 = (byte) findcol::mincol#10 [phi:findcol::@1->findcol::@return#0] -- register_copy 
    jmp breturn
    // findcol::@13
  b13:
    // [71] (byte~) findcol::mindiff#23 ← (byte) findcol::mindiff#10 -- vbuz1=vbuxx 
    stx.z mindiff
    // [52] phi from findcol::@13 to findcol::@2 [phi:findcol::@13->findcol::@2]
  b2_from_b13:
    // [52] phi (byte) findcol::mindiff#13 = (byte~) findcol::mindiff#23 [phi:findcol::@13->findcol::@2#0] -- register_copy 
    // [52] phi (byte) findcol::mincol#15 = (byte) findcol::mincol#10 [phi:findcol::@13->findcol::@2#1] -- register_copy 
    // [52] phi (byte) findcol::i#14 = (byte) findcol::i#1 [phi:findcol::@13->findcol::@2#2] -- register_copy 
    jmp b2
    // findcol::@14
  b14:
    // [72] (byte~) findcol::mindiff#25 ← (byte) findcol::mindiff#13 -- vbuxx=vbuz1 
    ldx.z mindiff
    jmp b8_from_b14
    // findcol::@6
  b6:
    // [73] (byte~) findcol::$11 ← (byte) findcol::yp#0 - (byte) findcol::y#0 -- vbuaa=vbuz1_minus_vbuz2 
    lda.z yp
    sec
    sbc.z y
    // [74] (byte) findcol::diff#3 ← (byte) findcol::diff#5 + (byte~) findcol::$11 -- vbuxx=vbuxx_plus_vbuaa 
    stx.z $ff
    clc
    adc.z $ff
    tax
    jmp b7_from_b6
    // findcol::@4
  b4:
    // [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 -- vbuxx=vbuxx_minus_vbuz1 
    txa
    sec
    sbc.z x
    tax
    jmp b5_from_b4
}
  // initscreen
initscreen: {
    .label screen = 6
    // [77] phi from initscreen to initscreen::@2 [phi:initscreen->initscreen::@2]
  b2_from_initscreen:
    // [77] phi (byte*) initscreen::screen#4 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    jmp b2
    // [77] phi from initscreen::@1 to initscreen::@2 [phi:initscreen::@1->initscreen::@2]
  b2_from_b1:
    // [77] phi (byte*) initscreen::screen#4 = (byte*) initscreen::screen#1 [phi:initscreen::@1->initscreen::@2#0] -- register_copy 
    jmp b2
    // initscreen::@2
  b2:
    // [78] *((byte*) initscreen::screen#4) ← (const byte) FILL#0 -- _deref_pbuz1=vbuc1 
    lda #FILL
    ldy #0
    sta (screen),y
    // [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    jmp b1
    // initscreen::@1
  b1:
    // [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word) $3e8) goto initscreen::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z screen+1
    cmp #>SCREEN+$3e8
    bcc b2_from_b1
    bne !+
    lda.z screen
    cmp #<SCREEN+$3e8
    bcc b2_from_b1
  !:
    jmp breturn
    // initscreen::@return
  breturn:
    // [81] return 
    rts
}
  // File Data
  // 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 b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b5
Removing instruction jmp b1
Removing instruction jmp b6
Removing instruction jmp b2
Removing instruction jmp b7
Removing instruction jmp b3
Removing instruction jmp b8
Removing instruction jmp b4
Removing instruction jmp b9
Removing instruction jmp b10
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b4
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b9
Removing instruction jmp breturn
Removing instruction jmp b10
Removing instruction jmp b5
Removing instruction jmp b11
Removing instruction jmp b7
Removing instruction jmp b12
Removing instruction jmp b8
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda XPOS+3
Replacing instruction ldy #0 with TAY
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b2 with b1
Replacing label b2_from_b4 with b2
Replacing label b1_from_b3 with b1
Replacing label b8_from_b14 with b8
Replacing label b7_from_b6 with b7
Replacing label b5_from_b4 with b5
Replacing label b2_from_b1 with b2
Replacing label b2_from_b1 with b2
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_main:
Removing instruction b1_from_b2:
Removing instruction render_from_b1:
Removing instruction b2_from_b1:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b4:
Removing instruction findcol_from_b2:
Removing instruction b5_from_b10:
Removing instruction b5_from_b4:
Removing instruction b7_from_b11:
Removing instruction b7_from_b6:
Removing instruction b8_from_b12:
Removing instruction b8_from_b14:
Removing instruction b2_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction initscreen_from_main:
Removing instruction b2:
Removing instruction b5:
Removing instruction b6:
Removing instruction b7:
Removing instruction b8:
Removing instruction b9:
Removing instruction b10:
Removing instruction b1_from_render:
Removing instruction b4:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b2_from_findcol:
Removing instruction b9:
Removing instruction breturn_from_b9:
Removing instruction b10:
Removing instruction b11:
Removing instruction b12:
Removing instruction b1:
Removing instruction breturn_from_b1:
Removing instruction b2_from_b13:
Removing instruction b2_from_initscreen:
Removing instruction b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Replacing jump to rts with rts in jmp breturn
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda XPOS+3
Removing instruction lda #$28
Removing instruction lda.z y
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) COLORS
(const byte*) COLORS#0 COLORS = (byte*) 55296
(byte[]) COLS
(const byte[]) COLS#0 COLS = { (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 7 }
(byte) FILL
(const byte) FILL#0 FILL = (byte) $e6
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte[]) XPOS
(const byte[]) XPOS#0 XPOS = { (byte) 5, (byte) $f, (byte) 6, (byte) $22, (byte) $15, (byte) $1f }
(byte[]) YPOS
(const byte[]) YPOS#0 YPOS = { (byte) 5, (byte) 8, (byte) $e, (byte) 2, (byte) $11, (byte) $16 }
(void()) animate()
(byte~) animate::$0 reg byte x 4.0
(byte~) animate::$12 reg byte x 4.0
(byte~) animate::$15 reg byte a 4.0
(byte~) animate::$18 reg byte a 4.0
(byte~) animate::$3 reg byte x 4.0
(byte~) animate::$6 reg byte a 4.0
(byte~) animate::$9 reg byte a 4.0
(label) animate::@1
(label) animate::@10
(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)
(byte~) findcol::$11 reg byte a 20002.0
(byte~) findcol::$9 reg byte a 20002.0
(label) findcol::@1
(label) findcol::@10
(label) findcol::@11
(label) findcol::@12
(label) findcol::@13
(label) findcol::@14
(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#1 reg byte x 20002.0
(byte) findcol::diff#2 reg byte x 20002.0
(byte) findcol::diff#3 reg byte x 20002.0
(byte) findcol::diff#4 reg byte x 20002.0
(byte) findcol::diff#5 reg byte x 10001.0
(byte) findcol::diff#7 reg byte x 13334.666666666666
(byte) findcol::i
(byte) findcol::i#1 reg byte y 10001.0
(byte) findcol::i#14 reg byte y 2631.842105263158
(byte) findcol::mincol
(byte) findcol::mincol#1 mincol zp ZP_BYTE:5 20002.0
(byte) findcol::mincol#10 mincol zp ZP_BYTE:5 10001.0
(byte) findcol::mincol#15 mincol zp ZP_BYTE:5 1176.5882352941176
(byte) findcol::mindiff
(byte) findcol::mindiff#10 reg byte x 10001.0
(byte) findcol::mindiff#13 mindiff zp ZP_BYTE:4 1875.1875
(byte~) findcol::mindiff#23 mindiff zp ZP_BYTE:4 20002.0
(byte~) findcol::mindiff#25 reg byte x 20002.0
(byte) findcol::return
(byte) findcol::return#0 reg byte a 2002.0
(byte) findcol::return#3 return zp ZP_BYTE:5 3667.333333333333
(byte) findcol::x
(byte) findcol::x#0 x zp ZP_BYTE:3 1640.2
(byte) findcol::xp
(byte) findcol::xp#0 reg byte x 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:8 6250.625
(void()) initscreen()
(label) initscreen::@1
(label) initscreen::@2
(label) initscreen::@return
(byte*) initscreen::screen
(byte*) initscreen::screen#1 screen zp ZP_WORD:6 16.5
(byte*) initscreen::screen#4 screen zp ZP_WORD:6 16.5
(void()) main()
(label) main::@1
(label) main::@2
(byte) numpoints
(const byte) numpoints#0 numpoints = (byte) 6
(void()) render()
(label) render::@1
(label) render::@2
(label) render::@3
(label) render::@4
(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:6 67.33333333333333
(byte*) render::colline#5 colline zp ZP_WORD:6 120.29999999999998
(byte) render::x
(byte) render::x#1 x zp ZP_BYTE:3 1501.5
(byte) render::x#2 x zp ZP_BYTE:3 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_BYTE:3 [ render::x#2 render::x#1 findcol::x#0 ]
reg byte y [ findcol::i#14 findcol::i#1 ]
zp ZP_BYTE:4 [ findcol::mindiff#13 findcol::mindiff#23 ]
zp ZP_BYTE:5 [ findcol::return#3 findcol::mincol#15 findcol::mincol#10 findcol::mincol#1 ]
reg byte x [ findcol::diff#5 findcol::diff#2 findcol::diff#1 ]
reg byte x [ findcol::mindiff#10 findcol::diff#7 findcol::diff#4 findcol::diff#3 findcol::mindiff#25 ]
zp ZP_WORD:6 [ initscreen::screen#4 initscreen::screen#1 render::colline#5 render::colline#1 ]
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 ]
reg byte x [ findcol::xp#0 ]
zp ZP_BYTE:8 [ findcol::yp#0 ]
reg byte a [ findcol::$9 ]
reg byte a [ findcol::$11 ]


FINAL ASSEMBLER
Score: 1504591

  // File Comments
// The screen
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  .label COLORS = $d800
  .const FILL = $e6
  // The total number of voronoi points
  .const numpoints = 6
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    // initscreen()
    // [5] call initscreen 
    // [76] phi from main to initscreen [phi:main->initscreen]
    jsr initscreen
    // [6] phi from main main::@2 to main::@1 [phi:main/main::@2->main::@1]
    // main::@1
  b1:
    // render()
    // [7] call render 
    // [36] phi from main::@1 to render [phi:main::@1->render]
    jsr render
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // animate()
    // [9] call animate 
    jsr animate
    jmp b1
}
  // animate
animate: {
    // XPOS[0]+1
    // [10] (byte~) animate::$0 ← *((const byte[]) XPOS#0) + (byte) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx XPOS
    inx
    // XPOS[0] = XPOS[0]+1
    // [11] *((const byte[]) XPOS#0) ← (byte~) animate::$0 -- _deref_pbuc1=vbuxx 
    stx XPOS
    // if(XPOS[0]==40)
    // [12] if(*((const byte[]) XPOS#0)!=(byte) $28) goto animate::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$28
    cmp XPOS
    bne b1
    // animate::@5
    // XPOS[0] = 0
    // [13] *((const byte[]) XPOS#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta XPOS
    // animate::@1
  b1:
    // YPOS[0]+1
    // [14] (byte~) animate::$3 ← *((const byte[]) YPOS#0) + (byte) 1 -- vbuxx=_deref_pbuc1_plus_1 
    ldx YPOS
    inx
    // YPOS[0] = YPOS[0]+1
    // [15] *((const byte[]) YPOS#0) ← (byte~) animate::$3 -- _deref_pbuc1=vbuxx 
    stx YPOS
    // if(YPOS[0]==25)
    // [16] if(*((const byte[]) YPOS#0)!=(byte) $19) goto animate::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$19
    cmp YPOS
    bne b2
    // animate::@6
    // YPOS[0] = 0
    // [17] *((const byte[]) YPOS#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS
    // animate::@2
  b2:
    // XPOS[1]-1
    // [18] (byte~) animate::$6 ← *((const byte[]) XPOS#0+(byte) 1) - (byte) 1 -- vbuaa=_deref_pbuc1_minus_1 
    lda XPOS+1
    sec
    sbc #1
    // XPOS[1] = XPOS[1]-1
    // [19] *((const byte[]) XPOS#0+(byte) 1) ← (byte~) animate::$6 -- _deref_pbuc1=vbuaa 
    sta XPOS+1
    // if(XPOS[1]==255)
    // [20] if(*((const byte[]) XPOS#0+(byte) 1)!=(byte) $ff) goto animate::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp XPOS+1
    bne b3
    // animate::@7
    // XPOS[1] = 40
    // [21] *((const byte[]) XPOS#0+(byte) 1) ← (byte) $28 -- _deref_pbuc1=vbuc2 
    lda #$28
    sta XPOS+1
    // animate::@3
  b3:
    // YPOS[2]+1
    // [22] (byte~) animate::$9 ← *((const byte[]) YPOS#0+(byte) 2) + (byte) 1 -- vbuaa=_deref_pbuc1_plus_1 
    lda YPOS+2
    clc
    adc #1
    // YPOS[2] = YPOS[2]+1
    // [23] *((const byte[]) YPOS#0+(byte) 2) ← (byte~) animate::$9 -- _deref_pbuc1=vbuaa 
    sta YPOS+2
    // if(YPOS[2]==25)
    // [24] if(*((const byte[]) YPOS#0+(byte) 2)!=(byte) $19) goto animate::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$19
    cmp YPOS+2
    bne b4
    // animate::@8
    // YPOS[2] = 0
    // [25] *((const byte[]) YPOS#0+(byte) 2) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta YPOS+2
    // animate::@4
  b4:
    // YPOS[3]-1
    // [26] (byte~) animate::$12 ← *((const byte[]) YPOS#0+(byte) 3) - (byte) 1 -- vbuxx=_deref_pbuc1_minus_1 
    ldx YPOS+3
    dex
    // YPOS[3] = YPOS[3]-1
    // [27] *((const byte[]) YPOS#0+(byte) 3) ← (byte~) animate::$12 -- _deref_pbuc1=vbuxx 
    stx YPOS+3
    // if(YPOS[3]==255)
    // [28] if(*((const byte[]) YPOS#0+(byte) 3)!=(byte) $ff) goto animate::@return -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp YPOS+3
    bne breturn
    // animate::@9
    // YPOS[3] = 25
    // [29] *((const byte[]) YPOS#0+(byte) 3) ← (byte) $19 -- _deref_pbuc1=vbuc2 
    lda #$19
    sta YPOS+3
    // XPOS[3]+7
    // [30] (byte~) animate::$15 ← *((const byte[]) XPOS#0+(byte) 3) + (byte) 7 -- vbuaa=_deref_pbuc1_plus_vbuc2 
    lda #7
    clc
    adc XPOS+3
    // XPOS[3] = XPOS[3]+7
    // [31] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$15 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
    // if(XPOS[3]>=40)
    // [32] if(*((const byte[]) XPOS#0+(byte) 3)<(byte) $28) goto animate::@return -- _deref_pbuc1_lt_vbuc2_then_la1 
    cmp #$28
    bcc breturn
    // animate::@10
    // XPOS[3]-40
    // [33] (byte~) animate::$18 ← *((const byte[]) XPOS#0+(byte) 3) - (byte) $28 -- vbuaa=_deref_pbuc1_minus_vbuc2 
    sec
    sbc #$28
    // XPOS[3] = XPOS[3]-40
    // [34] *((const byte[]) XPOS#0+(byte) 3) ← (byte~) animate::$18 -- _deref_pbuc1=vbuaa 
    sta XPOS+3
    // animate::@return
  breturn:
    // }
    // [35] return 
    rts
}
  // render
render: {
    .label x = 3
    .label colline = 6
    .label y = 2
    // [37] phi from render to render::@1 [phi:render->render::@1]
    // [37] phi (byte*) render::colline#5 = (const byte*) COLORS#0 [phi:render->render::@1#0] -- pbuz1=pbuc1 
    lda #<COLORS
    sta.z colline
    lda #>COLORS
    sta.z colline+1
    // [37] phi (byte) render::y#4 = (byte) 0 [phi:render->render::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    // [37] phi from render::@3 to render::@1 [phi:render::@3->render::@1]
    // [37] phi (byte*) render::colline#5 = (byte*) render::colline#1 [phi:render::@3->render::@1#0] -- register_copy 
    // [37] phi (byte) render::y#4 = (byte) render::y#1 [phi:render::@3->render::@1#1] -- register_copy 
    // render::@1
  b1:
    // [38] phi from render::@1 to render::@2 [phi:render::@1->render::@2]
    // [38] phi (byte) render::x#2 = (byte) 0 [phi:render::@1->render::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z x
    // [38] phi from render::@4 to render::@2 [phi:render::@4->render::@2]
    // [38] phi (byte) render::x#2 = (byte) render::x#1 [phi:render::@4->render::@2#0] -- register_copy 
    // render::@2
  b2:
    // findcol(x, y)
    // [39] (byte) findcol::x#0 ← (byte) render::x#2
    // [40] (byte) findcol::y#0 ← (byte) render::y#4
    // [41] call findcol 
    // [51] phi from render::@2 to findcol [phi:render::@2->findcol]
    jsr findcol
    // findcol(x, y)
    // [42] (byte) findcol::return#0 ← (byte) findcol::return#3 -- vbuaa=vbuz1 
    lda.z findcol.return
    // render::@4
    // col = findcol(x, y)
    // [43] (byte) render::col#0 ← (byte) findcol::return#0
    // colline[x] = col
    // [44] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy.z x
    sta (colline),y
    // for( byte x : 0..39)
    // [45] (byte) render::x#1 ← ++ (byte) render::x#2 -- vbuz1=_inc_vbuz1 
    inc.z x
    // [46] if((byte) render::x#1!=(byte) $28) goto render::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$28
    cmp.z x
    bne b2
    // render::@3
    // colline = colline+40
    // [47] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    clc
    adc.z colline
    sta.z colline
    bcc !+
    inc.z colline+1
  !:
    // for( byte y : 0.. 24)
    // [48] (byte) render::y#1 ← ++ (byte) render::y#4 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [49] if((byte) render::y#1!=(byte) $19) goto render::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z y
    bne b1
    // render::@return
    // }
    // [50] return 
    rts
}
  // findcol
// findcol(byte zeropage(3) x, byte zeropage(2) y)
findcol: {
    .label x = 3
    .label y = 2
    .label yp = 8
    .label return = 5
    .label mincol = 5
    .label mindiff = 4
    // [52] phi from findcol to findcol::@2 [phi:findcol->findcol::@2]
    // [52] phi (byte) findcol::mindiff#13 = (byte) $ff [phi:findcol->findcol::@2#0] -- vbuz1=vbuc1 
    lda #$ff
    sta.z mindiff
    // [52] phi (byte) findcol::mincol#15 = (byte) 0 [phi:findcol->findcol::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta.z mincol
    // [52] phi (byte) findcol::i#14 = (byte) 0 [phi:findcol->findcol::@2#2] -- vbuyy=vbuc1 
    tay
    // findcol::@2
  b2:
    // xp = XPOS[i]
    // [53] (byte) findcol::xp#0 ← *((const byte[]) XPOS#0 + (byte) findcol::i#14) -- vbuxx=pbuc1_derefidx_vbuyy 
    ldx XPOS,y
    // yp = YPOS[i]
    // [54] (byte) findcol::yp#0 ← *((const byte[]) YPOS#0 + (byte) findcol::i#14) -- vbuz1=pbuc1_derefidx_vbuyy 
    lda YPOS,y
    sta.z yp
    // if(x==xp)
    // [55] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@3 -- vbuz1_neq_vbuxx_then_la1 
    cpx.z x
    bne b3
    // findcol::@9
    // if(y==yp)
    // [56] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@3 -- vbuz1_neq_vbuz2_then_la1 
    lda.z y
    cmp.z yp
    bne b3
    // [57] phi from findcol::@9 to findcol::@return [phi:findcol::@9->findcol::@return]
    // [57] phi (byte) findcol::return#3 = (byte) 0 [phi:findcol::@9->findcol::@return#0] -- vbuz1=vbuc1 
    lda #0
    sta.z return
    // findcol::@return
    // }
    // [58] return 
    rts
    // findcol::@3
  b3:
    // if(x<xp)
    // [59] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 -- vbuz1_lt_vbuxx_then_la1 
    txa
    cmp.z x
    beq !+
    bcs b4
  !:
    // findcol::@10
    // diff = x-xp
    // [60] (byte) findcol::diff#2 ← (byte) findcol::x#0 - (byte) findcol::xp#0 -- vbuxx=vbuz1_minus_vbuxx 
    txa
    eor #$ff
    sec
    adc.z x
    tax
    // [61] phi from findcol::@10 findcol::@4 to findcol::@5 [phi:findcol::@10/findcol::@4->findcol::@5]
    // [61] phi (byte) findcol::diff#5 = (byte) findcol::diff#2 [phi:findcol::@10/findcol::@4->findcol::@5#0] -- register_copy 
    // findcol::@5
  b5:
    // if(y<yp)
    // [62] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 -- vbuz1_lt_vbuz2_then_la1 
    lda.z y
    cmp.z yp
    bcc b6
    // findcol::@11
    // y-yp
    // [63] (byte~) findcol::$9 ← (byte) findcol::y#0 - (byte) findcol::yp#0 -- vbuaa=vbuz1_minus_vbuz2 
    sec
    sbc.z yp
    // diff = diff + (y-yp)
    // [64] (byte) findcol::diff#4 ← (byte) findcol::diff#5 + (byte~) findcol::$9 -- vbuxx=vbuxx_plus_vbuaa 
    stx.z $ff
    clc
    adc.z $ff
    tax
    // [65] phi from findcol::@11 findcol::@6 to findcol::@7 [phi:findcol::@11/findcol::@6->findcol::@7]
    // [65] phi (byte) findcol::diff#7 = (byte) findcol::diff#4 [phi:findcol::@11/findcol::@6->findcol::@7#0] -- register_copy 
    // findcol::@7
  b7:
    // if(diff<mindiff)
    // [66] if((byte) findcol::diff#7>=(byte) findcol::mindiff#13) goto findcol::@14 -- vbuxx_ge_vbuz1_then_la1 
    cpx.z mindiff
    bcs b14
    // findcol::@12
    // mincol = COLS[i]
    // [67] (byte) findcol::mincol#1 ← *((const byte[]) COLS#0 + (byte) findcol::i#14) -- vbuz1=pbuc1_derefidx_vbuyy 
    lda COLS,y
    sta.z mincol
    // [68] phi from findcol::@12 findcol::@14 to findcol::@8 [phi:findcol::@12/findcol::@14->findcol::@8]
    // [68] phi (byte) findcol::mindiff#10 = (byte) findcol::diff#7 [phi:findcol::@12/findcol::@14->findcol::@8#0] -- register_copy 
    // [68] phi (byte) findcol::mincol#10 = (byte) findcol::mincol#1 [phi:findcol::@12/findcol::@14->findcol::@8#1] -- register_copy 
    // findcol::@8
  b8:
    // for( byte i=0; i<numpoints; ++i)
    // [69] (byte) findcol::i#1 ← ++ (byte) findcol::i#14 -- vbuyy=_inc_vbuyy 
    iny
    // findcol::@1
    // [70] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@13 -- vbuyy_lt_vbuc1_then_la1 
    cpy #numpoints
    bcc b13
    // [57] phi from findcol::@1 to findcol::@return [phi:findcol::@1->findcol::@return]
    // [57] phi (byte) findcol::return#3 = (byte) findcol::mincol#10 [phi:findcol::@1->findcol::@return#0] -- register_copy 
    rts
    // findcol::@13
  b13:
    // [71] (byte~) findcol::mindiff#23 ← (byte) findcol::mindiff#10 -- vbuz1=vbuxx 
    stx.z mindiff
    // [52] phi from findcol::@13 to findcol::@2 [phi:findcol::@13->findcol::@2]
    // [52] phi (byte) findcol::mindiff#13 = (byte~) findcol::mindiff#23 [phi:findcol::@13->findcol::@2#0] -- register_copy 
    // [52] phi (byte) findcol::mincol#15 = (byte) findcol::mincol#10 [phi:findcol::@13->findcol::@2#1] -- register_copy 
    // [52] phi (byte) findcol::i#14 = (byte) findcol::i#1 [phi:findcol::@13->findcol::@2#2] -- register_copy 
    jmp b2
    // findcol::@14
  b14:
    // [72] (byte~) findcol::mindiff#25 ← (byte) findcol::mindiff#13 -- vbuxx=vbuz1 
    ldx.z mindiff
    jmp b8
    // findcol::@6
  b6:
    // yp-y
    // [73] (byte~) findcol::$11 ← (byte) findcol::yp#0 - (byte) findcol::y#0 -- vbuaa=vbuz1_minus_vbuz2 
    lda.z yp
    sec
    sbc.z y
    // diff = diff + (yp-y)
    // [74] (byte) findcol::diff#3 ← (byte) findcol::diff#5 + (byte~) findcol::$11 -- vbuxx=vbuxx_plus_vbuaa 
    stx.z $ff
    clc
    adc.z $ff
    tax
    jmp b7
    // findcol::@4
  b4:
    // diff = xp-x
    // [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 -- vbuxx=vbuxx_minus_vbuz1 
    txa
    sec
    sbc.z x
    tax
    jmp b5
}
  // initscreen
initscreen: {
    .label screen = 6
    // [77] phi from initscreen to initscreen::@2 [phi:initscreen->initscreen::@2]
    // [77] phi (byte*) initscreen::screen#4 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [77] phi from initscreen::@1 to initscreen::@2 [phi:initscreen::@1->initscreen::@2]
    // [77] phi (byte*) initscreen::screen#4 = (byte*) initscreen::screen#1 [phi:initscreen::@1->initscreen::@2#0] -- register_copy 
    // initscreen::@2
  b2:
    // *screen = FILL
    // [78] *((byte*) initscreen::screen#4) ← (const byte) FILL#0 -- _deref_pbuz1=vbuc1 
    lda #FILL
    ldy #0
    sta (screen),y
    // for( byte* screen = SCREEN; screen<SCREEN+$03e8; ++screen)
    // [79] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // initscreen::@1
    // [80] if((byte*) initscreen::screen#1<(const byte*) SCREEN#0+(word) $3e8) goto initscreen::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z screen+1
    cmp #>SCREEN+$3e8
    bcc b2
    bne !+
    lda.z screen
    cmp #<SCREEN+$3e8
    bcc b2
  !:
    // initscreen::@return
    // }
    // [81] return 
    rts
}
  // File Data
  // 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

