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)
Fixing pointer array-indexing *((signed word[]) words + (byte) main::j)
Fixing pointer array-indexing *((signed word[]) words + (byte) sub::idx)
Fixing pointer array-indexing *((signed word[]) words + (byte) sub::idx)
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Identified constant variable (byte*) HEAP_TOP
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) memset::@5
Culled Empty Block (label) memset::@3
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) @13
Culled Empty Block (label) @14
Culled Empty Block (label) @15
Culled Empty Block (label) @16
Culled Empty Block (label) @17
Culled Empty Block (label) print_sword::@4
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) @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) main::@4
Culled Empty Block (label) @36

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@12
memset: scope:[memset]  from print_cls
  (byte) memset::c#3 ← phi( print_cls/(byte) memset::c#0 )
  (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 )
  (word) memset::num#1 ← phi( print_cls/(word) memset::num#0 )
  (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
  (bool~) memset::$1 ← ! (bool~) memset::$0
  if((bool~) memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@4
  (void*) memset::str#1 ← phi( memset/(void*) memset::str#3 memset::@4/(void*) memset::str#4 )
  (void*) memset::return#0 ← (void*) memset::str#1
  to:memset::@return
memset::@2: scope:[memset]  from memset
  (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 )
  (word) memset::num#2 ← phi( memset/(word) memset::num#1 )
  (void*) memset::str#2 ← phi( memset/(void*) memset::str#3 )
  (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#2
  (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#2
  (byte*) memset::end#0 ← (byte*~) memset::$3
  (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2
  to:memset::@4
memset::@4: scope:[memset]  from memset::@2 memset::@4
  (void*) memset::str#4 ← phi( memset::@2/(void*) memset::str#2 memset::@4/(void*) memset::str#4 )
  (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 )
  (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 )
  (byte) memset::c#1 ← phi( memset::@2/(byte) memset::c#2 memset::@4/(byte) memset::c#1 )
  *((byte*) memset::dst#2) ← (byte) memset::c#1
  (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1
  if((bool~) memset::$4) goto memset::@4
  to:memset::@1
memset::@return: scope:[memset]  from memset::@1
  (void*) memset::return#3 ← phi( memset::@1/(void*) memset::return#0 )
  (void*) memset::return#1 ← (void*) memset::return#3
  return 
  to:@return
@12: 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:@28
print_ln: scope:[print_ln]  from main::@9
  (byte*) print_char_cursor#42 ← phi( main::@9/(byte*) print_char_cursor#18 )
  (byte*) print_line_cursor#17 ← phi( main::@9/(byte*) print_line_cursor#19 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  (byte*) print_char_cursor#22 ← phi( print_ln/(byte*) print_char_cursor#42 print_ln::@1/(byte*) print_char_cursor#22 )
  (byte*) print_line_cursor#9 ← phi( print_ln/(byte*) print_line_cursor#17 print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (number) $28
  (byte*) print_line_cursor#1 ← (byte*~) print_ln::$0
  (bool~) print_ln::$1 ← (byte*) print_line_cursor#1 < (byte*) print_char_cursor#22
  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#10 ← phi( print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*) print_char_cursor#1 ← (byte*) print_line_cursor#10
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  (byte*) print_char_cursor#23 ← phi( print_ln::@2/(byte*) print_char_cursor#1 )
  (byte*) print_line_cursor#11 ← phi( print_ln::@2/(byte*) print_line_cursor#10 )
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#11
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#23
  return 
  to:@return
print_sword: scope:[print_sword]  from main::@3
  (byte*) print_char_cursor#51 ← phi( main::@3/(byte*) print_char_cursor#49 )
  (signed word) print_sword::w#2 ← phi( main::@3/(signed word) print_sword::w#1 )
  (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (number) 0
  if((bool~) print_sword::$0) goto print_sword::@1
  to:print_sword::@3
print_sword::@1: scope:[print_sword]  from print_sword
  (signed word) print_sword::w#5 ← phi( print_sword/(signed word) print_sword::w#2 )
  (byte*) print_char_cursor#43 ← phi( print_sword/(byte*) print_char_cursor#51 )
  (byte) print_char::ch#0 ← (byte) '-'
  call print_char 
  to:print_sword::@5
print_sword::@5: scope:[print_sword]  from print_sword::@1
  (signed word) print_sword::w#3 ← phi( print_sword::@1/(signed word) print_sword::w#5 )
  (byte*) print_char_cursor#24 ← phi( print_sword::@1/(byte*) print_char_cursor#14 )
  (byte*) print_char_cursor#3 ← (byte*) print_char_cursor#24
  (signed word~) print_sword::$5 ← - (signed word) print_sword::w#3
  (signed word) print_sword::w#0 ← (signed word~) print_sword::$5
  to:print_sword::@2
print_sword::@3: scope:[print_sword]  from print_sword
  (signed word) print_sword::w#7 ← phi( print_sword/(signed word) print_sword::w#2 )
  (byte*) print_char_cursor#44 ← phi( print_sword/(byte*) print_char_cursor#51 )
  (byte) print_char::ch#1 ← (byte) ' '
  call print_char 
  to:print_sword::@6
print_sword::@6: scope:[print_sword]  from print_sword::@3
  (signed word) print_sword::w#6 ← phi( print_sword::@3/(signed word) print_sword::w#7 )
  (byte*) print_char_cursor#25 ← phi( print_sword::@3/(byte*) print_char_cursor#14 )
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#25
  to:print_sword::@2
print_sword::@2: scope:[print_sword]  from print_sword::@5 print_sword::@6
  (byte*) print_char_cursor#45 ← phi( print_sword::@5/(byte*) print_char_cursor#3 print_sword::@6/(byte*) print_char_cursor#4 )
  (signed word) print_sword::w#4 ← phi( print_sword::@5/(signed word) print_sword::w#0 print_sword::@6/(signed word) print_sword::w#6 )
  (word~) print_sword::$1 ← ((word)) (signed word) print_sword::w#4
  (word) print_word::w#0 ← (word~) print_sword::$1
  call print_word 
  to:print_sword::@7
print_sword::@7: scope:[print_sword]  from print_sword::@2
  (byte*) print_char_cursor#26 ← phi( print_sword::@2/(byte*) print_char_cursor#9 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#26
  to:print_sword::@return
print_sword::@return: scope:[print_sword]  from print_sword::@7
  (byte*) print_char_cursor#27 ← phi( print_sword::@7/(byte*) print_char_cursor#5 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#27
  return 
  to:@return
print_word: scope:[print_word]  from print_sword::@2
  (byte*) print_char_cursor#46 ← phi( print_sword::@2/(byte*) print_char_cursor#45 )
  (word) print_word::w#1 ← phi( print_sword::@2/(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#28 ← phi( print_word/(byte*) print_char_cursor#12 )
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#28
  (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#29 ← phi( print_word::@1/(byte*) print_char_cursor#12 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#29
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@2
  (byte*) print_char_cursor#30 ← phi( print_word::@2/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#30
  return 
  to:@return
@28: scope:[]  from @12
  (byte*) print_screen#11 ← phi( @12/(byte*) print_screen#0 )
  (byte*) print_char_cursor#54 ← phi( @12/(byte*) print_char_cursor#0 )
  (byte*) print_line_cursor#24 ← phi( @12/(byte*) print_line_cursor#0 )
  (byte[]) print_hextab#0 ← (const string) $0
  to:@35
print_byte: scope:[print_byte]  from print_word print_word::@1
  (byte*) print_char_cursor#47 ← phi( print_word/(byte*) print_char_cursor#46 print_word::@1/(byte*) print_char_cursor#7 )
  (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#2 ← *((byte[]) print_hextab#0 + (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#31 ← phi( print_byte/(byte*) print_char_cursor#14 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#31
  (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
  (byte) print_char::ch#3 ← *((byte[]) print_hextab#0 + (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#32 ← phi( print_byte::@1/(byte*) print_char_cursor#14 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#32
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#33 ← phi( print_byte::@2/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#33
  return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1 print_sword::@1 print_sword::@3
  (byte*) print_char_cursor#34 ← phi( print_byte/(byte*) print_char_cursor#47 print_byte::@1/(byte*) print_char_cursor#10 print_sword::@1/(byte*) print_char_cursor#43 print_sword::@3/(byte*) print_char_cursor#44 )
  (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 )
  *((byte*) print_char_cursor#34) ← (byte) print_char::ch#4
  (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#34
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#35 ← phi( print_char/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#35
  return 
  to:@return
print_cls: scope:[print_cls]  from main::@2
  (byte*) print_screen#1 ← phi( main::@2/(byte*) print_screen#3 )
  (void*) memset::str#0 ← (void*)(byte*) print_screen#1
  (byte) memset::c#0 ← (byte) ' '
  (word) memset::num#0 ← (number) $3e8
  call memset 
  (void*) memset::return#2 ← (void*) memset::return#1
  to:print_cls::@1
print_cls::@1: scope:[print_cls]  from print_cls
  (byte*) print_screen#2 ← phi( print_cls/(byte*) print_screen#1 )
  (byte*) print_line_cursor#3 ← (byte*) print_screen#2
  (byte*) print_char_cursor#15 ← (byte*) print_line_cursor#3
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls::@1
  (byte*) print_char_cursor#36 ← phi( print_cls::@1/(byte*) print_char_cursor#15 )
  (byte*) print_line_cursor#12 ← phi( print_cls::@1/(byte*) print_line_cursor#3 )
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#12
  (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#36
  return 
  to:@return
@35: scope:[]  from @28
  (byte*) print_screen#10 ← phi( @28/(byte*) print_screen#11 )
  (byte*) print_char_cursor#53 ← phi( @28/(byte*) print_char_cursor#54 )
  (byte*) print_line_cursor#23 ← phi( @28/(byte*) print_line_cursor#24 )
  (signed word[]) words#0 ← { (number) -$6000, (number) -$600, (number) -$60, (number) -6, (number) 0, (number) 6, (number) $60, (number) $600, (number) $6000 }
  to:@37
main: scope:[main]  from @37
  (byte*) print_char_cursor#58 ← phi( @37/(byte*) print_char_cursor#50 )
  (byte*) print_line_cursor#28 ← phi( @37/(byte*) print_line_cursor#20 )
  (byte*) print_screen#8 ← phi( @37/(byte*) print_screen#9 )
  (byte) main::i#0 ← (byte) 0
  to:main::@1
main::@1: scope:[main]  from main main::@7
  (byte*) print_char_cursor#57 ← phi( main/(byte*) print_char_cursor#58 main::@7/(byte*) print_char_cursor#52 )
  (byte*) print_line_cursor#27 ← phi( main/(byte*) print_line_cursor#28 main::@7/(byte*) print_line_cursor#21 )
  (byte*) print_screen#7 ← phi( main/(byte*) print_screen#8 main::@7/(byte*) print_screen#4 )
  (byte) main::i#2 ← phi( main/(byte) main::i#0 main::@7/(byte) main::i#1 )
  (byte) sub::idx#0 ← (byte) main::i#2
  (byte) sub::s#0 ← (number) $80
  call sub 
  to:main::@5
main::@5: scope:[main]  from main::@1
  (byte*) print_char_cursor#56 ← phi( main::@1/(byte*) print_char_cursor#57 )
  (byte*) print_line_cursor#26 ← phi( main::@1/(byte*) print_line_cursor#27 )
  (byte*) print_screen#6 ← phi( main::@1/(byte*) print_screen#7 )
  (byte) main::i#3 ← phi( main::@1/(byte) main::i#2 )
  (byte) sub::idx#1 ← (byte) main::i#3
  (byte) sub::s#1 ← (number) $40
  call sub 
  to:main::@6
main::@6: scope:[main]  from main::@5
  (byte*) print_char_cursor#55 ← phi( main::@5/(byte*) print_char_cursor#56 )
  (byte*) print_line_cursor#25 ← phi( main::@5/(byte*) print_line_cursor#26 )
  (byte*) print_screen#5 ← phi( main::@5/(byte*) print_screen#6 )
  (byte) main::i#4 ← phi( main::@5/(byte) main::i#3 )
  (byte) sub::idx#2 ← (byte) main::i#4
  (byte) sub::s#2 ← (number) $40
  call sub 
  to:main::@7
main::@7: scope:[main]  from main::@6
  (byte*) print_char_cursor#52 ← phi( main::@6/(byte*) print_char_cursor#55 )
  (byte*) print_line_cursor#21 ← phi( main::@6/(byte*) print_line_cursor#25 )
  (byte*) print_screen#4 ← phi( main::@6/(byte*) print_screen#5 )
  (byte) main::i#5 ← phi( main::@6/(byte) main::i#4 )
  (byte) main::i#1 ← (byte) main::i#5 + rangenext(0,8)
  (bool~) main::$4 ← (byte) main::i#1 != rangelast(0,8)
  if((bool~) main::$4) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@7
  (byte*) print_char_cursor#48 ← phi( main::@7/(byte*) print_char_cursor#52 )
  (byte*) print_line_cursor#18 ← phi( main::@7/(byte*) print_line_cursor#21 )
  (byte*) print_screen#3 ← phi( main::@7/(byte*) print_screen#4 )
  call print_cls 
  to:main::@8
main::@8: scope:[main]  from main::@2
  (byte*) print_char_cursor#37 ← phi( main::@2/(byte*) print_char_cursor#16 )
  (byte*) print_line_cursor#13 ← phi( main::@2/(byte*) print_line_cursor#4 )
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#13
  (byte*) print_char_cursor#17 ← (byte*) print_char_cursor#37
  (byte) main::j#0 ← (byte) 0
  to:main::@3
main::@3: scope:[main]  from main::@10 main::@8
  (byte*) print_line_cursor#22 ← phi( main::@10/(byte*) print_line_cursor#6 main::@8/(byte*) print_line_cursor#5 )
  (byte*) print_char_cursor#49 ← phi( main::@10/(byte*) print_char_cursor#19 main::@8/(byte*) print_char_cursor#17 )
  (byte) main::j#2 ← phi( main::@10/(byte) main::j#1 main::@8/(byte) main::j#0 )
  (byte~) main::$8 ← (byte) main::j#2 * (const byte) SIZEOF_SIGNED_WORD
  (signed word) print_sword::w#1 ← *((signed word[]) words#0 + (byte~) main::$8)
  call print_sword 
  to:main::@9
main::@9: scope:[main]  from main::@3
  (byte) main::j#4 ← phi( main::@3/(byte) main::j#2 )
  (byte*) print_line_cursor#19 ← phi( main::@3/(byte*) print_line_cursor#22 )
  (byte*) print_char_cursor#38 ← phi( main::@3/(byte*) print_char_cursor#6 )
  (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#38
  call print_ln 
  to:main::@10
main::@10: scope:[main]  from main::@9
  (byte) main::j#3 ← phi( main::@9/(byte) main::j#4 )
  (byte*) print_char_cursor#39 ← phi( main::@9/(byte*) print_char_cursor#2 )
  (byte*) print_line_cursor#14 ← phi( main::@9/(byte*) print_line_cursor#2 )
  (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#14
  (byte*) print_char_cursor#19 ← (byte*) print_char_cursor#39
  (byte) main::j#1 ← (byte) main::j#3 + rangenext(0,8)
  (bool~) main::$7 ← (byte) main::j#1 != rangelast(0,8)
  if((bool~) main::$7) goto main::@3
  to:main::@return
main::@return: scope:[main]  from main::@10
  (byte*) print_char_cursor#40 ← phi( main::@10/(byte*) print_char_cursor#19 )
  (byte*) print_line_cursor#15 ← phi( main::@10/(byte*) print_line_cursor#6 )
  (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#15
  (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#40
  return 
  to:@return
sub: scope:[sub]  from main::@1 main::@5 main::@6
  (byte) sub::s#3 ← phi( main::@1/(byte) sub::s#0 main::@5/(byte) sub::s#1 main::@6/(byte) sub::s#2 )
  (byte) sub::idx#3 ← phi( main::@1/(byte) sub::idx#0 main::@5/(byte) sub::idx#1 main::@6/(byte) sub::idx#2 )
  (byte~) sub::$0 ← (byte) sub::idx#3 * (const byte) SIZEOF_SIGNED_WORD
  *((signed word[]) words#0 + (byte~) sub::$0) ← *((signed word[]) words#0 + (byte~) sub::$0) - (byte) sub::s#3
  to:sub::@return
sub::@return: scope:[sub]  from sub
  return 
  to:@return
@37: scope:[]  from @35
  (byte*) print_screen#9 ← phi( @35/(byte*) print_screen#10 )
  (byte*) print_char_cursor#50 ← phi( @35/(byte*) print_char_cursor#53 )
  (byte*) print_line_cursor#20 ← phi( @35/(byte*) print_line_cursor#23 )
  call main 
  to:@38
@38: scope:[]  from @37
  (byte*) print_char_cursor#41 ← phi( @37/(byte*) print_char_cursor#20 )
  (byte*) print_line_cursor#16 ← phi( @37/(byte*) print_line_cursor#7 )
  (byte*) print_line_cursor#8 ← (byte*) print_line_cursor#16
  (byte*) print_char_cursor#21 ← (byte*) print_char_cursor#41
  to:@end
@end: scope:[]  from @38

SYMBOL TABLE SSA
(const string) $0 = (string) "0123456789abcdef"
(label) @12
(label) @28
(label) @35
(label) @37
(label) @38
(label) @begin
(label) @end
(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) SIZEOF_SIGNED_WORD = (byte) 2
(void()) main()
(bool~) main::$4
(bool~) main::$7
(byte~) main::$8
(label) main::@1
(label) main::@10
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(byte) main::i#3
(byte) main::i#4
(byte) main::i#5
(byte) main::j
(byte) main::j#0
(byte) main::j#1
(byte) main::j#2
(byte) main::j#3
(byte) main::j#4
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(bool~) memset::$0
(bool~) memset::$1
(byte*~) memset::$2
(byte*~) memset::$3
(bool~) memset::$4
(label) memset::@1
(label) memset::@2
(label) memset::@4
(label) memset::@return
(byte) memset::c
(byte) memset::c#0
(byte) memset::c#1
(byte) memset::c#2
(byte) memset::c#3
(byte*) memset::dst
(byte*) memset::dst#0
(byte*) memset::dst#1
(byte*) memset::dst#2
(byte*) memset::end
(byte*) memset::end#0
(byte*) memset::end#1
(word) memset::num
(word) memset::num#0
(word) memset::num#1
(word) memset::num#2
(void*) memset::return
(void*) memset::return#0
(void*) memset::return#1
(void*) memset::return#2
(void*) memset::return#3
(void*) memset::str
(void*) memset::str#0
(void*) memset::str#1
(void*) memset::str#2
(void*) memset::str#3
(void*) memset::str#4
(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::ch#3
(byte) print_char::ch#4
(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#53
(byte*) print_char_cursor#54
(byte*) print_char_cursor#55
(byte*) print_char_cursor#56
(byte*) print_char_cursor#57
(byte*) print_char_cursor#58
(byte*) print_char_cursor#6
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
(byte[]) print_hextab
(byte[]) print_hextab#0
(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#3
(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
(byte*) print_screen#1
(byte*) print_screen#10
(byte*) print_screen#11
(byte*) print_screen#2
(byte*) print_screen#3
(byte*) print_screen#4
(byte*) print_screen#5
(byte*) print_screen#6
(byte*) print_screen#7
(byte*) print_screen#8
(byte*) print_screen#9
(void()) print_sword((signed word) print_sword::w)
(bool~) print_sword::$0
(word~) print_sword::$1
(signed word~) print_sword::$5
(label) print_sword::@1
(label) print_sword::@2
(label) print_sword::@3
(label) print_sword::@5
(label) print_sword::@6
(label) print_sword::@7
(label) print_sword::@return
(signed word) print_sword::w
(signed word) print_sword::w#0
(signed word) print_sword::w#1
(signed word) print_sword::w#2
(signed word) print_sword::w#3
(signed word) print_sword::w#4
(signed word) print_sword::w#5
(signed word) print_sword::w#6
(signed word) print_sword::w#7
(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
(void()) sub((byte) sub::idx , (byte) sub::s)
(byte~) sub::$0
(label) sub::@return
(byte) sub::idx
(byte) sub::idx#0
(byte) sub::idx#1
(byte) sub::idx#2
(byte) sub::idx#3
(byte) sub::s
(byte) sub::s#0
(byte) sub::s#1
(byte) sub::s#2
(byte) sub::s#3
(signed word[]) words
(signed word[]) words#0

Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (number) $28
Adding number conversion cast (snumber) 0 in (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (number) 0
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) $3e8 in (word) memset::num#0 ← (number) $3e8
Adding number conversion cast (unumber) $80 in (byte) sub::s#0 ← (number) $80
Adding number conversion cast (unumber) $40 in (byte) sub::s#1 ← (number) $40
Adding number conversion cast (unumber) $40 in (byte) sub::s#2 ← (number) $40
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (signed word) to elements in (signed word[]) words#0 ← { (signed word)(number) -$6000, (signed word)(number) -$600, (signed word)(number) -$60, (signed word)(number) -6, (signed word)(number) 0, (signed word)(number) 6, (signed word)(number) $60, (signed word)(number) $600, (signed word)(number) $6000 }
Successful SSA optimization PassNAddArrayNumberTypeConversions
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
Inlining cast (word~) print_sword::$1 ← (word)(signed word) print_sword::w#4
Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8
Inlining cast (byte) sub::s#0 ← (unumber)(number) $80
Inlining cast (byte) sub::s#1 ← (unumber)(number) $40
Inlining cast (byte) sub::s#2 ← (unumber)(number) $40
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $3e8
Simplifying constant integer cast -$6000
Simplifying constant integer cast -$600
Simplifying constant integer cast -$60
Simplifying constant integer cast -6
Simplifying constant integer cast 0
Simplifying constant integer cast 6
Simplifying constant integer cast $60
Simplifying constant integer cast $600
Simplifying constant integer cast $6000
Simplifying constant integer cast $80
Simplifying constant integer cast $40
Simplifying constant integer cast $40
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $40
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f
Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1 
Alias (void*) memset::str#2 = (void*) memset::str#3 
Alias (word) memset::num#1 = (word) memset::num#2 
Alias (byte) memset::c#2 = (byte) memset::c#3 
Alias (byte*) memset::end#0 = (byte*~) memset::$3 
Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#24 (byte*) print_char_cursor#54 (byte*) print_screen#11 (byte*) print_line_cursor#23 (byte*) print_char_cursor#53 (byte*) print_screen#10 (byte*) print_line_cursor#20 (byte*) print_char_cursor#50 (byte*) print_screen#9 
Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#10 (byte*) print_char_cursor#1 (byte*) print_line_cursor#11 (byte*) print_char_cursor#23 (byte*) print_line_cursor#2 (byte*) print_char_cursor#2 
Alias (byte*) print_char_cursor#43 = (byte*) print_char_cursor#51 (byte*) print_char_cursor#44 
Alias (signed word) print_sword::w#2 = (signed word) print_sword::w#5 (signed word) print_sword::w#3 (signed word) print_sword::w#7 (signed word) print_sword::w#6 
Alias (byte*) print_char_cursor#24 = (byte*) print_char_cursor#3 
Alias (signed word) print_sword::w#0 = (signed word~) print_sword::$5 
Alias (byte*) print_char_cursor#25 = (byte*) print_char_cursor#4 
Alias (word) print_word::w#0 = (word~) print_sword::$1 
Alias (byte*) print_char_cursor#26 = (byte*) print_char_cursor#5 (byte*) print_char_cursor#27 (byte*) print_char_cursor#6 
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#28 = (byte*) print_char_cursor#7 
Alias (byte) print_byte::b#1 = (byte~) print_word::$2 
Alias (byte*) print_char_cursor#29 = (byte*) print_char_cursor#8 (byte*) print_char_cursor#30 (byte*) print_char_cursor#9 
Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#31 
Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#32 (byte*) print_char_cursor#33 (byte*) print_char_cursor#12 
Alias (byte*) print_char_cursor#13 = (byte*) print_char_cursor#35 (byte*) print_char_cursor#14 
Alias (byte*) print_line_cursor#12 = (byte*) print_screen#2 (byte*) print_screen#1 (byte*) print_line_cursor#3 (byte*) print_char_cursor#15 (byte*) print_char_cursor#36 (byte*) print_line_cursor#4 (byte*) print_char_cursor#16 
Alias (byte) main::i#2 = (byte) main::i#3 (byte) main::i#4 (byte) main::i#5 
Alias (byte*) print_screen#3 = (byte*) print_screen#6 (byte*) print_screen#7 (byte*) print_screen#5 (byte*) print_screen#4 
Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#26 (byte*) print_line_cursor#27 (byte*) print_line_cursor#25 (byte*) print_line_cursor#21 
Alias (byte*) print_char_cursor#48 = (byte*) print_char_cursor#56 (byte*) print_char_cursor#57 (byte*) print_char_cursor#55 (byte*) print_char_cursor#52 
Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#5 
Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#37 
Alias (byte*) print_line_cursor#19 = (byte*) print_line_cursor#22 
Alias (byte) main::j#2 = (byte) main::j#4 (byte) main::j#3 
Alias (byte*) print_char_cursor#18 = (byte*) print_char_cursor#38 
Alias (byte*) print_line_cursor#14 = (byte*) print_line_cursor#6 (byte*) print_line_cursor#15 (byte*) print_line_cursor#7 
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#39 (byte*) print_char_cursor#40 (byte*) print_char_cursor#20 
Alias (byte*) print_line_cursor#16 = (byte*) print_line_cursor#8 
Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#41 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte*) print_char_cursor#22
Self Phi Eliminated (byte*) print_screen#3
Self Phi Eliminated (byte*) print_line_cursor#18
Self Phi Eliminated (byte*) print_char_cursor#48
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0
Identical Phi Values (byte) memset::c#1 (byte) memset::c#2
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#4 (void*) memset::str#2
Identical Phi Values (byte*) print_line_cursor#17 (byte*) print_line_cursor#19
Identical Phi Values (byte*) print_char_cursor#42 (byte*) print_char_cursor#18
Identical Phi Values (byte*) print_char_cursor#22 (byte*) print_char_cursor#42
Identical Phi Values (signed word) print_sword::w#2 (signed word) print_sword::w#1
Identical Phi Values (byte*) print_char_cursor#43 (byte*) print_char_cursor#49
Identical Phi Values (byte*) print_char_cursor#24 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_char_cursor#25 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_char_cursor#26 (byte*) print_char_cursor#29
Identical Phi Values (word) print_word::w#1 (word) print_word::w#0
Identical Phi Values (byte*) print_char_cursor#46 (byte*) print_char_cursor#45
Identical Phi Values (byte*) print_char_cursor#28 (byte*) print_char_cursor#11
Identical Phi Values (byte*) print_char_cursor#29 (byte*) print_char_cursor#11
Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_line_cursor#12 (byte*) print_screen#3
Identical Phi Values (byte*) print_screen#8 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_line_cursor#28 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_char_cursor#58 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_screen#3 (byte*) print_screen#8
Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#28
Identical Phi Values (byte*) print_char_cursor#48 (byte*) print_char_cursor#58
Identical Phi Values (byte*) print_line_cursor#13 (byte*) print_line_cursor#12
Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_line_cursor#12
Identical Phi Values (byte*) print_char_cursor#18 (byte*) print_char_cursor#26
Identical Phi Values (byte*) print_line_cursor#14 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#19 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_line_cursor#16 (byte*) print_line_cursor#14
Identical Phi Values (byte*) print_char_cursor#21 (byte*) print_char_cursor#19
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#0
Identical Phi Values (byte*) print_char_cursor#45 (byte*) print_char_cursor#13
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) print_char_cursor#47 (byte*) print_char_cursor#13
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [15] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4
Simple Condition (bool~) print_ln::$1 [27] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1
Simple Condition (bool~) print_sword::$0 [36] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1
Simple Condition (bool~) main::$4 [126] if((byte) main::i#1!=rangelast(0,8)) goto main::@1
Simple Condition (bool~) main::$7 [145] if((byte) main::j#1!=rangelast(0,8)) goto main::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [108] (signed word[]) words#0 ← { (signed word) -$6000, (signed word) -$600, (signed word) -$60, (signed word) -6, (signed word) 0, (signed word) 6, (signed word) $60, (signed word) $600, (signed word) $6000 }
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) print_line_cursor#0 = (byte*) 1024
Constant (const byte) print_char::ch#0 = '-'
Constant (const byte) print_char::ch#1 = ' '
Constant (const byte[]) print_hextab#0 = $0
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const signed word[]) words#0 = { -$6000, -$600, -$60, -6, 0, 6, $60, $600, $6000 }
Constant (const byte) main::i#0 = 0
Constant (const byte) sub::s#0 = $80
Constant (const byte) sub::s#1 = $40
Constant (const byte) sub::s#2 = $40
Constant (const byte) main::j#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (void*)print_line_cursor#0 in [95] (void*) memset::str#0 ← (void*)(const byte*) print_line_cursor#0
Successful SSA optimization Pass2ConstantValues
if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [124] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [126] if(main::i#1!=rangelast(0,8)) goto main::@1 to (number) 9
Resolved ranged next value [143] main::j#1 ← ++ main::j#2 to ++
Resolved ranged comparison value [145] if(main::j#1!=rangelast(0,8)) goto main::@3 to (number) 9
Eliminating unused variable (void*) memset::return#2 and assignment [39] (void*) memset::return#2 ← (void*) memset::str#0
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) 9 in if((byte) main::i#1!=(number) 9) goto main::@1
Adding number conversion cast (unumber) 9 in if((byte) main::j#1!=(number) 9) goto main::@3
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 9
Simplifying constant integer cast 9
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 9
Finalized unsigned number type (byte) 9
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant (const void*) memset::str#0 = (void*)print_line_cursor#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memset::str#0 in [0] (byte*~) memset::$2 ← (byte*)(const void*) memset::str#0
Constant value identified (byte*)memset::str#0 in [2] (byte*) memset::dst#0 ← (byte*)(const void*) memset::str#0
Successful SSA optimization Pass2ConstantValues
Constant (const byte*) memset::$2 = (byte*)memset::str#0
Constant (const byte*) memset::dst#0 = (byte*)memset::str#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) memset::end#0 = memset::$2+memset::num#0
Successful SSA optimization Pass2ConstantIdentification
Rewriting multiplication to use shift [47] (byte~) main::$8 ← (byte) main::j#2 * (const byte) SIZEOF_SIGNED_WORD
Rewriting multiplication to use shift [55] (byte~) sub::$0 ← (byte) sub::idx#3 * (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) memset::dst#0
Inlining constant with var siblings (const byte) print_char::ch#0
Inlining constant with var siblings (const byte) print_char::ch#1
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::j#0
Inlining constant with var siblings (const byte) sub::s#0
Inlining constant with var siblings (const byte) sub::s#1
Inlining constant with var siblings (const byte) sub::s#2
Inlining constant with var siblings (const byte*) print_line_cursor#0
Constant inlined memset::$2 = (byte*)(const void*) memset::str#0
Constant inlined print_char::ch#1 = (byte) ' '
Constant inlined print_line_cursor#0 = (byte*) 1024
Constant inlined print_char::ch#0 = (byte) '-'
Constant inlined main::i#0 = (byte) 0
Constant inlined sub::s#0 = (byte) $80
Constant inlined sub::s#1 = (byte) $40
Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0
Constant inlined sub::s#2 = (byte) $40
Constant inlined main::j#0 = (byte) 0
Constant inlined $0 = (const byte[]) print_hextab#0
Successful SSA optimization Pass2ConstantInlining
Eliminating unused constant (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization PassNEliminateUnusedVars
Added new block during phi lifting memset::@6(between memset::@4 and memset::@4)
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Added new block during phi lifting main::@11(between main::@7 and main::@1)
Added new block during phi lifting main::@12(between main::@10 and main::@3)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @12
Adding NOP phi() at start of @28
Adding NOP phi() at start of @35
Adding NOP phi() at start of @37
Adding NOP phi() at start of @38
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::@8
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of print_ln::@2
Adding NOP phi() at start of print_sword::@7
Adding NOP phi() at start of print_word::@2
Adding NOP phi() at start of print_byte::@2
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of print_cls::@1
Adding NOP phi() at start of memset
Adding NOP phi() at start of memset::@2
Adding NOP phi() at start of memset::@1
CALL GRAPH
Calls in [] to main:5 
Calls in [main] to sub:12 sub:15 sub:18 print_cls:22 print_sword:27 print_ln:29 
Calls in [print_sword] to print_char:46 print_word:50 print_char:54 
Calls in [print_word] to print_byte:63 print_byte:66 
Calls in [print_byte] to print_char:74 print_char:79 
Calls in [print_cls] to memset:83 

Created 12 initial phi equivalence classes
Coalesced [11] sub::idx#4 ← sub::idx#0
Coalesced [14] sub::idx#5 ← sub::idx#1
Coalesced [17] sub::idx#6 ← sub::idx#2
Coalesced [33] main::j#5 ← main::j#1
Not coalescing [34] print_char_cursor#63 ← print_line_cursor#1
Coalesced [35] print_line_cursor#31 ← print_line_cursor#1
Coalesced [36] main::i#6 ← main::i#1
Coalesced [37] print_line_cursor#29 ← print_line_cursor#19
Coalesced (already) [43] print_line_cursor#30 ← print_line_cursor#1
Coalesced [45] print_char_cursor#62 ← print_char_cursor#49
Coalesced [47] print_sword::w#9 ← print_sword::w#1
Coalesced (already) [53] print_char_cursor#61 ← print_char_cursor#49
Coalesced [56] print_sword::w#8 ← print_sword::w#0
Coalesced [62] print_byte::b#4 ← print_byte::b#0
Coalesced [65] print_byte::b#5 ← print_byte::b#1
Coalesced [72] print_char::ch#5 ← print_char::ch#2
Coalesced [73] print_char_cursor#59 ← print_char_cursor#13
Coalesced [77] print_char::ch#6 ← print_char::ch#3
Coalesced (already) [78] print_char_cursor#60 ← print_char_cursor#13
Coalesced [94] memset::dst#3 ← memset::dst#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) @12
Culled Empty Block (label) @28
Culled Empty Block (label) @35
Culled Empty Block (label) @38
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@11
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_ln::@3
Culled Empty Block (label) print_sword::@6
Culled Empty Block (label) print_sword::@7
Culled Empty Block (label) print_word::@2
Culled Empty Block (label) print_byte::@2
Culled Empty Block (label) print_cls::@1
Culled Empty Block (label) memset::@2
Culled Empty Block (label) memset::@1
Culled Empty Block (label) memset::@6
Renumbering block @37 to @1
Renumbering block memset::@4 to memset::@1
Renumbering block print_sword::@5 to print_sword::@4
Renumbering block main::@5 to main::@4
Renumbering block main::@6 to main::@5
Renumbering block main::@7 to main::@6
Renumbering block main::@9 to main::@7
Renumbering block main::@10 to main::@8
Renumbering block main::@12 to main::@9
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of print_sword::@3
Adding NOP phi() at start of print_sword::@1
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of memset

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()
main: scope:[main]  from @1
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@6
  [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@6/(byte) main::i#1 )
  [6] (byte) sub::idx#0 ← (byte) main::i#2
  [7] call sub 
  to:main::@4
main::@4: scope:[main]  from main::@1
  [8] (byte) sub::idx#1 ← (byte) main::i#2
  [9] call sub 
  to:main::@5
main::@5: scope:[main]  from main::@4
  [10] (byte) sub::idx#2 ← (byte) main::i#2
  [11] call sub 
  to:main::@6
main::@6: scope:[main]  from main::@5
  [12] (byte) main::i#1 ← ++ (byte) main::i#2
  [13] if((byte) main::i#1!=(byte) 9) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@6
  [14] phi()
  [15] call print_cls 
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@9
  [16] (byte*) print_line_cursor#19 ← phi( main::@9/(byte*) print_line_cursor#1 main::@2/(byte*) 1024 )
  [16] (byte*) print_char_cursor#49 ← phi( main::@9/(byte*~) print_char_cursor#63 main::@2/(byte*) 1024 )
  [16] (byte) main::j#2 ← phi( main::@9/(byte) main::j#1 main::@2/(byte) 0 )
  [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1
  [18] (signed word) print_sword::w#1 ← *((const signed word[]) words#0 + (byte~) main::$8)
  [19] call print_sword 
  to:main::@7
main::@7: scope:[main]  from main::@3
  [20] phi()
  [21] call print_ln 
  to:main::@8
main::@8: scope:[main]  from main::@7
  [22] (byte) main::j#1 ← ++ (byte) main::j#2
  [23] if((byte) main::j#1!=(byte) 9) goto main::@9
  to:main::@return
main::@return: scope:[main]  from main::@8
  [24] return 
  to:@return
main::@9: scope:[main]  from main::@8
  [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1
  to:main::@3
print_ln: scope:[print_ln]  from main::@7
  [26] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [27] (byte*) print_line_cursor#9 ← phi( print_ln/(byte*) print_line_cursor#19 print_ln::@1/(byte*) print_line_cursor#1 )
  [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28
  [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [30] return 
  to:@return
print_sword: scope:[print_sword]  from main::@3
  [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1
  to:print_sword::@3
print_sword::@3: scope:[print_sword]  from print_sword
  [32] phi()
  [33] call print_char 
  to:print_sword::@2
print_sword::@2: scope:[print_sword]  from print_sword::@3 print_sword::@4
  [34] (signed word) print_sword::w#4 ← phi( print_sword::@4/(signed word) print_sword::w#0 print_sword::@3/(signed word) print_sword::w#1 )
  [35] (word) print_word::w#0 ← (word)(signed word) print_sword::w#4
  [36] call print_word 
  to:print_sword::@return
print_sword::@return: scope:[print_sword]  from print_sword::@2
  [37] return 
  to:@return
print_sword::@1: scope:[print_sword]  from print_sword
  [38] phi()
  [39] call print_char 
  to:print_sword::@4
print_sword::@4: scope:[print_sword]  from print_sword::@1
  [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1
  to:print_sword::@2
print_char: scope:[print_char]  from print_byte print_byte::@1 print_sword::@1 print_sword::@3
  [41] (byte*) print_char_cursor#34 ← phi( print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#49 print_sword::@3/(byte*) print_char_cursor#49 )
  [41] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' )
  [42] *((byte*) print_char_cursor#34) ← (byte) print_char::ch#4
  [43] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#34
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [44] return 
  to:@return
print_word: scope:[print_word]  from print_sword::@2
  [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
print_byte: scope:[print_byte]  from print_word print_word::@1
  [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#2 ← *((const byte[]) print_hextab#0 + (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#3 ← *((const byte[]) print_hextab#0 + (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
print_cls: scope:[print_cls]  from main::@2
  [58] phi()
  [59] call memset 
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls
  [60] return 
  to:@return
memset: scope:[memset]  from print_cls
  [61] phi()
  to:memset::@1
memset::@1: scope:[memset]  from memset memset::@1
  [62] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@1/(byte*) memset::dst#1 )
  [63] *((byte*) memset::dst#2) ← (const byte) memset::c#0
  [64] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  [65] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1
  to:memset::@return
memset::@return: scope:[memset]  from memset::@1
  [66] return 
  to:@return
sub: scope:[sub]  from main::@1 main::@4 main::@5
  [67] (byte) sub::s#3 ← phi( main::@1/(byte) $80 main::@4/(byte) $40 main::@5/(byte) $40 )
  [67] (byte) sub::idx#3 ← phi( main::@1/(byte) sub::idx#0 main::@4/(byte) sub::idx#1 main::@5/(byte) sub::idx#2 )
  [68] (byte~) sub::$0 ← (byte) sub::idx#3 << (byte) 1
  [69] *((const signed word[]) words#0 + (byte~) sub::$0) ← *((const signed word[]) words#0 + (byte~) sub::$0) - (byte) sub::s#3
  to:sub::@return
sub::@return: scope:[sub]  from sub
  [70] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) main()
(byte~) main::$8 22.0
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 7.857142857142857
(byte) main::j
(byte) main::j#1 11.0
(byte) main::j#2 5.5
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(byte) memset::c
(byte*) memset::dst
(byte*) memset::dst#1 16.5
(byte*) memset::dst#2 16.5
(byte*) memset::end
(word) memset::num
(void*) memset::return
(void*) memset::str
(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#2 4.0
(byte) print_char::ch#3 4.0
(byte) print_char::ch#4 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#13 3.821428571428572
(byte*) print_char_cursor#34 6.0
(byte*) print_char_cursor#49 2.5
(byte*~) print_char_cursor#63 22.0
(void()) print_cls()
(byte[]) print_hextab
(byte*) print_line_cursor
(byte*) print_line_cursor#1 46.42857142857143
(byte*) print_line_cursor#19 2.1666666666666665
(byte*) print_line_cursor#9 204.0
(void()) print_ln()
(byte*) print_screen
(void()) print_sword((signed word) print_sword::w)
(signed word) print_sword::w
(signed word) print_sword::w#0 4.0
(signed word) print_sword::w#1 2.8333333333333335
(signed word) print_sword::w#4 4.0
(void()) print_word((word) print_word::w)
(word) print_word::w
(word) print_word::w#0 2.0
(void()) sub((byte) sub::idx , (byte) sub::s)
(byte~) sub::$0 6.0
(byte) sub::idx
(byte) sub::idx#0 22.0
(byte) sub::idx#1 22.0
(byte) sub::idx#2 22.0
(byte) sub::idx#3 35.0
(byte) sub::s
(byte) sub::s#3 1.0
(signed word[]) words

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::j#2 main::j#1 ]
[ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
[ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
[ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
[ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ memset::dst#2 memset::dst#1 ]
[ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
[ sub::s#3 ]
Added variable main::$8 to zero page equivalence class [ main::$8 ]
Added variable print_word::w#0 to zero page equivalence class [ print_word::w#0 ]
Added variable print_byte::$0 to zero page equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to zero page equivalence class [ print_byte::$2 ]
Added variable sub::$0 to zero page equivalence class [ sub::$0 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::j#2 main::j#1 ]
[ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
[ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
[ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
[ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ memset::dst#2 memset::dst#1 ]
[ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
[ sub::s#3 ]
[ main::$8 ]
[ print_word::w#0 ]
[ print_byte::$0 ]
[ print_byte::$2 ]
[ sub::$0 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:3 [ main::j#2 main::j#1 ]
Allocated zp ZP_WORD:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
Allocated zp ZP_WORD:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
Allocated zp ZP_BYTE:8 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
Allocated zp ZP_WORD:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ]
Allocated zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ]
Allocated zp ZP_BYTE:14 [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
Allocated zp ZP_BYTE:15 [ sub::s#3 ]
Allocated zp ZP_BYTE:16 [ main::$8 ]
Allocated zp ZP_WORD:17 [ print_word::w#0 ]
Allocated zp ZP_BYTE:19 [ print_byte::$0 ]
Allocated zp ZP_BYTE:20 [ print_byte::$2 ]
Allocated zp ZP_BYTE:21 [ sub::$0 ]

INITIAL ASM
  // File Comments
// Tests that signed indexed subtract works as intended
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label print_line_cursor = 4
  .label print_char_cursor = 9
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .label _8 = $10
    .label i = 2
    .label j = 3
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
    // [5] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
    // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@6->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] (byte) sub::idx#0 ← (byte) main::i#2 -- vbuz1=vbuz2 
    lda i
    sta sub.idx
    // [7] call sub 
    // [67] phi from main::@1 to sub [phi:main::@1->sub]
  sub_from_b1:
    // [67] phi (byte) sub::s#3 = (byte) $80 [phi:main::@1->sub#0] -- vbuz1=vbuc1 
    lda #$80
    sta sub.s
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#0 [phi:main::@1->sub#1] -- register_copy 
    jsr sub
    jmp b4
    // main::@4
  b4:
    // [8] (byte) sub::idx#1 ← (byte) main::i#2 -- vbuz1=vbuz2 
    lda i
    sta sub.idx
    // [9] call sub 
    // [67] phi from main::@4 to sub [phi:main::@4->sub]
  sub_from_b4:
    // [67] phi (byte) sub::s#3 = (byte) $40 [phi:main::@4->sub#0] -- vbuz1=vbuc1 
    lda #$40
    sta sub.s
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#1 [phi:main::@4->sub#1] -- register_copy 
    jsr sub
    jmp b5
    // main::@5
  b5:
    // [10] (byte) sub::idx#2 ← (byte) main::i#2 -- vbuz1=vbuz2 
    lda i
    sta sub.idx
    // [11] call sub 
    // [67] phi from main::@5 to sub [phi:main::@5->sub]
  sub_from_b5:
    // [67] phi (byte) sub::s#3 = (byte) $40 [phi:main::@5->sub#0] -- vbuz1=vbuc1 
    lda #$40
    sta sub.s
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#2 [phi:main::@5->sub#1] -- register_copy 
    jsr sub
    jmp b6
    // main::@6
  b6:
    // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
    // [13] if((byte) main::i#1!=(byte) 9) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #9
    cmp i
    bne b1_from_b6
    // [14] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
  b2_from_b6:
    jmp b2
    // main::@2
  b2:
    // [15] call print_cls 
    // [58] phi from main::@2 to print_cls [phi:main::@2->print_cls]
  print_cls_from_b2:
    jsr print_cls
    // [16] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
    // [16] phi (byte*) print_line_cursor#19 = (byte*) 1024 [phi:main::@2->main::@3#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
    // [16] phi (byte*) print_char_cursor#49 = (byte*) 1024 [phi:main::@2->main::@3#1] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
    // [16] phi (byte) main::j#2 = (byte) 0 [phi:main::@2->main::@3#2] -- vbuz1=vbuc1 
    lda #0
    sta j
    jmp b3
    // main::@3
  b3:
    // [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda j
    asl
    sta _8
    // [18] (signed word) print_sword::w#1 ← *((const signed word[]) words#0 + (byte~) main::$8) -- vwsz1=pwsc1_derefidx_vbuz2 
    ldy _8
    lda words,y
    sta print_sword.w
    lda words+1,y
    sta print_sword.w+1
    // [19] call print_sword 
    jsr print_sword
    // [20] phi from main::@3 to main::@7 [phi:main::@3->main::@7]
  b7_from_b3:
    jmp b7
    // main::@7
  b7:
    // [21] call print_ln 
    // [26] phi from main::@7 to print_ln [phi:main::@7->print_ln]
  print_ln_from_b7:
    jsr print_ln
    jmp b8
    // main::@8
  b8:
    // [22] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1 
    inc j
    // [23] if((byte) main::j#1!=(byte) 9) goto main::@9 -- vbuz1_neq_vbuc1_then_la1 
    lda #9
    cmp j
    bne b9
    jmp breturn
    // main::@return
  breturn:
    // [24] return 
    rts
    // main::@9
  b9:
    // [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda print_line_cursor
    sta print_char_cursor
    lda print_line_cursor+1
    sta print_char_cursor+1
    // [16] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
  b3_from_b9:
    // [16] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#1 [phi:main::@9->main::@3#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#63 [phi:main::@9->main::@3#1] -- register_copy 
    // [16] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@9->main::@3#2] -- register_copy 
    jmp b3
}
  // print_ln
// Print a newline
print_ln: {
    // [27] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
  b1_from_print_ln:
  b1_from_b1:
    // [27] phi (byte*) print_line_cursor#9 = (byte*) print_line_cursor#19 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
    // print_ln::@1
  b1:
    // [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc print_line_cursor
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
    // [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
    // print_ln::@return
  breturn:
    // [30] return 
    rts
}
  // print_sword
// Print a signed word as HEX
// print_sword(signed word zeropage(6) w)
print_sword: {
    .label w = 6
    // [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 -- vwsz1_lt_0_then_la1 
    lda w+1
    bmi b1_from_print_sword
    // [32] phi from print_sword to print_sword::@3 [phi:print_sword->print_sword::@3]
  b3_from_print_sword:
    jmp b3
    // print_sword::@3
  b3:
    // [33] call print_char 
    // [41] phi from print_sword::@3 to print_char [phi:print_sword::@3->print_char]
  print_char_from_b3:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#49 [phi:print_sword::@3->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sword::@3->print_char#1] -- vbuz1=vbuc1 
    lda #' '
    sta print_char.ch
    jsr print_char
    // [34] phi from print_sword::@3 print_sword::@4 to print_sword::@2 [phi:print_sword::@3/print_sword::@4->print_sword::@2]
  b2_from_b3:
  b2_from_b4:
    // [34] phi (signed word) print_sword::w#4 = (signed word) print_sword::w#1 [phi:print_sword::@3/print_sword::@4->print_sword::@2#0] -- register_copy 
    jmp b2
    // print_sword::@2
  b2:
    // [35] (word) print_word::w#0 ← (word)(signed word) print_sword::w#4 -- vwuz1=vwuz2 
    lda w
    sta print_word.w
    lda w+1
    sta print_word.w+1
    // [36] call print_word 
    jsr print_word
    jmp breturn
    // print_sword::@return
  breturn:
    // [37] return 
    rts
    // [38] phi from print_sword to print_sword::@1 [phi:print_sword->print_sword::@1]
  b1_from_print_sword:
    jmp b1
    // print_sword::@1
  b1:
    // [39] call print_char 
    // [41] phi from print_sword::@1 to print_char [phi:print_sword::@1->print_char]
  print_char_from_b1:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#49 [phi:print_sword::@1->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sword::@1->print_char#1] -- vbuz1=vbuc1 
    lda #'-'
    sta print_char.ch
    jsr print_char
    jmp b4
    // print_sword::@4
  b4:
    // [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 -- vwsz1=_neg_vwsz1 
    sec
    lda #0
    sbc w
    sta w
    lda #0
    sbc w+1
    sta w+1
    jmp b2_from_b4
}
  // print_char
// Print a single char
// print_char(byte zeropage(8) ch)
print_char: {
    .label ch = 8
    // [42] *((byte*) print_char_cursor#34) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuz2 
    lda ch
    ldy #0
    sta (print_char_cursor),y
    // [43] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#34 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
    // print_char::@return
  breturn:
    // [44] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zeropage($11) w)
print_word: {
    .label w = $11
    // [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 
    lda w+1
    sta 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_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#0] -- 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 w
    sta 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_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#0] -- register_copy 
    jsr print_byte
    jmp breturn
    // print_word::@return
  breturn:
    // [49] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zeropage($b) b)
print_byte: {
    .label _0 = $13
    .label _2 = $14
    .label b = $b
    // [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 
    lda b
    lsr
    lsr
    lsr
    lsr
    sta _0
    // [52] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _0
    lda print_hextab,y
    sta print_char.ch
    // [53] call print_char 
    // [41] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#13 [phi:print_byte->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [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 b
    sta _2
    // [55] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _2
    lda print_hextab,y
    sta print_char.ch
    // [56] call print_char 
    // [41] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#13 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
    // print_byte::@return
  breturn:
    // [57] return 
    rts
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // [59] call memset 
    // [61] phi from print_cls to memset [phi:print_cls->memset]
  memset_from_print_cls:
    jsr memset
    jmp breturn
    // print_cls::@return
  breturn:
    // [60] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = $400
    .label end = str+num
    .label dst = $c
    // [62] phi from memset to memset::@1 [phi:memset->memset::@1]
  b1_from_memset:
    // [62] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta dst
    lda #>str
    sta dst+1
    jmp b1
    // [62] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1]
  b1_from_b1:
    // [62] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy 
    jmp b1
    // memset::@1
  b1:
    // [63] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [64] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [65] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda dst+1
    cmp #>end
    bne b1_from_b1
    lda dst
    cmp #<end
    bne b1_from_b1
    jmp breturn
    // memset::@return
  breturn:
    // [66] return 
    rts
}
  // sub
// sub(byte zeropage($e) idx, byte zeropage($f) s)
sub: {
    .label _0 = $15
    .label idx = $e
    .label s = $f
    // [68] (byte~) sub::$0 ← (byte) sub::idx#3 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda idx
    asl
    sta _0
    // [69] *((const signed word[]) words#0 + (byte~) sub::$0) ← *((const signed word[]) words#0 + (byte~) sub::$0) - (byte) sub::s#3 -- pwsc1_derefidx_vbuz1=pwsc1_derefidx_vbuz1_minus_vbuz2 
    ldx _0
    sec
    lda words,x
    sbc s
    sta words,x
    bcs !+
    dec words+1,x
  !:
    jmp breturn
    // sub::@return
  breturn:
    // [70] return 
    rts
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  words: .word -$6000, -$600, -$60, -6, 0, 6, $60, $600, $6000

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::j#2 main::j#1 ]
Statement [18] (signed word) print_sword::w#1 ← *((const signed word[]) words#0 + (byte~) main::$8) [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ) always clobbers reg byte a 
Statement [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1 [ main::j#1 print_char_cursor#63 print_line_cursor#1 ] ( main:2 [ main::j#1 print_char_cursor#63 print_line_cursor#1 ] ) always clobbers reg byte a 
Statement [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a 
Statement [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a 
Statement [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 [ print_char_cursor#49 print_sword::w#1 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#49 print_sword::w#1 ] ) always clobbers reg byte a 
Statement [35] (word) print_word::w#0 ← (word)(signed word) print_sword::w#4 [ print_char_cursor#13 print_word::w#0 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_word::w#0 ] ) always clobbers reg byte a 
Statement [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 [ print_char_cursor#13 print_sword::w#0 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_sword::w#0 ] ) always clobbers reg byte a 
Statement [42] *((byte*) print_char_cursor#34) ← (byte) print_char::ch#4 [ print_char_cursor#34 ] ( main:2::print_sword:19::print_char:33 [ main::j#2 print_line_cursor#19 print_sword::w#1 print_char_cursor#34 ] main:2::print_sword:19::print_char:39 [ main::j#2 print_line_cursor#19 print_sword::w#1 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:46::print_char:53 [ main::j#2 print_line_cursor#19 print_word::w#0 print_byte::b#2 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:48::print_char:53 [ main::j#2 print_line_cursor#19 print_byte::b#2 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:46::print_char:56 [ main::j#2 print_line_cursor#19 print_word::w#0 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:48::print_char:56 [ main::j#2 print_line_cursor#19 print_char_cursor#34 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ main::j#2 main::j#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_char_cursor#13 print_word::w#0 print_byte::b#0 ] ( main:2::print_sword:19::print_word:36 [ main::j#2 print_line_cursor#19 print_char_cursor#13 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#13 print_byte::b#1 ] ( main:2::print_sword:19::print_word:36 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_char_cursor#13 print_byte::b#2 print_byte::$0 ] ( main:2::print_sword:19::print_word:36::print_byte:46 [ main::j#2 print_line_cursor#19 print_word::w#0 print_char_cursor#13 print_byte::b#2 print_byte::$0 ] main:2::print_sword:19::print_word:36::print_byte:48 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_byte::b#2 print_byte::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ 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#13 print_byte::$2 ] ( main:2::print_sword:19::print_word:36::print_byte:46 [ main::j#2 print_line_cursor#19 print_word::w#0 print_char_cursor#13 print_byte::$2 ] main:2::print_sword:19::print_word:36::print_byte:48 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_byte::$2 ] ) always clobbers reg byte a 
Statement [63] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:15::memset:59 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Statement [65] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:2::print_cls:15::memset:59 [ memset::dst#1 ] ) always clobbers reg byte a 
Statement [68] (byte~) sub::$0 ← (byte) sub::idx#3 << (byte) 1 [ sub::s#3 sub::$0 ] ( main:2::sub:7 [ main::i#2 sub::s#3 sub::$0 ] main:2::sub:9 [ main::i#2 sub::s#3 sub::$0 ] main:2::sub:11 [ main::i#2 sub::s#3 sub::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ sub::s#3 ]
Statement [69] *((const signed word[]) words#0 + (byte~) sub::$0) ← *((const signed word[]) words#0 + (byte~) sub::$0) - (byte) sub::s#3 [ ] ( main:2::sub:7 [ main::i#2 ] main:2::sub:9 [ main::i#2 ] main:2::sub:11 [ main::i#2 ] ) always clobbers reg byte a 
Statement [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 main::$8 ] ) always clobbers reg byte a 
Statement [18] (signed word) print_sword::w#1 ← *((const signed word[]) words#0 + (byte~) main::$8) [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ( main:2 [ main::j#2 print_char_cursor#49 print_line_cursor#19 print_sword::w#1 ] ) always clobbers reg byte a 
Statement [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1 [ main::j#1 print_char_cursor#63 print_line_cursor#1 ] ( main:2 [ main::j#1 print_char_cursor#63 print_line_cursor#1 ] ) always clobbers reg byte a 
Statement [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a 
Statement [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#13 ] ( main:2::print_ln:21 [ main::j#2 print_line_cursor#1 print_char_cursor#13 ] ) always clobbers reg byte a 
Statement [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 [ print_char_cursor#49 print_sword::w#1 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#49 print_sword::w#1 ] ) always clobbers reg byte a 
Statement [35] (word) print_word::w#0 ← (word)(signed word) print_sword::w#4 [ print_char_cursor#13 print_word::w#0 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_word::w#0 ] ) always clobbers reg byte a 
Statement [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 [ print_char_cursor#13 print_sword::w#0 ] ( main:2::print_sword:19 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_sword::w#0 ] ) always clobbers reg byte a 
Statement [42] *((byte*) print_char_cursor#34) ← (byte) print_char::ch#4 [ print_char_cursor#34 ] ( main:2::print_sword:19::print_char:33 [ main::j#2 print_line_cursor#19 print_sword::w#1 print_char_cursor#34 ] main:2::print_sword:19::print_char:39 [ main::j#2 print_line_cursor#19 print_sword::w#1 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:46::print_char:53 [ main::j#2 print_line_cursor#19 print_word::w#0 print_byte::b#2 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:48::print_char:53 [ main::j#2 print_line_cursor#19 print_byte::b#2 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:46::print_char:56 [ main::j#2 print_line_cursor#19 print_word::w#0 print_char_cursor#34 ] main:2::print_sword:19::print_word:36::print_byte:48::print_char:56 [ main::j#2 print_line_cursor#19 print_char_cursor#34 ] ) always clobbers reg byte y 
Statement [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_char_cursor#13 print_word::w#0 print_byte::b#0 ] ( main:2::print_sword:19::print_word:36 [ main::j#2 print_line_cursor#19 print_char_cursor#13 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#13 print_byte::b#1 ] ( main:2::print_sword:19::print_word:36 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_char_cursor#13 print_byte::b#2 print_byte::$0 ] ( main:2::print_sword:19::print_word:36::print_byte:46 [ main::j#2 print_line_cursor#19 print_word::w#0 print_char_cursor#13 print_byte::b#2 print_byte::$0 ] main:2::print_sword:19::print_word:36::print_byte:48 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_byte::b#2 print_byte::$0 ] ) always clobbers reg byte a 
Statement [54] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#13 print_byte::$2 ] ( main:2::print_sword:19::print_word:36::print_byte:46 [ main::j#2 print_line_cursor#19 print_word::w#0 print_char_cursor#13 print_byte::$2 ] main:2::print_sword:19::print_word:36::print_byte:48 [ main::j#2 print_line_cursor#19 print_char_cursor#13 print_byte::$2 ] ) always clobbers reg byte a 
Statement [63] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:15::memset:59 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Statement [65] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:2::print_cls:15::memset:59 [ memset::dst#1 ] ) always clobbers reg byte a 
Statement [68] (byte~) sub::$0 ← (byte) sub::idx#3 << (byte) 1 [ sub::s#3 sub::$0 ] ( main:2::sub:7 [ main::i#2 sub::s#3 sub::$0 ] main:2::sub:9 [ main::i#2 sub::s#3 sub::$0 ] main:2::sub:11 [ main::i#2 sub::s#3 sub::$0 ] ) always clobbers reg byte a 
Statement [69] *((const signed word[]) words#0 + (byte~) sub::$0) ← *((const signed word[]) words#0 + (byte~) sub::$0) - (byte) sub::s#3 [ ] ( main:2::sub:7 [ main::i#2 ] main:2::sub:9 [ main::i#2 ] main:2::sub:11 [ main::i#2 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ main::j#2 main::j#1 ] : zp ZP_BYTE:3 , reg byte x , 
Potential registers zp ZP_WORD:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_WORD:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ] : zp ZP_WORD:6 , 
Potential registers zp ZP_BYTE:8 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ] : zp ZP_WORD:9 , 
Potential registers zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp ZP_BYTE:11 , reg byte x , 
Potential registers zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ] : zp ZP_WORD:12 , 
Potential registers zp ZP_BYTE:14 [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:15 [ sub::s#3 ] : zp ZP_BYTE:15 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:16 [ main::$8 ] : zp ZP_BYTE:16 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:17 [ print_word::w#0 ] : zp ZP_WORD:17 , 
Potential registers zp ZP_BYTE:19 [ print_byte::$0 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ print_byte::$2 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:21 [ sub::$0 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [] 252.6: zp ZP_WORD:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] 34.32: zp ZP_WORD:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ] 
Uplift Scope [sub] 101: zp ZP_BYTE:14 [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ] 6: zp ZP_BYTE:21 [ sub::$0 ] 1: zp ZP_BYTE:15 [ sub::s#3 ] 
Uplift Scope [main] 24.36: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 22: zp ZP_BYTE:16 [ main::$8 ] 16.5: zp ZP_BYTE:3 [ main::j#2 main::j#1 ] 
Uplift Scope [memset] 33: zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ] 
Uplift Scope [print_byte] 10: zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp ZP_BYTE:19 [ print_byte::$0 ] 4: zp ZP_BYTE:20 [ print_byte::$2 ] 
Uplift Scope [print_char] 14: zp ZP_BYTE:8 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] 
Uplift Scope [print_sword] 10.83: zp ZP_WORD:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ] 
Uplift Scope [print_word] 2: zp ZP_WORD:17 [ print_word::w#0 ] 
Uplift Scope [RADIX] 
Uplift Scope [print_ln] 
Uplift Scope [print_cls] 

Uplifting [] best 6585 combination zp ZP_WORD:4 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ] zp ZP_WORD:9 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ] 
Uplifting [sub] best 6482 combination reg byte a [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ] reg byte a [ sub::$0 ] reg byte x [ sub::s#3 ] 
Uplifting [main] best 6222 combination reg byte y [ main::i#2 main::i#1 ] reg byte a [ main::$8 ] reg byte x [ main::j#2 main::j#1 ] 
Uplifting [memset] best 6222 combination zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ] 
Uplifting [print_byte] best 6214 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] 
Uplifting [print_char] best 6199 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] 
Uplifting [print_sword] best 6199 combination zp ZP_WORD:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ] 
Uplifting [print_word] best 6199 combination zp ZP_WORD:17 [ print_word::w#0 ] 
Uplifting [RADIX] best 6199 combination 
Uplifting [print_ln] best 6199 combination 
Uplifting [print_cls] best 6199 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Uplifting [print_byte] best 6199 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 
Coalescing zero page register with common assignment [ zp ZP_WORD:6 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ] ] with [ zp ZP_WORD:17 [ print_word::w#0 ] ] - score: 1
Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 print_word::w#0 ]
Allocated (was zp ZP_WORD:9) zp ZP_WORD:6 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ]
Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:8 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated (was zp ZP_WORD:12) zp ZP_WORD:9 [ memset::dst#2 memset::dst#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Tests that signed indexed subtract works as intended
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label print_line_cursor = 2
  .label print_char_cursor = 6
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 
    ldy #0
    jmp b1
    // [5] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
    // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@6->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] (byte) sub::idx#0 ← (byte) main::i#2 -- vbuaa=vbuyy 
    tya
    // [7] call sub 
    // [67] phi from main::@1 to sub [phi:main::@1->sub]
  sub_from_b1:
    // [67] phi (byte) sub::s#3 = (byte) $80 [phi:main::@1->sub#0] -- vbuxx=vbuc1 
    ldx #$80
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#0 [phi:main::@1->sub#1] -- register_copy 
    jsr sub
    jmp b4
    // main::@4
  b4:
    // [8] (byte) sub::idx#1 ← (byte) main::i#2 -- vbuaa=vbuyy 
    tya
    // [9] call sub 
    // [67] phi from main::@4 to sub [phi:main::@4->sub]
  sub_from_b4:
    // [67] phi (byte) sub::s#3 = (byte) $40 [phi:main::@4->sub#0] -- vbuxx=vbuc1 
    ldx #$40
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#1 [phi:main::@4->sub#1] -- register_copy 
    jsr sub
    jmp b5
    // main::@5
  b5:
    // [10] (byte) sub::idx#2 ← (byte) main::i#2 -- vbuaa=vbuyy 
    tya
    // [11] call sub 
    // [67] phi from main::@5 to sub [phi:main::@5->sub]
  sub_from_b5:
    // [67] phi (byte) sub::s#3 = (byte) $40 [phi:main::@5->sub#0] -- vbuxx=vbuc1 
    ldx #$40
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#2 [phi:main::@5->sub#1] -- register_copy 
    jsr sub
    jmp b6
    // main::@6
  b6:
    // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [13] if((byte) main::i#1!=(byte) 9) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #9
    bne b1_from_b6
    // [14] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
  b2_from_b6:
    jmp b2
    // main::@2
  b2:
    // [15] call print_cls 
    // [58] phi from main::@2 to print_cls [phi:main::@2->print_cls]
  print_cls_from_b2:
    jsr print_cls
    // [16] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
    // [16] phi (byte*) print_line_cursor#19 = (byte*) 1024 [phi:main::@2->main::@3#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
    // [16] phi (byte*) print_char_cursor#49 = (byte*) 1024 [phi:main::@2->main::@3#1] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
    // [16] phi (byte) main::j#2 = (byte) 0 [phi:main::@2->main::@3#2] -- vbuxx=vbuc1 
    ldx #0
    jmp b3
    // main::@3
  b3:
    // [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [18] (signed word) print_sword::w#1 ← *((const signed word[]) words#0 + (byte~) main::$8) -- vwsz1=pwsc1_derefidx_vbuaa 
    tay
    lda words,y
    sta print_sword.w
    lda words+1,y
    sta print_sword.w+1
    // [19] call print_sword 
    jsr print_sword
    // [20] phi from main::@3 to main::@7 [phi:main::@3->main::@7]
  b7_from_b3:
    jmp b7
    // main::@7
  b7:
    // [21] call print_ln 
    // [26] phi from main::@7 to print_ln [phi:main::@7->print_ln]
  print_ln_from_b7:
    jsr print_ln
    jmp b8
    // main::@8
  b8:
    // [22] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx 
    inx
    // [23] if((byte) main::j#1!=(byte) 9) goto main::@9 -- vbuxx_neq_vbuc1_then_la1 
    cpx #9
    bne b9
    jmp breturn
    // main::@return
  breturn:
    // [24] return 
    rts
    // main::@9
  b9:
    // [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda print_line_cursor
    sta print_char_cursor
    lda print_line_cursor+1
    sta print_char_cursor+1
    // [16] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
  b3_from_b9:
    // [16] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#1 [phi:main::@9->main::@3#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#63 [phi:main::@9->main::@3#1] -- register_copy 
    // [16] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@9->main::@3#2] -- register_copy 
    jmp b3
}
  // print_ln
// Print a newline
print_ln: {
    // [27] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
  b1_from_print_ln:
  b1_from_b1:
    // [27] phi (byte*) print_line_cursor#9 = (byte*) print_line_cursor#19 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
    // print_ln::@1
  b1:
    // [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc print_line_cursor
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
    // [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
    // print_ln::@return
  breturn:
    // [30] return 
    rts
}
  // print_sword
// Print a signed word as HEX
// print_sword(signed word zeropage(4) w)
print_sword: {
    .label w = 4
    // [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 -- vwsz1_lt_0_then_la1 
    lda w+1
    bmi b1_from_print_sword
    // [32] phi from print_sword to print_sword::@3 [phi:print_sword->print_sword::@3]
  b3_from_print_sword:
    jmp b3
    // print_sword::@3
  b3:
    // [33] call print_char 
    // [41] phi from print_sword::@3 to print_char [phi:print_sword::@3->print_char]
  print_char_from_b3:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#49 [phi:print_sword::@3->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sword::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
    // [34] phi from print_sword::@3 print_sword::@4 to print_sword::@2 [phi:print_sword::@3/print_sword::@4->print_sword::@2]
  b2_from_b3:
  b2_from_b4:
    // [34] phi (signed word) print_sword::w#4 = (signed word) print_sword::w#1 [phi:print_sword::@3/print_sword::@4->print_sword::@2#0] -- register_copy 
    jmp b2
    // print_sword::@2
  b2:
    // [35] (word) print_word::w#0 ← (word)(signed word) print_sword::w#4
    // [36] call print_word 
    jsr print_word
    jmp breturn
    // print_sword::@return
  breturn:
    // [37] return 
    rts
    // [38] phi from print_sword to print_sword::@1 [phi:print_sword->print_sword::@1]
  b1_from_print_sword:
    jmp b1
    // print_sword::@1
  b1:
    // [39] call print_char 
    // [41] phi from print_sword::@1 to print_char [phi:print_sword::@1->print_char]
  print_char_from_b1:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#49 [phi:print_sword::@1->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sword::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
    jmp b4
    // print_sword::@4
  b4:
    // [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 -- vwsz1=_neg_vwsz1 
    sec
    lda #0
    sbc w
    sta w
    lda #0
    sbc w+1
    sta w+1
    jmp b2_from_b4
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // [42] *((byte*) print_char_cursor#34) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [43] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#34 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
    // print_char::@return
  breturn:
    // [44] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zeropage(4) w)
print_word: {
    .label w = 4
    // [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 
    lda w+1
    sta 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_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#0] -- 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 w
    sta 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_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#0] -- register_copy 
    jsr print_byte
    jmp breturn
    // print_word::@return
  breturn:
    // [49] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zeropage(8) b)
print_byte: {
    .label b = 8
    // [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuz1_ror_4 
    lda b
    lsr
    lsr
    lsr
    lsr
    // [52] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [53] call print_char 
    // [41] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#13 [phi:print_byte->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [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 -- vbuaa=vbuz1_band_vbuc1 
    lda #$f
    and b
    // [55] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [56] call print_char 
    // [41] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#13 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
    // print_byte::@return
  breturn:
    // [57] return 
    rts
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // [59] call memset 
    // [61] phi from print_cls to memset [phi:print_cls->memset]
  memset_from_print_cls:
    jsr memset
    jmp breturn
    // print_cls::@return
  breturn:
    // [60] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = $400
    .label end = str+num
    .label dst = 9
    // [62] phi from memset to memset::@1 [phi:memset->memset::@1]
  b1_from_memset:
    // [62] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta dst
    lda #>str
    sta dst+1
    jmp b1
    // [62] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1]
  b1_from_b1:
    // [62] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy 
    jmp b1
    // memset::@1
  b1:
    // [63] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [64] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [65] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda dst+1
    cmp #>end
    bne b1_from_b1
    lda dst
    cmp #<end
    bne b1_from_b1
    jmp breturn
    // memset::@return
  breturn:
    // [66] return 
    rts
}
  // sub
// sub(byte register(A) idx, byte register(X) s)
sub: {
    // [68] (byte~) sub::$0 ← (byte) sub::idx#3 << (byte) 1 -- vbuaa=vbuaa_rol_1 
    asl
    // [69] *((const signed word[]) words#0 + (byte~) sub::$0) ← *((const signed word[]) words#0 + (byte~) sub::$0) - (byte) sub::s#3 -- pwsc1_derefidx_vbuaa=pwsc1_derefidx_vbuaa_minus_vbuxx 
    sec
    stx $ff
    tax
    lda words,x
    sbc $ff
    sta words,x
    bcs !+
    dec words+1,x
  !:
    jmp breturn
    // sub::@return
  breturn:
    // [70] return 
    rts
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  words: .word -$6000, -$600, -$60, -6, 0, 6, $60, $600, $6000

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp b6
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b3
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b4
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 b1
Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b6 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_print_sword with b1
Replacing label b2_from_b4 with b2
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b6:
Removing instruction b2_from_b6:
Removing instruction print_cls_from_b2:
Removing instruction b7_from_b3:
Removing instruction print_ln_from_b7:
Removing instruction b1_from_print_ln:
Removing instruction b1_from_b1:
Removing instruction b3_from_print_sword:
Removing instruction print_char_from_b3:
Removing instruction b2_from_b3:
Removing instruction b2_from_b4:
Removing instruction b1_from_print_sword:
Removing instruction print_char_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction sub_from_b1:
Removing instruction b4:
Removing instruction sub_from_b4:
Removing instruction b5:
Removing instruction sub_from_b5:
Removing instruction b6:
Removing instruction b2:
Removing instruction b3_from_b2:
Removing instruction b7:
Removing instruction b8:
Removing instruction breturn:
Removing instruction b3_from_b9:
Removing instruction breturn:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b4:
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 memset_from_print_cls:
Removing instruction breturn:
Removing instruction b1_from_memset:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (number) 8
(void()) main()
(byte~) main::$8 reg byte a 22.0
(label) main::@1
(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
(byte) main::i
(byte) main::i#1 reg byte y 16.5
(byte) main::i#2 reg byte y 7.857142857142857
(byte) main::j
(byte) main::j#1 reg byte x 11.0
(byte) main::j#2 reg byte x 5.5
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@return
(byte) memset::c
(const byte) memset::c#0 c = (byte) ' '
(byte*) memset::dst
(byte*) memset::dst#1 dst zp ZP_WORD:9 16.5
(byte*) memset::dst#2 dst zp ZP_WORD:9 16.5
(byte*) memset::end
(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0
(word) memset::num
(const word) memset::num#0 num = (word) $3e8
(void*) memset::return
(void*) memset::str
(const void*) memset::str#0 str = (void*)(byte*) 1024
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte a 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 b zp ZP_BYTE:8 4.0
(byte) print_byte::b#1 b zp ZP_BYTE:8 4.0
(byte) print_byte::b#2 b zp ZP_BYTE:8 2.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#2 reg byte a 4.0
(byte) print_char::ch#3 reg byte a 4.0
(byte) print_char::ch#4 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#13 print_char_cursor zp ZP_WORD:6 3.821428571428572
(byte*) print_char_cursor#34 print_char_cursor zp ZP_WORD:6 6.0
(byte*) print_char_cursor#49 print_char_cursor zp ZP_WORD:6 2.5
(byte*~) print_char_cursor#63 print_char_cursor zp ZP_WORD:6 22.0
(void()) print_cls()
(label) print_cls::@return
(byte[]) print_hextab
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:2 46.42857142857143
(byte*) print_line_cursor#19 print_line_cursor zp ZP_WORD:2 2.1666666666666665
(byte*) print_line_cursor#9 print_line_cursor zp ZP_WORD:2 204.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(byte*) print_screen
(void()) print_sword((signed word) print_sword::w)
(label) print_sword::@1
(label) print_sword::@2
(label) print_sword::@3
(label) print_sword::@4
(label) print_sword::@return
(signed word) print_sword::w
(signed word) print_sword::w#0 w zp ZP_WORD:4 4.0
(signed word) print_sword::w#1 w zp ZP_WORD:4 2.8333333333333335
(signed word) print_sword::w#4 w zp ZP_WORD:4 4.0
(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 ZP_WORD:4 2.0
(void()) sub((byte) sub::idx , (byte) sub::s)
(byte~) sub::$0 reg byte a 6.0
(label) sub::@return
(byte) sub::idx
(byte) sub::idx#0 reg byte a 22.0
(byte) sub::idx#1 reg byte a 22.0
(byte) sub::idx#2 reg byte a 22.0
(byte) sub::idx#3 reg byte a 35.0
(byte) sub::s
(byte) sub::s#3 reg byte x 1.0
(signed word[]) words
(const signed word[]) words#0 words = { (signed word) -$6000, (signed word) -$600, (signed word) -$60, (signed word) -6, (signed word) 0, (signed word) 6, (signed word) $60, (signed word) $600, (signed word) $6000 }

reg byte y [ main::i#2 main::i#1 ]
reg byte x [ main::j#2 main::j#1 ]
zp ZP_WORD:2 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#1 ]
zp ZP_WORD:4 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 print_word::w#0 ]
reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
zp ZP_WORD:6 [ print_char_cursor#34 print_char_cursor#13 print_char_cursor#49 print_char_cursor#63 ]
zp ZP_BYTE:8 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
zp ZP_WORD:9 [ memset::dst#2 memset::dst#1 ]
reg byte a [ sub::idx#3 sub::idx#0 sub::idx#1 sub::idx#2 ]
reg byte x [ sub::s#3 ]
reg byte a [ main::$8 ]
reg byte a [ print_byte::$0 ]
reg byte a [ print_byte::$2 ]
reg byte a [ sub::$0 ]


FINAL ASSEMBLER
Score: 5284

  // File Comments
// Tests that signed indexed subtract works as intended
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label print_line_cursor = 2
  .label print_char_cursor = 6
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 
    ldy #0
    // [5] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
    // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@6->main::@1#0] -- register_copy 
    // main::@1
  b1:
    // sub(i, $80)
    // [6] (byte) sub::idx#0 ← (byte) main::i#2 -- vbuaa=vbuyy 
    tya
    // [7] call sub 
    // [67] phi from main::@1 to sub [phi:main::@1->sub]
    // [67] phi (byte) sub::s#3 = (byte) $80 [phi:main::@1->sub#0] -- vbuxx=vbuc1 
    ldx #$80
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#0 [phi:main::@1->sub#1] -- register_copy 
    jsr sub
    // main::@4
    // sub(i, $40)
    // [8] (byte) sub::idx#1 ← (byte) main::i#2 -- vbuaa=vbuyy 
    tya
    // [9] call sub 
    // [67] phi from main::@4 to sub [phi:main::@4->sub]
    // [67] phi (byte) sub::s#3 = (byte) $40 [phi:main::@4->sub#0] -- vbuxx=vbuc1 
    ldx #$40
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#1 [phi:main::@4->sub#1] -- register_copy 
    jsr sub
    // main::@5
    // sub(i, $40)
    // [10] (byte) sub::idx#2 ← (byte) main::i#2 -- vbuaa=vbuyy 
    tya
    // [11] call sub 
    // [67] phi from main::@5 to sub [phi:main::@5->sub]
    // [67] phi (byte) sub::s#3 = (byte) $40 [phi:main::@5->sub#0] -- vbuxx=vbuc1 
    ldx #$40
    // [67] phi (byte) sub::idx#3 = (byte) sub::idx#2 [phi:main::@5->sub#1] -- register_copy 
    jsr sub
    // main::@6
    // for(byte i: 0..8)
    // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [13] if((byte) main::i#1!=(byte) 9) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #9
    bne b1
    // [14] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
    // main::@2
    // print_cls()
    // [15] call print_cls 
    // [58] phi from main::@2 to print_cls [phi:main::@2->print_cls]
    jsr print_cls
    // [16] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // [16] phi (byte*) print_line_cursor#19 = (byte*) 1024 [phi:main::@2->main::@3#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
    // [16] phi (byte*) print_char_cursor#49 = (byte*) 1024 [phi:main::@2->main::@3#1] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
    // [16] phi (byte) main::j#2 = (byte) 0 [phi:main::@2->main::@3#2] -- vbuxx=vbuc1 
    ldx #0
    // main::@3
  b3:
    // print_sword(words[j])
    // [17] (byte~) main::$8 ← (byte) main::j#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [18] (signed word) print_sword::w#1 ← *((const signed word[]) words#0 + (byte~) main::$8) -- vwsz1=pwsc1_derefidx_vbuaa 
    tay
    lda words,y
    sta print_sword.w
    lda words+1,y
    sta print_sword.w+1
    // [19] call print_sword 
    jsr print_sword
    // [20] phi from main::@3 to main::@7 [phi:main::@3->main::@7]
    // main::@7
    // print_ln()
    // [21] call print_ln 
    // [26] phi from main::@7 to print_ln [phi:main::@7->print_ln]
    jsr print_ln
    // main::@8
    // for(byte j: 0..8)
    // [22] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx 
    inx
    // [23] if((byte) main::j#1!=(byte) 9) goto main::@9 -- vbuxx_neq_vbuc1_then_la1 
    cpx #9
    bne b9
    // main::@return
    // }
    // [24] return 
    rts
    // main::@9
  b9:
    // [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda print_line_cursor
    sta print_char_cursor
    lda print_line_cursor+1
    sta print_char_cursor+1
    // [16] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
    // [16] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#1 [phi:main::@9->main::@3#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#49 = (byte*~) print_char_cursor#63 [phi:main::@9->main::@3#1] -- register_copy 
    // [16] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@9->main::@3#2] -- register_copy 
    jmp b3
}
  // print_ln
// Print a newline
print_ln: {
    // [27] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
    // [27] phi (byte*) print_line_cursor#9 = (byte*) print_line_cursor#19 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  b1:
    // print_line_cursor + $28
    // [28] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc print_line_cursor
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
    // while (print_line_cursor<print_char_cursor)
    // [29] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1
  !:
    // print_ln::@return
    // }
    // [30] return 
    rts
}
  // print_sword
// Print a signed word as HEX
// print_sword(signed word zeropage(4) w)
print_sword: {
    .label w = 4
    // if(w<0)
    // [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 -- vwsz1_lt_0_then_la1 
    lda w+1
    bmi b1
    // [32] phi from print_sword to print_sword::@3 [phi:print_sword->print_sword::@3]
    // print_sword::@3
    // print_char(' ')
    // [33] call print_char 
    // [41] phi from print_sword::@3 to print_char [phi:print_sword::@3->print_char]
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#49 [phi:print_sword::@3->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sword::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
    // [34] phi from print_sword::@3 print_sword::@4 to print_sword::@2 [phi:print_sword::@3/print_sword::@4->print_sword::@2]
    // [34] phi (signed word) print_sword::w#4 = (signed word) print_sword::w#1 [phi:print_sword::@3/print_sword::@4->print_sword::@2#0] -- register_copy 
    // print_sword::@2
  b2:
    // print_word((word)w)
    // [35] (word) print_word::w#0 ← (word)(signed word) print_sword::w#4
    // [36] call print_word 
    jsr print_word
    // print_sword::@return
    // }
    // [37] return 
    rts
    // [38] phi from print_sword to print_sword::@1 [phi:print_sword->print_sword::@1]
    // print_sword::@1
  b1:
    // print_char('-')
    // [39] call print_char 
    // [41] phi from print_sword::@1 to print_char [phi:print_sword::@1->print_char]
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#49 [phi:print_sword::@1->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sword::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
    // print_sword::@4
    // w = -w
    // [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 -- vwsz1=_neg_vwsz1 
    sec
    lda #0
    sbc w
    sta w
    lda #0
    sbc w+1
    sta w+1
    jmp b2
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [42] *((byte*) print_char_cursor#34) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [43] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#34 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [44] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zeropage(4) w)
print_word: {
    .label w = 4
    // print_byte(>w)
    // [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 
    lda w+1
    sta print_byte.b
    // [46] call print_byte 
    // [50] phi from print_word to print_byte [phi:print_word->print_byte]
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#0] -- register_copy 
    jsr print_byte
    // print_word::@1
    // print_byte(<w)
    // [47] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuz1=_lo_vwuz2 
    lda w
    sta print_byte.b
    // [48] call print_byte 
    // [50] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
    // [50] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#0] -- register_copy 
    jsr print_byte
    // print_word::@return
    // }
    // [49] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zeropage(8) b)
print_byte: {
    .label b = 8
    // b>>4
    // [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuz1_ror_4 
    lda b
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [52] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [53] call print_char 
    // [41] phi from print_byte to print_char [phi:print_byte->print_char]
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#13 [phi:print_byte->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [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 -- vbuaa=vbuz1_band_vbuc1 
    lda #$f
    and b
    // print_char(print_hextab[b&$f])
    // [55] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [56] call print_char 
    // [41] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
    // [41] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#13 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [41] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@return
    // }
    // [57] return 
    rts
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // memset(print_screen, ' ', 1000)
    // [59] call memset 
    // [61] phi from print_cls to memset [phi:print_cls->memset]
    jsr memset
    // print_cls::@return
    // }
    // [60] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = $400
    .label end = str+num
    .label dst = 9
    // [62] phi from memset to memset::@1 [phi:memset->memset::@1]
    // [62] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta dst
    lda #>str
    sta dst+1
    // [62] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1]
    // [62] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy 
    // memset::@1
  b1:
    // *dst = c
    // [63] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [64] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [65] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda dst+1
    cmp #>end
    bne b1
    lda dst
    cmp #<end
    bne b1
    // memset::@return
    // }
    // [66] return 
    rts
}
  // sub
// sub(byte register(A) idx, byte register(X) s)
sub: {
    // words[idx] -= s
    // [68] (byte~) sub::$0 ← (byte) sub::idx#3 << (byte) 1 -- vbuaa=vbuaa_rol_1 
    asl
    // [69] *((const signed word[]) words#0 + (byte~) sub::$0) ← *((const signed word[]) words#0 + (byte~) sub::$0) - (byte) sub::s#3 -- pwsc1_derefidx_vbuaa=pwsc1_derefidx_vbuaa_minus_vbuxx 
    sec
    stx $ff
    tax
    lda words,x
    sbc $ff
    sta words,x
    bcs !+
    dec words+1,x
  !:
    // sub::@return
    // }
    // [70] return 
    rts
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  words: .word -$6000, -$600, -$60, -6, 0, 6, $60, $600, $6000

