Resolved forward reference rand_seed to (word) rand_seed
Setting inferred volatile on symbol affected by address-of (word) last_time
Setting inferred volatile on symbol affected by address-of (word) rand_seed
Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6
Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
Fixing pointer array-indexing *((word*) utoa::digit_values + (byte) utoa::digit)
Fixing pointer array-indexing *((dword*) ultoa::digit_values + (byte) ultoa::digit)
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean condition *((byte*) strlen::str)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str::str)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_at::str)
Warning! Adding boolean cast to non-boolean sub-expression (byte) print_str_lines::ch
Identified constant variable (byte*) HEAP_TOP
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) @11
Culled Empty Block (label) @12
Culled Empty Block (label) @14
Culled Empty Block (label) @15
Culled Empty Block (label) @16
Culled Empty Block (label) @17
Culled Empty Block (label) @18
Culled Empty Block (label) @19
Culled Empty Block (label) @20
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) @23
Culled Empty Block (label) @24
Culled Empty Block (label) @25
Culled Empty Block (label) @26
Culled Empty Block (label) @27
Culled Empty Block (label) @28
Culled Empty Block (label) @29
Culled Empty Block (label) @30
Culled Empty Block (label) @31
Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @35
Culled Empty Block (label) @36
Culled Empty Block (label) @37
Culled Empty Block (label) @38
Culled Empty Block (label) @39
Culled Empty Block (label) @40
Culled Empty Block (label) @41
Culled Empty Block (label) @42
Culled Empty Block (label) @44
Culled Empty Block (label) @46
Culled Empty Block (label) round::@4
Culled Empty Block (label) round::@5
Culled Empty Block (label) round::@6
Culled Empty Block (label) round::@17
Culled Empty Block (label) round::@9
Culled Empty Block (label) round::@18
Culled Empty Block (label) round::@14
Culled Empty Block (label) round::@13
Culled Empty Block (label) round::@15
Culled Empty Block (label) round::@16
Culled Empty Block (label) round::@20
Culled Empty Block (label) @47
Culled Empty Block (label) main::@1

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@13
@13: scope:[]  from @begin
  (byte*) print_screen#0 ← (byte*)(number) $400
  (byte*) print_line_cursor#0 ← (byte*) print_screen#0
  (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
  to:@43

(void()) print_ln()
print_ln: scope:[print_ln]  from end::@2
  (byte*) print_char_cursor#33 ← phi( end::@2/(byte*) print_char_cursor#11 )
  (byte*) print_line_cursor#16 ← phi( end::@2/(byte*) print_line_cursor#17 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  (byte*) print_char_cursor#17 ← phi( print_ln/(byte*) print_char_cursor#33 print_ln::@1/(byte*) print_char_cursor#17 )
  (byte*) print_line_cursor#8 ← phi( print_ln/(byte*) print_line_cursor#16 print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*~) print_ln::$0 ← (byte*) print_line_cursor#8 + (number) $28
  (byte*) print_line_cursor#1 ← (byte*~) print_ln::$0
  (bool~) print_ln::$1 ← (byte*) print_line_cursor#1 < (byte*) print_char_cursor#17
  if((bool~) print_ln::$1) goto print_ln::@1
  to:print_ln::@2
print_ln::@2: scope:[print_ln]  from print_ln::@1
  (byte*) print_line_cursor#9 ← phi( print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*) print_char_cursor#1 ← (byte*) print_line_cursor#9
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  (byte*) print_char_cursor#18 ← phi( print_ln::@2/(byte*) print_char_cursor#1 )
  (byte*) print_line_cursor#10 ← phi( print_ln::@2/(byte*) print_line_cursor#9 )
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#10
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#18
  return 
  to:@return

(void()) print_word((word) print_word::w)
print_word: scope:[print_word]  from end::@1
  (byte*) print_char_cursor#34 ← phi( end::@1/(byte*) print_char_cursor#36 )
  (word) print_word::w#1 ← phi( end::@1/(word) print_word::w#0 )
  (byte~) print_word::$0 ← > (word) print_word::w#1
  (byte) print_byte::b#0 ← (byte~) print_word::$0
  call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  (word) print_word::w#2 ← phi( print_word/(word) print_word::w#1 )
  (byte*) print_char_cursor#19 ← phi( print_word/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#3 ← (byte*) print_char_cursor#19
  (byte~) print_word::$2 ← < (word) print_word::w#2
  (byte) print_byte::b#1 ← (byte~) print_word::$2
  call print_byte 
  to:print_word::@2
print_word::@2: scope:[print_word]  from print_word::@1
  (byte*) print_char_cursor#20 ← phi( print_word::@1/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#20
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@2
  (byte*) print_char_cursor#21 ← phi( print_word::@2/(byte*) print_char_cursor#4 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#21
  return 
  to:@return

(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte]  from print_word print_word::@1
  (byte*) print_char_cursor#35 ← phi( print_word/(byte*) print_char_cursor#34 print_word::@1/(byte*) print_char_cursor#3 )
  (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
  (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 )
  (byte*) print_char_cursor#22 ← phi( print_byte/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#22
  (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
  (byte) print_char::ch#1 ← *((const byte*) print_hextab + (number~) print_byte::$2)
  call print_char 
  to:print_byte::@2
print_byte::@2: scope:[print_byte]  from print_byte::@1
  (byte*) print_char_cursor#23 ← phi( print_byte::@1/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#23
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#24 ← phi( print_byte::@2/(byte*) print_char_cursor#7 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#24
  return 
  to:@return

(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char]  from print_byte print_byte::@1
  (byte*) print_char_cursor#25 ← phi( print_byte/(byte*) print_char_cursor#35 print_byte::@1/(byte*) print_char_cursor#6 )
  (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2
  (byte*) print_char_cursor#9 ← ++ (byte*) print_char_cursor#25
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#26 ← phi( print_char/(byte*) print_char_cursor#9 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#26
  return 
  to:@return
@43: scope:[]  from @13
  (byte*) print_line_cursor#24 ← phi( @13/(byte*) print_line_cursor#0 )
  (byte*) print_char_cursor#42 ← phi( @13/(byte*) print_char_cursor#0 )
  (word) last_time ← (word) 0
  (word) Ticks#0 ← (word) 0
  to:@45

(void()) start()
start: scope:[start]  from end main
  asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
  (word) rand_seed ← (number) $194a
  to:start::@return
start::@return: scope:[start]  from start
  return 
  to:@return

(void()) end()
end: scope:[end]  from main::@12
  (byte*) print_line_cursor#23 ← phi( main::@12/(byte*) print_line_cursor#18 )
  (byte*) print_char_cursor#39 ← phi( main::@12/(byte*) print_char_cursor#37 )
  (word) Ticks#1 ← (word) last_time
  call start 
  to:end::@1
end::@1: scope:[end]  from end
  (byte*) print_line_cursor#20 ← phi( end/(byte*) print_line_cursor#23 )
  (byte*) print_char_cursor#36 ← phi( end/(byte*) print_char_cursor#39 )
  (word) Ticks#7 ← phi( end/(word) Ticks#1 )
  (word) last_time ← (word) last_time - (word) Ticks#7
  (word) Ticks#2 ← (word) last_time
  (word) print_word::w#0 ← (word) Ticks#2
  call print_word 
  to:end::@2
end::@2: scope:[end]  from end::@1
  (word) Ticks#15 ← phi( end::@1/(word) Ticks#2 )
  (byte*) print_line_cursor#17 ← phi( end::@1/(byte*) print_line_cursor#20 )
  (byte*) print_char_cursor#27 ← phi( end::@1/(byte*) print_char_cursor#5 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#27
  call print_ln 
  to:end::@3
end::@3: scope:[end]  from end::@2
  (word) Ticks#12 ← phi( end::@2/(word) Ticks#15 )
  (byte*) print_char_cursor#28 ← phi( end::@2/(byte*) print_char_cursor#2 )
  (byte*) print_line_cursor#11 ← phi( end::@2/(byte*) print_line_cursor#2 )
  (byte*) print_line_cursor#3 ← (byte*) print_line_cursor#11
  (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#28
  to:end::@return
end::@return: scope:[end]  from end::@3
  (byte*) print_line_cursor#12 ← phi( end::@3/(byte*) print_line_cursor#3 )
  (byte*) print_char_cursor#29 ← phi( end::@3/(byte*) print_char_cursor#12 )
  (word) Ticks#8 ← phi( end::@3/(word) Ticks#12 )
  (word) Ticks#3 ← (word) Ticks#8
  (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#29
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#12
  return 
  to:@return
@45: scope:[]  from @43
  (byte*) print_line_cursor#22 ← phi( @43/(byte*) print_line_cursor#24 )
  (byte*) print_char_cursor#41 ← phi( @43/(byte*) print_char_cursor#42 )
  (word) Ticks#17 ← phi( @43/(word) Ticks#0 )
  (word) rand_seed ← (word) 0
  to:@48

(void()) round()
round: scope:[round]  from main::@10 main::@11 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
  (byte*) round::S#0 ← (byte*) 0
  (byte) round::I#0 ← (byte) 0
  (byte*) round::p#0 ← (const byte*) Sieve
  to:round::@1
round::@1: scope:[round]  from round round::@2
  (byte*) round::p#2 ← phi( round/(byte*) round::p#0 round::@2/(byte*) round::p#1 )
  (bool~) round::$0 ← (byte*) round::p#2 < (const byte*) Sieve+(const word) COUNT
  if((bool~) round::$0) goto round::@2
  to:round::@3
round::@2: scope:[round]  from round::@1
  (byte*) round::p#3 ← phi( round::@1/(byte*) round::p#2 )
  *((byte*) round::p#3) ← (number) 0
  (byte*) round::p#1 ← ++ (byte*) round::p#3
  to:round::@1
round::@3: scope:[round]  from round::@1
  (byte) round::I#1 ← (number) 2
  to:round::@7
round::@7: scope:[round]  from round::@10 round::@3
  (byte) round::I#3 ← phi( round::@10/(byte) round::I#2 round::@3/(byte) round::I#1 )
  (bool~) round::$1 ← (byte) round::I#3 < (const byte) SQRT_COUNT
  if((bool~) round::$1) goto round::@8
  to:round::@return
round::@8: scope:[round]  from round::@7
  (byte) round::I#4 ← phi( round::@7/(byte) round::I#3 )
  (bool~) round::$2 ← *((const byte*) Sieve + (byte) round::I#4) == (number) 0
  (bool~) round::$3 ← ! (bool~) round::$2
  if((bool~) round::$3) goto round::@10
  to:round::@19
round::@10: scope:[round]  from round::@11 round::@8
  (byte) round::I#5 ← phi( round::@11/(byte) round::I#8 round::@8/(byte) round::I#4 )
  (byte) round::I#2 ← ++ (byte) round::I#5
  to:round::@7
round::@19: scope:[round]  from round::@8
  (byte) round::I#6 ← phi( round::@8/(byte) round::I#4 )
  (byte~) round::$4 ← (byte) round::I#6 << (number) 1
  (byte*~) round::$5 ← (const byte*) Sieve + (byte~) round::$4
  (byte*) round::S#1 ← (byte*~) round::$5
  to:round::@11
round::@11: scope:[round]  from round::@12 round::@19
  (byte) round::I#8 ← phi( round::@12/(byte) round::I#7 round::@19/(byte) round::I#6 )
  (byte*) round::S#3 ← phi( round::@12/(byte*) round::S#2 round::@19/(byte*) round::S#1 )
  (bool~) round::$6 ← (byte*) round::S#3 < (const byte*) Sieve+(const word) COUNT
  if((bool~) round::$6) goto round::@12
  to:round::@10
round::@12: scope:[round]  from round::@11
  (byte) round::I#7 ← phi( round::@11/(byte) round::I#8 )
  (byte*) round::S#4 ← phi( round::@11/(byte*) round::S#3 )
  *((byte*) round::S#4) ← (number) 1
  (byte*) round::S#2 ← (byte*) round::S#4 + (byte) round::I#7
  to:round::@11
round::@return: scope:[round]  from round::@7
  return 
  to:@return

(signed word()) main()
main: scope:[main]  from @48
  (byte*) print_line_cursor#34 ← phi( @48/(byte*) print_line_cursor#19 )
  (byte*) print_char_cursor#52 ← phi( @48/(byte*) print_char_cursor#38 )
  (word) Ticks#27 ← phi( @48/(word) Ticks#14 )
  call start 
  to:main::@2
main::@2: scope:[main]  from main
  (byte*) print_line_cursor#33 ← phi( main/(byte*) print_line_cursor#34 )
  (byte*) print_char_cursor#51 ← phi( main/(byte*) print_char_cursor#52 )
  (word) Ticks#26 ← phi( main/(word) Ticks#27 )
  call round 
  to:main::@3
main::@3: scope:[main]  from main::@2
  (byte*) print_line_cursor#32 ← phi( main::@2/(byte*) print_line_cursor#33 )
  (byte*) print_char_cursor#50 ← phi( main::@2/(byte*) print_char_cursor#51 )
  (word) Ticks#25 ← phi( main::@2/(word) Ticks#26 )
  call round 
  to:main::@4
main::@4: scope:[main]  from main::@3
  (byte*) print_line_cursor#31 ← phi( main::@3/(byte*) print_line_cursor#32 )
  (byte*) print_char_cursor#49 ← phi( main::@3/(byte*) print_char_cursor#50 )
  (word) Ticks#24 ← phi( main::@3/(word) Ticks#25 )
  call round 
  to:main::@5
main::@5: scope:[main]  from main::@4
  (byte*) print_line_cursor#30 ← phi( main::@4/(byte*) print_line_cursor#31 )
  (byte*) print_char_cursor#48 ← phi( main::@4/(byte*) print_char_cursor#49 )
  (word) Ticks#23 ← phi( main::@4/(word) Ticks#24 )
  call round 
  to:main::@6
main::@6: scope:[main]  from main::@5
  (byte*) print_line_cursor#29 ← phi( main::@5/(byte*) print_line_cursor#30 )
  (byte*) print_char_cursor#47 ← phi( main::@5/(byte*) print_char_cursor#48 )
  (word) Ticks#22 ← phi( main::@5/(word) Ticks#23 )
  call round 
  to:main::@7
main::@7: scope:[main]  from main::@6
  (byte*) print_line_cursor#28 ← phi( main::@6/(byte*) print_line_cursor#29 )
  (byte*) print_char_cursor#46 ← phi( main::@6/(byte*) print_char_cursor#47 )
  (word) Ticks#21 ← phi( main::@6/(word) Ticks#22 )
  call round 
  to:main::@8
main::@8: scope:[main]  from main::@7
  (byte*) print_line_cursor#27 ← phi( main::@7/(byte*) print_line_cursor#28 )
  (byte*) print_char_cursor#45 ← phi( main::@7/(byte*) print_char_cursor#46 )
  (word) Ticks#20 ← phi( main::@7/(word) Ticks#21 )
  call round 
  to:main::@9
main::@9: scope:[main]  from main::@8
  (byte*) print_line_cursor#26 ← phi( main::@8/(byte*) print_line_cursor#27 )
  (byte*) print_char_cursor#44 ← phi( main::@8/(byte*) print_char_cursor#45 )
  (word) Ticks#19 ← phi( main::@8/(word) Ticks#20 )
  call round 
  to:main::@10
main::@10: scope:[main]  from main::@9
  (byte*) print_line_cursor#25 ← phi( main::@9/(byte*) print_line_cursor#26 )
  (byte*) print_char_cursor#43 ← phi( main::@9/(byte*) print_char_cursor#44 )
  (word) Ticks#18 ← phi( main::@9/(word) Ticks#19 )
  call round 
  to:main::@11
main::@11: scope:[main]  from main::@10
  (byte*) print_line_cursor#21 ← phi( main::@10/(byte*) print_line_cursor#25 )
  (byte*) print_char_cursor#40 ← phi( main::@10/(byte*) print_char_cursor#43 )
  (word) Ticks#16 ← phi( main::@10/(word) Ticks#18 )
  call round 
  to:main::@12
main::@12: scope:[main]  from main::@11
  (byte*) print_line_cursor#18 ← phi( main::@11/(byte*) print_line_cursor#21 )
  (byte*) print_char_cursor#37 ← phi( main::@11/(byte*) print_char_cursor#40 )
  (word) Ticks#13 ← phi( main::@11/(word) Ticks#16 )
  call end 
  to:main::@13
main::@13: scope:[main]  from main::@12
  (byte*) print_line_cursor#13 ← phi( main::@12/(byte*) print_line_cursor#4 )
  (byte*) print_char_cursor#30 ← phi( main::@12/(byte*) print_char_cursor#13 )
  (word) Ticks#9 ← phi( main::@12/(word) Ticks#3 )
  (word) Ticks#4 ← (word) Ticks#9
  (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#30
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#13
  (signed word) main::return#0 ← (number) 0
  to:main::@return
main::@return: scope:[main]  from main::@13
  (byte*) print_line_cursor#14 ← phi( main::@13/(byte*) print_line_cursor#5 )
  (byte*) print_char_cursor#31 ← phi( main::@13/(byte*) print_char_cursor#14 )
  (word) Ticks#10 ← phi( main::@13/(word) Ticks#4 )
  (signed word) main::return#3 ← phi( main::@13/(signed word) main::return#0 )
  (signed word) main::return#1 ← (signed word) main::return#3
  (word) Ticks#5 ← (word) Ticks#10
  (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#31
  (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#14
  return 
  to:@return
@48: scope:[]  from @45
  (byte*) print_line_cursor#19 ← phi( @45/(byte*) print_line_cursor#22 )
  (byte*) print_char_cursor#38 ← phi( @45/(byte*) print_char_cursor#41 )
  (word) Ticks#14 ← phi( @45/(word) Ticks#17 )
  call main 
  (signed word) main::return#2 ← (signed word) main::return#1
  to:@49
@49: scope:[]  from @48
  (byte*) print_line_cursor#15 ← phi( @48/(byte*) print_line_cursor#6 )
  (byte*) print_char_cursor#32 ← phi( @48/(byte*) print_char_cursor#15 )
  (word) Ticks#11 ← phi( @48/(word) Ticks#5 )
  (word) Ticks#6 ← (word) Ticks#11
  (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#32
  (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#15
  to:@end
@end: scope:[]  from @49

SYMBOL TABLE SSA
(label) @13
(label) @43
(label) @45
(label) @48
(label) @49
(label) @begin
(label) @end
(const word) COUNT = (word) $4000
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const byte) SQRT_COUNT = (byte) $80
(const byte*) Sieve[(const word) COUNT]  = { fill( COUNT, 0) }
(word) Ticks
(word) Ticks#0
(word) Ticks#1
(word) Ticks#10
(word) Ticks#11
(word) Ticks#12
(word) Ticks#13
(word) Ticks#14
(word) Ticks#15
(word) Ticks#16
(word) Ticks#17
(word) Ticks#18
(word) Ticks#19
(word) Ticks#2
(word) Ticks#20
(word) Ticks#21
(word) Ticks#22
(word) Ticks#23
(word) Ticks#24
(word) Ticks#25
(word) Ticks#26
(word) Ticks#27
(word) Ticks#3
(word) Ticks#4
(word) Ticks#5
(word) Ticks#6
(word) Ticks#7
(word) Ticks#8
(word) Ticks#9
(void()) end()
(label) end::@1
(label) end::@2
(label) end::@3
(label) end::@return
(word) last_time loadstore
(signed word()) main()
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(signed word) main::return
(signed word) main::return#0
(signed word) main::return#1
(signed word) main::return#2
(signed word) main::return#3
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0
(number~) print_byte::$2
(label) print_byte::@1
(label) print_byte::@2
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0
(byte) print_byte::b#1
(byte) print_byte::b#2
(byte) print_byte::b#3
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0
(byte) print_char::ch#1
(byte) print_char::ch#2
(byte*) print_char_cursor
(byte*) print_char_cursor#0
(byte*) print_char_cursor#1
(byte*) print_char_cursor#10
(byte*) print_char_cursor#11
(byte*) print_char_cursor#12
(byte*) print_char_cursor#13
(byte*) print_char_cursor#14
(byte*) print_char_cursor#15
(byte*) print_char_cursor#16
(byte*) print_char_cursor#17
(byte*) print_char_cursor#18
(byte*) print_char_cursor#19
(byte*) print_char_cursor#2
(byte*) print_char_cursor#20
(byte*) print_char_cursor#21
(byte*) print_char_cursor#22
(byte*) print_char_cursor#23
(byte*) print_char_cursor#24
(byte*) print_char_cursor#25
(byte*) print_char_cursor#26
(byte*) print_char_cursor#27
(byte*) print_char_cursor#28
(byte*) print_char_cursor#29
(byte*) print_char_cursor#3
(byte*) print_char_cursor#30
(byte*) print_char_cursor#31
(byte*) print_char_cursor#32
(byte*) print_char_cursor#33
(byte*) print_char_cursor#34
(byte*) print_char_cursor#35
(byte*) print_char_cursor#36
(byte*) print_char_cursor#37
(byte*) print_char_cursor#38
(byte*) print_char_cursor#39
(byte*) print_char_cursor#4
(byte*) print_char_cursor#40
(byte*) print_char_cursor#41
(byte*) print_char_cursor#42
(byte*) print_char_cursor#43
(byte*) print_char_cursor#44
(byte*) print_char_cursor#45
(byte*) print_char_cursor#46
(byte*) print_char_cursor#47
(byte*) print_char_cursor#48
(byte*) print_char_cursor#49
(byte*) print_char_cursor#5
(byte*) print_char_cursor#50
(byte*) print_char_cursor#51
(byte*) print_char_cursor#52
(byte*) print_char_cursor#6
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(const byte*) print_hextab[]  = (string) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_line_cursor#1
(byte*) print_line_cursor#10
(byte*) print_line_cursor#11
(byte*) print_line_cursor#12
(byte*) print_line_cursor#13
(byte*) print_line_cursor#14
(byte*) print_line_cursor#15
(byte*) print_line_cursor#16
(byte*) print_line_cursor#17
(byte*) print_line_cursor#18
(byte*) print_line_cursor#19
(byte*) print_line_cursor#2
(byte*) print_line_cursor#20
(byte*) print_line_cursor#21
(byte*) print_line_cursor#22
(byte*) print_line_cursor#23
(byte*) print_line_cursor#24
(byte*) print_line_cursor#25
(byte*) print_line_cursor#26
(byte*) print_line_cursor#27
(byte*) print_line_cursor#28
(byte*) print_line_cursor#29
(byte*) print_line_cursor#3
(byte*) print_line_cursor#30
(byte*) print_line_cursor#31
(byte*) print_line_cursor#32
(byte*) print_line_cursor#33
(byte*) print_line_cursor#34
(byte*) print_line_cursor#4
(byte*) print_line_cursor#5
(byte*) print_line_cursor#6
(byte*) print_line_cursor#7
(byte*) print_line_cursor#8
(byte*) print_line_cursor#9
(void()) print_ln()
(byte*~) print_ln::$0
(bool~) print_ln::$1
(label) print_ln::@1
(label) print_ln::@2
(label) print_ln::@return
(byte*) print_screen
(byte*) print_screen#0
(void()) print_word((word) print_word::w)
(byte~) print_word::$0
(byte~) print_word::$2
(label) print_word::@1
(label) print_word::@2
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0
(word) print_word::w#1
(word) print_word::w#2
(word) rand_seed loadstore
(void()) round()
(bool~) round::$0
(bool~) round::$1
(bool~) round::$2
(bool~) round::$3
(byte~) round::$4
(byte*~) round::$5
(bool~) round::$6
(label) round::@1
(label) round::@10
(label) round::@11
(label) round::@12
(label) round::@19
(label) round::@2
(label) round::@3
(label) round::@7
(label) round::@8
(label) round::@return
(byte) round::I
(byte) round::I#0
(byte) round::I#1
(byte) round::I#2
(byte) round::I#3
(byte) round::I#4
(byte) round::I#5
(byte) round::I#6
(byte) round::I#7
(byte) round::I#8
(byte*) round::S
(byte*) round::S#0
(byte*) round::S#1
(byte*) round::S#2
(byte*) round::S#3
(byte*) round::S#4
(byte*) round::p
(byte*) round::p#0
(byte*) round::p#1
(byte*) round::p#2
(byte*) round::p#3
(void()) start()
(label) start::@return
(const word*) start::LAST_TIME = &(word) last_time

Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#8 + (number) $28
Adding number conversion cast (unumber) 4 in (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
Adding number conversion cast (unumber) $f in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (unumber)(number) $f
Adding number conversion cast (unumber) $194a in (word) rand_seed ← (number) $194a
Adding number conversion cast (unumber) 0 in *((byte*) round::p#3) ← (number) 0
Adding number conversion cast (unumber) 2 in (byte) round::I#1 ← (number) 2
Adding number conversion cast (unumber) 0 in (bool~) round::$2 ← *((const byte*) Sieve + (byte) round::I#4) == (number) 0
Adding number conversion cast (unumber) 1 in (byte~) round::$4 ← (byte) round::I#6 << (number) 1
Adding number conversion cast (unumber) 1 in *((byte*) round::S#4) ← (number) 1
Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (word) rand_seed ← (unumber)(number) $194a
Inlining cast *((byte*) round::p#3) ← (unumber)(number) 0
Inlining cast (byte) round::I#1 ← (unumber)(number) 2
Inlining cast *((byte*) round::S#4) ← (unumber)(number) 1
Inlining cast (signed word) main::return#0 ← (snumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $28
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $194a
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (word) $194a
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized signed number type (signed byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f
Inversing boolean not [91] (bool~) round::$3 ← *((const byte*) Sieve + (byte) round::I#4) != (byte) 0 from [90] (bool~) round::$2 ← *((const byte*) Sieve + (byte) round::I#4) == (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) print_char_cursor#0 = (byte*) print_line_cursor#0 (byte*) print_screen#0 (byte*) print_char_cursor#42 (byte*) print_line_cursor#24 (byte*) print_char_cursor#41 (byte*) print_line_cursor#22 (byte*) print_char_cursor#38 (byte*) print_line_cursor#19 
Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#9 (byte*) print_char_cursor#1 (byte*) print_line_cursor#10 (byte*) print_char_cursor#18 (byte*) print_line_cursor#2 (byte*) print_char_cursor#2 
Alias (byte) print_byte::b#0 = (byte~) print_word::$0 
Alias (word) print_word::w#1 = (word) print_word::w#2 
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#3 
Alias (byte) print_byte::b#1 = (byte~) print_word::$2 
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#4 (byte*) print_char_cursor#21 (byte*) print_char_cursor#5 
Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 
Alias (byte*) print_char_cursor#22 = (byte*) print_char_cursor#6 
Alias (byte*) print_char_cursor#23 = (byte*) print_char_cursor#7 (byte*) print_char_cursor#24 (byte*) print_char_cursor#8 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#26 (byte*) print_char_cursor#9 
Alias (word) Ticks#1 = (word) Ticks#7 
Alias (byte*) print_char_cursor#36 = (byte*) print_char_cursor#39 
Alias (byte*) print_line_cursor#17 = (byte*) print_line_cursor#20 (byte*) print_line_cursor#23 
Alias (word) Ticks#12 = (word) Ticks#15 (word) Ticks#2 (word) Ticks#8 (word) Ticks#3 
Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#27 
Alias (byte*) print_line_cursor#11 = (byte*) print_line_cursor#3 (byte*) print_line_cursor#12 (byte*) print_line_cursor#4 
Alias (byte*) print_char_cursor#12 = (byte*) print_char_cursor#28 (byte*) print_char_cursor#29 (byte*) print_char_cursor#13 
Alias (word) Ticks#0 = (word) Ticks#17 (word) Ticks#14 
Alias (byte*) round::p#2 = (byte*) round::p#3 
Alias (byte) round::I#3 = (byte) round::I#4 (byte) round::I#6 
Alias (byte*) round::S#1 = (byte*~) round::$5 
Alias (byte*) round::S#3 = (byte*) round::S#4 
Alias (byte) round::I#7 = (byte) round::I#8 
Alias (word) Ticks#13 = (word) Ticks#26 (word) Ticks#27 (word) Ticks#25 (word) Ticks#24 (word) Ticks#23 (word) Ticks#22 (word) Ticks#21 (word) Ticks#20 (word) Ticks#19 (word) Ticks#18 (word) Ticks#16 
Alias (byte*) print_char_cursor#37 = (byte*) print_char_cursor#51 (byte*) print_char_cursor#52 (byte*) print_char_cursor#50 (byte*) print_char_cursor#49 (byte*) print_char_cursor#48 (byte*) print_char_cursor#47 (byte*) print_char_cursor#46 (byte*) print_char_cursor#45 (byte*) print_char_cursor#44 (byte*) print_char_cursor#43 (byte*) print_char_cursor#40 
Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#33 (byte*) print_line_cursor#34 (byte*) print_line_cursor#32 (byte*) print_line_cursor#31 (byte*) print_line_cursor#30 (byte*) print_line_cursor#29 (byte*) print_line_cursor#28 (byte*) print_line_cursor#27 (byte*) print_line_cursor#26 (byte*) print_line_cursor#25 (byte*) print_line_cursor#21 
Alias (word) Ticks#10 = (word) Ticks#4 (word) Ticks#9 (word) Ticks#5 
Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#30 (byte*) print_char_cursor#31 (byte*) print_char_cursor#15 
Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#5 (byte*) print_line_cursor#14 (byte*) print_line_cursor#6 
Alias (signed word) main::return#0 = (signed word) main::return#3 (signed word) main::return#1 
Alias (word) Ticks#11 = (word) Ticks#6 
Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#32 
Alias (byte*) print_line_cursor#15 = (byte*) print_line_cursor#7 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) print_line_cursor#16 (byte*) print_line_cursor#17
Identical Phi Values (byte*) print_char_cursor#33 (byte*) print_char_cursor#11
Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_char_cursor#33
Identical Phi Values (word) print_word::w#1 (word) print_word::w#0
Identical Phi Values (byte*) print_char_cursor#34 (byte*) print_char_cursor#36
Identical Phi Values (byte*) print_char_cursor#19 (byte*) print_char_cursor#23
Identical Phi Values (byte*) print_char_cursor#20 (byte*) print_char_cursor#23
Identical Phi Values (byte*) print_char_cursor#22 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_char_cursor#23 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_char_cursor#36 (byte*) print_char_cursor#37
Identical Phi Values (byte*) print_line_cursor#17 (byte*) print_line_cursor#18
Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#20
Identical Phi Values (byte*) print_line_cursor#11 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#12 (byte*) print_line_cursor#1
Identical Phi Values (byte) round::I#7 (byte) round::I#3
Identical Phi Values (word) Ticks#13 (word) Ticks#0
Identical Phi Values (byte*) print_char_cursor#37 (byte*) print_char_cursor#0
Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_char_cursor#0
Identical Phi Values (word) Ticks#10 (word) Ticks#12
Identical Phi Values (byte*) print_char_cursor#14 (byte*) print_char_cursor#12
Identical Phi Values (byte*) print_line_cursor#13 (byte*) print_line_cursor#11
Identical Phi Values (word) Ticks#11 (word) Ticks#10
Identical Phi Values (byte*) print_char_cursor#16 (byte*) print_char_cursor#14
Identical Phi Values (byte*) print_line_cursor#15 (byte*) print_line_cursor#13
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) round::I#5 (byte) round::I#3
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1
Simple Condition (bool~) round::$0 [81] if((byte*) round::p#2<(const byte*) Sieve+(const word) COUNT) goto round::@2
Simple Condition (bool~) round::$1 [88] if((byte) round::I#3<(const byte) SQRT_COUNT) goto round::@8
Simple Condition (bool~) round::$3 [92] if(*((const byte*) Sieve + (byte) round::I#3)!=(byte) 0) goto round::@10
Simple Condition (bool~) round::$6 [101] if((byte*) round::S#3<(const byte*) Sieve+(const word) COUNT) goto round::@12
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) print_char_cursor#0 = (byte*) 1024
Constant (const word) Ticks#0 = 0
Constant (const byte*) round::S#0 = (byte*) 0
Constant (const byte) round::I#0 = 0
Constant (const byte*) round::p#0 = Sieve
Constant (const byte) round::I#1 = 2
Constant (const signed word) main::return#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const signed word) main::return#2 = main::return#0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const byte*) round::S#0
Eliminating unused constant (const byte) round::I#0
Eliminating unused constant (const signed word) main::return#2
Eliminating unused constant (const word) Ticks#0
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const signed word) main::return#0
Successful SSA optimization PassNEliminateUnusedVars
Inlining constant with var siblings (const byte*) round::p#0
Inlining constant with var siblings (const byte) round::I#1
Inlining constant with var siblings (const byte*) print_char_cursor#0
Constant inlined round::I#1 = (byte) 2
Constant inlined print_char_cursor#0 = (byte*) 1024
Constant inlined round::p#0 = (const byte*) Sieve
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @13
Adding NOP phi() at start of @48
Adding NOP phi() at start of @49
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of main::@11
Adding NOP phi() at start of main::@12
Adding NOP phi() at start of main::@13
Adding NOP phi() at start of end::@2
Adding NOP phi() at start of end::@3
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of print_ln::@2
Adding NOP phi() at start of print_word::@2
Adding NOP phi() at start of print_byte::@2
Adding NOP phi() at start of round
Adding NOP phi() at start of round::@3
CALL GRAPH
Calls in [] to main:5 
Calls in [main] to start:9 round:11 round:13 round:15 round:17 round:19 round:21 round:23 round:25 round:27 round:29 end:31 
Calls in [end] to start:35 print_word:39 print_ln:41 
Calls in [print_word] to print_byte:53 print_byte:57 
Calls in [print_byte] to print_char:65 print_char:70 

Created 8 initial phi equivalence classes
Coalesced [50] print_line_cursor#35 ← print_line_cursor#1
Coalesced [52] print_byte::b#4 ← print_byte::b#0
Coalesced [55] print_byte::b#5 ← print_byte::b#1
Coalesced [56] print_char_cursor#53 ← print_char_cursor#10
Coalesced [63] print_char::ch#3 ← print_char::ch#0
Coalesced [64] print_char_cursor#54 ← print_char_cursor#35
Coalesced [68] print_char::ch#4 ← print_char::ch#1
Coalesced (already) [69] print_char_cursor#55 ← print_char_cursor#10
Coalesced [90] round::S#6 ← round::S#1
Coalesced [94] round::I#9 ← round::I#2
Coalesced [97] round::S#5 ← round::S#2
Coalesced [100] round::p#4 ← round::p#1
Coalesced down to 7 phi equivalence classes
Culled Empty Block (label) @13
Culled Empty Block (label) @49
Culled Empty Block (label) main::@13
Culled Empty Block (label) end::@3
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_ln::@3
Culled Empty Block (label) print_word::@2
Culled Empty Block (label) print_byte::@2
Culled Empty Block (label) round::@3
Renumbering block @43 to @1
Renumbering block @45 to @2
Renumbering block @48 to @3
Renumbering block round::@7 to round::@3
Renumbering block round::@8 to round::@4
Renumbering block round::@10 to round::@5
Renumbering block round::@11 to round::@6
Renumbering block round::@12 to round::@7
Renumbering block round::@19 to round::@8
Renumbering block main::@2 to main::@1
Renumbering block main::@3 to main::@2
Renumbering block main::@4 to main::@3
Renumbering block main::@5 to main::@4
Renumbering block main::@6 to main::@5
Renumbering block main::@7 to main::@6
Renumbering block main::@8 to main::@7
Renumbering block main::@9 to main::@8
Renumbering block main::@10 to main::@9
Renumbering block main::@11 to main::@10
Renumbering block main::@12 to main::@11
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @3
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 main::@3
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of main::@11
Adding NOP phi() at start of end::@2
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of round

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] (word) last_time ← (word) 0
  to:@2
@2: scope:[]  from @1
  [2] (word) rand_seed ← (word) 0
  to:@3
@3: scope:[]  from @2
  [3] phi()
  [4] call main 
  to:@end
@end: scope:[]  from @3
  [5] phi()

(signed word()) main()
main: scope:[main]  from @3
  [6] phi()
  [7] call start 
  to:main::@1
main::@1: scope:[main]  from main
  [8] phi()
  [9] call round 
  to:main::@2
main::@2: scope:[main]  from main::@1
  [10] phi()
  [11] call round 
  to:main::@3
main::@3: scope:[main]  from main::@2
  [12] phi()
  [13] call round 
  to:main::@4
main::@4: scope:[main]  from main::@3
  [14] phi()
  [15] call round 
  to:main::@5
main::@5: scope:[main]  from main::@4
  [16] phi()
  [17] call round 
  to:main::@6
main::@6: scope:[main]  from main::@5
  [18] phi()
  [19] call round 
  to:main::@7
main::@7: scope:[main]  from main::@6
  [20] phi()
  [21] call round 
  to:main::@8
main::@8: scope:[main]  from main::@7
  [22] phi()
  [23] call round 
  to:main::@9
main::@9: scope:[main]  from main::@8
  [24] phi()
  [25] call round 
  to:main::@10
main::@10: scope:[main]  from main::@9
  [26] phi()
  [27] call round 
  to:main::@11
main::@11: scope:[main]  from main::@10
  [28] phi()
  [29] call end 
  to:main::@return
main::@return: scope:[main]  from main::@11
  [30] return 
  to:@return

(void()) end()
end: scope:[end]  from main::@11
  [31] (word) Ticks#1 ← (word) last_time
  [32] call start 
  to:end::@1
end::@1: scope:[end]  from end
  [33] (word) last_time ← (word) last_time - (word) Ticks#1
  [34] (word) Ticks#12 ← (word) last_time
  [35] (word) print_word::w#0 ← (word) Ticks#12
  [36] call print_word 
  to:end::@2
end::@2: scope:[end]  from end::@1
  [37] phi()
  [38] call print_ln 
  to:end::@return
end::@return: scope:[end]  from end::@2
  [39] return 
  to:@return

(void()) print_ln()
print_ln: scope:[print_ln]  from end::@2
  [40] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [41] (byte*) print_line_cursor#8 ← phi( print_ln/(byte*) 1024 print_ln::@1/(byte*) print_line_cursor#1 )
  [42] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#8 + (byte) $28
  [43] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [44] return 
  to:@return

(void()) print_word((word) print_word::w)
print_word: scope:[print_word]  from end::@1
  [45] (byte) print_byte::b#0 ← > (word) print_word::w#0
  [46] call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  [47] (byte) print_byte::b#1 ← < (word) print_word::w#0
  [48] call print_byte 
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@1
  [49] return 
  to:@return

(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte]  from print_word print_word::@1
  [50] (byte*) print_char_cursor#35 ← phi( print_word/(byte*) 1024 print_word::@1/(byte*) print_char_cursor#10 )
  [50] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4
  [52] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0)
  [53] call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  [54] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f
  [55] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2)
  [56] call print_char 
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@1
  [57] return 
  to:@return

(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char]  from print_byte print_byte::@1
  [58] (byte*) print_char_cursor#25 ← phi( print_byte/(byte*) print_char_cursor#35 print_byte::@1/(byte*) print_char_cursor#10 )
  [58] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  [59] *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2
  [60] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#25
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [61] return 
  to:@return

(void()) start()
start: scope:[start]  from end main
  asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
  [63] (word) rand_seed ← (word) $194a
  to:start::@return
start::@return: scope:[start]  from start
  [64] return 
  to:@return

(void()) round()
round: scope:[round]  from main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
  [65] phi()
  to:round::@1
round::@1: scope:[round]  from round round::@2
  [66] (byte*) round::p#2 ← phi( round/(const byte*) Sieve round::@2/(byte*) round::p#1 )
  [67] if((byte*) round::p#2<(const byte*) Sieve+(const word) COUNT) goto round::@2
  to:round::@3
round::@3: scope:[round]  from round::@1 round::@5
  [68] (byte) round::I#3 ← phi( round::@5/(byte) round::I#2 round::@1/(byte) 2 )
  [69] if((byte) round::I#3<(const byte) SQRT_COUNT) goto round::@4
  to:round::@return
round::@return: scope:[round]  from round::@3
  [70] return 
  to:@return
round::@4: scope:[round]  from round::@3
  [71] if(*((const byte*) Sieve + (byte) round::I#3)!=(byte) 0) goto round::@5
  to:round::@8
round::@8: scope:[round]  from round::@4
  [72] (byte~) round::$4 ← (byte) round::I#3 << (byte) 1
  [73] (byte*) round::S#1 ← (const byte*) Sieve + (byte~) round::$4
  to:round::@6
round::@6: scope:[round]  from round::@7 round::@8
  [74] (byte*) round::S#3 ← phi( round::@7/(byte*) round::S#2 round::@8/(byte*) round::S#1 )
  [75] if((byte*) round::S#3<(const byte*) Sieve+(const word) COUNT) goto round::@7
  to:round::@5
round::@5: scope:[round]  from round::@4 round::@6
  [76] (byte) round::I#2 ← ++ (byte) round::I#3
  to:round::@3
round::@7: scope:[round]  from round::@6
  [77] *((byte*) round::S#3) ← (byte) 1
  [78] (byte*) round::S#2 ← (byte*) round::S#3 + (byte) round::I#3
  to:round::@6
round::@2: scope:[round]  from round::@1
  [79] *((byte*) round::p#2) ← (byte) 0
  [80] (byte*) round::p#1 ← ++ (byte*) round::p#2
  to:round::@1


VARIABLE REGISTER WEIGHTS
(word) Ticks
(word) Ticks#1 2.0
(word) Ticks#12 4.0
(void()) end()
(word) last_time loadstore 0.37037037037037035
(signed word()) main()
(signed word) main::return
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 4.0
(byte~) print_byte::$2 4.0
(byte) print_byte::b
(byte) print_byte::b#0 4.0
(byte) print_byte::b#1 4.0
(byte) print_byte::b#2 2.0
(void()) print_char((byte) print_char::ch)
(byte) print_char::ch
(byte) print_char::ch#0 4.0
(byte) print_char::ch#1 4.0
(byte) print_char::ch#2 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#10 1.0
(byte*) print_char_cursor#25 4.0
(byte*) print_char_cursor#35 1.3333333333333333
(byte*) print_line_cursor
(byte*) print_line_cursor#1 16.5
(byte*) print_line_cursor#8 22.0
(void()) print_ln()
(byte*) print_screen
(void()) print_word((word) print_word::w)
(word) print_word::w
(word) print_word::w#0 2.0
(word) rand_seed loadstore 40.0
(void()) round()
(byte~) round::$4 22.0
(byte) round::I
(byte) round::I#2 22.0
(byte) round::I#3 17.333333333333332
(byte*) round::S
(byte*) round::S#1 22.0
(byte*) round::S#2 202.0
(byte*) round::S#3 138.33333333333331
(byte*) round::p
(byte*) round::p#1 22.0
(byte*) round::p#2 14.666666666666666
(void()) start()

Initial phi equivalence classes
[ print_line_cursor#8 print_line_cursor#1 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ]
[ round::p#2 round::p#1 ]
[ round::I#3 round::I#2 ]
[ round::S#3 round::S#2 round::S#1 ]
Added variable last_time to live range equivalence class [ last_time ]
Added variable rand_seed to live range equivalence class [ rand_seed ]
Added variable Ticks#1 to live range equivalence class [ Ticks#1 ]
Added variable Ticks#12 to live range equivalence class [ Ticks#12 ]
Added variable print_word::w#0 to live range equivalence class [ print_word::w#0 ]
Added variable print_byte::$0 to live range equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to live range equivalence class [ print_byte::$2 ]
Added variable round::$4 to live range equivalence class [ round::$4 ]
Complete equivalence classes
[ print_line_cursor#8 print_line_cursor#1 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ]
[ round::p#2 round::p#1 ]
[ round::I#3 round::I#2 ]
[ round::S#3 round::S#2 round::S#1 ]
[ last_time ]
[ rand_seed ]
[ Ticks#1 ]
[ Ticks#12 ]
[ print_word::w#0 ]
[ print_byte::$0 ]
[ print_byte::$2 ]
[ round::$4 ]
Allocated zp[2]:2 [ print_line_cursor#8 print_line_cursor#1 ]
Allocated zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated zp[1]:5 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
Allocated zp[2]:6 [ print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ]
Allocated zp[2]:8 [ round::p#2 round::p#1 ]
Allocated zp[1]:10 [ round::I#3 round::I#2 ]
Allocated zp[2]:11 [ round::S#3 round::S#2 round::S#1 ]
Allocated zp[2]:13 [ last_time ]
Allocated zp[2]:15 [ rand_seed ]
Allocated zp[2]:17 [ Ticks#1 ]
Allocated zp[2]:19 [ Ticks#12 ]
Allocated zp[2]:21 [ print_word::w#0 ]
Allocated zp[1]:23 [ print_byte::$0 ]
Allocated zp[1]:24 [ print_byte::$2 ]
Allocated zp[1]:25 [ round::$4 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .const COUNT = $4000
  .const SQRT_COUNT = $80
  .label last_time = $d
  .label rand_seed = $f
  .label print_line_cursor = 2
  .label print_char_cursor = 6
  .label Ticks = $11
  .label Ticks_1 = $13
  // @begin
__bbegin:
  jmp __b1
  // @1
__b1:
  // [1] (word) last_time ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z last_time
  lda #>0
  sta.z last_time+1
  jmp __b2
  // @2
__b2:
  // [2] (word) rand_seed ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z rand_seed
  lda #>0
  sta.z rand_seed+1
  // [3] phi from @2 to @3 [phi:@2->@3]
__b3_from___b2:
  jmp __b3
  // @3
__b3:
  // [4] call main 
  // [6] phi from @3 to main [phi:@3->main]
main_from___b3:
  jsr main
  // [5] phi from @3 to @end [phi:@3->@end]
__bend_from___b3:
  jmp __bend
  // @end
__bend:
  // main
main: {
    // [7] call start 
    jsr start
    // [8] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    jmp __b1
    // main::@1
  __b1:
    // [9] call round 
    // [65] phi from main::@1 to round [phi:main::@1->round]
  round_from___b1:
    jsr round
    // [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [11] call round 
    // [65] phi from main::@2 to round [phi:main::@2->round]
  round_from___b2:
    jsr round
    // [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  __b3_from___b2:
    jmp __b3
    // main::@3
  __b3:
    // [13] call round 
    // [65] phi from main::@3 to round [phi:main::@3->round]
  round_from___b3:
    jsr round
    // [14] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  __b4_from___b3:
    jmp __b4
    // main::@4
  __b4:
    // [15] call round 
    // [65] phi from main::@4 to round [phi:main::@4->round]
  round_from___b4:
    jsr round
    // [16] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [17] call round 
    // [65] phi from main::@5 to round [phi:main::@5->round]
  round_from___b5:
    jsr round
    // [18] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [19] call round 
    // [65] phi from main::@6 to round [phi:main::@6->round]
  round_from___b6:
    jsr round
    // [20] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  __b7_from___b6:
    jmp __b7
    // main::@7
  __b7:
    // [21] call round 
    // [65] phi from main::@7 to round [phi:main::@7->round]
  round_from___b7:
    jsr round
    // [22] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  __b8_from___b7:
    jmp __b8
    // main::@8
  __b8:
    // [23] call round 
    // [65] phi from main::@8 to round [phi:main::@8->round]
  round_from___b8:
    jsr round
    // [24] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  __b9_from___b8:
    jmp __b9
    // main::@9
  __b9:
    // [25] call round 
    // [65] phi from main::@9 to round [phi:main::@9->round]
  round_from___b9:
    jsr round
    // [26] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  __b10_from___b9:
    jmp __b10
    // main::@10
  __b10:
    // [27] call round 
    // [65] phi from main::@10 to round [phi:main::@10->round]
  round_from___b10:
    jsr round
    // [28] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  __b11_from___b10:
    jmp __b11
    // main::@11
  __b11:
    // [29] call end 
    jsr end
    jmp __breturn
    // main::@return
  __breturn:
    // [30] return 
    rts
}
  // end
end: {
    // [31] (word) Ticks#1 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // [32] call start 
    jsr start
    jmp __b1
    // end::@1
  __b1:
    // [33] (word) last_time ← (word) last_time - (word) Ticks#1 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z last_time
    sec
    sbc.z Ticks
    sta.z last_time
    lda.z last_time+1
    sbc.z Ticks+1
    sta.z last_time+1
    // [34] (word) Ticks#12 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // [35] (word) print_word::w#0 ← (word) Ticks#12 -- vwuz1=vwuz2 
    lda.z Ticks_1
    sta.z print_word.w
    lda.z Ticks_1+1
    sta.z print_word.w+1
    // [36] call print_word 
    jsr print_word
    // [37] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
  __b2_from___b1:
    jmp __b2
    // end::@2
  __b2:
    // [38] call print_ln 
    // [40] phi from end::@2 to print_ln [phi:end::@2->print_ln]
  print_ln_from___b2:
    jsr print_ln
    jmp __breturn
    // end::@return
  __breturn:
    // [39] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [41] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  __b1_from_print_ln:
    // [41] phi (byte*) print_line_cursor#8 = (byte*) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    jmp __b1
    // [41] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  __b1_from___b1:
    // [41] phi (byte*) print_line_cursor#8 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [42] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#8 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // [43] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc __b1_from___b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc __b1_from___b1
  !:
    jmp __breturn
    // print_ln::@return
  __breturn:
    // [44] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp($15) w)
print_word: {
    .label w = $15
    // [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 
    lda.z w+1
    sta.z print_byte.b
    // [46] call print_byte 
    // [50] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [50] phi (byte*) print_char_cursor#35 = (byte*) 1024 [phi:print_word->print_byte#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __b1
    // print_word::@1
  __b1:
    // [47] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuz1=_lo_vwuz2 
    lda.z w
    sta.z print_byte.b
    // [48] call print_byte 
    // [50] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from___b1:
    // [50] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __breturn
    // print_word::@return
  __breturn:
    // [49] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zp(4) b)
print_byte: {
    .label __0 = $17
    .label __2 = $18
    .label b = 4
    // [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 
    lda.z b
    lsr
    lsr
    lsr
    lsr
    sta.z __0
    // [52] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z __0
    lda print_hextab,y
    sta.z print_char.ch
    // [53] call print_char 
    // [58] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [58] phi (byte*) print_char_cursor#25 = (byte*) print_char_cursor#35 [phi:print_byte->print_char#0] -- register_copy 
    // [58] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_byte::@1
  __b1:
    // [54] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and.z b
    sta.z __2
    // [55] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z __2
    lda print_hextab,y
    sta.z print_char.ch
    // [56] call print_char 
    // [58] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from___b1:
    // [58] phi (byte*) print_char_cursor#25 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [58] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_byte::@return
  __breturn:
    // [57] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte zp(5) ch)
print_char: {
    .label ch = 5
    // [59] *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuz2 
    lda.z ch
    ldy #0
    sta (print_char_cursor),y
    // [60] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#25 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [61] return 
    rts
}
  // start
start: {
    .label LAST_TIME = last_time
    // asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
    jsr $ffde
    sta LAST_TIME
    stx LAST_TIME+1
    // [63] (word) rand_seed ← (word) $194a -- vwuz1=vwuc1 
    lda #<$194a
    sta.z rand_seed
    lda #>$194a
    sta.z rand_seed+1
    jmp __breturn
    // start::@return
  __breturn:
    // [64] return 
    rts
}
  // round
round: {
    .label __4 = $19
    .label p = 8
    .label I = $a
    .label S = $b
    // [66] phi from round to round::@1 [phi:round->round::@1]
  __b1_from_round:
    // [66] phi (byte*) round::p#2 = (const byte*) Sieve [phi:round->round::@1#0] -- pbuz1=pbuc1 
    lda #<Sieve
    sta.z p
    lda #>Sieve
    sta.z p+1
    jmp __b1
    // round::@1
  __b1:
    // [67] if((byte*) round::p#2<(const byte*) Sieve+(const word) COUNT) goto round::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z p+1
    cmp #>Sieve+COUNT
    bcc __b2
    bne !+
    lda.z p
    cmp #<Sieve+COUNT
    bcc __b2
  !:
    // [68] phi from round::@1 to round::@3 [phi:round::@1->round::@3]
  __b3_from___b1:
    // [68] phi (byte) round::I#3 = (byte) 2 [phi:round::@1->round::@3#0] -- vbuz1=vbuc1 
    lda #2
    sta.z I
    jmp __b3
    // round::@3
  __b3:
    // [69] if((byte) round::I#3<(const byte) SQRT_COUNT) goto round::@4 -- vbuz1_lt_vbuc1_then_la1 
    lda.z I
    cmp #SQRT_COUNT
    bcc __b4
    jmp __breturn
    // round::@return
  __breturn:
    // [70] return 
    rts
    // round::@4
  __b4:
    // [71] if(*((const byte*) Sieve + (byte) round::I#3)!=(byte) 0) goto round::@5 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 
    ldy.z I
    lda Sieve,y
    cmp #0
    bne __b5
    jmp __b8
    // round::@8
  __b8:
    // [72] (byte~) round::$4 ← (byte) round::I#3 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda.z I
    asl
    sta.z __4
    // [73] (byte*) round::S#1 ← (const byte*) Sieve + (byte~) round::$4 -- pbuz1=pbuc1_plus_vbuz2 
    lda.z __4
    clc
    adc #<Sieve
    sta.z S
    lda #>Sieve
    adc #0
    sta.z S+1
    // [74] phi from round::@7 round::@8 to round::@6 [phi:round::@7/round::@8->round::@6]
  __b6_from___b7:
  __b6_from___b8:
    // [74] phi (byte*) round::S#3 = (byte*) round::S#2 [phi:round::@7/round::@8->round::@6#0] -- register_copy 
    jmp __b6
    // round::@6
  __b6:
    // [75] if((byte*) round::S#3<(const byte*) Sieve+(const word) COUNT) goto round::@7 -- pbuz1_lt_pbuc1_then_la1 
    lda.z S+1
    cmp #>Sieve+COUNT
    bcc __b7
    bne !+
    lda.z S
    cmp #<Sieve+COUNT
    bcc __b7
  !:
    jmp __b5
    // round::@5
  __b5:
    // [76] (byte) round::I#2 ← ++ (byte) round::I#3 -- vbuz1=_inc_vbuz1 
    inc.z I
    // [68] phi from round::@5 to round::@3 [phi:round::@5->round::@3]
  __b3_from___b5:
    // [68] phi (byte) round::I#3 = (byte) round::I#2 [phi:round::@5->round::@3#0] -- register_copy 
    jmp __b3
    // round::@7
  __b7:
    // [77] *((byte*) round::S#3) ← (byte) 1 -- _deref_pbuz1=vbuc1 
    lda #1
    ldy #0
    sta (S),y
    // [78] (byte*) round::S#2 ← (byte*) round::S#3 + (byte) round::I#3 -- pbuz1=pbuz1_plus_vbuz2 
    lda.z I
    clc
    adc.z S
    sta.z S
    bcc !+
    inc.z S+1
  !:
    jmp __b6_from___b7
    // round::@2
  __b2:
    // [79] *((byte*) round::p#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (p),y
    // [80] (byte*) round::p#1 ← ++ (byte*) round::p#2 -- pbuz1=_inc_pbuz1 
    inc.z p
    bne !+
    inc.z p+1
  !:
    // [66] phi from round::@2 to round::@1 [phi:round::@2->round::@1]
  __b1_from___b2:
    // [66] phi (byte*) round::p#2 = (byte*) round::p#1 [phi:round::@2->round::@1#0] -- register_copy 
    jmp __b1
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  .align $100
  Sieve: .fill COUNT, 0

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] (word) last_time ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [2] (word) rand_seed ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [31] (word) Ticks#1 ← (word) last_time [ Ticks#1 ] ( main:4::end:29 [ Ticks#1 ] ) always clobbers reg byte a 
Statement [33] (word) last_time ← (word) last_time - (word) Ticks#1 [ last_time ] ( main:4::end:29 [ last_time ] ) always clobbers reg byte a 
Statement [34] (word) Ticks#12 ← (word) last_time [ Ticks#12 ] ( main:4::end:29 [ Ticks#12 ] ) always clobbers reg byte a 
Statement [35] (word) print_word::w#0 ← (word) Ticks#12 [ print_word::w#0 ] ( main:4::end:29 [ print_word::w#0 ] ) always clobbers reg byte a 
Statement [42] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#8 + (byte) $28 [ print_line_cursor#1 print_char_cursor#10 ] ( main:4::end:29::print_ln:38 [ print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [43] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#10 ] ( main:4::end:29::print_ln:38 [ print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_word::w#0 print_byte::b#0 ] ( main:4::end:29::print_word:36 [ print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [47] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_char_cursor#10 print_byte::b#1 ] ( main:4::end:29::print_word:36 [ print_char_cursor#10 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#35 print_byte::$0 ] ( main:4::end:29::print_word:36::print_byte:46 [ print_word::w#0 print_byte::b#2 print_char_cursor#35 print_byte::$0 ] main:4::end:29::print_word:36::print_byte:48 [ print_byte::b#2 print_char_cursor#35 print_byte::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [54] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#10 print_byte::$2 ] ( main:4::end:29::print_word:36::print_byte:46 [ print_word::w#0 print_char_cursor#10 print_byte::$2 ] main:4::end:29::print_word:36::print_byte:48 [ print_char_cursor#10 print_byte::$2 ] ) always clobbers reg byte a 
Statement [59] *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2 [ print_char_cursor#25 ] ( main:4::end:29::print_word:36::print_byte:46::print_char:53 [ print_word::w#0 print_byte::b#2 print_char_cursor#25 ] main:4::end:29::print_word:36::print_byte:48::print_char:53 [ print_byte::b#2 print_char_cursor#25 ] main:4::end:29::print_word:36::print_byte:46::print_char:56 [ print_word::w#0 print_char_cursor#25 ] main:4::end:29::print_word:36::print_byte:48::print_char:56 [ print_char_cursor#25 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  } always clobbers reg byte a reg byte x reg byte y 
Statement [63] (word) rand_seed ← (word) $194a [ ] ( main:4::start:7 [ last_time ] main:4::end:29::start:32 [ Ticks#1 ] ) always clobbers reg byte a 
Statement [67] if((byte*) round::p#2<(const byte*) Sieve+(const word) COUNT) goto round::@2 [ round::p#2 ] ( main:4::round:9 [ last_time round::p#2 ] main:4::round:11 [ last_time round::p#2 ] main:4::round:13 [ last_time round::p#2 ] main:4::round:15 [ last_time round::p#2 ] main:4::round:17 [ last_time round::p#2 ] main:4::round:19 [ last_time round::p#2 ] main:4::round:21 [ last_time round::p#2 ] main:4::round:23 [ last_time round::p#2 ] main:4::round:25 [ last_time round::p#2 ] main:4::round:27 [ last_time round::p#2 ] ) always clobbers reg byte a 
Statement [71] if(*((const byte*) Sieve + (byte) round::I#3)!=(byte) 0) goto round::@5 [ round::I#3 ] ( main:4::round:9 [ last_time round::I#3 ] main:4::round:11 [ last_time round::I#3 ] main:4::round:13 [ last_time round::I#3 ] main:4::round:15 [ last_time round::I#3 ] main:4::round:17 [ last_time round::I#3 ] main:4::round:19 [ last_time round::I#3 ] main:4::round:21 [ last_time round::I#3 ] main:4::round:23 [ last_time round::I#3 ] main:4::round:25 [ last_time round::I#3 ] main:4::round:27 [ last_time round::I#3 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:10 [ round::I#3 round::I#2 ]
Statement [72] (byte~) round::$4 ← (byte) round::I#3 << (byte) 1 [ round::I#3 round::$4 ] ( main:4::round:9 [ last_time round::I#3 round::$4 ] main:4::round:11 [ last_time round::I#3 round::$4 ] main:4::round:13 [ last_time round::I#3 round::$4 ] main:4::round:15 [ last_time round::I#3 round::$4 ] main:4::round:17 [ last_time round::I#3 round::$4 ] main:4::round:19 [ last_time round::I#3 round::$4 ] main:4::round:21 [ last_time round::I#3 round::$4 ] main:4::round:23 [ last_time round::I#3 round::$4 ] main:4::round:25 [ last_time round::I#3 round::$4 ] main:4::round:27 [ last_time round::I#3 round::$4 ] ) always clobbers reg byte a 
Statement [73] (byte*) round::S#1 ← (const byte*) Sieve + (byte~) round::$4 [ round::I#3 round::S#1 ] ( main:4::round:9 [ last_time round::I#3 round::S#1 ] main:4::round:11 [ last_time round::I#3 round::S#1 ] main:4::round:13 [ last_time round::I#3 round::S#1 ] main:4::round:15 [ last_time round::I#3 round::S#1 ] main:4::round:17 [ last_time round::I#3 round::S#1 ] main:4::round:19 [ last_time round::I#3 round::S#1 ] main:4::round:21 [ last_time round::I#3 round::S#1 ] main:4::round:23 [ last_time round::I#3 round::S#1 ] main:4::round:25 [ last_time round::I#3 round::S#1 ] main:4::round:27 [ last_time round::I#3 round::S#1 ] ) always clobbers reg byte a 
Statement [75] if((byte*) round::S#3<(const byte*) Sieve+(const word) COUNT) goto round::@7 [ round::I#3 round::S#3 ] ( main:4::round:9 [ last_time round::I#3 round::S#3 ] main:4::round:11 [ last_time round::I#3 round::S#3 ] main:4::round:13 [ last_time round::I#3 round::S#3 ] main:4::round:15 [ last_time round::I#3 round::S#3 ] main:4::round:17 [ last_time round::I#3 round::S#3 ] main:4::round:19 [ last_time round::I#3 round::S#3 ] main:4::round:21 [ last_time round::I#3 round::S#3 ] main:4::round:23 [ last_time round::I#3 round::S#3 ] main:4::round:25 [ last_time round::I#3 round::S#3 ] main:4::round:27 [ last_time round::I#3 round::S#3 ] ) always clobbers reg byte a 
Statement [77] *((byte*) round::S#3) ← (byte) 1 [ round::I#3 round::S#3 ] ( main:4::round:9 [ last_time round::I#3 round::S#3 ] main:4::round:11 [ last_time round::I#3 round::S#3 ] main:4::round:13 [ last_time round::I#3 round::S#3 ] main:4::round:15 [ last_time round::I#3 round::S#3 ] main:4::round:17 [ last_time round::I#3 round::S#3 ] main:4::round:19 [ last_time round::I#3 round::S#3 ] main:4::round:21 [ last_time round::I#3 round::S#3 ] main:4::round:23 [ last_time round::I#3 round::S#3 ] main:4::round:25 [ last_time round::I#3 round::S#3 ] main:4::round:27 [ last_time round::I#3 round::S#3 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:10 [ round::I#3 round::I#2 ]
Statement [78] (byte*) round::S#2 ← (byte*) round::S#3 + (byte) round::I#3 [ round::I#3 round::S#2 ] ( main:4::round:9 [ last_time round::I#3 round::S#2 ] main:4::round:11 [ last_time round::I#3 round::S#2 ] main:4::round:13 [ last_time round::I#3 round::S#2 ] main:4::round:15 [ last_time round::I#3 round::S#2 ] main:4::round:17 [ last_time round::I#3 round::S#2 ] main:4::round:19 [ last_time round::I#3 round::S#2 ] main:4::round:21 [ last_time round::I#3 round::S#2 ] main:4::round:23 [ last_time round::I#3 round::S#2 ] main:4::round:25 [ last_time round::I#3 round::S#2 ] main:4::round:27 [ last_time round::I#3 round::S#2 ] ) always clobbers reg byte a 
Statement [79] *((byte*) round::p#2) ← (byte) 0 [ round::p#2 ] ( main:4::round:9 [ last_time round::p#2 ] main:4::round:11 [ last_time round::p#2 ] main:4::round:13 [ last_time round::p#2 ] main:4::round:15 [ last_time round::p#2 ] main:4::round:17 [ last_time round::p#2 ] main:4::round:19 [ last_time round::p#2 ] main:4::round:21 [ last_time round::p#2 ] main:4::round:23 [ last_time round::p#2 ] main:4::round:25 [ last_time round::p#2 ] main:4::round:27 [ last_time round::p#2 ] ) always clobbers reg byte a reg byte y 
Statement [1] (word) last_time ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [2] (word) rand_seed ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [31] (word) Ticks#1 ← (word) last_time [ Ticks#1 ] ( main:4::end:29 [ Ticks#1 ] ) always clobbers reg byte a 
Statement [33] (word) last_time ← (word) last_time - (word) Ticks#1 [ last_time ] ( main:4::end:29 [ last_time ] ) always clobbers reg byte a 
Statement [34] (word) Ticks#12 ← (word) last_time [ Ticks#12 ] ( main:4::end:29 [ Ticks#12 ] ) always clobbers reg byte a 
Statement [35] (word) print_word::w#0 ← (word) Ticks#12 [ print_word::w#0 ] ( main:4::end:29 [ print_word::w#0 ] ) always clobbers reg byte a 
Statement [42] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#8 + (byte) $28 [ print_line_cursor#1 print_char_cursor#10 ] ( main:4::end:29::print_ln:38 [ print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [43] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#10 ] ( main:4::end:29::print_ln:38 [ print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_word::w#0 print_byte::b#0 ] ( main:4::end:29::print_word:36 [ print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [47] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_char_cursor#10 print_byte::b#1 ] ( main:4::end:29::print_word:36 [ print_char_cursor#10 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#35 print_byte::$0 ] ( main:4::end:29::print_word:36::print_byte:46 [ print_word::w#0 print_byte::b#2 print_char_cursor#35 print_byte::$0 ] main:4::end:29::print_word:36::print_byte:48 [ print_byte::b#2 print_char_cursor#35 print_byte::$0 ] ) always clobbers reg byte a 
Statement [54] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#10 print_byte::$2 ] ( main:4::end:29::print_word:36::print_byte:46 [ print_word::w#0 print_char_cursor#10 print_byte::$2 ] main:4::end:29::print_word:36::print_byte:48 [ print_char_cursor#10 print_byte::$2 ] ) always clobbers reg byte a 
Statement [59] *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2 [ print_char_cursor#25 ] ( main:4::end:29::print_word:36::print_byte:46::print_char:53 [ print_word::w#0 print_byte::b#2 print_char_cursor#25 ] main:4::end:29::print_word:36::print_byte:48::print_char:53 [ print_byte::b#2 print_char_cursor#25 ] main:4::end:29::print_word:36::print_byte:46::print_char:56 [ print_word::w#0 print_char_cursor#25 ] main:4::end:29::print_word:36::print_byte:48::print_char:56 [ print_char_cursor#25 ] ) always clobbers reg byte y 
Statement asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  } always clobbers reg byte a reg byte x reg byte y 
Statement [63] (word) rand_seed ← (word) $194a [ ] ( main:4::start:7 [ last_time ] main:4::end:29::start:32 [ Ticks#1 ] ) always clobbers reg byte a 
Statement [67] if((byte*) round::p#2<(const byte*) Sieve+(const word) COUNT) goto round::@2 [ round::p#2 ] ( main:4::round:9 [ last_time round::p#2 ] main:4::round:11 [ last_time round::p#2 ] main:4::round:13 [ last_time round::p#2 ] main:4::round:15 [ last_time round::p#2 ] main:4::round:17 [ last_time round::p#2 ] main:4::round:19 [ last_time round::p#2 ] main:4::round:21 [ last_time round::p#2 ] main:4::round:23 [ last_time round::p#2 ] main:4::round:25 [ last_time round::p#2 ] main:4::round:27 [ last_time round::p#2 ] ) always clobbers reg byte a 
Statement [71] if(*((const byte*) Sieve + (byte) round::I#3)!=(byte) 0) goto round::@5 [ round::I#3 ] ( main:4::round:9 [ last_time round::I#3 ] main:4::round:11 [ last_time round::I#3 ] main:4::round:13 [ last_time round::I#3 ] main:4::round:15 [ last_time round::I#3 ] main:4::round:17 [ last_time round::I#3 ] main:4::round:19 [ last_time round::I#3 ] main:4::round:21 [ last_time round::I#3 ] main:4::round:23 [ last_time round::I#3 ] main:4::round:25 [ last_time round::I#3 ] main:4::round:27 [ last_time round::I#3 ] ) always clobbers reg byte a 
Statement [72] (byte~) round::$4 ← (byte) round::I#3 << (byte) 1 [ round::I#3 round::$4 ] ( main:4::round:9 [ last_time round::I#3 round::$4 ] main:4::round:11 [ last_time round::I#3 round::$4 ] main:4::round:13 [ last_time round::I#3 round::$4 ] main:4::round:15 [ last_time round::I#3 round::$4 ] main:4::round:17 [ last_time round::I#3 round::$4 ] main:4::round:19 [ last_time round::I#3 round::$4 ] main:4::round:21 [ last_time round::I#3 round::$4 ] main:4::round:23 [ last_time round::I#3 round::$4 ] main:4::round:25 [ last_time round::I#3 round::$4 ] main:4::round:27 [ last_time round::I#3 round::$4 ] ) always clobbers reg byte a 
Statement [73] (byte*) round::S#1 ← (const byte*) Sieve + (byte~) round::$4 [ round::I#3 round::S#1 ] ( main:4::round:9 [ last_time round::I#3 round::S#1 ] main:4::round:11 [ last_time round::I#3 round::S#1 ] main:4::round:13 [ last_time round::I#3 round::S#1 ] main:4::round:15 [ last_time round::I#3 round::S#1 ] main:4::round:17 [ last_time round::I#3 round::S#1 ] main:4::round:19 [ last_time round::I#3 round::S#1 ] main:4::round:21 [ last_time round::I#3 round::S#1 ] main:4::round:23 [ last_time round::I#3 round::S#1 ] main:4::round:25 [ last_time round::I#3 round::S#1 ] main:4::round:27 [ last_time round::I#3 round::S#1 ] ) always clobbers reg byte a 
Statement [75] if((byte*) round::S#3<(const byte*) Sieve+(const word) COUNT) goto round::@7 [ round::I#3 round::S#3 ] ( main:4::round:9 [ last_time round::I#3 round::S#3 ] main:4::round:11 [ last_time round::I#3 round::S#3 ] main:4::round:13 [ last_time round::I#3 round::S#3 ] main:4::round:15 [ last_time round::I#3 round::S#3 ] main:4::round:17 [ last_time round::I#3 round::S#3 ] main:4::round:19 [ last_time round::I#3 round::S#3 ] main:4::round:21 [ last_time round::I#3 round::S#3 ] main:4::round:23 [ last_time round::I#3 round::S#3 ] main:4::round:25 [ last_time round::I#3 round::S#3 ] main:4::round:27 [ last_time round::I#3 round::S#3 ] ) always clobbers reg byte a 
Statement [77] *((byte*) round::S#3) ← (byte) 1 [ round::I#3 round::S#3 ] ( main:4::round:9 [ last_time round::I#3 round::S#3 ] main:4::round:11 [ last_time round::I#3 round::S#3 ] main:4::round:13 [ last_time round::I#3 round::S#3 ] main:4::round:15 [ last_time round::I#3 round::S#3 ] main:4::round:17 [ last_time round::I#3 round::S#3 ] main:4::round:19 [ last_time round::I#3 round::S#3 ] main:4::round:21 [ last_time round::I#3 round::S#3 ] main:4::round:23 [ last_time round::I#3 round::S#3 ] main:4::round:25 [ last_time round::I#3 round::S#3 ] main:4::round:27 [ last_time round::I#3 round::S#3 ] ) always clobbers reg byte a reg byte y 
Statement [78] (byte*) round::S#2 ← (byte*) round::S#3 + (byte) round::I#3 [ round::I#3 round::S#2 ] ( main:4::round:9 [ last_time round::I#3 round::S#2 ] main:4::round:11 [ last_time round::I#3 round::S#2 ] main:4::round:13 [ last_time round::I#3 round::S#2 ] main:4::round:15 [ last_time round::I#3 round::S#2 ] main:4::round:17 [ last_time round::I#3 round::S#2 ] main:4::round:19 [ last_time round::I#3 round::S#2 ] main:4::round:21 [ last_time round::I#3 round::S#2 ] main:4::round:23 [ last_time round::I#3 round::S#2 ] main:4::round:25 [ last_time round::I#3 round::S#2 ] main:4::round:27 [ last_time round::I#3 round::S#2 ] ) always clobbers reg byte a 
Statement [79] *((byte*) round::p#2) ← (byte) 0 [ round::p#2 ] ( main:4::round:9 [ last_time round::p#2 ] main:4::round:11 [ last_time round::p#2 ] main:4::round:13 [ last_time round::p#2 ] main:4::round:15 [ last_time round::p#2 ] main:4::round:17 [ last_time round::p#2 ] main:4::round:19 [ last_time round::p#2 ] main:4::round:21 [ last_time round::p#2 ] main:4::round:23 [ last_time round::p#2 ] main:4::round:25 [ last_time round::p#2 ] main:4::round:27 [ last_time round::p#2 ] ) always clobbers reg byte a reg byte y 
Potential registers zp[2]:2 [ print_line_cursor#8 print_line_cursor#1 ] : zp[2]:2 , 
Potential registers zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp[1]:4 , reg byte x , 
Potential registers zp[1]:5 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:6 [ print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ] : zp[2]:6 , 
Potential registers zp[2]:8 [ round::p#2 round::p#1 ] : zp[2]:8 , 
Potential registers zp[1]:10 [ round::I#3 round::I#2 ] : zp[1]:10 , reg byte x , 
Potential registers zp[2]:11 [ round::S#3 round::S#2 round::S#1 ] : zp[2]:11 , 
Potential registers zp[2]:13 [ last_time ] : zp[2]:13 , 
Potential registers zp[2]:15 [ rand_seed ] : zp[2]:15 , 
Potential registers zp[2]:17 [ Ticks#1 ] : zp[2]:17 , 
Potential registers zp[2]:19 [ Ticks#12 ] : zp[2]:19 , 
Potential registers zp[2]:21 [ print_word::w#0 ] : zp[2]:21 , 
Potential registers zp[1]:23 [ print_byte::$0 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:24 [ print_byte::$2 ] : zp[1]:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:25 [ round::$4 ] : zp[1]:25 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [round] 362.33: zp[2]:11 [ round::S#3 round::S#2 round::S#1 ] 39.33: zp[1]:10 [ round::I#3 round::I#2 ] 36.67: zp[2]:8 [ round::p#2 round::p#1 ] 22: zp[1]:25 [ round::$4 ] 
Uplift Scope [] 40: zp[2]:15 [ rand_seed ] 38.5: zp[2]:2 [ print_line_cursor#8 print_line_cursor#1 ] 6.33: zp[2]:6 [ print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ] 4: zp[2]:19 [ Ticks#12 ] 2: zp[2]:17 [ Ticks#1 ] 0.37: zp[2]:13 [ last_time ] 
Uplift Scope [print_byte] 10: zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp[1]:23 [ print_byte::$0 ] 4: zp[1]:24 [ print_byte::$2 ] 
Uplift Scope [print_char] 14: zp[1]:5 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplift Scope [print_word] 2: zp[2]:21 [ print_word::w#0 ] 
Uplift Scope [RADIX] 
Uplift Scope [print_ln] 
Uplift Scope [start] 
Uplift Scope [end] 
Uplift Scope [main] 

Uplifting [round] best 7452 combination zp[2]:11 [ round::S#3 round::S#2 round::S#1 ] reg byte x [ round::I#3 round::I#2 ] zp[2]:8 [ round::p#2 round::p#1 ] reg byte a [ round::$4 ] 
Uplifting [] best 7452 combination zp[2]:15 [ rand_seed ] zp[2]:2 [ print_line_cursor#8 print_line_cursor#1 ] zp[2]:6 [ print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ] zp[2]:19 [ Ticks#12 ] zp[2]:17 [ Ticks#1 ] zp[2]:13 [ last_time ] 
Uplifting [print_byte] best 7438 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] 
Uplifting [print_char] best 7429 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplifting [print_word] best 7429 combination zp[2]:21 [ print_word::w#0 ] 
Uplifting [RADIX] best 7429 combination 
Uplifting [print_ln] best 7429 combination 
Uplifting [start] best 7429 combination 
Uplifting [end] best 7429 combination 
Uplifting [main] best 7429 combination 
Coalescing zero page register [ zp[2]:19 [ Ticks#12 ] ] with [ zp[2]:21 [ print_word::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:8 [ round::p#2 round::p#1 ] ] with [ zp[2]:2 [ print_line_cursor#8 print_line_cursor#1 ] ]
Coalescing zero page register [ zp[2]:11 [ round::S#3 round::S#2 round::S#1 ] ] with [ zp[2]:6 [ print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ] ]
Allocated (was zp[2]:8) zp[2]:2 [ round::p#2 round::p#1 print_line_cursor#8 print_line_cursor#1 ]
Allocated (was zp[2]:11) zp[2]:4 [ round::S#3 round::S#2 round::S#1 print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ]
Allocated (was zp[2]:13) zp[2]:6 [ last_time ]
Allocated (was zp[2]:15) zp[2]:8 [ rand_seed ]
Allocated (was zp[2]:17) zp[2]:10 [ Ticks#1 ]
Allocated (was zp[2]:19) zp[2]:12 [ Ticks#12 print_word::w#0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .const COUNT = $4000
  .const SQRT_COUNT = $80
  .label last_time = 6
  .label rand_seed = 8
  .label print_line_cursor = 2
  .label print_char_cursor = 4
  .label Ticks = $a
  .label Ticks_1 = $c
  // @begin
__bbegin:
  jmp __b1
  // @1
__b1:
  // [1] (word) last_time ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z last_time
  lda #>0
  sta.z last_time+1
  jmp __b2
  // @2
__b2:
  // [2] (word) rand_seed ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z rand_seed
  lda #>0
  sta.z rand_seed+1
  // [3] phi from @2 to @3 [phi:@2->@3]
__b3_from___b2:
  jmp __b3
  // @3
__b3:
  // [4] call main 
  // [6] phi from @3 to main [phi:@3->main]
main_from___b3:
  jsr main
  // [5] phi from @3 to @end [phi:@3->@end]
__bend_from___b3:
  jmp __bend
  // @end
__bend:
  // main
main: {
    // [7] call start 
    jsr start
    // [8] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    jmp __b1
    // main::@1
  __b1:
    // [9] call round 
    // [65] phi from main::@1 to round [phi:main::@1->round]
  round_from___b1:
    jsr round
    // [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [11] call round 
    // [65] phi from main::@2 to round [phi:main::@2->round]
  round_from___b2:
    jsr round
    // [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  __b3_from___b2:
    jmp __b3
    // main::@3
  __b3:
    // [13] call round 
    // [65] phi from main::@3 to round [phi:main::@3->round]
  round_from___b3:
    jsr round
    // [14] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  __b4_from___b3:
    jmp __b4
    // main::@4
  __b4:
    // [15] call round 
    // [65] phi from main::@4 to round [phi:main::@4->round]
  round_from___b4:
    jsr round
    // [16] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [17] call round 
    // [65] phi from main::@5 to round [phi:main::@5->round]
  round_from___b5:
    jsr round
    // [18] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [19] call round 
    // [65] phi from main::@6 to round [phi:main::@6->round]
  round_from___b6:
    jsr round
    // [20] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  __b7_from___b6:
    jmp __b7
    // main::@7
  __b7:
    // [21] call round 
    // [65] phi from main::@7 to round [phi:main::@7->round]
  round_from___b7:
    jsr round
    // [22] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  __b8_from___b7:
    jmp __b8
    // main::@8
  __b8:
    // [23] call round 
    // [65] phi from main::@8 to round [phi:main::@8->round]
  round_from___b8:
    jsr round
    // [24] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  __b9_from___b8:
    jmp __b9
    // main::@9
  __b9:
    // [25] call round 
    // [65] phi from main::@9 to round [phi:main::@9->round]
  round_from___b9:
    jsr round
    // [26] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  __b10_from___b9:
    jmp __b10
    // main::@10
  __b10:
    // [27] call round 
    // [65] phi from main::@10 to round [phi:main::@10->round]
  round_from___b10:
    jsr round
    // [28] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  __b11_from___b10:
    jmp __b11
    // main::@11
  __b11:
    // [29] call end 
    jsr end
    jmp __breturn
    // main::@return
  __breturn:
    // [30] return 
    rts
}
  // end
end: {
    // [31] (word) Ticks#1 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // [32] call start 
    jsr start
    jmp __b1
    // end::@1
  __b1:
    // [33] (word) last_time ← (word) last_time - (word) Ticks#1 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z last_time
    sec
    sbc.z Ticks
    sta.z last_time
    lda.z last_time+1
    sbc.z Ticks+1
    sta.z last_time+1
    // [34] (word) Ticks#12 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // [35] (word) print_word::w#0 ← (word) Ticks#12
    // [36] call print_word 
    jsr print_word
    // [37] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
  __b2_from___b1:
    jmp __b2
    // end::@2
  __b2:
    // [38] call print_ln 
    // [40] phi from end::@2 to print_ln [phi:end::@2->print_ln]
  print_ln_from___b2:
    jsr print_ln
    jmp __breturn
    // end::@return
  __breturn:
    // [39] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [41] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  __b1_from_print_ln:
    // [41] phi (byte*) print_line_cursor#8 = (byte*) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    jmp __b1
    // [41] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  __b1_from___b1:
    // [41] phi (byte*) print_line_cursor#8 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [42] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#8 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // [43] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc __b1_from___b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc __b1_from___b1
  !:
    jmp __breturn
    // print_ln::@return
  __breturn:
    // [44] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp($c) w)
print_word: {
    .label w = $c
    // [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda.z w+1
    tax
    // [46] call print_byte 
    // [50] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [50] phi (byte*) print_char_cursor#35 = (byte*) 1024 [phi:print_word->print_byte#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __b1
    // print_word::@1
  __b1:
    // [47] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda.z w
    tax
    // [48] call print_byte 
    // [50] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from___b1:
    // [50] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __breturn
    // print_word::@return
  __breturn:
    // [49] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [52] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [53] call print_char 
    // [58] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [58] phi (byte*) print_char_cursor#25 = (byte*) print_char_cursor#35 [phi:print_byte->print_char#0] -- register_copy 
    // [58] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_byte::@1
  __b1:
    // [54] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [55] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [56] call print_char 
    // [58] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from___b1:
    // [58] phi (byte*) print_char_cursor#25 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [58] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_byte::@return
  __breturn:
    // [57] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // [59] *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [60] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#25 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [61] return 
    rts
}
  // start
start: {
    .label LAST_TIME = last_time
    // asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
    jsr $ffde
    sta LAST_TIME
    stx LAST_TIME+1
    // [63] (word) rand_seed ← (word) $194a -- vwuz1=vwuc1 
    lda #<$194a
    sta.z rand_seed
    lda #>$194a
    sta.z rand_seed+1
    jmp __breturn
    // start::@return
  __breturn:
    // [64] return 
    rts
}
  // round
round: {
    .label p = 2
    .label S = 4
    // [66] phi from round to round::@1 [phi:round->round::@1]
  __b1_from_round:
    // [66] phi (byte*) round::p#2 = (const byte*) Sieve [phi:round->round::@1#0] -- pbuz1=pbuc1 
    lda #<Sieve
    sta.z p
    lda #>Sieve
    sta.z p+1
    jmp __b1
    // round::@1
  __b1:
    // [67] if((byte*) round::p#2<(const byte*) Sieve+(const word) COUNT) goto round::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z p+1
    cmp #>Sieve+COUNT
    bcc __b2
    bne !+
    lda.z p
    cmp #<Sieve+COUNT
    bcc __b2
  !:
    // [68] phi from round::@1 to round::@3 [phi:round::@1->round::@3]
  __b3_from___b1:
    // [68] phi (byte) round::I#3 = (byte) 2 [phi:round::@1->round::@3#0] -- vbuxx=vbuc1 
    ldx #2
    jmp __b3
    // round::@3
  __b3:
    // [69] if((byte) round::I#3<(const byte) SQRT_COUNT) goto round::@4 -- vbuxx_lt_vbuc1_then_la1 
    cpx #SQRT_COUNT
    bcc __b4
    jmp __breturn
    // round::@return
  __breturn:
    // [70] return 
    rts
    // round::@4
  __b4:
    // [71] if(*((const byte*) Sieve + (byte) round::I#3)!=(byte) 0) goto round::@5 -- pbuc1_derefidx_vbuxx_neq_0_then_la1 
    lda Sieve,x
    cmp #0
    bne __b5
    jmp __b8
    // round::@8
  __b8:
    // [72] (byte~) round::$4 ← (byte) round::I#3 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [73] (byte*) round::S#1 ← (const byte*) Sieve + (byte~) round::$4 -- pbuz1=pbuc1_plus_vbuaa 
    clc
    adc #<Sieve
    sta.z S
    lda #>Sieve
    adc #0
    sta.z S+1
    // [74] phi from round::@7 round::@8 to round::@6 [phi:round::@7/round::@8->round::@6]
  __b6_from___b7:
  __b6_from___b8:
    // [74] phi (byte*) round::S#3 = (byte*) round::S#2 [phi:round::@7/round::@8->round::@6#0] -- register_copy 
    jmp __b6
    // round::@6
  __b6:
    // [75] if((byte*) round::S#3<(const byte*) Sieve+(const word) COUNT) goto round::@7 -- pbuz1_lt_pbuc1_then_la1 
    lda.z S+1
    cmp #>Sieve+COUNT
    bcc __b7
    bne !+
    lda.z S
    cmp #<Sieve+COUNT
    bcc __b7
  !:
    jmp __b5
    // round::@5
  __b5:
    // [76] (byte) round::I#2 ← ++ (byte) round::I#3 -- vbuxx=_inc_vbuxx 
    inx
    // [68] phi from round::@5 to round::@3 [phi:round::@5->round::@3]
  __b3_from___b5:
    // [68] phi (byte) round::I#3 = (byte) round::I#2 [phi:round::@5->round::@3#0] -- register_copy 
    jmp __b3
    // round::@7
  __b7:
    // [77] *((byte*) round::S#3) ← (byte) 1 -- _deref_pbuz1=vbuc1 
    lda #1
    ldy #0
    sta (S),y
    // [78] (byte*) round::S#2 ← (byte*) round::S#3 + (byte) round::I#3 -- pbuz1=pbuz1_plus_vbuxx 
    txa
    clc
    adc.z S
    sta.z S
    bcc !+
    inc.z S+1
  !:
    jmp __b6_from___b7
    // round::@2
  __b2:
    // [79] *((byte*) round::p#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (p),y
    // [80] (byte*) round::p#1 ← ++ (byte*) round::p#2 -- pbuz1=_inc_pbuz1 
    inc.z p
    bne !+
    inc.z p+1
  !:
    // [66] phi from round::@2 to round::@1 [phi:round::@2->round::@1]
  __b1_from___b2:
    // [66] phi (byte*) round::p#2 = (byte*) round::p#1 [phi:round::@2->round::@1#0] -- register_copy 
    jmp __b1
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  .align $100
  Sieve: .fill COUNT, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b6
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __b9
Removing instruction jmp __b10
Removing instruction jmp __b11
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b8
Removing instruction jmp __b6
Removing instruction jmp __b5
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction lda #>0
Replacing instruction ldy #0 with TAY
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __bbegin with __b1
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b1 with __b1
Replacing label __b6_from___b7 with __b6
Removing instruction __bbegin:
Removing instruction __b3_from___b2:
Removing instruction main_from___b3:
Removing instruction __bend_from___b3:
Removing instruction __b1_from_main:
Removing instruction round_from___b1:
Removing instruction __b2_from___b1:
Removing instruction round_from___b2:
Removing instruction __b3_from___b2:
Removing instruction round_from___b3:
Removing instruction __b4_from___b3:
Removing instruction round_from___b4:
Removing instruction __b5_from___b4:
Removing instruction round_from___b5:
Removing instruction __b6_from___b5:
Removing instruction round_from___b6:
Removing instruction __b7_from___b6:
Removing instruction round_from___b7:
Removing instruction __b8_from___b7:
Removing instruction round_from___b8:
Removing instruction __b9_from___b8:
Removing instruction round_from___b9:
Removing instruction __b10_from___b9:
Removing instruction round_from___b10:
Removing instruction __b11_from___b10:
Removing instruction __b2_from___b1:
Removing instruction print_ln_from___b2:
Removing instruction __b1_from___b1:
Removing instruction __b6_from___b7:
Removing instruction __b6_from___b8:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __bend:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __b7:
Removing instruction __b8:
Removing instruction __b9:
Removing instruction __b10:
Removing instruction __b11:
Removing instruction __breturn:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction __b1_from_print_ln:
Removing instruction __breturn:
Removing instruction print_byte_from_print_word:
Removing instruction __b1:
Removing instruction print_byte_from___b1:
Removing instruction __breturn:
Removing instruction print_char_from_print_byte:
Removing instruction __b1:
Removing instruction print_char_from___b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __b1_from_round:
Removing instruction __b3_from___b1:
Removing instruction __breturn:
Removing instruction __b8:
Removing instruction __b3_from___b5:
Removing instruction __b1_from___b2:
Succesful ASM optimization Pass5UnusedLabelElimination
Adding RTS to root block 
Succesful ASM optimization Pass5AddMainRts
Removing instruction jmp __b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #<0
Succesful ASM optimization Pass5UnnecesaryLoadElimination

FINAL SYMBOL TABLE
(label) @1
(label) @2
(label) @3
(label) @begin
(label) @end
(const word) COUNT = (word) $4000
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const byte) SQRT_COUNT = (byte) $80
(const byte*) Sieve[(const word) COUNT]  = { fill( COUNT, 0) }
(word) Ticks
(word) Ticks#1 Ticks zp[2]:10 2.0
(word) Ticks#12 Ticks_1 zp[2]:12 4.0
(void()) end()
(label) end::@1
(label) end::@2
(label) end::@return
(word) last_time loadstore zp[2]:6 0.37037037037037035
(signed word()) main()
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(signed word) main::return
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte x 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 reg byte x 4.0
(byte) print_byte::b#1 reg byte x 4.0
(byte) print_byte::b#2 reg byte x 2.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0 reg byte a 4.0
(byte) print_char::ch#1 reg byte a 4.0
(byte) print_char::ch#2 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#10 print_char_cursor zp[2]:4 1.0
(byte*) print_char_cursor#25 print_char_cursor zp[2]:4 4.0
(byte*) print_char_cursor#35 print_char_cursor zp[2]:4 1.3333333333333333
(const byte*) print_hextab[]  = (string) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp[2]:2 16.5
(byte*) print_line_cursor#8 print_line_cursor zp[2]:2 22.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(byte*) print_screen
(void()) print_word((word) print_word::w)
(label) print_word::@1
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0 w zp[2]:12 2.0
(word) rand_seed loadstore zp[2]:8 40.0
(void()) round()
(byte~) round::$4 reg byte a 22.0
(label) round::@1
(label) round::@2
(label) round::@3
(label) round::@4
(label) round::@5
(label) round::@6
(label) round::@7
(label) round::@8
(label) round::@return
(byte) round::I
(byte) round::I#2 reg byte x 22.0
(byte) round::I#3 reg byte x 17.333333333333332
(byte*) round::S
(byte*) round::S#1 S zp[2]:4 22.0
(byte*) round::S#2 S zp[2]:4 202.0
(byte*) round::S#3 S zp[2]:4 138.33333333333331
(byte*) round::p
(byte*) round::p#1 p zp[2]:2 22.0
(byte*) round::p#2 p zp[2]:2 14.666666666666666
(void()) start()
(label) start::@return
(const word*) start::LAST_TIME = &(word) last_time

reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp[2]:2 [ round::p#2 round::p#1 print_line_cursor#8 print_line_cursor#1 ]
reg byte x [ round::I#3 round::I#2 ]
zp[2]:4 [ round::S#3 round::S#2 round::S#1 print_char_cursor#25 print_char_cursor#35 print_char_cursor#10 ]
zp[2]:6 [ last_time ]
zp[2]:8 [ rand_seed ]
zp[2]:10 [ Ticks#1 ]
zp[2]:12 [ Ticks#12 print_word::w#0 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]
reg byte a [ round::$4 ]


FINAL ASSEMBLER
Score: 6505

  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__b1)
.pc = $80d "Program"
  // Global Constants & labels
  .const COUNT = $4000
  .const SQRT_COUNT = $80
  .label last_time = 6
  .label rand_seed = 8
  .label print_line_cursor = 2
  .label print_char_cursor = 4
  .label Ticks = $a
  .label Ticks_1 = $c
  // @begin
  // @1
__b1:
  // last_time
  // [1] (word) last_time ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z last_time
  sta.z last_time+1
  // @2
  // rand_seed
  // [2] (word) rand_seed ← (word) 0 -- vwuz1=vwuc1 
  sta.z rand_seed
  sta.z rand_seed+1
  // [3] phi from @2 to @3 [phi:@2->@3]
  // @3
  // [4] call main 
  // [6] phi from @3 to main [phi:@3->main]
  jsr main
  rts
  // [5] phi from @3 to @end [phi:@3->@end]
  // @end
  // main
main: {
    // start()
    // [7] call start 
    jsr start
    // [8] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // round()
    // [9] call round 
    // [65] phi from main::@1 to round [phi:main::@1->round]
    jsr round
    // [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // round()
    // [11] call round 
    // [65] phi from main::@2 to round [phi:main::@2->round]
    jsr round
    // [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // main::@3
    // round()
    // [13] call round 
    // [65] phi from main::@3 to round [phi:main::@3->round]
    jsr round
    // [14] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
    // main::@4
    // round()
    // [15] call round 
    // [65] phi from main::@4 to round [phi:main::@4->round]
    jsr round
    // [16] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
    // main::@5
    // round()
    // [17] call round 
    // [65] phi from main::@5 to round [phi:main::@5->round]
    jsr round
    // [18] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
    // main::@6
    // round()
    // [19] call round 
    // [65] phi from main::@6 to round [phi:main::@6->round]
    jsr round
    // [20] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
    // main::@7
    // round()
    // [21] call round 
    // [65] phi from main::@7 to round [phi:main::@7->round]
    jsr round
    // [22] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
    // main::@8
    // round()
    // [23] call round 
    // [65] phi from main::@8 to round [phi:main::@8->round]
    jsr round
    // [24] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
    // main::@9
    // round()
    // [25] call round 
    // [65] phi from main::@9 to round [phi:main::@9->round]
    jsr round
    // [26] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
    // main::@10
    // round()
    // [27] call round 
    // [65] phi from main::@10 to round [phi:main::@10->round]
    jsr round
    // [28] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
    // main::@11
    // end()
    // [29] call end 
    jsr end
    // main::@return
    // }
    // [30] return 
    rts
}
  // end
end: {
    // Ticks = last_time
    // [31] (word) Ticks#1 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // start()
    // [32] call start 
    jsr start
    // end::@1
    // last_time -= Ticks
    // [33] (word) last_time ← (word) last_time - (word) Ticks#1 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z last_time
    sec
    sbc.z Ticks
    sta.z last_time
    lda.z last_time+1
    sbc.z Ticks+1
    sta.z last_time+1
    // Ticks = last_time
    // [34] (word) Ticks#12 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // print_word(Ticks)
    // [35] (word) print_word::w#0 ← (word) Ticks#12
    // [36] call print_word 
    jsr print_word
    // [37] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
    // end::@2
    // print_ln()
    // [38] call print_ln 
    // [40] phi from end::@2 to print_ln [phi:end::@2->print_ln]
    jsr print_ln
    // end::@return
    // }
    // [39] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [41] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
    // [41] phi (byte*) print_line_cursor#8 = (byte*) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [41] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
    // [41] phi (byte*) print_line_cursor#8 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  __b1:
    // print_line_cursor + $28
    // [42] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#8 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // while (print_line_cursor<print_char_cursor)
    // [43] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc __b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc __b1
  !:
    // print_ln::@return
    // }
    // [44] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp($c) w)
print_word: {
    .label w = $c
    // print_byte(>w)
    // [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda.z w+1
    tax
    // [46] call print_byte 
    // [50] phi from print_word to print_byte [phi:print_word->print_byte]
    // [50] phi (byte*) print_char_cursor#35 = (byte*) 1024 [phi:print_word->print_byte#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@1
    // print_byte(<w)
    // [47] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda.z w
    tax
    // [48] call print_byte 
    // [50] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
    // [50] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@return
    // }
    // [49] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // b>>4
    // [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [52] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [53] call print_char 
    // [58] phi from print_byte to print_char [phi:print_byte->print_char]
    // [58] phi (byte*) print_char_cursor#25 = (byte*) print_char_cursor#35 [phi:print_byte->print_char#0] -- register_copy 
    // [58] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@1
    // b&$f
    // [54] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [55] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [56] call print_char 
    // [58] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
    // [58] phi (byte*) print_char_cursor#25 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [58] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@return
    // }
    // [57] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [59] *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [60] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#25 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [61] return 
    rts
}
  // start
start: {
    .label LAST_TIME = last_time
    // asm
    // asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
    jsr $ffde
    sta LAST_TIME
    stx LAST_TIME+1
    // rand_seed = 6474
    // [63] (word) rand_seed ← (word) $194a -- vwuz1=vwuc1 
    lda #<$194a
    sta.z rand_seed
    lda #>$194a
    sta.z rand_seed+1
    // start::@return
    // }
    // [64] return 
    rts
}
  // round
round: {
    .label p = 2
    .label S = 4
    // [66] phi from round to round::@1 [phi:round->round::@1]
    // [66] phi (byte*) round::p#2 = (const byte*) Sieve [phi:round->round::@1#0] -- pbuz1=pbuc1 
    lda #<Sieve
    sta.z p
    lda #>Sieve
    sta.z p+1
    // round::@1
  __b1:
    // for(char* p=Sieve;p<Sieve+COUNT;++p)
    // [67] if((byte*) round::p#2<(const byte*) Sieve+(const word) COUNT) goto round::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z p+1
    cmp #>Sieve+COUNT
    bcc __b2
    bne !+
    lda.z p
    cmp #<Sieve+COUNT
    bcc __b2
  !:
    // [68] phi from round::@1 to round::@3 [phi:round::@1->round::@3]
    // [68] phi (byte) round::I#3 = (byte) 2 [phi:round::@1->round::@3#0] -- vbuxx=vbuc1 
    ldx #2
    // round::@3
  __b3:
    // while (I < SQRT_COUNT)
    // [69] if((byte) round::I#3<(const byte) SQRT_COUNT) goto round::@4 -- vbuxx_lt_vbuc1_then_la1 
    cpx #SQRT_COUNT
    bcc __b4
    // round::@return
    // }
    // [70] return 
    rts
    // round::@4
  __b4:
    // if (Sieve[I] == 0)
    // [71] if(*((const byte*) Sieve + (byte) round::I#3)!=(byte) 0) goto round::@5 -- pbuc1_derefidx_vbuxx_neq_0_then_la1 
    lda Sieve,x
    cmp #0
    bne __b5
    // round::@8
    // I<<1
    // [72] (byte~) round::$4 ← (byte) round::I#3 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // S = Sieve + I<<1
    // [73] (byte*) round::S#1 ← (const byte*) Sieve + (byte~) round::$4 -- pbuz1=pbuc1_plus_vbuaa 
    clc
    adc #<Sieve
    sta.z S
    lda #>Sieve
    adc #0
    sta.z S+1
    // [74] phi from round::@7 round::@8 to round::@6 [phi:round::@7/round::@8->round::@6]
    // [74] phi (byte*) round::S#3 = (byte*) round::S#2 [phi:round::@7/round::@8->round::@6#0] -- register_copy 
    // round::@6
  __b6:
    // while (S < Sieve + COUNT)
    // [75] if((byte*) round::S#3<(const byte*) Sieve+(const word) COUNT) goto round::@7 -- pbuz1_lt_pbuc1_then_la1 
    lda.z S+1
    cmp #>Sieve+COUNT
    bcc __b7
    bne !+
    lda.z S
    cmp #<Sieve+COUNT
    bcc __b7
  !:
    // round::@5
  __b5:
    // ++I;
    // [76] (byte) round::I#2 ← ++ (byte) round::I#3 -- vbuxx=_inc_vbuxx 
    inx
    // [68] phi from round::@5 to round::@3 [phi:round::@5->round::@3]
    // [68] phi (byte) round::I#3 = (byte) round::I#2 [phi:round::@5->round::@3#0] -- register_copy 
    jmp __b3
    // round::@7
  __b7:
    // *S = 1
    // [77] *((byte*) round::S#3) ← (byte) 1 -- _deref_pbuz1=vbuc1 
    lda #1
    ldy #0
    sta (S),y
    // S += I
    // [78] (byte*) round::S#2 ← (byte*) round::S#3 + (byte) round::I#3 -- pbuz1=pbuz1_plus_vbuxx 
    txa
    clc
    adc.z S
    sta.z S
    bcc !+
    inc.z S+1
  !:
    jmp __b6
    // round::@2
  __b2:
    // *p = 0
    // [79] *((byte*) round::p#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (p),y
    // for(char* p=Sieve;p<Sieve+COUNT;++p)
    // [80] (byte*) round::p#1 ← ++ (byte*) round::p#2 -- pbuz1=_inc_pbuz1 
    inc.z p
    bne !+
    inc.z p+1
  !:
    // [66] phi from round::@2 to round::@1 [phi:round::@2->round::@1]
    // [66] phi (byte*) round::p#2 = (byte*) round::p#1 [phi:round::@2->round::@1#0] -- register_copy 
    jmp __b1
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  .align $100
  Sieve: .fill COUNT, 0

