Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_at::str)
Identified constant variable (byte*) SCREEN
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) mul8u::@5
Culled Empty Block (label) mul8u::@6
Culled Empty Block (label) mul8u::@8
Culled Empty Block (label) mul8u::@9
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) keyboard_matrix_read::@1
Culled Empty Block (label) @11
Culled Empty Block (label) keyboard_key_pressed::@1
Culled Empty Block (label) @12
Culled Empty Block (label) keyboard_get_keycode::@1
Culled Empty Block (label) @13
Culled Empty Block (label) @14
Culled Empty Block (label) @15
Culled Empty Block (label) @16
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@28
Culled Empty Block (label) main::@22
Culled Empty Block (label) @17
Culled Empty Block (label) print_str_at::@4
Culled Empty Block (label) print_str_at::@3
Culled Empty Block (label) print_str_at::@5
Culled Empty Block (label) print_str_at::@6
Culled Empty Block (label) @18

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@19

(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
mul8u: scope:[mul8u]  from plot_chargen::@1
  (byte) mul8u::a#5 ← phi( plot_chargen::@1/(byte) mul8u::a#1 )
  (byte) mul8u::b#1 ← phi( plot_chargen::@1/(byte) mul8u::b#0 )
  (word) mul8u::res#0 ← (word) 0
  (word) mul8u::mb#0 ← (word)(byte) mul8u::b#1
  to:mul8u::@1
mul8u::@1: scope:[mul8u]  from mul8u mul8u::@4
  (word) mul8u::mb#5 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@4/(word) mul8u::mb#1 )
  (word) mul8u::res#4 ← phi( mul8u/(word) mul8u::res#0 mul8u::@4/(word) mul8u::res#6 )
  (byte) mul8u::a#2 ← phi( mul8u/(byte) mul8u::a#5 mul8u::@4/(byte) mul8u::a#0 )
  (bool~) mul8u::$0 ← (byte) mul8u::a#2 != (number) 0
  if((bool~) mul8u::$0) goto mul8u::@2
  to:mul8u::@3
mul8u::@2: scope:[mul8u]  from mul8u::@1
  (word) mul8u::res#5 ← phi( mul8u::@1/(word) mul8u::res#4 )
  (word) mul8u::mb#4 ← phi( mul8u::@1/(word) mul8u::mb#5 )
  (byte) mul8u::a#3 ← phi( mul8u::@1/(byte) mul8u::a#2 )
  (number~) mul8u::$1 ← (byte) mul8u::a#3 & (number) 1
  (bool~) mul8u::$2 ← (number~) mul8u::$1 != (number) 0
  (bool~) mul8u::$3 ← ! (bool~) mul8u::$2
  if((bool~) mul8u::$3) goto mul8u::@4
  to:mul8u::@7
mul8u::@3: scope:[mul8u]  from mul8u::@1
  (word) mul8u::res#2 ← phi( mul8u::@1/(word) mul8u::res#4 )
  (word) mul8u::return#0 ← (word) mul8u::res#2
  to:mul8u::@return
mul8u::@4: scope:[mul8u]  from mul8u::@2 mul8u::@7
  (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#5 mul8u::@7/(word) mul8u::res#1 )
  (word) mul8u::mb#2 ← phi( mul8u::@2/(word) mul8u::mb#4 mul8u::@7/(word) mul8u::mb#3 )
  (byte) mul8u::a#4 ← phi( mul8u::@2/(byte) mul8u::a#3 mul8u::@7/(byte) mul8u::a#6 )
  (byte~) mul8u::$5 ← (byte) mul8u::a#4 >> (number) 1
  (byte) mul8u::a#0 ← (byte~) mul8u::$5
  (word~) mul8u::$6 ← (word) mul8u::mb#2 << (number) 1
  (word) mul8u::mb#1 ← (word~) mul8u::$6
  to:mul8u::@1
mul8u::@7: scope:[mul8u]  from mul8u::@2
  (byte) mul8u::a#6 ← phi( mul8u::@2/(byte) mul8u::a#3 )
  (word) mul8u::mb#3 ← phi( mul8u::@2/(word) mul8u::mb#4 )
  (word) mul8u::res#3 ← phi( mul8u::@2/(word) mul8u::res#5 )
  (word~) mul8u::$4 ← (word) mul8u::res#3 + (word) mul8u::mb#3
  (word) mul8u::res#1 ← (word~) mul8u::$4
  to:mul8u::@4
mul8u::@return: scope:[mul8u]  from mul8u::@3
  (word) mul8u::return#3 ← phi( mul8u::@3/(word) mul8u::return#0 )
  (word) mul8u::return#1 ← (word) mul8u::return#3
  return 
  to:@return

(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
keyboard_matrix_read: scope:[keyboard_matrix_read]  from keyboard_key_pressed
  (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 )
  *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#1)
  (byte~) keyboard_matrix_read::$0 ← ~ *((const byte*) CIA1_PORT_B)
  (byte) keyboard_matrix_read::row_pressed_bits#0 ← (byte~) keyboard_matrix_read::$0
  (byte) keyboard_matrix_read::return#0 ← (byte) keyboard_matrix_read::row_pressed_bits#0
  to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read]  from keyboard_matrix_read
  (byte) keyboard_matrix_read::return#3 ← phi( keyboard_matrix_read/(byte) keyboard_matrix_read::return#0 )
  (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#3
  return 
  to:@return

(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
keyboard_key_pressed: scope:[keyboard_key_pressed]  from main::@10 main::@11 main::@12 main::@13 main::@19 main::@9
  (byte) keyboard_key_pressed::key#6 ← phi( main::@10/(byte) keyboard_key_pressed::key#1 main::@11/(byte) keyboard_key_pressed::key#2 main::@12/(byte) keyboard_key_pressed::key#3 main::@13/(byte) keyboard_key_pressed::key#4 main::@19/(byte) keyboard_key_pressed::key#5 main::@9/(byte) keyboard_key_pressed::key#0 )
  (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#6 & (number) 7
  (byte) keyboard_key_pressed::colidx#0 ← (number~) keyboard_key_pressed::$0
  (byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key#6 >> (number) 3
  (byte) keyboard_key_pressed::rowidx#0 ← (byte~) keyboard_key_pressed::$1
  (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0
  call keyboard_matrix_read 
  (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#1
  to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed]  from keyboard_key_pressed
  (byte) keyboard_key_pressed::colidx#1 ← phi( keyboard_key_pressed/(byte) keyboard_key_pressed::colidx#0 )
  (byte) keyboard_matrix_read::return#4 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::return#2 )
  (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#4
  (byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#1)
  (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$3
  to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed]  from keyboard_key_pressed::@2
  (byte) keyboard_key_pressed::return#8 ← phi( keyboard_key_pressed::@2/(byte) keyboard_key_pressed::return#0 )
  (byte) keyboard_key_pressed::return#1 ← (byte) keyboard_key_pressed::return#8
  return 
  to:@return

(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
keyboard_get_keycode: scope:[keyboard_get_keycode]  from main::@16
  (byte) keyboard_get_keycode::ch#1 ← phi( main::@16/(byte) keyboard_get_keycode::ch#0 )
  (byte) keyboard_get_keycode::return#0 ← *((const byte*) keyboard_char_keycodes + (byte) keyboard_get_keycode::ch#1)
  to:keyboard_get_keycode::@return
keyboard_get_keycode::@return: scope:[keyboard_get_keycode]  from keyboard_get_keycode
  (byte) keyboard_get_keycode::return#3 ← phi( keyboard_get_keycode/(byte) keyboard_get_keycode::return#0 )
  (byte) keyboard_get_keycode::return#1 ← (byte) keyboard_get_keycode::return#3
  return 
  to:@return

(void()) main()
main: scope:[main]  from @19
  (byte*) main::sc#0 ← (const byte*) SCREEN
  to:main::@1
main::@1: scope:[main]  from main main::@2
  (byte*) main::sc#2 ← phi( main/(byte*) main::sc#0 main::@2/(byte*) main::sc#1 )
  (byte*~) main::$11 ← (const byte*) SCREEN + (number) $3e8
  (bool~) main::$12 ← (byte*) main::sc#2 < (byte*~) main::$11
  if((bool~) main::$12) goto main::@2
  to:main::@3
main::@2: scope:[main]  from main::@1
  (byte*) main::sc#3 ← phi( main::@1/(byte*) main::sc#2 )
  *((byte*) main::sc#3) ← (byte) ' '
  (byte*) main::sc#1 ← ++ (byte*) main::sc#3
  to:main::@1
main::@3: scope:[main]  from main::@1
  (byte*~) main::$0 ← (const byte*) SCREEN + (number) 1
  (byte*) print_str_at::str#0 ← (const byte*) main::str
  (byte*) print_str_at::at#0 ← (byte*~) main::$0
  call print_str_at 
  to:main::@29
main::@29: scope:[main]  from main::@3
  (byte*~) main::$2 ← (const byte*) SCREEN + (number) 1
  (byte*~) main::$3 ← (byte*~) main::$2 + (number) $a
  (byte*) print_str_at::str#1 ← (const byte*) main::str1
  (byte*) print_str_at::at#1 ← (byte*~) main::$3
  call print_str_at 
  to:main::@30
main::@30: scope:[main]  from main::@29
  (byte*~) main::$5 ← (const byte*) SCREEN + (number) 1
  (byte*~) main::$6 ← (byte*~) main::$5 + (number) $14
  (byte*) print_str_at::str#2 ← (const byte*) main::str2
  (byte*) print_str_at::at#2 ← (byte*~) main::$6
  call print_str_at 
  to:main::@31
main::@31: scope:[main]  from main::@30
  (byte*~) main::$8 ← (const byte*) SCREEN + (number) 1
  (byte*~) main::$9 ← (byte*~) main::$8 + (number) $1e
  (byte*) print_str_at::str#3 ← (const byte*) main::str3
  (byte*) print_str_at::at#3 ← (byte*~) main::$9
  call print_str_at 
  to:main::@32
main::@32: scope:[main]  from main::@31
  (byte) main::i#0 ← (byte) 0
  to:main::@7
main::@7: scope:[main]  from main::@32 main::@33
  (byte) main::i#2 ← phi( main::@32/(byte) main::i#0 main::@33/(byte) main::i#1 )
  (byte) plot_chargen::pos#0 ← (byte) main::i#2
  (byte) plot_chargen::ch#0 ← (number) $20
  (byte) plot_chargen::shift#0 ← (number) 0
  call plot_chargen 
  to:main::@33
main::@33: scope:[main]  from main::@7
  (byte) main::i#3 ← phi( main::@7/(byte) main::i#2 )
  (byte) main::i#1 ← (byte) main::i#3 + rangenext(0,3)
  (bool~) main::$14 ← (byte) main::i#1 != rangelast(0,3)
  if((bool~) main::$14) goto main::@7
  to:main::@8
main::@8: scope:[main]  from main::@33
  (byte) main::cur_pos#0 ← (byte) 0
  (byte) main::shift#0 ← (byte) 0
  to:main::@9
main::@9: scope:[main]  from main::@21 main::@8
  (byte) main::cur_pos#25 ← phi( main::@21/(byte) main::cur_pos#26 main::@8/(byte) main::cur_pos#0 )
  (byte) keyboard_key_pressed::key#0 ← (const byte) KEY_F1
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#1
  to:main::@34
main::@34: scope:[main]  from main::@9
  (byte) main::cur_pos#24 ← phi( main::@9/(byte) main::cur_pos#25 )
  (byte) keyboard_key_pressed::return#9 ← phi( main::@9/(byte) keyboard_key_pressed::return#2 )
  (byte~) main::$15 ← (byte) keyboard_key_pressed::return#9
  (bool~) main::$16 ← (byte~) main::$15 != (number) 0
  (bool~) main::$17 ← ! (bool~) main::$16
  if((bool~) main::$17) goto main::@10
  to:main::@23
main::@10: scope:[main]  from main::@23 main::@34
  (byte) main::cur_pos#23 ← phi( main::@23/(byte) main::cur_pos#1 main::@34/(byte) main::cur_pos#24 )
  (byte) keyboard_key_pressed::key#1 ← (const byte) KEY_F3
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#1
  to:main::@35
main::@35: scope:[main]  from main::@10
  (byte) main::cur_pos#22 ← phi( main::@10/(byte) main::cur_pos#23 )
  (byte) keyboard_key_pressed::return#10 ← phi( main::@10/(byte) keyboard_key_pressed::return#3 )
  (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
  (bool~) main::$19 ← (byte~) main::$18 != (number) 0
  (bool~) main::$20 ← ! (bool~) main::$19
  if((bool~) main::$20) goto main::@11
  to:main::@24
main::@23: scope:[main]  from main::@34
  (byte) main::cur_pos#1 ← (number) 0
  to:main::@10
main::@11: scope:[main]  from main::@24 main::@35
  (byte) main::cur_pos#21 ← phi( main::@24/(byte) main::cur_pos#2 main::@35/(byte) main::cur_pos#22 )
  (byte) keyboard_key_pressed::key#2 ← (const byte) KEY_F5
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#4 ← (byte) keyboard_key_pressed::return#1
  to:main::@36
main::@36: scope:[main]  from main::@11
  (byte) main::cur_pos#20 ← phi( main::@11/(byte) main::cur_pos#21 )
  (byte) keyboard_key_pressed::return#11 ← phi( main::@11/(byte) keyboard_key_pressed::return#4 )
  (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
  (bool~) main::$22 ← (byte~) main::$21 != (number) 0
  (bool~) main::$23 ← ! (bool~) main::$22
  if((bool~) main::$23) goto main::@12
  to:main::@25
main::@24: scope:[main]  from main::@35
  (byte) main::cur_pos#2 ← (number) 1
  to:main::@11
main::@12: scope:[main]  from main::@25 main::@36
  (byte) main::cur_pos#19 ← phi( main::@25/(byte) main::cur_pos#3 main::@36/(byte) main::cur_pos#20 )
  (byte) keyboard_key_pressed::key#3 ← (const byte) KEY_F7
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#5 ← (byte) keyboard_key_pressed::return#1
  to:main::@37
main::@37: scope:[main]  from main::@12
  (byte) main::cur_pos#18 ← phi( main::@12/(byte) main::cur_pos#19 )
  (byte) keyboard_key_pressed::return#12 ← phi( main::@12/(byte) keyboard_key_pressed::return#5 )
  (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
  (bool~) main::$25 ← (byte~) main::$24 != (number) 0
  (bool~) main::$26 ← ! (bool~) main::$25
  if((bool~) main::$26) goto main::@13
  to:main::@26
main::@25: scope:[main]  from main::@36
  (byte) main::cur_pos#3 ← (number) 2
  to:main::@12
main::@13: scope:[main]  from main::@26 main::@37
  (byte) main::cur_pos#17 ← phi( main::@26/(byte) main::cur_pos#4 main::@37/(byte) main::cur_pos#18 )
  (byte) keyboard_key_pressed::key#4 ← (const byte) KEY_LSHIFT
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#6 ← (byte) keyboard_key_pressed::return#1
  to:main::@38
main::@38: scope:[main]  from main::@13
  (byte) main::cur_pos#16 ← phi( main::@13/(byte) main::cur_pos#17 )
  (byte) keyboard_key_pressed::return#13 ← phi( main::@13/(byte) keyboard_key_pressed::return#6 )
  (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
  (bool~) main::$28 ← (byte~) main::$27 != (number) 0
  if((bool~) main::$28) goto main::@14
  to:main::@27
main::@26: scope:[main]  from main::@37
  (byte) main::cur_pos#4 ← (number) 3
  to:main::@13
main::@14: scope:[main]  from main::@38
  (byte) main::cur_pos#13 ← phi( main::@38/(byte) main::cur_pos#16 )
  (byte) main::shift#1 ← (number) 1
  to:main::@15
main::@27: scope:[main]  from main::@38
  (byte) main::cur_pos#14 ← phi( main::@38/(byte) main::cur_pos#16 )
  (byte) main::shift#2 ← (number) 0
  to:main::@15
main::@15: scope:[main]  from main::@14 main::@27
  (byte) main::shift#9 ← phi( main::@14/(byte) main::shift#1 main::@27/(byte) main::shift#2 )
  (byte) main::cur_pos#11 ← phi( main::@14/(byte) main::cur_pos#13 main::@27/(byte) main::cur_pos#14 )
  (byte) main::ch#0 ← (byte) 0
  to:main::@16
main::@16: scope:[main]  from main::@15 main::@18
  (byte) main::shift#7 ← phi( main::@15/(byte) main::shift#9 main::@18/(byte) main::shift#10 )
  (byte) main::cur_pos#9 ← phi( main::@15/(byte) main::cur_pos#11 main::@18/(byte) main::cur_pos#12 )
  (byte) main::ch#2 ← phi( main::@15/(byte) main::ch#0 main::@18/(byte) main::ch#1 )
  (byte) main::pressed#0 ← (byte) 0
  (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2
  call keyboard_get_keycode 
  (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#1
  to:main::@39
main::@39: scope:[main]  from main::@16
  (byte) main::shift#5 ← phi( main::@16/(byte) main::shift#7 )
  (byte) main::cur_pos#7 ← phi( main::@16/(byte) main::cur_pos#9 )
  (byte) main::ch#7 ← phi( main::@16/(byte) main::ch#2 )
  (byte) main::pressed#3 ← phi( main::@16/(byte) main::pressed#0 )
  (byte) keyboard_get_keycode::return#4 ← phi( main::@16/(byte) keyboard_get_keycode::return#2 )
  (byte~) main::$29 ← (byte) keyboard_get_keycode::return#4
  (byte) main::key#0 ← (byte~) main::$29
  (bool~) main::$30 ← (byte) main::key#0 != (number) $3f
  (bool~) main::$31 ← ! (bool~) main::$30
  if((bool~) main::$31) goto main::@17
  to:main::@19
main::@17: scope:[main]  from main::@39 main::@40
  (byte) main::shift#4 ← phi( main::@39/(byte) main::shift#5 main::@40/(byte) main::shift#6 )
  (byte) main::cur_pos#6 ← phi( main::@39/(byte) main::cur_pos#7 main::@40/(byte) main::cur_pos#8 )
  (byte) main::ch#5 ← phi( main::@39/(byte) main::ch#7 main::@40/(byte) main::ch#8 )
  (byte) main::pressed#2 ← phi( main::@39/(byte) main::pressed#3 main::@40/(byte) main::pressed#1 )
  (bool~) main::$33 ← (byte) main::pressed#2 != (number) 0
  (bool~) main::$34 ← ! (bool~) main::$33
  if((bool~) main::$34) goto main::@18
  to:main::@20
main::@19: scope:[main]  from main::@39
  (byte) main::shift#8 ← phi( main::@39/(byte) main::shift#5 )
  (byte) main::cur_pos#10 ← phi( main::@39/(byte) main::cur_pos#7 )
  (byte) main::ch#9 ← phi( main::@39/(byte) main::ch#7 )
  (byte) main::key#1 ← phi( main::@39/(byte) main::key#0 )
  (byte) keyboard_key_pressed::key#5 ← (byte) main::key#1
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#7 ← (byte) keyboard_key_pressed::return#1
  to:main::@40
main::@40: scope:[main]  from main::@19
  (byte) main::shift#6 ← phi( main::@19/(byte) main::shift#8 )
  (byte) main::cur_pos#8 ← phi( main::@19/(byte) main::cur_pos#10 )
  (byte) main::ch#8 ← phi( main::@19/(byte) main::ch#9 )
  (byte) keyboard_key_pressed::return#14 ← phi( main::@19/(byte) keyboard_key_pressed::return#7 )
  (byte~) main::$32 ← (byte) keyboard_key_pressed::return#14
  (byte) main::pressed#1 ← (byte~) main::$32
  to:main::@17
main::@18: scope:[main]  from main::@17 main::@41
  (byte) main::shift#10 ← phi( main::@17/(byte) main::shift#4 main::@41/(byte) main::shift#11 )
  (byte) main::cur_pos#12 ← phi( main::@17/(byte) main::cur_pos#6 main::@41/(byte) main::cur_pos#15 )
  (byte) main::ch#3 ← phi( main::@17/(byte) main::ch#5 main::@41/(byte) main::ch#6 )
  (byte) main::ch#1 ← (byte) main::ch#3 + rangenext(0,$3f)
  (bool~) main::$36 ← (byte) main::ch#1 != rangelast(0,$3f)
  if((bool~) main::$36) goto main::@16
  to:main::@21
main::@20: scope:[main]  from main::@17
  (byte) main::shift#3 ← phi( main::@17/(byte) main::shift#4 )
  (byte) main::ch#4 ← phi( main::@17/(byte) main::ch#5 )
  (byte) main::cur_pos#5 ← phi( main::@17/(byte) main::cur_pos#6 )
  (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#5
  (byte) plot_chargen::ch#1 ← (byte) main::ch#4
  (byte) plot_chargen::shift#1 ← (byte) main::shift#3
  call plot_chargen 
  to:main::@41
main::@41: scope:[main]  from main::@20
  (byte) main::shift#11 ← phi( main::@20/(byte) main::shift#3 )
  (byte) main::cur_pos#15 ← phi( main::@20/(byte) main::cur_pos#5 )
  (byte) main::ch#6 ← phi( main::@20/(byte) main::ch#4 )
  to:main::@18
main::@21: scope:[main]  from main::@18
  (byte) main::cur_pos#26 ← phi( main::@18/(byte) main::cur_pos#12 )
  if(true) goto main::@9
  to:main::@return
main::@return: scope:[main]  from main::@21
  return 
  to:@return

(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at)
print_str_at: scope:[print_str_at]  from main::@29 main::@3 main::@30 main::@31
  (byte*) print_str_at::at#7 ← phi( main::@29/(byte*) print_str_at::at#1 main::@3/(byte*) print_str_at::at#0 main::@30/(byte*) print_str_at::at#2 main::@31/(byte*) print_str_at::at#3 )
  (byte*) print_str_at::str#7 ← phi( main::@29/(byte*) print_str_at::str#1 main::@3/(byte*) print_str_at::str#0 main::@30/(byte*) print_str_at::str#2 main::@31/(byte*) print_str_at::str#3 )
  to:print_str_at::@1
print_str_at::@1: scope:[print_str_at]  from print_str_at print_str_at::@2
  (byte*) print_str_at::at#6 ← phi( print_str_at/(byte*) print_str_at::at#7 print_str_at::@2/(byte*) print_str_at::at#4 )
  (byte*) print_str_at::str#5 ← phi( print_str_at/(byte*) print_str_at::str#7 print_str_at::@2/(byte*) print_str_at::str#4 )
  (bool~) print_str_at::$0 ← (number) 0 != *((byte*) print_str_at::str#5)
  if((bool~) print_str_at::$0) goto print_str_at::@2
  to:print_str_at::@return
print_str_at::@2: scope:[print_str_at]  from print_str_at::@1
  (byte*) print_str_at::at#5 ← phi( print_str_at::@1/(byte*) print_str_at::at#6 )
  (byte*) print_str_at::str#6 ← phi( print_str_at::@1/(byte*) print_str_at::str#5 )
  *((byte*) print_str_at::at#5) ← *((byte*) print_str_at::str#6)
  (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5
  (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#6
  to:print_str_at::@1
print_str_at::@return: scope:[print_str_at]  from print_str_at::@1
  return 
  to:@return

(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift)
plot_chargen: scope:[plot_chargen]  from main::@20 main::@7
  (byte) plot_chargen::pos#3 ← phi( main::@20/(byte) plot_chargen::pos#1 main::@7/(byte) plot_chargen::pos#0 )
  (byte) plot_chargen::shift#2 ← phi( main::@20/(byte) plot_chargen::shift#1 main::@7/(byte) plot_chargen::shift#0 )
  (byte) plot_chargen::ch#2 ← phi( main::@20/(byte) plot_chargen::ch#1 main::@7/(byte) plot_chargen::ch#0 )
  asm { sei  }
  (word~) plot_chargen::$0 ← ((word)) (byte) plot_chargen::ch#2
  (number~) plot_chargen::$1 ← (word~) plot_chargen::$0 * (number) 8
  (byte*~) plot_chargen::$2 ← (const byte*) CHARGEN + (number~) plot_chargen::$1
  (byte*) plot_chargen::chargen#0 ← (byte*~) plot_chargen::$2
  (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (number) 0
  (bool~) plot_chargen::$4 ← ! (bool~) plot_chargen::$3
  if((bool~) plot_chargen::$4) goto plot_chargen::@1
  to:plot_chargen::@2
plot_chargen::@1: scope:[plot_chargen]  from plot_chargen plot_chargen::@2
  (byte*) plot_chargen::chargen#6 ← phi( plot_chargen/(byte*) plot_chargen::chargen#0 plot_chargen::@2/(byte*) plot_chargen::chargen#1 )
  (byte) plot_chargen::pos#2 ← phi( plot_chargen/(byte) plot_chargen::pos#3 plot_chargen::@2/(byte) plot_chargen::pos#4 )
  *((const byte*) PROCPORT) ← (number) $32
  (byte*~) plot_chargen::$5 ← (const byte*) SCREEN + (number) $28
  (byte*~) plot_chargen::$6 ← (byte*~) plot_chargen::$5 + (number) 1
  (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2
  (byte) mul8u::b#0 ← (number) $a
  call mul8u 
  (word) mul8u::return#2 ← (word) mul8u::return#1
  to:plot_chargen::@9
plot_chargen::@9: scope:[plot_chargen]  from plot_chargen::@1
  (byte*) plot_chargen::chargen#5 ← phi( plot_chargen::@1/(byte*) plot_chargen::chargen#6 )
  (word) mul8u::return#4 ← phi( plot_chargen::@1/(word) mul8u::return#2 )
  (word~) plot_chargen::$7 ← (word) mul8u::return#4
  (byte*~) plot_chargen::$8 ← (byte*~) plot_chargen::$6 + (word~) plot_chargen::$7
  (byte*) plot_chargen::sc#0 ← (byte*~) plot_chargen::$8
  (byte) plot_chargen::y#0 ← (byte) 0
  to:plot_chargen::@3
plot_chargen::@2: scope:[plot_chargen]  from plot_chargen
  (byte) plot_chargen::pos#4 ← phi( plot_chargen/(byte) plot_chargen::pos#3 )
  (byte*) plot_chargen::chargen#2 ← phi( plot_chargen/(byte*) plot_chargen::chargen#0 )
  (byte*~) plot_chargen::$9 ← (byte*) plot_chargen::chargen#2 + (number) $800
  (byte*) plot_chargen::chargen#1 ← (byte*~) plot_chargen::$9
  to:plot_chargen::@1
plot_chargen::@3: scope:[plot_chargen]  from plot_chargen::@7 plot_chargen::@9
  (byte*) plot_chargen::sc#7 ← phi( plot_chargen::@7/(byte*) plot_chargen::sc#2 plot_chargen::@9/(byte*) plot_chargen::sc#0 )
  (byte) plot_chargen::y#2 ← phi( plot_chargen::@7/(byte) plot_chargen::y#1 plot_chargen::@9/(byte) plot_chargen::y#0 )
  (byte*) plot_chargen::chargen#3 ← phi( plot_chargen::@7/(byte*) plot_chargen::chargen#4 plot_chargen::@9/(byte*) plot_chargen::chargen#5 )
  (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#3 + (byte) plot_chargen::y#2)
  (byte) plot_chargen::x#0 ← (byte) 0
  to:plot_chargen::@4
plot_chargen::@4: scope:[plot_chargen]  from plot_chargen::@3 plot_chargen::@5
  (byte*) plot_chargen::chargen#8 ← phi( plot_chargen::@3/(byte*) plot_chargen::chargen#3 plot_chargen::@5/(byte*) plot_chargen::chargen#7 )
  (byte) plot_chargen::y#5 ← phi( plot_chargen::@3/(byte) plot_chargen::y#2 plot_chargen::@5/(byte) plot_chargen::y#4 )
  (byte) plot_chargen::x#3 ← phi( plot_chargen::@3/(byte) plot_chargen::x#0 plot_chargen::@5/(byte) plot_chargen::x#1 )
  (byte*) plot_chargen::sc#5 ← phi( plot_chargen::@3/(byte*) plot_chargen::sc#7 plot_chargen::@5/(byte*) plot_chargen::sc#1 )
  (byte) plot_chargen::bits#2 ← phi( plot_chargen::@3/(byte) plot_chargen::bits#0 plot_chargen::@5/(byte) plot_chargen::bits#1 )
  (byte) plot_chargen::c#0 ← (byte) '.'
  (number~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (number) $80
  (bool~) plot_chargen::$11 ← (number~) plot_chargen::$10 != (number) 0
  (bool~) plot_chargen::$12 ← ! (bool~) plot_chargen::$11
  if((bool~) plot_chargen::$12) goto plot_chargen::@5
  to:plot_chargen::@6
plot_chargen::@5: scope:[plot_chargen]  from plot_chargen::@4 plot_chargen::@6
  (byte*) plot_chargen::chargen#7 ← phi( plot_chargen::@4/(byte*) plot_chargen::chargen#8 plot_chargen::@6/(byte*) plot_chargen::chargen#9 )
  (byte) plot_chargen::y#4 ← phi( plot_chargen::@4/(byte) plot_chargen::y#5 plot_chargen::@6/(byte) plot_chargen::y#6 )
  (byte) plot_chargen::x#2 ← phi( plot_chargen::@4/(byte) plot_chargen::x#3 plot_chargen::@6/(byte) plot_chargen::x#4 )
  (byte) plot_chargen::bits#3 ← phi( plot_chargen::@4/(byte) plot_chargen::bits#2 plot_chargen::@6/(byte) plot_chargen::bits#4 )
  (byte*) plot_chargen::sc#3 ← phi( plot_chargen::@4/(byte*) plot_chargen::sc#5 plot_chargen::@6/(byte*) plot_chargen::sc#6 )
  (byte) plot_chargen::c#2 ← phi( plot_chargen::@4/(byte) plot_chargen::c#0 plot_chargen::@6/(byte) plot_chargen::c#1 )
  *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2
  (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3
  (number~) plot_chargen::$13 ← (byte) plot_chargen::bits#3 * (number) 2
  (byte) plot_chargen::bits#1 ← (number~) plot_chargen::$13
  (byte) plot_chargen::x#1 ← (byte) plot_chargen::x#2 + rangenext(0,7)
  (bool~) plot_chargen::$14 ← (byte) plot_chargen::x#1 != rangelast(0,7)
  if((bool~) plot_chargen::$14) goto plot_chargen::@4
  to:plot_chargen::@7
plot_chargen::@6: scope:[plot_chargen]  from plot_chargen::@4
  (byte*) plot_chargen::chargen#9 ← phi( plot_chargen::@4/(byte*) plot_chargen::chargen#8 )
  (byte) plot_chargen::y#6 ← phi( plot_chargen::@4/(byte) plot_chargen::y#5 )
  (byte) plot_chargen::x#4 ← phi( plot_chargen::@4/(byte) plot_chargen::x#3 )
  (byte) plot_chargen::bits#4 ← phi( plot_chargen::@4/(byte) plot_chargen::bits#2 )
  (byte*) plot_chargen::sc#6 ← phi( plot_chargen::@4/(byte*) plot_chargen::sc#5 )
  (byte) plot_chargen::c#1 ← (byte) '*'
  to:plot_chargen::@5
plot_chargen::@7: scope:[plot_chargen]  from plot_chargen::@5
  (byte*) plot_chargen::chargen#4 ← phi( plot_chargen::@5/(byte*) plot_chargen::chargen#7 )
  (byte) plot_chargen::y#3 ← phi( plot_chargen::@5/(byte) plot_chargen::y#4 )
  (byte*) plot_chargen::sc#4 ← phi( plot_chargen::@5/(byte*) plot_chargen::sc#1 )
  (byte*~) plot_chargen::$15 ← (byte*) plot_chargen::sc#4 + (number) $20
  (byte*) plot_chargen::sc#2 ← (byte*~) plot_chargen::$15
  (byte) plot_chargen::y#1 ← (byte) plot_chargen::y#3 + rangenext(0,7)
  (bool~) plot_chargen::$16 ← (byte) plot_chargen::y#1 != rangelast(0,7)
  if((bool~) plot_chargen::$16) goto plot_chargen::@3
  to:plot_chargen::@8
plot_chargen::@8: scope:[plot_chargen]  from plot_chargen::@7
  *((const byte*) PROCPORT) ← (number) $37
  asm { cli  }
  to:plot_chargen::@return
plot_chargen::@return: scope:[plot_chargen]  from plot_chargen::@8
  return 
  to:@return
@19: scope:[]  from @begin
  call main 
  to:@20
@20: scope:[]  from @19
  to:@end
@end: scope:[]  from @20

SYMBOL TABLE SSA
(label) @19
(label) @20
(label) @begin
(label) @end
(const byte*) CHARGEN = (byte*)(number) $d000
(const byte*) CIA1_PORT_A = (byte*)(number) $dc00
(const byte*) CIA1_PORT_B = (byte*)(number) $dc01
(const byte) KEY_0 = (byte) $23
(const byte) KEY_1 = (byte) $38
(const byte) KEY_2 = (byte) $3b
(const byte) KEY_3 = (byte) 8
(const byte) KEY_4 = (byte) $b
(const byte) KEY_5 = (byte) $10
(const byte) KEY_6 = (byte) $13
(const byte) KEY_7 = (byte) $18
(const byte) KEY_8 = (byte) $1b
(const byte) KEY_9 = (byte) $20
(const byte) KEY_A = (byte) $a
(const byte) KEY_ARROW_LEFT = (byte) $39
(const byte) KEY_ARROW_UP = (byte) $36
(const byte) KEY_ASTERISK = (byte) $31
(const byte) KEY_AT = (byte) $2e
(const byte) KEY_B = (byte) $1c
(const byte) KEY_C = (byte) $14
(const byte) KEY_COLON = (byte) $2d
(const byte) KEY_COMMA = (byte) $2f
(const byte) KEY_D = (byte) $12
(const byte) KEY_DOT = (byte) $2c
(const byte) KEY_E = (byte) $e
(const byte) KEY_EQUALS = (byte) $35
(const byte) KEY_F = (byte) $15
(const byte) KEY_F1 = (byte) 4
(const byte) KEY_F3 = (byte) 5
(const byte) KEY_F5 = (byte) 6
(const byte) KEY_F7 = (byte) 3
(const byte) KEY_G = (byte) $1a
(const byte) KEY_H = (byte) $1d
(const byte) KEY_I = (byte) $21
(const byte) KEY_J = (byte) $22
(const byte) KEY_K = (byte) $25
(const byte) KEY_L = (byte) $2a
(const byte) KEY_LSHIFT = (byte) $f
(const byte) KEY_M = (byte) $24
(const byte) KEY_MINUS = (byte) $2b
(const byte) KEY_N = (byte) $27
(const byte) KEY_O = (byte) $26
(const byte) KEY_P = (byte) $29
(const byte) KEY_PLUS = (byte) $28
(const byte) KEY_POUND = (byte) $30
(const byte) KEY_Q = (byte) $3e
(const byte) KEY_R = (byte) $11
(const byte) KEY_S = (byte) $d
(const byte) KEY_SEMICOLON = (byte) $32
(const byte) KEY_SLASH = (byte) $37
(const byte) KEY_SPACE = (byte) $3c
(const byte) KEY_T = (byte) $16
(const byte) KEY_U = (byte) $1e
(const byte) KEY_V = (byte) $1f
(const byte) KEY_W = (byte) 9
(const byte) KEY_X = (byte) $17
(const byte) KEY_Y = (byte) $19
(const byte) KEY_Z = (byte) $c
(const byte*) PROCPORT = (byte*)(number) 1
(const byte*) SCREEN = (byte*)(number) $400
(const byte*) keyboard_char_keycodes[]  = { (const byte) KEY_AT, (const byte) KEY_A, (const byte) KEY_B, (const byte) KEY_C, (const byte) KEY_D, (const byte) KEY_E, (const byte) KEY_F, (const byte) KEY_G, (const byte) KEY_H, (const byte) KEY_I, (const byte) KEY_J, (const byte) KEY_K, (const byte) KEY_L, (const byte) KEY_M, (const byte) KEY_N, (const byte) KEY_O, (const byte) KEY_P, (const byte) KEY_Q, (const byte) KEY_R, (const byte) KEY_S, (const byte) KEY_T, (const byte) KEY_U, (const byte) KEY_V, (const byte) KEY_W, (const byte) KEY_X, (const byte) KEY_Y, (const byte) KEY_Z, (byte) $3f, (const byte) KEY_POUND, (byte) $3f, (const byte) KEY_ARROW_UP, (const byte) KEY_ARROW_LEFT, (const byte) KEY_SPACE, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (const byte) KEY_ASTERISK, (const byte) KEY_PLUS, (const byte) KEY_COMMA, (const byte) KEY_MINUS, (const byte) KEY_DOT, (const byte) KEY_SLASH, (const byte) KEY_0, (const byte) KEY_1, (const byte) KEY_2, (const byte) KEY_3, (const byte) KEY_4, (const byte) KEY_5, (const byte) KEY_6, (const byte) KEY_7, (const byte) KEY_8, (const byte) KEY_9, (const byte) KEY_COLON, (const byte) KEY_SEMICOLON, (byte) $3f, (const byte) KEY_EQUALS, (byte) $3f, (byte) $3f }
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
(label) keyboard_get_keycode::@return
(byte) keyboard_get_keycode::ch
(byte) keyboard_get_keycode::ch#0
(byte) keyboard_get_keycode::ch#1
(byte) keyboard_get_keycode::return
(byte) keyboard_get_keycode::return#0
(byte) keyboard_get_keycode::return#1
(byte) keyboard_get_keycode::return#2
(byte) keyboard_get_keycode::return#3
(byte) keyboard_get_keycode::return#4
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
(number~) keyboard_key_pressed::$0
(byte~) keyboard_key_pressed::$1
(byte~) keyboard_key_pressed::$2
(byte~) keyboard_key_pressed::$3
(label) keyboard_key_pressed::@2
(label) keyboard_key_pressed::@return
(byte) keyboard_key_pressed::colidx
(byte) keyboard_key_pressed::colidx#0
(byte) keyboard_key_pressed::colidx#1
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::key#0
(byte) keyboard_key_pressed::key#1
(byte) keyboard_key_pressed::key#2
(byte) keyboard_key_pressed::key#3
(byte) keyboard_key_pressed::key#4
(byte) keyboard_key_pressed::key#5
(byte) keyboard_key_pressed::key#6
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::return#0
(byte) keyboard_key_pressed::return#1
(byte) keyboard_key_pressed::return#10
(byte) keyboard_key_pressed::return#11
(byte) keyboard_key_pressed::return#12
(byte) keyboard_key_pressed::return#13
(byte) keyboard_key_pressed::return#14
(byte) keyboard_key_pressed::return#2
(byte) keyboard_key_pressed::return#3
(byte) keyboard_key_pressed::return#4
(byte) keyboard_key_pressed::return#5
(byte) keyboard_key_pressed::return#6
(byte) keyboard_key_pressed::return#7
(byte) keyboard_key_pressed::return#8
(byte) keyboard_key_pressed::return#9
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0
(const byte*) keyboard_matrix_col_bitmask[(number) 8]  = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
(byte) keyboard_matrix_read::return
(byte) keyboard_matrix_read::return#0
(byte) keyboard_matrix_read::return#1
(byte) keyboard_matrix_read::return#2
(byte) keyboard_matrix_read::return#3
(byte) keyboard_matrix_read::return#4
(byte) keyboard_matrix_read::row_pressed_bits
(byte) keyboard_matrix_read::row_pressed_bits#0
(byte) keyboard_matrix_read::rowid
(byte) keyboard_matrix_read::rowid#0
(byte) keyboard_matrix_read::rowid#1
(const byte*) keyboard_matrix_row_bitmask[(number) 8]  = { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f }
(void()) main()
(byte*~) main::$0
(byte*~) main::$11
(bool~) main::$12
(bool~) main::$14
(byte~) main::$15
(bool~) main::$16
(bool~) main::$17
(byte~) main::$18
(bool~) main::$19
(byte*~) main::$2
(bool~) main::$20
(byte~) main::$21
(bool~) main::$22
(bool~) main::$23
(byte~) main::$24
(bool~) main::$25
(bool~) main::$26
(byte~) main::$27
(bool~) main::$28
(byte~) main::$29
(byte*~) main::$3
(bool~) main::$30
(bool~) main::$31
(byte~) main::$32
(bool~) main::$33
(bool~) main::$34
(bool~) main::$36
(byte*~) main::$5
(byte*~) main::$6
(byte*~) main::$8
(byte*~) main::$9
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@16
(label) main::@17
(label) main::@18
(label) main::@19
(label) main::@2
(label) main::@20
(label) main::@21
(label) main::@23
(label) main::@24
(label) main::@25
(label) main::@26
(label) main::@27
(label) main::@29
(label) main::@3
(label) main::@30
(label) main::@31
(label) main::@32
(label) main::@33
(label) main::@34
(label) main::@35
(label) main::@36
(label) main::@37
(label) main::@38
(label) main::@39
(label) main::@40
(label) main::@41
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::ch
(byte) main::ch#0
(byte) main::ch#1
(byte) main::ch#2
(byte) main::ch#3
(byte) main::ch#4
(byte) main::ch#5
(byte) main::ch#6
(byte) main::ch#7
(byte) main::ch#8
(byte) main::ch#9
(byte) main::cur_pos
(byte) main::cur_pos#0
(byte) main::cur_pos#1
(byte) main::cur_pos#10
(byte) main::cur_pos#11
(byte) main::cur_pos#12
(byte) main::cur_pos#13
(byte) main::cur_pos#14
(byte) main::cur_pos#15
(byte) main::cur_pos#16
(byte) main::cur_pos#17
(byte) main::cur_pos#18
(byte) main::cur_pos#19
(byte) main::cur_pos#2
(byte) main::cur_pos#20
(byte) main::cur_pos#21
(byte) main::cur_pos#22
(byte) main::cur_pos#23
(byte) main::cur_pos#24
(byte) main::cur_pos#25
(byte) main::cur_pos#26
(byte) main::cur_pos#3
(byte) main::cur_pos#4
(byte) main::cur_pos#5
(byte) main::cur_pos#6
(byte) main::cur_pos#7
(byte) main::cur_pos#8
(byte) main::cur_pos#9
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(byte) main::i#3
(byte) main::key
(byte) main::key#0
(byte) main::key#1
(byte) main::pressed
(byte) main::pressed#0
(byte) main::pressed#1
(byte) main::pressed#2
(byte) main::pressed#3
(byte*) main::sc
(byte*) main::sc#0
(byte*) main::sc#1
(byte*) main::sc#2
(byte*) main::sc#3
(byte) main::shift
(byte) main::shift#0
(byte) main::shift#1
(byte) main::shift#10
(byte) main::shift#11
(byte) main::shift#2
(byte) main::shift#3
(byte) main::shift#4
(byte) main::shift#5
(byte) main::shift#6
(byte) main::shift#7
(byte) main::shift#8
(byte) main::shift#9
(const byte*) main::str[(byte) 3]  = (byte*) "f1"
(const byte*) main::str1[(byte) 3]  = (byte*) "f3"
(const byte*) main::str2[(byte) 3]  = (byte*) "f5"
(const byte*) main::str3[(byte) 3]  = (byte*) "f7"
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
(bool~) mul8u::$0
(number~) mul8u::$1
(bool~) mul8u::$2
(bool~) mul8u::$3
(word~) mul8u::$4
(byte~) mul8u::$5
(word~) mul8u::$6
(label) mul8u::@1
(label) mul8u::@2
(label) mul8u::@3
(label) mul8u::@4
(label) mul8u::@7
(label) mul8u::@return
(byte) mul8u::a
(byte) mul8u::a#0
(byte) mul8u::a#1
(byte) mul8u::a#2
(byte) mul8u::a#3
(byte) mul8u::a#4
(byte) mul8u::a#5
(byte) mul8u::a#6
(byte) mul8u::b
(byte) mul8u::b#0
(byte) mul8u::b#1
(word) mul8u::mb
(word) mul8u::mb#0
(word) mul8u::mb#1
(word) mul8u::mb#2
(word) mul8u::mb#3
(word) mul8u::mb#4
(word) mul8u::mb#5
(word) mul8u::res
(word) mul8u::res#0
(word) mul8u::res#1
(word) mul8u::res#2
(word) mul8u::res#3
(word) mul8u::res#4
(word) mul8u::res#5
(word) mul8u::res#6
(word) mul8u::return
(word) mul8u::return#0
(word) mul8u::return#1
(word) mul8u::return#2
(word) mul8u::return#3
(word) mul8u::return#4
(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift)
(word~) plot_chargen::$0
(number~) plot_chargen::$1
(number~) plot_chargen::$10
(bool~) plot_chargen::$11
(bool~) plot_chargen::$12
(number~) plot_chargen::$13
(bool~) plot_chargen::$14
(byte*~) plot_chargen::$15
(bool~) plot_chargen::$16
(byte*~) plot_chargen::$2
(bool~) plot_chargen::$3
(bool~) plot_chargen::$4
(byte*~) plot_chargen::$5
(byte*~) plot_chargen::$6
(word~) plot_chargen::$7
(byte*~) plot_chargen::$8
(byte*~) plot_chargen::$9
(label) plot_chargen::@1
(label) plot_chargen::@2
(label) plot_chargen::@3
(label) plot_chargen::@4
(label) plot_chargen::@5
(label) plot_chargen::@6
(label) plot_chargen::@7
(label) plot_chargen::@8
(label) plot_chargen::@9
(label) plot_chargen::@return
(byte) plot_chargen::bits
(byte) plot_chargen::bits#0
(byte) plot_chargen::bits#1
(byte) plot_chargen::bits#2
(byte) plot_chargen::bits#3
(byte) plot_chargen::bits#4
(byte) plot_chargen::c
(byte) plot_chargen::c#0
(byte) plot_chargen::c#1
(byte) plot_chargen::c#2
(byte) plot_chargen::ch
(byte) plot_chargen::ch#0
(byte) plot_chargen::ch#1
(byte) plot_chargen::ch#2
(byte*) plot_chargen::chargen
(byte*) plot_chargen::chargen#0
(byte*) plot_chargen::chargen#1
(byte*) plot_chargen::chargen#2
(byte*) plot_chargen::chargen#3
(byte*) plot_chargen::chargen#4
(byte*) plot_chargen::chargen#5
(byte*) plot_chargen::chargen#6
(byte*) plot_chargen::chargen#7
(byte*) plot_chargen::chargen#8
(byte*) plot_chargen::chargen#9
(byte) plot_chargen::pos
(byte) plot_chargen::pos#0
(byte) plot_chargen::pos#1
(byte) plot_chargen::pos#2
(byte) plot_chargen::pos#3
(byte) plot_chargen::pos#4
(byte*) plot_chargen::sc
(byte*) plot_chargen::sc#0
(byte*) plot_chargen::sc#1
(byte*) plot_chargen::sc#2
(byte*) plot_chargen::sc#3
(byte*) plot_chargen::sc#4
(byte*) plot_chargen::sc#5
(byte*) plot_chargen::sc#6
(byte*) plot_chargen::sc#7
(byte) plot_chargen::shift
(byte) plot_chargen::shift#0
(byte) plot_chargen::shift#1
(byte) plot_chargen::shift#2
(byte) plot_chargen::x
(byte) plot_chargen::x#0
(byte) plot_chargen::x#1
(byte) plot_chargen::x#2
(byte) plot_chargen::x#3
(byte) plot_chargen::x#4
(byte) plot_chargen::y
(byte) plot_chargen::y#0
(byte) plot_chargen::y#1
(byte) plot_chargen::y#2
(byte) plot_chargen::y#3
(byte) plot_chargen::y#4
(byte) plot_chargen::y#5
(byte) plot_chargen::y#6
(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at)
(bool~) print_str_at::$0
(label) print_str_at::@1
(label) print_str_at::@2
(label) print_str_at::@return
(byte*) print_str_at::at
(byte*) print_str_at::at#0
(byte*) print_str_at::at#1
(byte*) print_str_at::at#2
(byte*) print_str_at::at#3
(byte*) print_str_at::at#4
(byte*) print_str_at::at#5
(byte*) print_str_at::at#6
(byte*) print_str_at::at#7
(byte*) print_str_at::str
(byte*) print_str_at::str#0
(byte*) print_str_at::str#1
(byte*) print_str_at::str#2
(byte*) print_str_at::str#3
(byte*) print_str_at::str#4
(byte*) print_str_at::str#5
(byte*) print_str_at::str#6
(byte*) print_str_at::str#7

Adding number conversion cast (unumber) 0 in (bool~) mul8u::$0 ← (byte) mul8u::a#2 != (number) 0
Adding number conversion cast (unumber) 1 in (number~) mul8u::$1 ← (byte) mul8u::a#3 & (number) 1
Adding number conversion cast (unumber) mul8u::$1 in (number~) mul8u::$1 ← (byte) mul8u::a#3 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) mul8u::$2 ← (unumber~) mul8u::$1 != (number) 0
Adding number conversion cast (unumber) 1 in (byte~) mul8u::$5 ← (byte) mul8u::a#4 >> (number) 1
Adding number conversion cast (unumber) 1 in (word~) mul8u::$6 ← (word) mul8u::mb#2 << (number) 1
Adding number conversion cast (unumber) 7 in (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#6 & (number) 7
Adding number conversion cast (unumber) keyboard_key_pressed::$0 in (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#6 & (unumber)(number) 7
Adding number conversion cast (unumber) 3 in (byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key#6 >> (number) 3
Adding number conversion cast (unumber) $3e8 in (byte*~) main::$11 ← (const byte*) SCREEN + (number) $3e8
Adding number conversion cast (unumber) 1 in (byte*~) main::$0 ← (const byte*) SCREEN + (number) 1
Adding number conversion cast (unumber) 1 in (byte*~) main::$2 ← (const byte*) SCREEN + (number) 1
Adding number conversion cast (unumber) $a in (byte*~) main::$3 ← (byte*~) main::$2 + (number) $a
Adding number conversion cast (unumber) 1 in (byte*~) main::$5 ← (const byte*) SCREEN + (number) 1
Adding number conversion cast (unumber) $14 in (byte*~) main::$6 ← (byte*~) main::$5 + (number) $14
Adding number conversion cast (unumber) 1 in (byte*~) main::$8 ← (const byte*) SCREEN + (number) 1
Adding number conversion cast (unumber) $1e in (byte*~) main::$9 ← (byte*~) main::$8 + (number) $1e
Adding number conversion cast (unumber) $20 in (byte) plot_chargen::ch#0 ← (number) $20
Adding number conversion cast (unumber) 0 in (byte) plot_chargen::shift#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$16 ← (byte~) main::$15 != (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$19 ← (byte~) main::$18 != (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::cur_pos#1 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) main::$22 ← (byte~) main::$21 != (number) 0
Adding number conversion cast (unumber) 1 in (byte) main::cur_pos#2 ← (number) 1
Adding number conversion cast (unumber) 0 in (bool~) main::$25 ← (byte~) main::$24 != (number) 0
Adding number conversion cast (unumber) 2 in (byte) main::cur_pos#3 ← (number) 2
Adding number conversion cast (unumber) 0 in (bool~) main::$28 ← (byte~) main::$27 != (number) 0
Adding number conversion cast (unumber) 3 in (byte) main::cur_pos#4 ← (number) 3
Adding number conversion cast (unumber) 1 in (byte) main::shift#1 ← (number) 1
Adding number conversion cast (unumber) 0 in (byte) main::shift#2 ← (number) 0
Adding number conversion cast (unumber) $3f in (bool~) main::$30 ← (byte) main::key#0 != (number) $3f
Adding number conversion cast (unumber) 0 in (bool~) main::$33 ← (byte) main::pressed#2 != (number) 0
Adding number conversion cast (unumber) 0 in (bool~) print_str_at::$0 ← (number) 0 != *((byte*) print_str_at::str#5)
Adding number conversion cast (unumber) 8 in (number~) plot_chargen::$1 ← (word~) plot_chargen::$0 * (number) 8
Adding number conversion cast (unumber) plot_chargen::$1 in (number~) plot_chargen::$1 ← (word~) plot_chargen::$0 * (unumber)(number) 8
Adding number conversion cast (unumber) 0 in (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (number) 0
Adding number conversion cast (unumber) $32 in *((const byte*) PROCPORT) ← (number) $32
Adding number conversion cast (unumber) $28 in (byte*~) plot_chargen::$5 ← (const byte*) SCREEN + (number) $28
Adding number conversion cast (unumber) 1 in (byte*~) plot_chargen::$6 ← (byte*~) plot_chargen::$5 + (number) 1
Adding number conversion cast (unumber) $a in (byte) mul8u::b#0 ← (number) $a
Adding number conversion cast (unumber) $800 in (byte*~) plot_chargen::$9 ← (byte*) plot_chargen::chargen#2 + (number) $800
Adding number conversion cast (unumber) $80 in (number~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (number) $80
Adding number conversion cast (unumber) plot_chargen::$10 in (number~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (unumber)(number) $80
Adding number conversion cast (unumber) 0 in (bool~) plot_chargen::$11 ← (unumber~) plot_chargen::$10 != (number) 0
Adding number conversion cast (unumber) 2 in (number~) plot_chargen::$13 ← (byte) plot_chargen::bits#3 * (number) 2
Adding number conversion cast (unumber) plot_chargen::$13 in (number~) plot_chargen::$13 ← (byte) plot_chargen::bits#3 * (unumber)(number) 2
Adding number conversion cast (unumber) $20 in (byte*~) plot_chargen::$15 ← (byte*) plot_chargen::sc#4 + (number) $20
Adding number conversion cast (unumber) $37 in *((const byte*) PROCPORT) ← (number) $37
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) plot_chargen::ch#0 ← (unumber)(number) $20
Inlining cast (byte) plot_chargen::shift#0 ← (unumber)(number) 0
Inlining cast (byte) main::cur_pos#1 ← (unumber)(number) 0
Inlining cast (byte) main::cur_pos#2 ← (unumber)(number) 1
Inlining cast (byte) main::cur_pos#3 ← (unumber)(number) 2
Inlining cast (byte) main::cur_pos#4 ← (unumber)(number) 3
Inlining cast (byte) main::shift#1 ← (unumber)(number) 1
Inlining cast (byte) main::shift#2 ← (unumber)(number) 0
Inlining cast (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2
Inlining cast *((const byte*) PROCPORT) ← (unumber)(number) $32
Inlining cast (byte) mul8u::b#0 ← (unumber)(number) $a
Inlining cast *((const byte*) PROCPORT) ← (unumber)(number) $37
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1
Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 56320
Simplifying constant pointer cast (byte*) 56321
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 3
Simplifying constant integer cast $3e8
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $a
Simplifying constant integer cast 1
Simplifying constant integer cast $14
Simplifying constant integer cast 1
Simplifying constant integer cast $1e
Simplifying constant integer cast $20
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $3f
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast $32
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Simplifying constant integer cast $a
Simplifying constant integer cast $800
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast $20
Simplifying constant integer cast $37
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 3
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $1e
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $3f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $a
Finalized unsigned number type (word) $800
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) $37
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1
Inferred type updated to byte in (unumber~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7
Inferred type updated to word in (unumber~) plot_chargen::$1 ← (word~) plot_chargen::$0 * (byte) 8
Inferred type updated to byte in (unumber~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte) $80
Inferred type updated to byte in (unumber~) plot_chargen::$13 ← (byte) plot_chargen::bits#3 * (byte) 2
Inversing boolean not [9] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [8] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0
Inversing boolean not [98] (bool~) main::$17 ← (byte~) main::$15 == (byte) 0 from [97] (bool~) main::$16 ← (byte~) main::$15 != (byte) 0
Inversing boolean not [107] (bool~) main::$20 ← (byte~) main::$18 == (byte) 0 from [106] (bool~) main::$19 ← (byte~) main::$18 != (byte) 0
Inversing boolean not [117] (bool~) main::$23 ← (byte~) main::$21 == (byte) 0 from [116] (bool~) main::$22 ← (byte~) main::$21 != (byte) 0
Inversing boolean not [127] (bool~) main::$26 ← (byte~) main::$24 == (byte) 0 from [126] (bool~) main::$25 ← (byte~) main::$24 != (byte) 0
Inversing boolean not [154] (bool~) main::$31 ← (byte) main::key#0 == (byte) $3f from [153] (bool~) main::$30 ← (byte) main::key#0 != (byte) $3f
Inversing boolean not [158] (bool~) main::$34 ← (byte) main::pressed#2 == (byte) 0 from [157] (bool~) main::$33 ← (byte) main::pressed#2 != (byte) 0
Inversing boolean not [196] (bool~) plot_chargen::$4 ← (byte) plot_chargen::shift#2 == (byte) 0 from [195] (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte) 0
Inversing boolean not [221] (bool~) plot_chargen::$12 ← (byte~) plot_chargen::$10 == (byte) 0 from [220] (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) mul8u::a#2 = (byte) mul8u::a#3 (byte) mul8u::a#6 
Alias (word) mul8u::mb#3 = (word) mul8u::mb#4 (word) mul8u::mb#5 
Alias (word) mul8u::res#2 = (word) mul8u::res#5 (word) mul8u::res#4 (word) mul8u::return#0 (word) mul8u::res#3 (word) mul8u::return#3 (word) mul8u::return#1 
Alias (byte) mul8u::a#0 = (byte~) mul8u::$5 
Alias (word) mul8u::mb#1 = (word~) mul8u::$6 
Alias (word) mul8u::res#1 = (word~) mul8u::$4 
Alias (byte) keyboard_matrix_read::return#0 = (byte) keyboard_matrix_read::row_pressed_bits#0 (byte~) keyboard_matrix_read::$0 (byte) keyboard_matrix_read::return#3 (byte) keyboard_matrix_read::return#1 
Alias (byte) keyboard_key_pressed::colidx#0 = (byte~) keyboard_key_pressed::$0 (byte) keyboard_key_pressed::colidx#1 
Alias (byte) keyboard_key_pressed::rowidx#0 = (byte~) keyboard_key_pressed::$1 
Alias (byte) keyboard_matrix_read::return#2 = (byte) keyboard_matrix_read::return#4 
Alias (byte) keyboard_key_pressed::return#0 = (byte~) keyboard_key_pressed::$3 (byte) keyboard_key_pressed::return#8 (byte) keyboard_key_pressed::return#1 
Alias (byte) keyboard_get_keycode::return#0 = (byte) keyboard_get_keycode::return#3 (byte) keyboard_get_keycode::return#1 
Alias (byte*) main::sc#2 = (byte*) main::sc#3 
Alias (byte*) print_str_at::at#0 = (byte*~) main::$0 
Alias (byte*) print_str_at::at#1 = (byte*~) main::$3 
Alias (byte*) print_str_at::at#2 = (byte*~) main::$6 
Alias (byte*) print_str_at::at#3 = (byte*~) main::$9 
Alias (byte) main::i#2 = (byte) main::i#3 
Alias (byte) keyboard_key_pressed::return#2 = (byte) keyboard_key_pressed::return#9 
Alias (byte) main::cur_pos#24 = (byte) main::cur_pos#25 
Alias (byte) keyboard_key_pressed::return#10 = (byte) keyboard_key_pressed::return#3 
Alias (byte) main::cur_pos#22 = (byte) main::cur_pos#23 
Alias (byte) keyboard_key_pressed::return#11 = (byte) keyboard_key_pressed::return#4 
Alias (byte) main::cur_pos#20 = (byte) main::cur_pos#21 
Alias (byte) keyboard_key_pressed::return#12 = (byte) keyboard_key_pressed::return#5 
Alias (byte) main::cur_pos#18 = (byte) main::cur_pos#19 
Alias (byte) keyboard_key_pressed::return#13 = (byte) keyboard_key_pressed::return#6 
Alias (byte) main::cur_pos#13 = (byte) main::cur_pos#16 (byte) main::cur_pos#17 (byte) main::cur_pos#14 
Alias (byte) keyboard_get_keycode::return#2 = (byte) keyboard_get_keycode::return#4 
Alias (byte) main::pressed#0 = (byte) main::pressed#3 
Alias (byte) main::ch#2 = (byte) main::ch#7 (byte) main::ch#9 (byte) main::ch#8 
Alias (byte) main::cur_pos#10 = (byte) main::cur_pos#7 (byte) main::cur_pos#9 (byte) main::cur_pos#8 
Alias (byte) main::shift#5 = (byte) main::shift#7 (byte) main::shift#8 (byte) main::shift#6 
Alias (byte) main::key#0 = (byte~) main::$29 (byte) main::key#1 
Alias (byte) keyboard_key_pressed::return#14 = (byte) keyboard_key_pressed::return#7 
Alias (byte) main::pressed#1 = (byte~) main::$32 
Alias (byte) main::cur_pos#15 = (byte) main::cur_pos#5 (byte) main::cur_pos#6 
Alias (byte) main::ch#4 = (byte) main::ch#5 (byte) main::ch#6 
Alias (byte) main::shift#11 = (byte) main::shift#3 (byte) main::shift#4 
Alias (byte) main::cur_pos#12 = (byte) main::cur_pos#26 
Alias (byte*) print_str_at::str#5 = (byte*) print_str_at::str#6 
Alias (byte*) print_str_at::at#5 = (byte*) print_str_at::at#6 
Alias (byte*) plot_chargen::chargen#0 = (byte*~) plot_chargen::$2 (byte*) plot_chargen::chargen#2 
Alias (word) mul8u::return#2 = (word) mul8u::return#4 
Alias (byte*) plot_chargen::chargen#5 = (byte*) plot_chargen::chargen#6 
Alias (byte*) plot_chargen::sc#0 = (byte*~) plot_chargen::$8 
Alias (byte) plot_chargen::pos#3 = (byte) plot_chargen::pos#4 
Alias (byte*) plot_chargen::chargen#1 = (byte*~) plot_chargen::$9 
Alias (byte) plot_chargen::bits#1 = (byte~) plot_chargen::$13 
Alias (byte*) plot_chargen::sc#5 = (byte*) plot_chargen::sc#6 
Alias (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#4 
Alias (byte) plot_chargen::x#3 = (byte) plot_chargen::x#4 
Alias (byte) plot_chargen::y#5 = (byte) plot_chargen::y#6 
Alias (byte*) plot_chargen::chargen#8 = (byte*) plot_chargen::chargen#9 
Alias (byte*) plot_chargen::sc#1 = (byte*) plot_chargen::sc#4 
Alias (byte) plot_chargen::y#3 = (byte) plot_chargen::y#4 
Alias (byte*) plot_chargen::chargen#4 = (byte*) plot_chargen::chargen#7 
Alias (byte*) plot_chargen::sc#2 = (byte*~) plot_chargen::$15 
Successful SSA optimization Pass2AliasElimination
Alias (byte) mul8u::a#2 = (byte) mul8u::a#4 
Alias (word) mul8u::mb#2 = (word) mul8u::mb#3 
Alias (byte) main::cur_pos#11 = (byte) main::cur_pos#13 
Alias (byte) main::ch#2 = (byte) main::ch#4 (byte) main::ch#3 
Alias (byte) main::cur_pos#10 = (byte) main::cur_pos#15 (byte) main::cur_pos#12 
Alias (byte) main::shift#10 = (byte) main::shift#11 (byte) main::shift#5 
Alias (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#3 
Alias (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#5 
Alias (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#3 
Alias (byte) plot_chargen::x#2 = (byte) plot_chargen::x#3 
Alias (byte) plot_chargen::y#3 = (byte) plot_chargen::y#5 
Alias (byte*) plot_chargen::chargen#4 = (byte*) plot_chargen::chargen#8 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) mul8u::b#1 (byte) mul8u::b#0
Identical Phi Values (byte) mul8u::a#5 (byte) mul8u::a#1
Identical Phi Values (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0
Identical Phi Values (byte) keyboard_get_keycode::ch#1 (byte) keyboard_get_keycode::ch#0
Identical Phi Values (byte) main::cur_pos#10 (byte) main::cur_pos#11
Identical Phi Values (byte) main::shift#10 (byte) main::shift#9
Identical Phi Values (byte) plot_chargen::y#3 (byte) plot_chargen::y#2
Identical Phi Values (byte*) plot_chargen::chargen#4 (byte*) plot_chargen::chargen#3
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) plot_chargen::chargen#3 (byte*) plot_chargen::chargen#5
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) mul8u::$0 [5] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2
Simple Condition (bool~) mul8u::$3 [8] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4
Simple Condition (bool~) main::$12 [34] if((byte*) main::sc#2<(byte*~) main::$11) goto main::@2
Simple Condition (bool~) main::$14 [60] if((byte) main::i#1!=rangelast(0,3)) goto main::@7
Simple Condition (bool~) main::$17 [69] if((byte~) main::$15==(byte) 0) goto main::@10
Simple Condition (bool~) main::$20 [76] if((byte~) main::$18==(byte) 0) goto main::@11
Simple Condition (bool~) main::$23 [84] if((byte~) main::$21==(byte) 0) goto main::@12
Simple Condition (bool~) main::$26 [92] if((byte~) main::$24==(byte) 0) goto main::@13
Simple Condition (bool~) main::$28 [100] if((byte~) main::$27!=(byte) 0) goto main::@14
Simple Condition (bool~) main::$31 [113] if((byte) main::key#0==(byte) $3f) goto main::@17
Simple Condition (bool~) main::$34 [116] if((byte) main::pressed#2==(byte) 0) goto main::@18
Simple Condition (bool~) main::$36 [123] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@16
Simple Condition (bool~) print_str_at::$0 [133] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2
Simple Condition (bool~) plot_chargen::$4 [144] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1
Simple Condition (bool~) plot_chargen::$12 [164] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5
Simple Condition (bool~) plot_chargen::$14 [171] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4
Simple Condition (bool~) plot_chargen::$16 [176] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [32] (byte*~) main::$11 ← (const byte*) SCREEN + (word) $3e8
Constant right-side identified [37] (byte*) print_str_at::at#0 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [40] (byte*~) main::$2 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [44] (byte*~) main::$5 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [48] (byte*~) main::$8 ← (const byte*) SCREEN + (byte) 1
Constant right-side identified [147] (byte*~) plot_chargen::$5 ← (const byte*) SCREEN + (byte) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) mul8u::res#0 = 0
Constant (const byte*) main::sc#0 = SCREEN
Constant (const byte*) main::$11 = SCREEN+$3e8
Constant (const byte*) print_str_at::at#0 = SCREEN+1
Constant (const byte*) print_str_at::str#0 = main::str
Constant (const byte*) main::$2 = SCREEN+1
Constant (const byte*) print_str_at::str#1 = main::str1
Constant (const byte*) main::$5 = SCREEN+1
Constant (const byte*) print_str_at::str#2 = main::str2
Constant (const byte*) main::$8 = SCREEN+1
Constant (const byte*) print_str_at::str#3 = main::str3
Constant (const byte) main::i#0 = 0
Constant (const byte) plot_chargen::ch#0 = $20
Constant (const byte) plot_chargen::shift#0 = 0
Constant (const byte) main::cur_pos#0 = 0
Constant (const byte) main::shift#0 = 0
Constant (const byte) keyboard_key_pressed::key#0 = KEY_F1
Constant (const byte) keyboard_key_pressed::key#1 = KEY_F3
Constant (const byte) main::cur_pos#1 = 0
Constant (const byte) keyboard_key_pressed::key#2 = KEY_F5
Constant (const byte) main::cur_pos#2 = 1
Constant (const byte) keyboard_key_pressed::key#3 = KEY_F7
Constant (const byte) main::cur_pos#3 = 2
Constant (const byte) keyboard_key_pressed::key#4 = KEY_LSHIFT
Constant (const byte) main::cur_pos#4 = 3
Constant (const byte) main::shift#1 = 1
Constant (const byte) main::shift#2 = 0
Constant (const byte) main::ch#0 = 0
Constant (const byte) main::pressed#0 = 0
Constant (const byte*) plot_chargen::$5 = SCREEN+$28
Constant (const byte) mul8u::b#0 = $a
Constant (const byte) plot_chargen::y#0 = 0
Constant (const byte) plot_chargen::x#0 = 0
Constant (const byte) plot_chargen::c#0 = '.'
Constant (const byte) plot_chargen::c#1 = '*'
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) mul8u::mb#0 = (word)mul8u::b#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [128] if(true) goto main::@9
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [58] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [60] if(main::i#1!=rangelast(0,3)) goto main::@7 to (number) 4
Resolved ranged next value [121] main::ch#1 ← ++ main::ch#2 to ++
Resolved ranged comparison value [123] if(main::ch#1!=rangelast(0,$3f)) goto main::@16 to (number) $40
Resolved ranged next value [169] plot_chargen::x#1 ← ++ plot_chargen::x#2 to ++
Resolved ranged comparison value [171] if(plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 to (number) 8
Resolved ranged next value [174] plot_chargen::y#1 ← ++ plot_chargen::y#2 to ++
Resolved ranged comparison value [176] if(plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3 to (number) 8
Eliminating unused constant (const byte) main::shift#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 4 in if((byte) main::i#1!=(number) 4) goto main::@7
Adding number conversion cast (unumber) $40 in if((byte) main::ch#1!=(number) $40) goto main::@16
Adding number conversion cast (unumber) 8 in if((byte) plot_chargen::x#1!=(number) 8) goto plot_chargen::@4
Adding number conversion cast (unumber) 8 in if((byte) plot_chargen::y#1!=(number) 8) goto plot_chargen::@3
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 4
Simplifying constant integer cast $40
Simplifying constant integer cast 8
Simplifying constant integer cast 8
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [28] (byte*) print_str_at::at#1 ← (const byte*) main::$2 + (byte) $a
Constant right-side identified [30] (byte*) print_str_at::at#2 ← (const byte*) main::$5 + (byte) $14
Constant right-side identified [32] (byte*) print_str_at::at#3 ← (const byte*) main::$8 + (byte) $1e
Constant right-side identified [98] (byte*~) plot_chargen::$6 ← (const byte*) plot_chargen::$5 + (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) print_str_at::at#1 = main::$2+$a
Constant (const byte*) print_str_at::at#2 = main::$5+$14
Constant (const byte*) print_str_at::at#3 = main::$8+$1e
Constant (const byte*) plot_chargen::$6 = plot_chargen::$5+1
Successful SSA optimization Pass2ConstantIdentification
Rewriting multiplication to use shift [90] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 * (byte) 8
Rewriting multiplication to use shift [109] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 * (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const word) mul8u::res#0
Inlining constant with var siblings (const word) mul8u::mb#0
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#0
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#1
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#2
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#3
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#4
Inlining constant with var siblings (const byte*) main::sc#0
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::cur_pos#0
Inlining constant with var siblings (const byte) main::cur_pos#1
Inlining constant with var siblings (const byte) main::cur_pos#2
Inlining constant with var siblings (const byte) main::cur_pos#3
Inlining constant with var siblings (const byte) main::cur_pos#4
Inlining constant with var siblings (const byte) main::shift#1
Inlining constant with var siblings (const byte) main::shift#2
Inlining constant with var siblings (const byte) main::ch#0
Inlining constant with var siblings (const byte) main::pressed#0
Inlining constant with var siblings (const byte*) print_str_at::at#0
Inlining constant with var siblings (const byte*) print_str_at::str#0
Inlining constant with var siblings (const byte*) print_str_at::str#1
Inlining constant with var siblings (const byte*) print_str_at::str#2
Inlining constant with var siblings (const byte*) print_str_at::str#3
Inlining constant with var siblings (const byte*) print_str_at::at#1
Inlining constant with var siblings (const byte*) print_str_at::at#2
Inlining constant with var siblings (const byte*) print_str_at::at#3
Inlining constant with var siblings (const byte) plot_chargen::ch#0
Inlining constant with var siblings (const byte) plot_chargen::shift#0
Inlining constant with var siblings (const byte) plot_chargen::y#0
Inlining constant with var siblings (const byte) plot_chargen::x#0
Inlining constant with var siblings (const byte) plot_chargen::c#0
Inlining constant with var siblings (const byte) plot_chargen::c#1
Constant inlined print_str_at::str#1 = (const byte*) main::str1
Constant inlined main::shift#1 = (byte) 1
Constant inlined print_str_at::str#2 = (const byte*) main::str2
Constant inlined print_str_at::at#3 = (const byte*) SCREEN+(byte) 1+(byte) $1e
Constant inlined print_str_at::str#3 = (const byte*) main::str3
Constant inlined print_str_at::at#2 = (const byte*) SCREEN+(byte) 1+(byte) $14
Constant inlined plot_chargen::c#0 = (byte) '.'
Constant inlined print_str_at::at#1 = (const byte*) SCREEN+(byte) 1+(byte) $a
Constant inlined plot_chargen::c#1 = (byte) '*'
Constant inlined print_str_at::at#0 = (const byte*) SCREEN+(byte) 1
Constant inlined print_str_at::str#0 = (const byte*) main::str
Constant inlined main::$11 = (const byte*) SCREEN+(word) $3e8
Constant inlined main::shift#2 = (byte) 0
Constant inlined main::i#0 = (byte) 0
Constant inlined plot_chargen::$6 = (const byte*) SCREEN+(byte) $28+(byte) 1
Constant inlined plot_chargen::$5 = (const byte*) SCREEN+(byte) $28
Constant inlined plot_chargen::shift#0 = (byte) 0
Constant inlined main::ch#0 = (byte) 0
Constant inlined keyboard_key_pressed::key#0 = (const byte) KEY_F1
Constant inlined plot_chargen::ch#0 = (byte) $20
Constant inlined keyboard_key_pressed::key#1 = (const byte) KEY_F3
Constant inlined keyboard_key_pressed::key#4 = (const byte) KEY_LSHIFT
Constant inlined mul8u::mb#0 = (word)(const byte) mul8u::b#0
Constant inlined keyboard_key_pressed::key#2 = (const byte) KEY_F5
Constant inlined keyboard_key_pressed::key#3 = (const byte) KEY_F7
Constant inlined main::sc#0 = (const byte*) SCREEN
Constant inlined main::cur_pos#3 = (byte) 2
Constant inlined mul8u::res#0 = (word) 0
Constant inlined main::cur_pos#4 = (byte) 3
Constant inlined main::cur_pos#1 = (byte) 0
Constant inlined main::$2 = (const byte*) SCREEN+(byte) 1
Constant inlined main::cur_pos#2 = (byte) 1
Constant inlined main::cur_pos#0 = (byte) 0
Constant inlined main::$5 = (const byte*) SCREEN+(byte) 1
Constant inlined plot_chargen::y#0 = (byte) 0
Constant inlined main::$8 = (const byte*) SCREEN+(byte) 1
Constant inlined main::pressed#0 = (byte) 0
Constant inlined plot_chargen::x#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting mul8u::@10(between mul8u::@2 and mul8u::@4)
Added new block during phi lifting main::@42(between main::@33 and main::@7)
Added new block during phi lifting main::@43(between main::@34 and main::@10)
Added new block during phi lifting main::@44(between main::@35 and main::@11)
Added new block during phi lifting main::@45(between main::@36 and main::@12)
Added new block during phi lifting main::@46(between main::@37 and main::@13)
Added new block during phi lifting main::@47(between main::@18 and main::@16)
Added new block during phi lifting plot_chargen::@10(between plot_chargen and plot_chargen::@1)
Added new block during phi lifting plot_chargen::@11(between plot_chargen::@7 and plot_chargen::@3)
Added new block during phi lifting plot_chargen::@12(between plot_chargen::@5 and plot_chargen::@4)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @19
Adding NOP phi() at start of @20
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@29
Adding NOP phi() at start of main::@30
Adding NOP phi() at start of main::@31
Adding NOP phi() at start of main::@32
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@23
Adding NOP phi() at start of main::@24
Adding NOP phi() at start of main::@25
Adding NOP phi() at start of main::@26
Adding NOP phi() at start of main::@27
Adding NOP phi() at start of main::@41
Adding NOP phi() at start of main::@14
Adding NOP phi() at start of plot_chargen::@6
Adding NOP phi() at start of mul8u::@3
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to print_str_at:9 print_str_at:11 print_str_at:13 print_str_at:15 plot_chargen:20 keyboard_key_pressed:25 keyboard_key_pressed:31 keyboard_key_pressed:37 keyboard_key_pressed:43 keyboard_key_pressed:49 keyboard_get_keycode:57 keyboard_key_pressed:63 plot_chargen:75 
Calls in [plot_chargen] to mul8u:101 
Calls in [keyboard_key_pressed] to keyboard_matrix_read:152 

Created 29 initial phi equivalence classes
Coalesced [19] plot_chargen::pos#6 ← plot_chargen::pos#0
Coalesced [62] keyboard_key_pressed::key#7 ← keyboard_key_pressed::key#5
Coalesced [66] main::pressed#4 ← main::pressed#1
Coalesced [72] plot_chargen::ch#3 ← plot_chargen::ch#1
Coalesced [73] plot_chargen::shift#3 ← plot_chargen::shift#1
Coalesced [74] plot_chargen::pos#5 ← plot_chargen::pos#1
Coalesced [79] main::cur_pos#27 ← main::cur_pos#11
Coalesced [80] main::ch#10 ← main::ch#1
Coalesced [82] main::cur_pos#31 ← main::cur_pos#18
Coalesced [83] main::cur_pos#30 ← main::cur_pos#20
Coalesced [84] main::cur_pos#29 ← main::cur_pos#22
Coalesced (already) [85] main::cur_pos#28 ← main::cur_pos#24
Coalesced [86] main::i#4 ← main::i#1
Coalesced [89] main::sc#4 ← main::sc#1
Coalesced [97] plot_chargen::chargen#11 ← plot_chargen::chargen#1
Coalesced [105] plot_chargen::sc#9 ← plot_chargen::sc#0
Coalesced [108] plot_chargen::bits#5 ← plot_chargen::bits#0
Coalesced [109] plot_chargen::sc#10 ← plot_chargen::sc#7
Coalesced [126] plot_chargen::y#7 ← plot_chargen::y#1
Coalesced [127] plot_chargen::sc#8 ← plot_chargen::sc#2
Coalesced [128] plot_chargen::bits#6 ← plot_chargen::bits#1
Coalesced [129] plot_chargen::sc#11 ← plot_chargen::sc#1
Coalesced [130] plot_chargen::x#5 ← plot_chargen::x#1
Coalesced [131] plot_chargen::chargen#10 ← plot_chargen::chargen#0
Coalesced [132] mul8u::a#7 ← mul8u::a#1
Coalesced [140] mul8u::res#9 ← mul8u::res#1
Coalesced [144] mul8u::a#8 ← mul8u::a#0
Coalesced [145] mul8u::res#7 ← mul8u::res#6
Coalesced [146] mul8u::mb#6 ← mul8u::mb#1
Coalesced (already) [147] mul8u::res#8 ← mul8u::res#2
Coalesced [163] print_str_at::str#8 ← print_str_at::str#7
Coalesced [164] print_str_at::at#8 ← print_str_at::at#7
Coalesced [171] print_str_at::str#9 ← print_str_at::str#4
Coalesced [172] print_str_at::at#9 ← print_str_at::at#4
Coalesced down to 21 phi equivalence classes
Culled Empty Block (label) @20
Culled Empty Block (label) main::@32
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@23
Culled Empty Block (label) main::@24
Culled Empty Block (label) main::@25
Culled Empty Block (label) main::@26
Culled Empty Block (label) main::@27
Culled Empty Block (label) main::@41
Culled Empty Block (label) main::@21
Culled Empty Block (label) main::@47
Culled Empty Block (label) main::@42
Culled Empty Block (label) plot_chargen::@11
Culled Empty Block (label) plot_chargen::@12
Culled Empty Block (label) plot_chargen::@10
Culled Empty Block (label) mul8u::@3
Culled Empty Block (label) mul8u::@10
Renumbering block @19 to @1
Renumbering block mul8u::@4 to mul8u::@3
Renumbering block mul8u::@7 to mul8u::@4
Renumbering block keyboard_key_pressed::@2 to keyboard_key_pressed::@1
Renumbering block main::@7 to main::@4
Renumbering block main::@9 to main::@5
Renumbering block main::@10 to main::@6
Renumbering block main::@11 to main::@7
Renumbering block main::@12 to main::@8
Renumbering block main::@13 to main::@9
Renumbering block main::@14 to main::@10
Renumbering block main::@15 to main::@11
Renumbering block main::@16 to main::@12
Renumbering block main::@17 to main::@13
Renumbering block main::@18 to main::@14
Renumbering block main::@19 to main::@15
Renumbering block main::@20 to main::@16
Renumbering block main::@29 to main::@17
Renumbering block main::@30 to main::@18
Renumbering block main::@31 to main::@19
Renumbering block main::@33 to main::@20
Renumbering block main::@34 to main::@21
Renumbering block main::@35 to main::@22
Renumbering block main::@36 to main::@23
Renumbering block main::@37 to main::@24
Renumbering block main::@38 to main::@25
Renumbering block main::@39 to main::@26
Renumbering block main::@40 to main::@27
Renumbering block main::@43 to main::@28
Renumbering block main::@44 to main::@29
Renumbering block main::@45 to main::@30
Renumbering block main::@46 to main::@31
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::@3
Adding NOP phi() at start of main::@17
Adding NOP phi() at start of main::@18
Adding NOP phi() at start of main::@19
Adding NOP phi() at start of main::@28
Adding NOP phi() at start of main::@29
Adding NOP phi() at start of main::@30
Adding NOP phi() at start of main::@31
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of plot_chargen::@6
Adding NOP phi() at start of mul8u

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()

(void()) main()
main: scope:[main]  from @1
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@2
  [5] (byte*) main::sc#2 ← phi( main/(const byte*) SCREEN main::@2/(byte*) main::sc#1 )
  [6] if((byte*) main::sc#2<(const byte*) SCREEN+(word) $3e8) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@1
  [7] phi()
  [8] call print_str_at 
  to:main::@17
main::@17: scope:[main]  from main::@3
  [9] phi()
  [10] call print_str_at 
  to:main::@18
main::@18: scope:[main]  from main::@17
  [11] phi()
  [12] call print_str_at 
  to:main::@19
main::@19: scope:[main]  from main::@18
  [13] phi()
  [14] call print_str_at 
  to:main::@4
main::@4: scope:[main]  from main::@19 main::@20
  [15] (byte) main::i#2 ← phi( main::@19/(byte) 0 main::@20/(byte) main::i#1 )
  [16] (byte) plot_chargen::pos#0 ← (byte) main::i#2
  [17] call plot_chargen 
  to:main::@20
main::@20: scope:[main]  from main::@4
  [18] (byte) main::i#1 ← ++ (byte) main::i#2
  [19] if((byte) main::i#1!=(byte) 4) goto main::@4
  to:main::@5
main::@5: scope:[main]  from main::@14 main::@20
  [20] (byte) main::cur_pos#24 ← phi( main::@14/(byte) main::cur_pos#11 main::@20/(byte) 0 )
  [21] call keyboard_key_pressed 
  [22] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
  to:main::@21
main::@21: scope:[main]  from main::@5
  [23] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
  [24] if((byte~) main::$15==(byte) 0) goto main::@28
  to:main::@6
main::@28: scope:[main]  from main::@21
  [25] phi()
  to:main::@6
main::@6: scope:[main]  from main::@21 main::@28
  [26] (byte) main::cur_pos#22 ← phi( main::@21/(byte) 0 main::@28/(byte) main::cur_pos#24 )
  [27] call keyboard_key_pressed 
  [28] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
  to:main::@22
main::@22: scope:[main]  from main::@6
  [29] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
  [30] if((byte~) main::$18==(byte) 0) goto main::@29
  to:main::@7
main::@29: scope:[main]  from main::@22
  [31] phi()
  to:main::@7
main::@7: scope:[main]  from main::@22 main::@29
  [32] (byte) main::cur_pos#20 ← phi( main::@22/(byte) 1 main::@29/(byte) main::cur_pos#22 )
  [33] call keyboard_key_pressed 
  [34] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
  to:main::@23
main::@23: scope:[main]  from main::@7
  [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
  [36] if((byte~) main::$21==(byte) 0) goto main::@30
  to:main::@8
main::@30: scope:[main]  from main::@23
  [37] phi()
  to:main::@8
main::@8: scope:[main]  from main::@23 main::@30
  [38] (byte) main::cur_pos#18 ← phi( main::@23/(byte) 2 main::@30/(byte) main::cur_pos#20 )
  [39] call keyboard_key_pressed 
  [40] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
  to:main::@24
main::@24: scope:[main]  from main::@8
  [41] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
  [42] if((byte~) main::$24==(byte) 0) goto main::@31
  to:main::@9
main::@31: scope:[main]  from main::@24
  [43] phi()
  to:main::@9
main::@9: scope:[main]  from main::@24 main::@31
  [44] (byte) main::cur_pos#11 ← phi( main::@24/(byte) 3 main::@31/(byte) main::cur_pos#18 )
  [45] call keyboard_key_pressed 
  [46] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
  to:main::@25
main::@25: scope:[main]  from main::@9
  [47] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
  [48] if((byte~) main::$27!=(byte) 0) goto main::@10
  to:main::@11
main::@10: scope:[main]  from main::@25
  [49] phi()
  to:main::@11
main::@11: scope:[main]  from main::@10 main::@25
  [50] (byte) main::shift#9 ← phi( main::@10/(byte) 1 main::@25/(byte) 0 )
  to:main::@12
main::@12: scope:[main]  from main::@11 main::@14
  [51] (byte) main::ch#2 ← phi( main::@11/(byte) 0 main::@14/(byte) main::ch#1 )
  [52] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2
  [53] call keyboard_get_keycode 
  [54] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
  to:main::@26
main::@26: scope:[main]  from main::@12
  [55] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
  [56] if((byte) main::key#0==(byte) $3f) goto main::@13
  to:main::@15
main::@15: scope:[main]  from main::@26
  [57] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0
  [58] call keyboard_key_pressed 
  [59] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
  to:main::@27
main::@27: scope:[main]  from main::@15
  [60] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
  to:main::@13
main::@13: scope:[main]  from main::@26 main::@27
  [61] (byte) main::pressed#2 ← phi( main::@26/(byte) 0 main::@27/(byte) main::pressed#1 )
  [62] if((byte) main::pressed#2==(byte) 0) goto main::@14
  to:main::@16
main::@16: scope:[main]  from main::@13
  [63] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11
  [64] (byte) plot_chargen::ch#1 ← (byte) main::ch#2
  [65] (byte) plot_chargen::shift#1 ← (byte) main::shift#9
  [66] call plot_chargen 
  to:main::@14
main::@14: scope:[main]  from main::@13 main::@16
  [67] (byte) main::ch#1 ← ++ (byte) main::ch#2
  [68] if((byte) main::ch#1!=(byte) $40) goto main::@12
  to:main::@5
main::@2: scope:[main]  from main::@1
  [69] *((byte*) main::sc#2) ← (byte) ' '
  [70] (byte*) main::sc#1 ← ++ (byte*) main::sc#2
  to:main::@1

(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift)
plot_chargen: scope:[plot_chargen]  from main::@16 main::@4
  [71] (byte) plot_chargen::pos#2 ← phi( main::@16/(byte) plot_chargen::pos#1 main::@4/(byte) plot_chargen::pos#0 )
  [71] (byte) plot_chargen::shift#2 ← phi( main::@16/(byte) plot_chargen::shift#1 main::@4/(byte) 0 )
  [71] (byte) plot_chargen::ch#2 ← phi( main::@16/(byte) plot_chargen::ch#1 main::@4/(byte) $20 )
  asm { sei  }
  [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2
  [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3
  [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN + (word~) plot_chargen::$1
  [76] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1
  to:plot_chargen::@2
plot_chargen::@2: scope:[plot_chargen]  from plot_chargen
  [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word) $800
  to:plot_chargen::@1
plot_chargen::@1: scope:[plot_chargen]  from plot_chargen plot_chargen::@2
  [78] (byte*) plot_chargen::chargen#5 ← phi( plot_chargen/(byte*) plot_chargen::chargen#0 plot_chargen::@2/(byte*) plot_chargen::chargen#1 )
  [79] *((const byte*) PROCPORT) ← (byte) $32
  [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2
  [81] call mul8u 
  [82] (word) mul8u::return#2 ← (word) mul8u::res#2
  to:plot_chargen::@9
plot_chargen::@9: scope:[plot_chargen]  from plot_chargen::@1
  [83] (word~) plot_chargen::$7 ← (word) mul8u::return#2
  [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN+(byte) $28+(byte) 1 + (word~) plot_chargen::$7
  to:plot_chargen::@3
plot_chargen::@3: scope:[plot_chargen]  from plot_chargen::@7 plot_chargen::@9
  [85] (byte*) plot_chargen::sc#7 ← phi( plot_chargen::@7/(byte*) plot_chargen::sc#2 plot_chargen::@9/(byte*) plot_chargen::sc#0 )
  [85] (byte) plot_chargen::y#2 ← phi( plot_chargen::@7/(byte) plot_chargen::y#1 plot_chargen::@9/(byte) 0 )
  [86] (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#5 + (byte) plot_chargen::y#2)
  to:plot_chargen::@4
plot_chargen::@4: scope:[plot_chargen]  from plot_chargen::@3 plot_chargen::@5
  [87] (byte) plot_chargen::x#2 ← phi( plot_chargen::@3/(byte) 0 plot_chargen::@5/(byte) plot_chargen::x#1 )
  [87] (byte*) plot_chargen::sc#3 ← phi( plot_chargen::@3/(byte*) plot_chargen::sc#7 plot_chargen::@5/(byte*) plot_chargen::sc#1 )
  [87] (byte) plot_chargen::bits#2 ← phi( plot_chargen::@3/(byte) plot_chargen::bits#0 plot_chargen::@5/(byte) plot_chargen::bits#1 )
  [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte) $80
  [89] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5
  to:plot_chargen::@6
plot_chargen::@6: scope:[plot_chargen]  from plot_chargen::@4
  [90] phi()
  to:plot_chargen::@5
plot_chargen::@5: scope:[plot_chargen]  from plot_chargen::@4 plot_chargen::@6
  [91] (byte) plot_chargen::c#2 ← phi( plot_chargen::@4/(byte) '.' plot_chargen::@6/(byte) '*' )
  [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2
  [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3
  [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte) 1
  [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2
  [96] if((byte) plot_chargen::x#1!=(byte) 8) goto plot_chargen::@4
  to:plot_chargen::@7
plot_chargen::@7: scope:[plot_chargen]  from plot_chargen::@5
  [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte) $20
  [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2
  [99] if((byte) plot_chargen::y#1!=(byte) 8) goto plot_chargen::@3
  to:plot_chargen::@8
plot_chargen::@8: scope:[plot_chargen]  from plot_chargen::@7
  [100] *((const byte*) PROCPORT) ← (byte) $37
  asm { cli  }
  to:plot_chargen::@return
plot_chargen::@return: scope:[plot_chargen]  from plot_chargen::@8
  [102] return 
  to:@return

(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
mul8u: scope:[mul8u]  from plot_chargen::@1
  [103] phi()
  to:mul8u::@1
mul8u::@1: scope:[mul8u]  from mul8u mul8u::@3
  [104] (word) mul8u::mb#2 ← phi( mul8u/(word)(const byte) mul8u::b#0 mul8u::@3/(word) mul8u::mb#1 )
  [104] (word) mul8u::res#2 ← phi( mul8u/(word) 0 mul8u::@3/(word) mul8u::res#6 )
  [104] (byte) mul8u::a#2 ← phi( mul8u/(byte) mul8u::a#1 mul8u::@3/(byte) mul8u::a#0 )
  [105] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2
  to:mul8u::@return
mul8u::@return: scope:[mul8u]  from mul8u::@1
  [106] return 
  to:@return
mul8u::@2: scope:[mul8u]  from mul8u::@1
  [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte) 1
  [108] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3
  to:mul8u::@4
mul8u::@4: scope:[mul8u]  from mul8u::@2
  [109] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2
  to:mul8u::@3
mul8u::@3: scope:[mul8u]  from mul8u::@2 mul8u::@4
  [110] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@4/(word) mul8u::res#1 )
  [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1
  [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1
  to:mul8u::@1

(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
keyboard_key_pressed: scope:[keyboard_key_pressed]  from main::@15 main::@5 main::@6 main::@7 main::@8 main::@9
  [113] (byte) keyboard_key_pressed::key#6 ← phi( main::@6/(const byte) KEY_F3 main::@7/(const byte) KEY_F5 main::@8/(const byte) KEY_F7 main::@9/(const byte) KEY_LSHIFT main::@15/(byte) keyboard_key_pressed::key#5 main::@5/(const byte) KEY_F1 )
  [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7
  [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte) 3
  [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0
  [117] call keyboard_matrix_read 
  [118] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0
  to:keyboard_key_pressed::@1
keyboard_key_pressed::@1: scope:[keyboard_key_pressed]  from keyboard_key_pressed
  [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2
  [120] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#0)
  to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed]  from keyboard_key_pressed::@1
  [121] return 
  to:@return

(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
keyboard_matrix_read: scope:[keyboard_matrix_read]  from keyboard_key_pressed
  [122] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0)
  [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B)
  to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read]  from keyboard_matrix_read
  [124] return 
  to:@return

(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
keyboard_get_keycode: scope:[keyboard_get_keycode]  from main::@12
  [125] (byte) keyboard_get_keycode::return#0 ← *((const byte*) keyboard_char_keycodes + (byte) keyboard_get_keycode::ch#0)
  to:keyboard_get_keycode::@return
keyboard_get_keycode::@return: scope:[keyboard_get_keycode]  from keyboard_get_keycode
  [126] return 
  to:@return

(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at)
print_str_at: scope:[print_str_at]  from main::@17 main::@18 main::@19 main::@3
  [127] (byte*) print_str_at::at#7 ← phi( main::@17/(const byte*) SCREEN+(byte) 1+(byte) $a main::@3/(const byte*) SCREEN+(byte) 1 main::@18/(const byte*) SCREEN+(byte) 1+(byte) $14 main::@19/(const byte*) SCREEN+(byte) 1+(byte) $1e )
  [127] (byte*) print_str_at::str#7 ← phi( main::@17/(const byte*) main::str1 main::@3/(const byte*) main::str main::@18/(const byte*) main::str2 main::@19/(const byte*) main::str3 )
  to:print_str_at::@1
print_str_at::@1: scope:[print_str_at]  from print_str_at print_str_at::@2
  [128] (byte*) print_str_at::at#5 ← phi( print_str_at/(byte*) print_str_at::at#7 print_str_at::@2/(byte*) print_str_at::at#4 )
  [128] (byte*) print_str_at::str#5 ← phi( print_str_at/(byte*) print_str_at::str#7 print_str_at::@2/(byte*) print_str_at::str#4 )
  [129] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2
  to:print_str_at::@return
print_str_at::@return: scope:[print_str_at]  from print_str_at::@1
  [130] return 
  to:@return
print_str_at::@2: scope:[print_str_at]  from print_str_at::@1
  [131] *((byte*) print_str_at::at#5) ← *((byte*) print_str_at::str#5)
  [132] (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5
  [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5
  to:print_str_at::@1


VARIABLE REGISTER WEIGHTS
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
(byte) keyboard_get_keycode::ch
(byte) keyboard_get_keycode::ch#0 103.0
(byte) keyboard_get_keycode::return
(byte) keyboard_get_keycode::return#0 34.33333333333333
(byte) keyboard_get_keycode::return#2 202.0
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
(byte~) keyboard_key_pressed::$2 4.0
(byte) keyboard_key_pressed::colidx
(byte) keyboard_key_pressed::colidx#0 0.6666666666666666
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::key#5 202.0
(byte) keyboard_key_pressed::key#6 52.5
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::return#0 19.75
(byte) keyboard_key_pressed::return#10 22.0
(byte) keyboard_key_pressed::return#11 22.0
(byte) keyboard_key_pressed::return#12 22.0
(byte) keyboard_key_pressed::return#13 22.0
(byte) keyboard_key_pressed::return#14 202.0
(byte) keyboard_key_pressed::return#2 22.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 4.0
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte) keyboard_matrix_read::return
(byte) keyboard_matrix_read::return#0 1.3333333333333333
(byte) keyboard_matrix_read::return#2 4.0
(byte) keyboard_matrix_read::row_pressed_bits
(byte) keyboard_matrix_read::rowid
(byte) keyboard_matrix_read::rowid#0 4.0
(void()) main()
(byte~) main::$15 22.0
(byte~) main::$18 22.0
(byte~) main::$21 22.0
(byte~) main::$24 22.0
(byte~) main::$27 22.0
(byte) main::ch
(byte) main::ch#1 151.5
(byte) main::ch#2 25.25
(byte) main::cur_pos
(byte) main::cur_pos#11 8.52
(byte) main::cur_pos#18 3.6666666666666665
(byte) main::cur_pos#20 3.6666666666666665
(byte) main::cur_pos#22 3.6666666666666665
(byte) main::cur_pos#24 18.666666666666664
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 11.0
(byte) main::key
(byte) main::key#0 151.5
(byte) main::pressed
(byte) main::pressed#1 202.0
(byte) main::pressed#2 202.0
(byte*) main::sc
(byte*) main::sc#1 22.0
(byte*) main::sc#2 14.666666666666666
(byte) main::shift
(byte) main::shift#9 5.315789473684211
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
(byte~) mul8u::$1 2002.0
(byte) mul8u::a
(byte) mul8u::a#0 1001.0
(byte) mul8u::a#1 2.0
(byte) mul8u::a#2 667.6666666666667
(byte) mul8u::b
(word) mul8u::mb
(word) mul8u::mb#1 2002.0
(word) mul8u::mb#2 429.0
(word) mul8u::res
(word) mul8u::res#1 2002.0
(word) mul8u::res#2 500.83333333333337
(word) mul8u::res#6 1001.0
(word) mul8u::return
(word) mul8u::return#2 4.0
(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift)
(word~) plot_chargen::$0 4.0
(word~) plot_chargen::$1 4.0
(byte~) plot_chargen::$10 20002.0
(word~) plot_chargen::$7 4.0
(byte) plot_chargen::bits
(byte) plot_chargen::bits#0 2002.0
(byte) plot_chargen::bits#1 6667.333333333333
(byte) plot_chargen::bits#2 4429.142857142857
(byte) plot_chargen::c
(byte) plot_chargen::c#2 10001.0
(byte) plot_chargen::ch
(byte) plot_chargen::ch#1 101.0
(byte) plot_chargen::ch#2 50.5
(byte*) plot_chargen::chargen
(byte*) plot_chargen::chargen#0 3.0
(byte*) plot_chargen::chargen#1 4.0
(byte*) plot_chargen::chargen#5 45.68181818181818
(byte) plot_chargen::pos
(byte) plot_chargen::pos#0 22.0
(byte) plot_chargen::pos#1 67.33333333333333
(byte) plot_chargen::pos#2 12.666666666666664
(byte*) plot_chargen::sc
(byte*) plot_chargen::sc#0 4.0
(byte*) plot_chargen::sc#1 5250.75
(byte*) plot_chargen::sc#2 667.3333333333334
(byte*) plot_chargen::sc#3 5167.333333333333
(byte*) plot_chargen::sc#7 1002.0
(byte) plot_chargen::shift
(byte) plot_chargen::shift#1 202.0
(byte) plot_chargen::shift#2 20.599999999999998
(byte) plot_chargen::x
(byte) plot_chargen::x#1 15001.5
(byte) plot_chargen::x#2 2500.25
(byte) plot_chargen::y
(byte) plot_chargen::y#1 1501.5
(byte) plot_chargen::y#2 231.0
(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at)
(byte*) print_str_at::at
(byte*) print_str_at::at#4 11.0
(byte*) print_str_at::at#5 11.666666666666666
(byte*) print_str_at::at#7 2.0
(byte*) print_str_at::str
(byte*) print_str_at::str#4 22.0
(byte*) print_str_at::str#5 11.5
(byte*) print_str_at::str#7 2.0

Initial phi equivalence classes
[ main::sc#2 main::sc#1 ]
[ main::i#2 main::i#1 ]
[ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
[ main::shift#9 ]
[ main::ch#2 main::ch#1 ]
[ main::pressed#2 main::pressed#1 ]
[ plot_chargen::ch#2 plot_chargen::ch#1 ]
[ plot_chargen::shift#2 plot_chargen::shift#1 ]
[ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
[ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ]
[ plot_chargen::y#2 plot_chargen::y#1 ]
[ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
[ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ]
[ plot_chargen::x#2 plot_chargen::x#1 ]
[ plot_chargen::c#2 ]
[ mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
[ mul8u::res#2 mul8u::res#6 mul8u::res#1 ]
[ mul8u::mb#2 mul8u::mb#1 ]
[ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
[ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ]
[ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]
Added variable keyboard_key_pressed::return#2 to live range equivalence class [ keyboard_key_pressed::return#2 ]
Added variable main::$15 to live range equivalence class [ main::$15 ]
Added variable keyboard_key_pressed::return#10 to live range equivalence class [ keyboard_key_pressed::return#10 ]
Added variable main::$18 to live range equivalence class [ main::$18 ]
Added variable keyboard_key_pressed::return#11 to live range equivalence class [ keyboard_key_pressed::return#11 ]
Added variable main::$21 to live range equivalence class [ main::$21 ]
Added variable keyboard_key_pressed::return#12 to live range equivalence class [ keyboard_key_pressed::return#12 ]
Added variable main::$24 to live range equivalence class [ main::$24 ]
Added variable keyboard_key_pressed::return#13 to live range equivalence class [ keyboard_key_pressed::return#13 ]
Added variable main::$27 to live range equivalence class [ main::$27 ]
Added variable keyboard_get_keycode::ch#0 to live range equivalence class [ keyboard_get_keycode::ch#0 ]
Added variable keyboard_get_keycode::return#2 to live range equivalence class [ keyboard_get_keycode::return#2 ]
Added variable main::key#0 to live range equivalence class [ main::key#0 ]
Added variable keyboard_key_pressed::return#14 to live range equivalence class [ keyboard_key_pressed::return#14 ]
Added variable plot_chargen::$0 to live range equivalence class [ plot_chargen::$0 ]
Added variable plot_chargen::$1 to live range equivalence class [ plot_chargen::$1 ]
Added variable mul8u::return#2 to live range equivalence class [ mul8u::return#2 ]
Added variable plot_chargen::$7 to live range equivalence class [ plot_chargen::$7 ]
Added variable plot_chargen::$10 to live range equivalence class [ plot_chargen::$10 ]
Added variable mul8u::$1 to live range equivalence class [ mul8u::$1 ]
Added variable keyboard_key_pressed::colidx#0 to live range equivalence class [ keyboard_key_pressed::colidx#0 ]
Added variable keyboard_key_pressed::rowidx#0 to live range equivalence class [ keyboard_key_pressed::rowidx#0 ]
Added variable keyboard_matrix_read::rowid#0 to live range equivalence class [ keyboard_matrix_read::rowid#0 ]
Added variable keyboard_matrix_read::return#2 to live range equivalence class [ keyboard_matrix_read::return#2 ]
Added variable keyboard_key_pressed::$2 to live range equivalence class [ keyboard_key_pressed::$2 ]
Added variable keyboard_key_pressed::return#0 to live range equivalence class [ keyboard_key_pressed::return#0 ]
Added variable keyboard_matrix_read::return#0 to live range equivalence class [ keyboard_matrix_read::return#0 ]
Added variable keyboard_get_keycode::return#0 to live range equivalence class [ keyboard_get_keycode::return#0 ]
Complete equivalence classes
[ main::sc#2 main::sc#1 ]
[ main::i#2 main::i#1 ]
[ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
[ main::shift#9 ]
[ main::ch#2 main::ch#1 ]
[ main::pressed#2 main::pressed#1 ]
[ plot_chargen::ch#2 plot_chargen::ch#1 ]
[ plot_chargen::shift#2 plot_chargen::shift#1 ]
[ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
[ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ]
[ plot_chargen::y#2 plot_chargen::y#1 ]
[ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
[ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ]
[ plot_chargen::x#2 plot_chargen::x#1 ]
[ plot_chargen::c#2 ]
[ mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
[ mul8u::res#2 mul8u::res#6 mul8u::res#1 ]
[ mul8u::mb#2 mul8u::mb#1 ]
[ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
[ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ]
[ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]
[ keyboard_key_pressed::return#2 ]
[ main::$15 ]
[ keyboard_key_pressed::return#10 ]
[ main::$18 ]
[ keyboard_key_pressed::return#11 ]
[ main::$21 ]
[ keyboard_key_pressed::return#12 ]
[ main::$24 ]
[ keyboard_key_pressed::return#13 ]
[ main::$27 ]
[ keyboard_get_keycode::ch#0 ]
[ keyboard_get_keycode::return#2 ]
[ main::key#0 ]
[ keyboard_key_pressed::return#14 ]
[ plot_chargen::$0 ]
[ plot_chargen::$1 ]
[ mul8u::return#2 ]
[ plot_chargen::$7 ]
[ plot_chargen::$10 ]
[ mul8u::$1 ]
[ keyboard_key_pressed::colidx#0 ]
[ keyboard_key_pressed::rowidx#0 ]
[ keyboard_matrix_read::rowid#0 ]
[ keyboard_matrix_read::return#2 ]
[ keyboard_key_pressed::$2 ]
[ keyboard_key_pressed::return#0 ]
[ keyboard_matrix_read::return#0 ]
[ keyboard_get_keycode::return#0 ]
Allocated zp[2]:2 [ main::sc#2 main::sc#1 ]
Allocated zp[1]:4 [ main::i#2 main::i#1 ]
Allocated zp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
Allocated zp[1]:6 [ main::shift#9 ]
Allocated zp[1]:7 [ main::ch#2 main::ch#1 ]
Allocated zp[1]:8 [ main::pressed#2 main::pressed#1 ]
Allocated zp[1]:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ]
Allocated zp[1]:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ]
Allocated zp[1]:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
Allocated zp[2]:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ]
Allocated zp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ]
Allocated zp[1]:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Allocated zp[2]:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ]
Allocated zp[1]:18 [ plot_chargen::x#2 plot_chargen::x#1 ]
Allocated zp[1]:19 [ plot_chargen::c#2 ]
Allocated zp[1]:20 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
Allocated zp[2]:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ]
Allocated zp[2]:23 [ mul8u::mb#2 mul8u::mb#1 ]
Allocated zp[1]:25 [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
Allocated zp[2]:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ]
Allocated zp[2]:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]
Allocated zp[1]:30 [ keyboard_key_pressed::return#2 ]
Allocated zp[1]:31 [ main::$15 ]
Allocated zp[1]:32 [ keyboard_key_pressed::return#10 ]
Allocated zp[1]:33 [ main::$18 ]
Allocated zp[1]:34 [ keyboard_key_pressed::return#11 ]
Allocated zp[1]:35 [ main::$21 ]
Allocated zp[1]:36 [ keyboard_key_pressed::return#12 ]
Allocated zp[1]:37 [ main::$24 ]
Allocated zp[1]:38 [ keyboard_key_pressed::return#13 ]
Allocated zp[1]:39 [ main::$27 ]
Allocated zp[1]:40 [ keyboard_get_keycode::ch#0 ]
Allocated zp[1]:41 [ keyboard_get_keycode::return#2 ]
Allocated zp[1]:42 [ main::key#0 ]
Allocated zp[1]:43 [ keyboard_key_pressed::return#14 ]
Allocated zp[2]:44 [ plot_chargen::$0 ]
Allocated zp[2]:46 [ plot_chargen::$1 ]
Allocated zp[2]:48 [ mul8u::return#2 ]
Allocated zp[2]:50 [ plot_chargen::$7 ]
Allocated zp[1]:52 [ plot_chargen::$10 ]
Allocated zp[1]:53 [ mul8u::$1 ]
Allocated zp[1]:54 [ keyboard_key_pressed::colidx#0 ]
Allocated zp[1]:55 [ keyboard_key_pressed::rowidx#0 ]
Allocated zp[1]:56 [ keyboard_matrix_read::rowid#0 ]
Allocated zp[1]:57 [ keyboard_matrix_read::return#2 ]
Allocated zp[1]:58 [ keyboard_key_pressed::$2 ]
Allocated zp[1]:59 [ keyboard_key_pressed::return#0 ]
Allocated zp[1]:60 [ keyboard_matrix_read::return#0 ]
Allocated zp[1]:61 [ keyboard_get_keycode::return#0 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Allows analysis of the CHARGEN ROM font
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // The address of the CHARGEN character set
  .label CHARGEN = $d000
  // CIA#1 Port A: keyboard matrix columns and joystick #2
  .label CIA1_PORT_A = $dc00
  // CIA#1 Port B: keyboard matrix rows and joystick #1.
  .label CIA1_PORT_B = $dc01
  .const KEY_F7 = 3
  .const KEY_F1 = 4
  .const KEY_F3 = 5
  .const KEY_F5 = 6
  .const KEY_3 = 8
  .const KEY_W = 9
  .const KEY_A = $a
  .const KEY_4 = $b
  .const KEY_Z = $c
  .const KEY_S = $d
  .const KEY_E = $e
  .const KEY_LSHIFT = $f
  .const KEY_5 = $10
  .const KEY_R = $11
  .const KEY_D = $12
  .const KEY_6 = $13
  .const KEY_C = $14
  .const KEY_F = $15
  .const KEY_T = $16
  .const KEY_X = $17
  .const KEY_7 = $18
  .const KEY_Y = $19
  .const KEY_G = $1a
  .const KEY_8 = $1b
  .const KEY_B = $1c
  .const KEY_H = $1d
  .const KEY_U = $1e
  .const KEY_V = $1f
  .const KEY_9 = $20
  .const KEY_I = $21
  .const KEY_J = $22
  .const KEY_0 = $23
  .const KEY_M = $24
  .const KEY_K = $25
  .const KEY_O = $26
  .const KEY_N = $27
  .const KEY_PLUS = $28
  .const KEY_P = $29
  .const KEY_L = $2a
  .const KEY_MINUS = $2b
  .const KEY_DOT = $2c
  .const KEY_COLON = $2d
  .const KEY_AT = $2e
  .const KEY_COMMA = $2f
  .const KEY_POUND = $30
  .const KEY_ASTERISK = $31
  .const KEY_SEMICOLON = $32
  .const KEY_EQUALS = $35
  .const KEY_ARROW_UP = $36
  .const KEY_SLASH = $37
  .const KEY_1 = $38
  .const KEY_ARROW_LEFT = $39
  .const KEY_2 = $3b
  .const KEY_SPACE = $3c
  .const KEY_Q = $3e
  .label SCREEN = $400
  // @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 __15 = $1f
    .label __18 = $21
    .label __21 = $23
    .label __24 = $25
    .label __27 = $27
    .label sc = 2
    .label i = 4
    .label key = $2a
    .label pressed = 8
    .label ch = 7
    // Which char canvas to use
    .label cur_pos = 5
    // Is shift pressed
    .label shift = 6
    // [5] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [5] phi (byte*) main::sc#2 = (const byte*) SCREEN [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z sc
    lda #>SCREEN
    sta.z sc+1
    jmp __b1
  // Clear screen
    // main::@1
  __b1:
    // [6] if((byte*) main::sc#2<(const byte*) SCREEN+(word) $3e8) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z sc+1
    cmp #>SCREEN+$3e8
    bcc __b2
    bne !+
    lda.z sc
    cmp #<SCREEN+$3e8
    bcc __b2
  !:
    // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
  __b3_from___b1:
    jmp __b3
    // main::@3
  __b3:
    // [8] call print_str_at 
    // [127] phi from main::@3 to print_str_at [phi:main::@3->print_str_at]
  print_str_at_from___b3:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1 [phi:main::@3->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta.z print_str_at.at
    lda #>SCREEN+1
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str [phi:main::@3->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_at.str
    lda #>str
    sta.z print_str_at.str+1
    jsr print_str_at
    // [9] phi from main::@3 to main::@17 [phi:main::@3->main::@17]
  __b17_from___b3:
    jmp __b17
    // main::@17
  __b17:
    // [10] call print_str_at 
    // [127] phi from main::@17 to print_str_at [phi:main::@17->print_str_at]
  print_str_at_from___b17:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $a [phi:main::@17->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$a
    sta.z print_str_at.at
    lda #>SCREEN+1+$a
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str1 [phi:main::@17->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str_at.str
    lda #>str1
    sta.z print_str_at.str+1
    jsr print_str_at
    // [11] phi from main::@17 to main::@18 [phi:main::@17->main::@18]
  __b18_from___b17:
    jmp __b18
    // main::@18
  __b18:
    // [12] call print_str_at 
    // [127] phi from main::@18 to print_str_at [phi:main::@18->print_str_at]
  print_str_at_from___b18:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $14 [phi:main::@18->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$14
    sta.z print_str_at.at
    lda #>SCREEN+1+$14
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str2 [phi:main::@18->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str2
    sta.z print_str_at.str
    lda #>str2
    sta.z print_str_at.str+1
    jsr print_str_at
    // [13] phi from main::@18 to main::@19 [phi:main::@18->main::@19]
  __b19_from___b18:
    jmp __b19
    // main::@19
  __b19:
    // [14] call print_str_at 
    // [127] phi from main::@19 to print_str_at [phi:main::@19->print_str_at]
  print_str_at_from___b19:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $1e [phi:main::@19->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$1e
    sta.z print_str_at.at
    lda #>SCREEN+1+$1e
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str3 [phi:main::@19->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str3
    sta.z print_str_at.str
    lda #>str3
    sta.z print_str_at.str+1
    jsr print_str_at
    // [15] phi from main::@19 to main::@4 [phi:main::@19->main::@4]
  __b4_from___b19:
    // [15] phi (byte) main::i#2 = (byte) 0 [phi:main::@19->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp __b4
    // [15] phi from main::@20 to main::@4 [phi:main::@20->main::@4]
  __b4_from___b20:
    // [15] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@20->main::@4#0] -- register_copy 
    jmp __b4
    // main::@4
  __b4:
    // [16] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuz1=vbuz2 
    lda.z i
    sta.z plot_chargen.pos
    // [17] call plot_chargen 
    // [71] phi from main::@4 to plot_chargen [phi:main::@4->plot_chargen]
  plot_chargen_from___b4:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@4->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) 0 [phi:main::@4->plot_chargen#1] -- vbuz1=vbuc1 
    lda #0
    sta.z plot_chargen.shift
    // [71] phi (byte) plot_chargen::ch#2 = (byte) $20 [phi:main::@4->plot_chargen#2] -- vbuz1=vbuc1 
    lda #$20
    sta.z plot_chargen.ch
    jsr plot_chargen
    jmp __b20
    // main::@20
  __b20:
    // [18] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [19] if((byte) main::i#1!=(byte) 4) goto main::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp.z i
    bne __b4_from___b20
    // [20] phi from main::@20 to main::@5 [phi:main::@20->main::@5]
  __b5_from___b20:
    // [20] phi (byte) main::cur_pos#24 = (byte) 0 [phi:main::@20->main::@5#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cur_pos
    jmp __b5
    // main::@5
  __b5:
    // [21] call keyboard_key_pressed 
    // [113] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed]
  keyboard_key_pressed_from___b5:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1 [phi:main::@5->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F1
    sta.z keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [22] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return
    sta.z keyboard_key_pressed.return_1
    jmp __b21
    // main::@21
  __b21:
    // [23] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return_1
    sta.z __15
    // [24] if((byte~) main::$15==(byte) 0) goto main::@28 -- vbuz1_eq_0_then_la1 
    lda.z __15
    cmp #0
    beq __b28_from___b21
    // [26] phi from main::@21 to main::@6 [phi:main::@21->main::@6]
  __b6_from___b21:
    // [26] phi (byte) main::cur_pos#22 = (byte) 0 [phi:main::@21->main::@6#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cur_pos
    jmp __b6
    // [25] phi from main::@21 to main::@28 [phi:main::@21->main::@28]
  __b28_from___b21:
    jmp __b28
    // main::@28
  __b28:
    // [26] phi from main::@28 to main::@6 [phi:main::@28->main::@6]
  __b6_from___b28:
    // [26] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@28->main::@6#0] -- register_copy 
    jmp __b6
    // main::@6
  __b6:
    // [27] call keyboard_key_pressed 
    // [113] phi from main::@6 to keyboard_key_pressed [phi:main::@6->keyboard_key_pressed]
  keyboard_key_pressed_from___b6:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F3 [phi:main::@6->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F3
    sta.z keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [28] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return
    sta.z keyboard_key_pressed.return_2
    jmp __b22
    // main::@22
  __b22:
    // [29] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return_2
    sta.z __18
    // [30] if((byte~) main::$18==(byte) 0) goto main::@29 -- vbuz1_eq_0_then_la1 
    lda.z __18
    cmp #0
    beq __b29_from___b22
    // [32] phi from main::@22 to main::@7 [phi:main::@22->main::@7]
  __b7_from___b22:
    // [32] phi (byte) main::cur_pos#20 = (byte) 1 [phi:main::@22->main::@7#0] -- vbuz1=vbuc1 
    lda #1
    sta.z cur_pos
    jmp __b7
    // [31] phi from main::@22 to main::@29 [phi:main::@22->main::@29]
  __b29_from___b22:
    jmp __b29
    // main::@29
  __b29:
    // [32] phi from main::@29 to main::@7 [phi:main::@29->main::@7]
  __b7_from___b29:
    // [32] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@29->main::@7#0] -- register_copy 
    jmp __b7
    // main::@7
  __b7:
    // [33] call keyboard_key_pressed 
    // [113] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed]
  keyboard_key_pressed_from___b7:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F5 [phi:main::@7->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F5
    sta.z keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [34] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return
    sta.z keyboard_key_pressed.return_3
    jmp __b23
    // main::@23
  __b23:
    // [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return_3
    sta.z __21
    // [36] if((byte~) main::$21==(byte) 0) goto main::@30 -- vbuz1_eq_0_then_la1 
    lda.z __21
    cmp #0
    beq __b30_from___b23
    // [38] phi from main::@23 to main::@8 [phi:main::@23->main::@8]
  __b8_from___b23:
    // [38] phi (byte) main::cur_pos#18 = (byte) 2 [phi:main::@23->main::@8#0] -- vbuz1=vbuc1 
    lda #2
    sta.z cur_pos
    jmp __b8
    // [37] phi from main::@23 to main::@30 [phi:main::@23->main::@30]
  __b30_from___b23:
    jmp __b30
    // main::@30
  __b30:
    // [38] phi from main::@30 to main::@8 [phi:main::@30->main::@8]
  __b8_from___b30:
    // [38] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@30->main::@8#0] -- register_copy 
    jmp __b8
    // main::@8
  __b8:
    // [39] call keyboard_key_pressed 
    // [113] phi from main::@8 to keyboard_key_pressed [phi:main::@8->keyboard_key_pressed]
  keyboard_key_pressed_from___b8:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F7 [phi:main::@8->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F7
    sta.z keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [40] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return
    sta.z keyboard_key_pressed.return_4
    jmp __b24
    // main::@24
  __b24:
    // [41] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return_4
    sta.z __24
    // [42] if((byte~) main::$24==(byte) 0) goto main::@31 -- vbuz1_eq_0_then_la1 
    lda.z __24
    cmp #0
    beq __b31_from___b24
    // [44] phi from main::@24 to main::@9 [phi:main::@24->main::@9]
  __b9_from___b24:
    // [44] phi (byte) main::cur_pos#11 = (byte) 3 [phi:main::@24->main::@9#0] -- vbuz1=vbuc1 
    lda #3
    sta.z cur_pos
    jmp __b9
    // [43] phi from main::@24 to main::@31 [phi:main::@24->main::@31]
  __b31_from___b24:
    jmp __b31
    // main::@31
  __b31:
    // [44] phi from main::@31 to main::@9 [phi:main::@31->main::@9]
  __b9_from___b31:
    // [44] phi (byte) main::cur_pos#11 = (byte) main::cur_pos#18 [phi:main::@31->main::@9#0] -- register_copy 
    jmp __b9
    // main::@9
  __b9:
    // [45] call keyboard_key_pressed 
    // [113] phi from main::@9 to keyboard_key_pressed [phi:main::@9->keyboard_key_pressed]
  keyboard_key_pressed_from___b9:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_LSHIFT [phi:main::@9->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_LSHIFT
    sta.z keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [46] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return
    sta.z keyboard_key_pressed.return_5
    jmp __b25
    // main::@25
  __b25:
    // [47] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return_5
    sta.z __27
    // [48] if((byte~) main::$27!=(byte) 0) goto main::@10 -- vbuz1_neq_0_then_la1 
    lda.z __27
    cmp #0
    bne __b10_from___b25
    // [50] phi from main::@25 to main::@11 [phi:main::@25->main::@11]
  __b11_from___b25:
    // [50] phi (byte) main::shift#9 = (byte) 0 [phi:main::@25->main::@11#0] -- vbuz1=vbuc1 
    lda #0
    sta.z shift
    jmp __b11
    // [49] phi from main::@25 to main::@10 [phi:main::@25->main::@10]
  __b10_from___b25:
    jmp __b10
    // main::@10
  __b10:
    // [50] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  __b11_from___b10:
    // [50] phi (byte) main::shift#9 = (byte) 1 [phi:main::@10->main::@11#0] -- vbuz1=vbuc1 
    lda #1
    sta.z shift
    jmp __b11
    // main::@11
  __b11:
    // [51] phi from main::@11 to main::@12 [phi:main::@11->main::@12]
  __b12_from___b11:
    // [51] phi (byte) main::ch#2 = (byte) 0 [phi:main::@11->main::@12#0] -- vbuz1=vbuc1 
    lda #0
    sta.z ch
    jmp __b12
  // Check for key presses - and plot char if found
    // [51] phi from main::@14 to main::@12 [phi:main::@14->main::@12]
  __b12_from___b14:
    // [51] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@14->main::@12#0] -- register_copy 
    jmp __b12
    // main::@12
  __b12:
    // [52] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuz1=vbuz2 
    lda.z ch
    sta.z keyboard_get_keycode.ch
    // [53] call keyboard_get_keycode 
    jsr keyboard_get_keycode
    // [54] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_get_keycode.return
    sta.z keyboard_get_keycode.return_1
    jmp __b26
    // main::@26
  __b26:
    // [55] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2 -- vbuz1=vbuz2 
    lda.z keyboard_get_keycode.return_1
    sta.z key
    // [56] if((byte) main::key#0==(byte) $3f) goto main::@13 -- vbuz1_eq_vbuc1_then_la1 
    lda #$3f
    cmp.z key
    beq __b13_from___b26
    jmp __b15
    // main::@15
  __b15:
    // [57] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuz1=vbuz2 
    lda.z key
    sta.z keyboard_key_pressed.key
    // [58] call keyboard_key_pressed 
    // [113] phi from main::@15 to keyboard_key_pressed [phi:main::@15->keyboard_key_pressed]
  keyboard_key_pressed_from___b15:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@15->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
    // [59] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return
    sta.z keyboard_key_pressed.return_6
    jmp __b27
    // main::@27
  __b27:
    // [60] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14 -- vbuz1=vbuz2 
    lda.z keyboard_key_pressed.return_6
    sta.z pressed
    // [61] phi from main::@27 to main::@13 [phi:main::@27->main::@13]
  __b13_from___b27:
    // [61] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@27->main::@13#0] -- register_copy 
    jmp __b13
    // [61] phi from main::@26 to main::@13 [phi:main::@26->main::@13]
  __b13_from___b26:
    // [61] phi (byte) main::pressed#2 = (byte) 0 [phi:main::@26->main::@13#0] -- vbuz1=vbuc1 
    lda #0
    sta.z pressed
    jmp __b13
    // main::@13
  __b13:
    // [62] if((byte) main::pressed#2==(byte) 0) goto main::@14 -- vbuz1_eq_0_then_la1 
    lda.z pressed
    cmp #0
    beq __b14
    jmp __b16
    // main::@16
  __b16:
    // [63] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11 -- vbuz1=vbuz2 
    lda.z cur_pos
    sta.z plot_chargen.pos
    // [64] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuz1=vbuz2 
    lda.z ch
    sta.z plot_chargen.ch
    // [65] (byte) plot_chargen::shift#1 ← (byte) main::shift#9 -- vbuz1=vbuz2 
    lda.z shift
    sta.z plot_chargen.shift
    // [66] call plot_chargen 
    // [71] phi from main::@16 to plot_chargen [phi:main::@16->plot_chargen]
  plot_chargen_from___b16:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@16->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@16->plot_chargen#1] -- register_copy 
    // [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@16->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    jmp __b14
    // main::@14
  __b14:
    // [67] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc.z ch
    // [68] if((byte) main::ch#1!=(byte) $40) goto main::@12 -- vbuz1_neq_vbuc1_then_la1 
    lda #$40
    cmp.z ch
    bne __b12_from___b14
    // [20] phi from main::@14 to main::@5 [phi:main::@14->main::@5]
  __b5_from___b14:
    // [20] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#11 [phi:main::@14->main::@5#0] -- register_copy 
    jmp __b5
    // main::@2
  __b2:
    // [69] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // [70] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc.z sc
    bne !+
    inc.z sc+1
  !:
    // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
  __b1_from___b2:
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@2->main::@1#0] -- register_copy 
    jmp __b1
    str: .text "f1"
    .byte 0
    str1: .text "f3"
    .byte 0
    str2: .text "f5"
    .byte 0
    str3: .text "f7"
    .byte 0
}
  // plot_chargen
// Render 8x8 char (ch) as pixels on char canvas #pos
// plot_chargen(byte zp($b) pos, byte zp(9) ch, byte zp($a) shift)
plot_chargen: {
    .label __0 = $2c
    .label __1 = $2e
    .label __7 = $32
    .label __10 = $34
    .label pos = $b
    .label ch = 9
    .label shift = $a
    .label chargen = $c
    .label sc = $10
    .label bits = $f
    .label x = $12
    .label y = $e
    .label c = $13
    // asm { sei  }
    sei
    // [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2 -- vwuz1=_word_vbuz2 
    lda.z ch
    sta.z __0
    lda #0
    sta.z __0+1
    // [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 -- vwuz1=vwuz2_rol_3 
    lda.z __0
    asl
    sta.z __1
    lda.z __0+1
    rol
    sta.z __1+1
    asl.z __1
    rol.z __1+1
    asl.z __1
    rol.z __1+1
    // [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN + (word~) plot_chargen::$1 -- pbuz1=pbuc1_plus_vwuz2 
    lda.z __1
    clc
    adc #<CHARGEN
    sta.z chargen
    lda.z __1+1
    adc #>CHARGEN
    sta.z chargen+1
    // [76] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1 -- vbuz1_eq_0_then_la1 
    lda.z shift
    cmp #0
    beq __b1_from_plot_chargen
    jmp __b2
    // plot_chargen::@2
  __b2:
    // [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word) $800 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z chargen
    adc #<$800
    sta.z chargen
    lda.z chargen+1
    adc #>$800
    sta.z chargen+1
    // [78] phi from plot_chargen plot_chargen::@2 to plot_chargen::@1 [phi:plot_chargen/plot_chargen::@2->plot_chargen::@1]
  __b1_from_plot_chargen:
  __b1_from___b2:
    // [78] phi (byte*) plot_chargen::chargen#5 = (byte*) plot_chargen::chargen#0 [phi:plot_chargen/plot_chargen::@2->plot_chargen::@1#0] -- register_copy 
    jmp __b1
    // plot_chargen::@1
  __b1:
    // [79] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
    // [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2 -- vbuz1=vbuz2 
    lda.z pos
    sta.z mul8u.a
    // [81] call mul8u 
    // [103] phi from plot_chargen::@1 to mul8u [phi:plot_chargen::@1->mul8u]
  mul8u_from___b1:
    jsr mul8u
    // [82] (word) mul8u::return#2 ← (word) mul8u::res#2 -- vwuz1=vwuz2 
    lda.z mul8u.res
    sta.z mul8u.return
    lda.z mul8u.res+1
    sta.z mul8u.return+1
    jmp __b9
    // plot_chargen::@9
  __b9:
    // [83] (word~) plot_chargen::$7 ← (word) mul8u::return#2 -- vwuz1=vwuz2 
    lda.z mul8u.return
    sta.z __7
    lda.z mul8u.return+1
    sta.z __7+1
    // [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 -- pbuz1=pbuc1_plus_vwuz2 
    lda.z __7
    clc
    adc #<SCREEN+$28+1
    sta.z sc
    lda.z __7+1
    adc #>SCREEN+$28+1
    sta.z sc+1
    // [85] phi from plot_chargen::@9 to plot_chargen::@3 [phi:plot_chargen::@9->plot_chargen::@3]
  __b3_from___b9:
    // [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#0 [phi:plot_chargen::@9->plot_chargen::@3#0] -- register_copy 
    // [85] phi (byte) plot_chargen::y#2 = (byte) 0 [phi:plot_chargen::@9->plot_chargen::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    jmp __b3
    // [85] phi from plot_chargen::@7 to plot_chargen::@3 [phi:plot_chargen::@7->plot_chargen::@3]
  __b3_from___b7:
    // [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#2 [phi:plot_chargen::@7->plot_chargen::@3#0] -- register_copy 
    // [85] phi (byte) plot_chargen::y#2 = (byte) plot_chargen::y#1 [phi:plot_chargen::@7->plot_chargen::@3#1] -- register_copy 
    jmp __b3
    // plot_chargen::@3
  __b3:
    // [86] (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#5 + (byte) plot_chargen::y#2) -- vbuz1=pbuz2_derefidx_vbuz3 
    ldy.z y
    lda (chargen),y
    sta.z bits
    // [87] phi from plot_chargen::@3 to plot_chargen::@4 [phi:plot_chargen::@3->plot_chargen::@4]
  __b4_from___b3:
    // [87] phi (byte) plot_chargen::x#2 = (byte) 0 [phi:plot_chargen::@3->plot_chargen::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta.z x
    // [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#7 [phi:plot_chargen::@3->plot_chargen::@4#1] -- register_copy 
    // [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#0 [phi:plot_chargen::@3->plot_chargen::@4#2] -- register_copy 
    jmp __b4
    // [87] phi from plot_chargen::@5 to plot_chargen::@4 [phi:plot_chargen::@5->plot_chargen::@4]
  __b4_from___b5:
    // [87] phi (byte) plot_chargen::x#2 = (byte) plot_chargen::x#1 [phi:plot_chargen::@5->plot_chargen::@4#0] -- register_copy 
    // [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#1 [phi:plot_chargen::@5->plot_chargen::@4#1] -- register_copy 
    // [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#1 [phi:plot_chargen::@5->plot_chargen::@4#2] -- register_copy 
    jmp __b4
    // plot_chargen::@4
  __b4:
    // [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 
    lda #$80
    and.z bits
    sta.z __10
    // [89] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5 -- vbuz1_eq_0_then_la1 
    lda.z __10
    cmp #0
    beq __b5_from___b4
    // [90] phi from plot_chargen::@4 to plot_chargen::@6 [phi:plot_chargen::@4->plot_chargen::@6]
  __b6_from___b4:
    jmp __b6
    // plot_chargen::@6
  __b6:
    // [91] phi from plot_chargen::@6 to plot_chargen::@5 [phi:plot_chargen::@6->plot_chargen::@5]
  __b5_from___b6:
    // [91] phi (byte) plot_chargen::c#2 = (byte) '*' [phi:plot_chargen::@6->plot_chargen::@5#0] -- vbuz1=vbuc1 
    lda #'*'
    sta.z c
    jmp __b5
    // [91] phi from plot_chargen::@4 to plot_chargen::@5 [phi:plot_chargen::@4->plot_chargen::@5]
  __b5_from___b4:
    // [91] phi (byte) plot_chargen::c#2 = (byte) '.' [phi:plot_chargen::@4->plot_chargen::@5#0] -- vbuz1=vbuc1 
    lda #'.'
    sta.z c
    jmp __b5
    // plot_chargen::@5
  __b5:
    // [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 -- _deref_pbuz1=vbuz2 
    lda.z c
    ldy #0
    sta (sc),y
    // [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3 -- pbuz1=_inc_pbuz1 
    inc.z sc
    bne !+
    inc.z sc+1
  !:
    // [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl.z bits
    // [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2 -- vbuz1=_inc_vbuz1 
    inc.z x
    // [96] if((byte) plot_chargen::x#1!=(byte) 8) goto plot_chargen::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z x
    bne __b4_from___b5
    jmp __b7
    // plot_chargen::@7
  __b7:
    // [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$20
    clc
    adc.z sc
    sta.z sc
    bcc !+
    inc.z sc+1
  !:
    // [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [99] if((byte) plot_chargen::y#1!=(byte) 8) goto plot_chargen::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z y
    bne __b3_from___b7
    jmp __b8
    // plot_chargen::@8
  __b8:
    // [100] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
    // asm { cli  }
    cli
    jmp __breturn
    // plot_chargen::@return
  __breturn:
    // [102] return 
    rts
}
  // mul8u
// Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word
// mul8u(byte zp($14) a)
mul8u: {
    .const b = $a
    .label __1 = $35
    .label a = $14
    .label mb = $17
    .label res = $15
    .label return = $30
    // [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
  __b1_from_mul8u:
    // [104] phi (word) mul8u::mb#2 = (word)(const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vwuc1 
    lda #<b
    sta.z mb
    lda #>b
    sta.z mb+1
    // [104] phi (word) mul8u::res#2 = (word) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z res
    lda #>0
    sta.z res+1
    // [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#1 [phi:mul8u->mul8u::@1#2] -- register_copy 
    jmp __b1
    // mul8u::@1
  __b1:
    // [105] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -- vbuz1_neq_0_then_la1 
    lda.z a
    cmp #0
    bne __b2
    jmp __breturn
    // mul8u::@return
  __breturn:
    // [106] return 
    rts
    // mul8u::@2
  __b2:
    // [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and.z a
    sta.z __1
    // [108] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuz1_eq_0_then_la1 
    lda.z __1
    cmp #0
    beq __b3_from___b2
    jmp __b4
    // mul8u::@4
  __b4:
    // [109] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 
    lda.z res
    clc
    adc.z mb
    sta.z res
    lda.z res+1
    adc.z mb+1
    sta.z res+1
    // [110] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3]
  __b3_from___b2:
  __b3_from___b4:
    // [110] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy 
    jmp __b3
    // mul8u::@3
  __b3:
    // [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 -- vbuz1=vbuz1_ror_1 
    lsr.z a
    // [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z mb
    rol.z mb+1
    // [104] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1]
  __b1_from___b3:
    // [104] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy 
    // [104] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy 
    // [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy 
    jmp __b1
}
  // keyboard_key_pressed
// Determines whether a specific key is currently pressed by accessing the matrix directly
// The key is a keyboard code defined from the keyboard matrix by %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7)
// All keys exist as as KEY_XXX constants.
// Returns zero if the key is not pressed and a non-zero value if the key is currently pressed
// keyboard_key_pressed(byte zp($19) key)
keyboard_key_pressed: {
    .label __2 = $3a
    .label colidx = $36
    .label rowidx = $37
    .label return = $3b
    .label return_1 = $1e
    .label key = $19
    .label return_2 = $20
    .label return_3 = $22
    .label return_4 = $24
    .label return_5 = $26
    .label return_6 = $2b
    // [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and.z key
    sta.z colidx
    // [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte) 3 -- vbuz1=vbuz2_ror_3 
    lda.z key
    lsr
    lsr
    lsr
    sta.z rowidx
    // [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 -- vbuz1=vbuz2 
    lda.z rowidx
    sta.z keyboard_matrix_read.rowid
    // [117] call keyboard_matrix_read 
    jsr keyboard_matrix_read
    // [118] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 
    lda.z keyboard_matrix_read.return
    sta.z keyboard_matrix_read.return_1
    jmp __b1
    // keyboard_key_pressed::@1
  __b1:
    // [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 
    lda.z keyboard_matrix_read.return_1
    sta.z __2
    // [120] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#0) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 
    lda.z __2
    ldy.z colidx
    and keyboard_matrix_col_bitmask,y
    sta.z return
    jmp __breturn
    // keyboard_key_pressed::@return
  __breturn:
    // [121] return 
    rts
}
  // keyboard_matrix_read
// Read a single row of the keyboard matrix
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
// Returns the keys pressed on the row as bits according to the C64 key matrix.
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
// keyboard_matrix_read(byte zp($38) rowid)
keyboard_matrix_read: {
    .label return = $3c
    .label rowid = $38
    .label return_1 = $39
    // [122] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 
    ldy.z rowid
    lda keyboard_matrix_row_bitmask,y
    sta CIA1_PORT_A
    // [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuz1=_bnot__deref_pbuc1 
    lda CIA1_PORT_B
    eor #$ff
    sta.z return
    jmp __breturn
    // keyboard_matrix_read::@return
  __breturn:
    // [124] return 
    rts
}
  // keyboard_get_keycode
// Get the keycode corresponding to a specific screen code character
// ch is the character to get the key code for ($00-$3f)
// Returns the key code corresponding to the passed character. Only characters with a non-shifted key are handled.
// If there is no non-shifted key representing the char $3f is returned (representing RUN/STOP) .
// keyboard_get_keycode(byte zp($28) ch)
keyboard_get_keycode: {
    .label return = $3d
    .label ch = $28
    .label return_1 = $29
    // [125] (byte) keyboard_get_keycode::return#0 ← *((const byte*) keyboard_char_keycodes + (byte) keyboard_get_keycode::ch#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z ch
    lda keyboard_char_keycodes,y
    sta.z return
    jmp __breturn
    // keyboard_get_keycode::@return
  __breturn:
    // [126] return 
    rts
}
  // print_str_at
// Print a string at a specific screen position
// print_str_at(byte* zp($1a) str, byte* zp($1c) at)
print_str_at: {
    .label at = $1c
    .label str = $1a
    // [128] phi from print_str_at print_str_at::@2 to print_str_at::@1 [phi:print_str_at/print_str_at::@2->print_str_at::@1]
  __b1_from_print_str_at:
  __b1_from___b2:
    // [128] phi (byte*) print_str_at::at#5 = (byte*) print_str_at::at#7 [phi:print_str_at/print_str_at::@2->print_str_at::@1#0] -- register_copy 
    // [128] phi (byte*) print_str_at::str#5 = (byte*) print_str_at::str#7 [phi:print_str_at/print_str_at::@2->print_str_at::@1#1] -- register_copy 
    jmp __b1
    // print_str_at::@1
  __b1:
    // [129] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne __b2
    jmp __breturn
    // print_str_at::@return
  __breturn:
    // [130] return 
    rts
    // print_str_at::@2
  __b2:
    // [131] *((byte*) print_str_at::at#5) ← *((byte*) print_str_at::str#5) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (at),y
    // [132] (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5 -- pbuz1=_inc_pbuz1 
    inc.z at
    bne !+
    inc.z at+1
  !:
    // [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp __b1_from___b2
}
  // File Data
  // Keycodes for each screen code character from $00-$3f.
  // Chars that do not have an unmodified keycode return $3f (representing RUN/STOP).
  keyboard_char_keycodes: .byte KEY_AT, KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, $3f, KEY_POUND, $3f, KEY_ARROW_UP, KEY_ARROW_LEFT, KEY_SPACE, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, KEY_ASTERISK, KEY_PLUS, KEY_COMMA, KEY_MINUS, KEY_DOT, KEY_SLASH, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_COLON, KEY_SEMICOLON, $3f, KEY_EQUALS, $3f, $3f
  // Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
  keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
  // Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
  keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] if((byte*) main::sc#2<(const byte*) SCREEN+(word) $3e8) goto main::@2 [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a 
Statement [69] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a reg byte y 
Statement [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::shift#9 ]
Removing always clobbered register reg byte a as potential for zp[1]:7 [ main::ch#2 main::ch#1 ]
Statement [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] ) always clobbers reg byte a 
Statement [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN + (word~) plot_chargen::$1 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] ) always clobbers reg byte a 
Statement [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word) $800 [ plot_chargen::pos#2 plot_chargen::chargen#1 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] ) always clobbers reg byte a 
Statement [79] *((const byte*) PROCPORT) ← (byte) $32 [ plot_chargen::pos#2 plot_chargen::chargen#5 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#5 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::pos#2 plot_chargen::chargen#5 ] ) always clobbers reg byte a 
Statement [82] (word) mul8u::return#2 ← (word) mul8u::res#2 [ plot_chargen::chargen#5 mul8u::return#2 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 mul8u::return#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 mul8u::return#2 ] ) always clobbers reg byte a 
Statement [83] (word~) plot_chargen::$7 ← (word) mul8u::return#2 [ plot_chargen::chargen#5 plot_chargen::$7 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::$7 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::$7 ] ) always clobbers reg byte a 
Statement [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 [ plot_chargen::chargen#5 plot_chargen::sc#0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::sc#0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::sc#0 ] ) always clobbers reg byte a 
Statement [86] (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#5 + (byte) plot_chargen::y#2) [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ]
Statement [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:4 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:18 [ plot_chargen::x#2 plot_chargen::x#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
Removing always clobbered register reg byte y as potential for zp[1]:6 [ main::shift#9 ]
Removing always clobbered register reg byte y as potential for zp[1]:7 [ main::ch#2 main::ch#1 ]
Statement [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte) $20 [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] ) always clobbers reg byte a 
Statement [100] *((const byte*) PROCPORT) ← (byte) $37 [ ] ( main:2::plot_chargen:17 [ main::i#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 ] ) always clobbers reg byte a 
Statement [109] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] ( main:2::plot_chargen:17::mul8u:81 [ main::i#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] main:2::plot_chargen:66::mul8u:81 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:20 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
Statement [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::keyboard_key_pressed:21 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:27 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:39 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:45 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:58 [ main::cur_pos#11 main::shift#9 main::ch#2 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:54 [ keyboard_key_pressed::colidx#0 ]
Statement [122] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::keyboard_key_pressed:21::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:27::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:39::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:45::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:58::keyboard_matrix_read:117 [ main::cur_pos#11 main::shift#9 main::ch#2 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a 
Statement [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_key_pressed:21::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:27::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:39::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:45::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:58::keyboard_matrix_read:117 [ main::cur_pos#11 main::shift#9 main::ch#2 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a 
Statement [129] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2 [ print_str_at::str#5 print_str_at::at#5 ] ( main:2::print_str_at:8 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:10 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:12 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:14 [ print_str_at::str#5 print_str_at::at#5 ] ) always clobbers reg byte a reg byte y 
Statement [131] *((byte*) print_str_at::at#5) ← *((byte*) print_str_at::str#5) [ print_str_at::str#5 print_str_at::at#5 ] ( main:2::print_str_at:8 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:10 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:12 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:14 [ print_str_at::str#5 print_str_at::at#5 ] ) always clobbers reg byte a reg byte y 
Statement [6] if((byte*) main::sc#2<(const byte*) SCREEN+(word) $3e8) goto main::@2 [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a 
Statement [69] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a reg byte y 
Statement [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] ) always clobbers reg byte a 
Statement [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] ) always clobbers reg byte a 
Statement [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN + (word~) plot_chargen::$1 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] ) always clobbers reg byte a 
Statement [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word) $800 [ plot_chargen::pos#2 plot_chargen::chargen#1 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] ) always clobbers reg byte a 
Statement [79] *((const byte*) PROCPORT) ← (byte) $32 [ plot_chargen::pos#2 plot_chargen::chargen#5 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#5 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::pos#2 plot_chargen::chargen#5 ] ) always clobbers reg byte a 
Statement [82] (word) mul8u::return#2 ← (word) mul8u::res#2 [ plot_chargen::chargen#5 mul8u::return#2 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 mul8u::return#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 mul8u::return#2 ] ) always clobbers reg byte a 
Statement [83] (word~) plot_chargen::$7 ← (word) mul8u::return#2 [ plot_chargen::chargen#5 plot_chargen::$7 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::$7 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::$7 ] ) always clobbers reg byte a 
Statement [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 [ plot_chargen::chargen#5 plot_chargen::sc#0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::sc#0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::sc#0 ] ) always clobbers reg byte a 
Statement [86] (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#5 + (byte) plot_chargen::y#2) [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] ) always clobbers reg byte a reg byte y 
Statement [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 ] ) always clobbers reg byte y 
Statement [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte) $20 [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] ( main:2::plot_chargen:17 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] ) always clobbers reg byte a 
Statement [100] *((const byte*) PROCPORT) ← (byte) $37 [ ] ( main:2::plot_chargen:17 [ main::i#2 ] main:2::plot_chargen:66 [ main::cur_pos#11 main::shift#9 main::ch#2 ] ) always clobbers reg byte a 
Statement [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte) 1 [ mul8u::res#2 mul8u::a#2 mul8u::mb#2 mul8u::$1 ] ( main:2::plot_chargen:17::mul8u:81 [ main::i#2 plot_chargen::chargen#5 mul8u::res#2 mul8u::a#2 mul8u::mb#2 mul8u::$1 ] main:2::plot_chargen:66::mul8u:81 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 mul8u::res#2 mul8u::a#2 mul8u::mb#2 mul8u::$1 ] ) always clobbers reg byte a 
Statement [109] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] ( main:2::plot_chargen:17::mul8u:81 [ main::i#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] main:2::plot_chargen:66::mul8u:81 [ main::cur_pos#11 main::shift#9 main::ch#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a 
Statement [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::keyboard_key_pressed:21 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:27 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:39 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:45 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:58 [ main::cur_pos#11 main::shift#9 main::ch#2 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ) always clobbers reg byte a 
Statement [122] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::keyboard_key_pressed:21::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:27::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:39::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:45::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:58::keyboard_matrix_read:117 [ main::cur_pos#11 main::shift#9 main::ch#2 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a 
Statement [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_key_pressed:21::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:27::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:39::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:45::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:58::keyboard_matrix_read:117 [ main::cur_pos#11 main::shift#9 main::ch#2 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a 
Statement [129] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2 [ print_str_at::str#5 print_str_at::at#5 ] ( main:2::print_str_at:8 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:10 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:12 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:14 [ print_str_at::str#5 print_str_at::at#5 ] ) always clobbers reg byte a reg byte y 
Statement [131] *((byte*) print_str_at::at#5) ← *((byte*) print_str_at::str#5) [ print_str_at::str#5 print_str_at::at#5 ] ( main:2::print_str_at:8 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:10 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:12 [ print_str_at::str#5 print_str_at::at#5 ] main:2::print_str_at:14 [ print_str_at::str#5 print_str_at::at#5 ] ) always clobbers reg byte a reg byte y 
Potential registers zp[2]:2 [ main::sc#2 main::sc#1 ] : zp[2]:2 , 
Potential registers zp[1]:4 [ main::i#2 main::i#1 ] : zp[1]:4 , reg byte x , 
Potential registers zp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ] : zp[1]:5 , reg byte x , 
Potential registers zp[1]:6 [ main::shift#9 ] : zp[1]:6 , reg byte x , 
Potential registers zp[1]:7 [ main::ch#2 main::ch#1 ] : zp[1]:7 , reg byte x , 
Potential registers zp[1]:8 [ main::pressed#2 main::pressed#1 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] : zp[1]:10 , reg byte x , reg byte y , 
Potential registers zp[1]:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ] : zp[1]:11 , reg byte x , reg byte y , 
Potential registers zp[2]:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] : zp[2]:12 , 
Potential registers zp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ] : zp[1]:14 , reg byte x , 
Potential registers zp[1]:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] : zp[1]:15 , reg byte a , reg byte x , 
Potential registers zp[2]:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] : zp[2]:16 , 
Potential registers zp[1]:18 [ plot_chargen::x#2 plot_chargen::x#1 ] : zp[1]:18 , reg byte a , reg byte x , 
Potential registers zp[1]:19 [ plot_chargen::c#2 ] : zp[1]:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:20 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] : zp[1]:20 , reg byte x , reg byte y , 
Potential registers zp[2]:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] : zp[2]:21 , 
Potential registers zp[2]:23 [ mul8u::mb#2 mul8u::mb#1 ] : zp[2]:23 , 
Potential registers zp[1]:25 [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ] : zp[1]:25 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] : zp[2]:26 , 
Potential registers zp[2]:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] : zp[2]:28 , 
Potential registers zp[1]:30 [ keyboard_key_pressed::return#2 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:31 [ main::$15 ] : zp[1]:31 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:32 [ keyboard_key_pressed::return#10 ] : zp[1]:32 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:33 [ main::$18 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:34 [ keyboard_key_pressed::return#11 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:35 [ main::$21 ] : zp[1]:35 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:36 [ keyboard_key_pressed::return#12 ] : zp[1]:36 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:37 [ main::$24 ] : zp[1]:37 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:38 [ keyboard_key_pressed::return#13 ] : zp[1]:38 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:39 [ main::$27 ] : zp[1]:39 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:40 [ keyboard_get_keycode::ch#0 ] : zp[1]:40 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:41 [ keyboard_get_keycode::return#2 ] : zp[1]:41 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:42 [ main::key#0 ] : zp[1]:42 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:43 [ keyboard_key_pressed::return#14 ] : zp[1]:43 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:44 [ plot_chargen::$0 ] : zp[2]:44 , 
Potential registers zp[2]:46 [ plot_chargen::$1 ] : zp[2]:46 , 
Potential registers zp[2]:48 [ mul8u::return#2 ] : zp[2]:48 , 
Potential registers zp[2]:50 [ plot_chargen::$7 ] : zp[2]:50 , 
Potential registers zp[1]:52 [ plot_chargen::$10 ] : zp[1]:52 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:53 [ mul8u::$1 ] : zp[1]:53 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:54 [ keyboard_key_pressed::colidx#0 ] : zp[1]:54 , reg byte x , reg byte y , 
Potential registers zp[1]:55 [ keyboard_key_pressed::rowidx#0 ] : zp[1]:55 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:56 [ keyboard_matrix_read::rowid#0 ] : zp[1]:56 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:57 [ keyboard_matrix_read::return#2 ] : zp[1]:57 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:58 [ keyboard_key_pressed::$2 ] : zp[1]:58 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:59 [ keyboard_key_pressed::return#0 ] : zp[1]:59 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:60 [ keyboard_matrix_read::return#0 ] : zp[1]:60 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:61 [ keyboard_get_keycode::return#0 ] : zp[1]:61 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [plot_chargen] 20,002: zp[1]:52 [ plot_chargen::$10 ] 17,501.75: zp[1]:18 [ plot_chargen::x#2 plot_chargen::x#1 ] 13,098.48: zp[1]:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] 12,091.42: zp[2]:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] 10,001: zp[1]:19 [ plot_chargen::c#2 ] 1,732.5: zp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ] 222.6: zp[1]:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] 151.5: zp[1]:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] 102: zp[1]:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ] 52.68: zp[2]:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] 4: zp[2]:44 [ plot_chargen::$0 ] 4: zp[2]:46 [ plot_chargen::$1 ] 4: zp[2]:50 [ plot_chargen::$7 ] 
Uplift Scope [mul8u] 3,503.83: zp[2]:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] 2,431: zp[2]:23 [ mul8u::mb#2 mul8u::mb#1 ] 2,002: zp[1]:53 [ mul8u::$1 ] 1,670.67: zp[1]:20 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] 4: zp[2]:48 [ mul8u::return#2 ] 
Uplift Scope [main] 404: zp[1]:8 [ main::pressed#2 main::pressed#1 ] 176.75: zp[1]:7 [ main::ch#2 main::ch#1 ] 151.5: zp[1]:42 [ main::key#0 ] 38.19: zp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ] 36.67: zp[2]:2 [ main::sc#2 main::sc#1 ] 27.5: zp[1]:4 [ main::i#2 main::i#1 ] 22: zp[1]:31 [ main::$15 ] 22: zp[1]:33 [ main::$18 ] 22: zp[1]:35 [ main::$21 ] 22: zp[1]:37 [ main::$24 ] 22: zp[1]:39 [ main::$27 ] 5.32: zp[1]:6 [ main::shift#9 ] 
Uplift Scope [keyboard_key_pressed] 254.5: zp[1]:25 [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ] 202: zp[1]:43 [ keyboard_key_pressed::return#14 ] 22: zp[1]:30 [ keyboard_key_pressed::return#2 ] 22: zp[1]:32 [ keyboard_key_pressed::return#10 ] 22: zp[1]:34 [ keyboard_key_pressed::return#11 ] 22: zp[1]:36 [ keyboard_key_pressed::return#12 ] 22: zp[1]:38 [ keyboard_key_pressed::return#13 ] 19.75: zp[1]:59 [ keyboard_key_pressed::return#0 ] 4: zp[1]:55 [ keyboard_key_pressed::rowidx#0 ] 4: zp[1]:58 [ keyboard_key_pressed::$2 ] 0.67: zp[1]:54 [ keyboard_key_pressed::colidx#0 ] 
Uplift Scope [keyboard_get_keycode] 202: zp[1]:41 [ keyboard_get_keycode::return#2 ] 103: zp[1]:40 [ keyboard_get_keycode::ch#0 ] 34.33: zp[1]:61 [ keyboard_get_keycode::return#0 ] 
Uplift Scope [print_str_at] 35.5: zp[2]:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] 24.67: zp[2]:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] 
Uplift Scope [keyboard_matrix_read] 4: zp[1]:56 [ keyboard_matrix_read::rowid#0 ] 4: zp[1]:57 [ keyboard_matrix_read::return#2 ] 1.33: zp[1]:60 [ keyboard_matrix_read::return#0 ] 
Uplift Scope [] 

Uplifting [plot_chargen] best 819629 combination reg byte a [ plot_chargen::$10 ] reg byte x [ plot_chargen::x#2 plot_chargen::x#1 ] zp[1]:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] zp[2]:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] reg byte a [ plot_chargen::c#2 ] zp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ] zp[1]:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] zp[1]:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] zp[1]:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ] zp[2]:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] zp[2]:44 [ plot_chargen::$0 ] zp[2]:46 [ plot_chargen::$1 ] zp[2]:50 [ plot_chargen::$7 ] 
Limited combination testing to 100 combinations of 10368 possible.
Uplifting [mul8u] best 810626 combination zp[2]:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp[2]:23 [ mul8u::mb#2 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp[2]:48 [ mul8u::return#2 ] 
Uplifting [main] best 808826 combination reg byte a [ main::pressed#2 main::pressed#1 ] zp[1]:7 [ main::ch#2 main::ch#1 ] reg byte a [ main::key#0 ] zp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ] zp[2]:2 [ main::sc#2 main::sc#1 ] zp[1]:4 [ main::i#2 main::i#1 ] zp[1]:31 [ main::$15 ] zp[1]:33 [ main::$18 ] zp[1]:35 [ main::$21 ] zp[1]:37 [ main::$24 ] zp[1]:39 [ main::$27 ] zp[1]:6 [ main::shift#9 ] 
Limited combination testing to 100 combinations of 262144 possible.
Uplifting [keyboard_key_pressed] best 807987 combination reg byte x [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ] reg byte a [ keyboard_key_pressed::return#14 ] reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ keyboard_key_pressed::return#10 ] zp[1]:34 [ keyboard_key_pressed::return#11 ] zp[1]:36 [ keyboard_key_pressed::return#12 ] zp[1]:38 [ keyboard_key_pressed::return#13 ] zp[1]:59 [ keyboard_key_pressed::return#0 ] zp[1]:55 [ keyboard_key_pressed::rowidx#0 ] zp[1]:58 [ keyboard_key_pressed::$2 ] zp[1]:54 [ keyboard_key_pressed::colidx#0 ] 
Limited combination testing to 100 combinations of 3145728 possible.
Uplifting [keyboard_get_keycode] best 806781 combination reg byte a [ keyboard_get_keycode::return#2 ] reg byte x [ keyboard_get_keycode::ch#0 ] reg byte a [ keyboard_get_keycode::return#0 ] 
Uplifting [print_str_at] best 806781 combination zp[2]:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] zp[2]:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] 
Uplifting [keyboard_matrix_read] best 806763 combination reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#2 ] reg byte a [ keyboard_matrix_read::return#0 ] 
Uplifting [] best 806763 combination 
Attempting to uplift remaining variables inzp[1]:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Uplifting [plot_chargen] best 806763 combination zp[1]:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] 
Attempting to uplift remaining variables inzp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ]
Uplifting [plot_chargen] best 806763 combination zp[1]:14 [ plot_chargen::y#2 plot_chargen::y#1 ] 
Attempting to uplift remaining variables inzp[1]:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ]
Uplifting [plot_chargen] best 806457 combination reg byte x [ plot_chargen::shift#2 plot_chargen::shift#1 ] 
Attempting to uplift remaining variables inzp[1]:7 [ main::ch#2 main::ch#1 ]
Uplifting [main] best 806457 combination zp[1]:7 [ main::ch#2 main::ch#1 ] 
Attempting to uplift remaining variables inzp[1]:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ]
Uplifting [plot_chargen] best 806151 combination reg byte a [ plot_chargen::ch#2 plot_chargen::ch#1 ] 
Attempting to uplift remaining variables inzp[1]:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
Uplifting [plot_chargen] best 805822 combination reg byte y [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ] 
Attempting to uplift remaining variables inzp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
Uplifting [main] best 805822 combination zp[1]:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ] 
Attempting to uplift remaining variables inzp[1]:4 [ main::i#2 main::i#1 ]
Uplifting [main] best 805822 combination zp[1]:4 [ main::i#2 main::i#1 ] 
Attempting to uplift remaining variables inzp[1]:31 [ main::$15 ]
Uplifting [main] best 805762 combination reg byte a [ main::$15 ] 
Attempting to uplift remaining variables inzp[1]:33 [ main::$18 ]
Uplifting [main] best 805702 combination reg byte a [ main::$18 ] 
Attempting to uplift remaining variables inzp[1]:34 [ keyboard_key_pressed::return#11 ]
Uplifting [keyboard_key_pressed] best 805642 combination reg byte a [ keyboard_key_pressed::return#11 ] 
Attempting to uplift remaining variables inzp[1]:35 [ main::$21 ]
Uplifting [main] best 805582 combination reg byte a [ main::$21 ] 
Attempting to uplift remaining variables inzp[1]:36 [ keyboard_key_pressed::return#12 ]
Uplifting [keyboard_key_pressed] best 805522 combination reg byte a [ keyboard_key_pressed::return#12 ] 
Attempting to uplift remaining variables inzp[1]:37 [ main::$24 ]
Uplifting [main] best 805462 combination reg byte a [ main::$24 ] 
Attempting to uplift remaining variables inzp[1]:38 [ keyboard_key_pressed::return#13 ]
Uplifting [keyboard_key_pressed] best 805402 combination reg byte a [ keyboard_key_pressed::return#13 ] 
Attempting to uplift remaining variables inzp[1]:39 [ main::$27 ]
Uplifting [main] best 805342 combination reg byte a [ main::$27 ] 
Attempting to uplift remaining variables inzp[1]:59 [ keyboard_key_pressed::return#0 ]
Uplifting [keyboard_key_pressed] best 804889 combination reg byte a [ keyboard_key_pressed::return#0 ] 
Attempting to uplift remaining variables inzp[1]:6 [ main::shift#9 ]
Uplifting [main] best 804889 combination zp[1]:6 [ main::shift#9 ] 
Attempting to uplift remaining variables inzp[1]:55 [ keyboard_key_pressed::rowidx#0 ]
Uplifting [keyboard_key_pressed] best 804885 combination reg byte a [ keyboard_key_pressed::rowidx#0 ] 
Attempting to uplift remaining variables inzp[1]:58 [ keyboard_key_pressed::$2 ]
Uplifting [keyboard_key_pressed] best 804879 combination reg byte a [ keyboard_key_pressed::$2 ] 
Attempting to uplift remaining variables inzp[1]:54 [ keyboard_key_pressed::colidx#0 ]
Uplifting [keyboard_key_pressed] best 804877 combination reg byte y [ keyboard_key_pressed::colidx#0 ] 
Coalescing zero page register [ zp[2]:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] ] with [ zp[2]:46 [ plot_chargen::$1 ] ] - score: 1
Coalescing zero page register [ zp[2]:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] ] with [ zp[2]:50 [ plot_chargen::$7 ] ] - score: 1
Coalescing zero page register [ zp[2]:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] ] with [ zp[2]:48 [ mul8u::return#2 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 ] ] with [ zp[2]:44 [ plot_chargen::$0 ] ] - score: 1
Coalescing zero page register [ zp[2]:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 plot_chargen::$7 ] ] with [ zp[2]:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 ] ] with [ zp[2]:2 [ main::sc#2 main::sc#1 ] ]
Coalescing zero page register [ zp[2]:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] ] with [ zp[2]:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 plot_chargen::$7 mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ]
Coalescing zero page register [ zp[2]:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] ] with [ zp[2]:23 [ mul8u::mb#2 mul8u::mb#1 ] ]
Allocated (was zp[1]:4) zp[1]:2 [ main::i#2 main::i#1 ]
Allocated (was zp[1]:5) zp[1]:3 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
Allocated (was zp[1]:6) zp[1]:4 [ main::shift#9 ]
Allocated (was zp[1]:7) zp[1]:5 [ main::ch#2 main::ch#1 ]
Allocated (was zp[2]:12) zp[2]:6 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 main::sc#2 main::sc#1 ]
Allocated (was zp[1]:14) zp[1]:8 [ plot_chargen::y#2 plot_chargen::y#1 ]
Allocated (was zp[1]:15) zp[1]:9 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Allocated (was zp[2]:26) zp[2]:10 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 plot_chargen::$7 mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ]
Allocated (was zp[2]:28) zp[2]:12 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 mul8u::mb#2 mul8u::mb#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Allows analysis of the CHARGEN ROM font
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // The address of the CHARGEN character set
  .label CHARGEN = $d000
  // CIA#1 Port A: keyboard matrix columns and joystick #2
  .label CIA1_PORT_A = $dc00
  // CIA#1 Port B: keyboard matrix rows and joystick #1.
  .label CIA1_PORT_B = $dc01
  .const KEY_F7 = 3
  .const KEY_F1 = 4
  .const KEY_F3 = 5
  .const KEY_F5 = 6
  .const KEY_3 = 8
  .const KEY_W = 9
  .const KEY_A = $a
  .const KEY_4 = $b
  .const KEY_Z = $c
  .const KEY_S = $d
  .const KEY_E = $e
  .const KEY_LSHIFT = $f
  .const KEY_5 = $10
  .const KEY_R = $11
  .const KEY_D = $12
  .const KEY_6 = $13
  .const KEY_C = $14
  .const KEY_F = $15
  .const KEY_T = $16
  .const KEY_X = $17
  .const KEY_7 = $18
  .const KEY_Y = $19
  .const KEY_G = $1a
  .const KEY_8 = $1b
  .const KEY_B = $1c
  .const KEY_H = $1d
  .const KEY_U = $1e
  .const KEY_V = $1f
  .const KEY_9 = $20
  .const KEY_I = $21
  .const KEY_J = $22
  .const KEY_0 = $23
  .const KEY_M = $24
  .const KEY_K = $25
  .const KEY_O = $26
  .const KEY_N = $27
  .const KEY_PLUS = $28
  .const KEY_P = $29
  .const KEY_L = $2a
  .const KEY_MINUS = $2b
  .const KEY_DOT = $2c
  .const KEY_COLON = $2d
  .const KEY_AT = $2e
  .const KEY_COMMA = $2f
  .const KEY_POUND = $30
  .const KEY_ASTERISK = $31
  .const KEY_SEMICOLON = $32
  .const KEY_EQUALS = $35
  .const KEY_ARROW_UP = $36
  .const KEY_SLASH = $37
  .const KEY_1 = $38
  .const KEY_ARROW_LEFT = $39
  .const KEY_2 = $3b
  .const KEY_SPACE = $3c
  .const KEY_Q = $3e
  .label SCREEN = $400
  // @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 sc = 6
    .label i = 2
    .label ch = 5
    // Which char canvas to use
    .label cur_pos = 3
    // Is shift pressed
    .label shift = 4
    // [5] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [5] phi (byte*) main::sc#2 = (const byte*) SCREEN [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z sc
    lda #>SCREEN
    sta.z sc+1
    jmp __b1
  // Clear screen
    // main::@1
  __b1:
    // [6] if((byte*) main::sc#2<(const byte*) SCREEN+(word) $3e8) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z sc+1
    cmp #>SCREEN+$3e8
    bcc __b2
    bne !+
    lda.z sc
    cmp #<SCREEN+$3e8
    bcc __b2
  !:
    // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
  __b3_from___b1:
    jmp __b3
    // main::@3
  __b3:
    // [8] call print_str_at 
    // [127] phi from main::@3 to print_str_at [phi:main::@3->print_str_at]
  print_str_at_from___b3:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1 [phi:main::@3->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta.z print_str_at.at
    lda #>SCREEN+1
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str [phi:main::@3->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_at.str
    lda #>str
    sta.z print_str_at.str+1
    jsr print_str_at
    // [9] phi from main::@3 to main::@17 [phi:main::@3->main::@17]
  __b17_from___b3:
    jmp __b17
    // main::@17
  __b17:
    // [10] call print_str_at 
    // [127] phi from main::@17 to print_str_at [phi:main::@17->print_str_at]
  print_str_at_from___b17:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $a [phi:main::@17->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$a
    sta.z print_str_at.at
    lda #>SCREEN+1+$a
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str1 [phi:main::@17->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str_at.str
    lda #>str1
    sta.z print_str_at.str+1
    jsr print_str_at
    // [11] phi from main::@17 to main::@18 [phi:main::@17->main::@18]
  __b18_from___b17:
    jmp __b18
    // main::@18
  __b18:
    // [12] call print_str_at 
    // [127] phi from main::@18 to print_str_at [phi:main::@18->print_str_at]
  print_str_at_from___b18:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $14 [phi:main::@18->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$14
    sta.z print_str_at.at
    lda #>SCREEN+1+$14
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str2 [phi:main::@18->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str2
    sta.z print_str_at.str
    lda #>str2
    sta.z print_str_at.str+1
    jsr print_str_at
    // [13] phi from main::@18 to main::@19 [phi:main::@18->main::@19]
  __b19_from___b18:
    jmp __b19
    // main::@19
  __b19:
    // [14] call print_str_at 
    // [127] phi from main::@19 to print_str_at [phi:main::@19->print_str_at]
  print_str_at_from___b19:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $1e [phi:main::@19->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$1e
    sta.z print_str_at.at
    lda #>SCREEN+1+$1e
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str3 [phi:main::@19->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str3
    sta.z print_str_at.str
    lda #>str3
    sta.z print_str_at.str+1
    jsr print_str_at
    // [15] phi from main::@19 to main::@4 [phi:main::@19->main::@4]
  __b4_from___b19:
    // [15] phi (byte) main::i#2 = (byte) 0 [phi:main::@19->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp __b4
    // [15] phi from main::@20 to main::@4 [phi:main::@20->main::@4]
  __b4_from___b20:
    // [15] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@20->main::@4#0] -- register_copy 
    jmp __b4
    // main::@4
  __b4:
    // [16] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuyy=vbuz1 
    ldy.z i
    // [17] call plot_chargen 
    // [71] phi from main::@4 to plot_chargen [phi:main::@4->plot_chargen]
  plot_chargen_from___b4:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@4->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) 0 [phi:main::@4->plot_chargen#1] -- vbuxx=vbuc1 
    ldx #0
    // [71] phi (byte) plot_chargen::ch#2 = (byte) $20 [phi:main::@4->plot_chargen#2] -- vbuaa=vbuc1 
    lda #$20
    jsr plot_chargen
    jmp __b20
    // main::@20
  __b20:
    // [18] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [19] if((byte) main::i#1!=(byte) 4) goto main::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp.z i
    bne __b4_from___b20
    // [20] phi from main::@20 to main::@5 [phi:main::@20->main::@5]
  __b5_from___b20:
    // [20] phi (byte) main::cur_pos#24 = (byte) 0 [phi:main::@20->main::@5#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cur_pos
    jmp __b5
    // main::@5
  __b5:
    // [21] call keyboard_key_pressed 
    // [113] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed]
  keyboard_key_pressed_from___b5:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1 [phi:main::@5->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F1
    jsr keyboard_key_pressed
    // [22] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
    jmp __b21
    // main::@21
  __b21:
    // [23] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
    // [24] if((byte~) main::$15==(byte) 0) goto main::@28 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b28_from___b21
    // [26] phi from main::@21 to main::@6 [phi:main::@21->main::@6]
  __b6_from___b21:
    // [26] phi (byte) main::cur_pos#22 = (byte) 0 [phi:main::@21->main::@6#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cur_pos
    jmp __b6
    // [25] phi from main::@21 to main::@28 [phi:main::@21->main::@28]
  __b28_from___b21:
    jmp __b28
    // main::@28
  __b28:
    // [26] phi from main::@28 to main::@6 [phi:main::@28->main::@6]
  __b6_from___b28:
    // [26] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@28->main::@6#0] -- register_copy 
    jmp __b6
    // main::@6
  __b6:
    // [27] call keyboard_key_pressed 
    // [113] phi from main::@6 to keyboard_key_pressed [phi:main::@6->keyboard_key_pressed]
  keyboard_key_pressed_from___b6:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F3 [phi:main::@6->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F3
    jsr keyboard_key_pressed
    // [28] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
    jmp __b22
    // main::@22
  __b22:
    // [29] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
    // [30] if((byte~) main::$18==(byte) 0) goto main::@29 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b29_from___b22
    // [32] phi from main::@22 to main::@7 [phi:main::@22->main::@7]
  __b7_from___b22:
    // [32] phi (byte) main::cur_pos#20 = (byte) 1 [phi:main::@22->main::@7#0] -- vbuz1=vbuc1 
    lda #1
    sta.z cur_pos
    jmp __b7
    // [31] phi from main::@22 to main::@29 [phi:main::@22->main::@29]
  __b29_from___b22:
    jmp __b29
    // main::@29
  __b29:
    // [32] phi from main::@29 to main::@7 [phi:main::@29->main::@7]
  __b7_from___b29:
    // [32] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@29->main::@7#0] -- register_copy 
    jmp __b7
    // main::@7
  __b7:
    // [33] call keyboard_key_pressed 
    // [113] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed]
  keyboard_key_pressed_from___b7:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F5 [phi:main::@7->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F5
    jsr keyboard_key_pressed
    // [34] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
    jmp __b23
    // main::@23
  __b23:
    // [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
    // [36] if((byte~) main::$21==(byte) 0) goto main::@30 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b30_from___b23
    // [38] phi from main::@23 to main::@8 [phi:main::@23->main::@8]
  __b8_from___b23:
    // [38] phi (byte) main::cur_pos#18 = (byte) 2 [phi:main::@23->main::@8#0] -- vbuz1=vbuc1 
    lda #2
    sta.z cur_pos
    jmp __b8
    // [37] phi from main::@23 to main::@30 [phi:main::@23->main::@30]
  __b30_from___b23:
    jmp __b30
    // main::@30
  __b30:
    // [38] phi from main::@30 to main::@8 [phi:main::@30->main::@8]
  __b8_from___b30:
    // [38] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@30->main::@8#0] -- register_copy 
    jmp __b8
    // main::@8
  __b8:
    // [39] call keyboard_key_pressed 
    // [113] phi from main::@8 to keyboard_key_pressed [phi:main::@8->keyboard_key_pressed]
  keyboard_key_pressed_from___b8:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F7 [phi:main::@8->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F7
    jsr keyboard_key_pressed
    // [40] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
    jmp __b24
    // main::@24
  __b24:
    // [41] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
    // [42] if((byte~) main::$24==(byte) 0) goto main::@31 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b31_from___b24
    // [44] phi from main::@24 to main::@9 [phi:main::@24->main::@9]
  __b9_from___b24:
    // [44] phi (byte) main::cur_pos#11 = (byte) 3 [phi:main::@24->main::@9#0] -- vbuz1=vbuc1 
    lda #3
    sta.z cur_pos
    jmp __b9
    // [43] phi from main::@24 to main::@31 [phi:main::@24->main::@31]
  __b31_from___b24:
    jmp __b31
    // main::@31
  __b31:
    // [44] phi from main::@31 to main::@9 [phi:main::@31->main::@9]
  __b9_from___b31:
    // [44] phi (byte) main::cur_pos#11 = (byte) main::cur_pos#18 [phi:main::@31->main::@9#0] -- register_copy 
    jmp __b9
    // main::@9
  __b9:
    // [45] call keyboard_key_pressed 
    // [113] phi from main::@9 to keyboard_key_pressed [phi:main::@9->keyboard_key_pressed]
  keyboard_key_pressed_from___b9:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_LSHIFT [phi:main::@9->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_LSHIFT
    jsr keyboard_key_pressed
    // [46] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
    jmp __b25
    // main::@25
  __b25:
    // [47] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
    // [48] if((byte~) main::$27!=(byte) 0) goto main::@10 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b10_from___b25
    // [50] phi from main::@25 to main::@11 [phi:main::@25->main::@11]
  __b11_from___b25:
    // [50] phi (byte) main::shift#9 = (byte) 0 [phi:main::@25->main::@11#0] -- vbuz1=vbuc1 
    lda #0
    sta.z shift
    jmp __b11
    // [49] phi from main::@25 to main::@10 [phi:main::@25->main::@10]
  __b10_from___b25:
    jmp __b10
    // main::@10
  __b10:
    // [50] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  __b11_from___b10:
    // [50] phi (byte) main::shift#9 = (byte) 1 [phi:main::@10->main::@11#0] -- vbuz1=vbuc1 
    lda #1
    sta.z shift
    jmp __b11
    // main::@11
  __b11:
    // [51] phi from main::@11 to main::@12 [phi:main::@11->main::@12]
  __b12_from___b11:
    // [51] phi (byte) main::ch#2 = (byte) 0 [phi:main::@11->main::@12#0] -- vbuz1=vbuc1 
    lda #0
    sta.z ch
    jmp __b12
  // Check for key presses - and plot char if found
    // [51] phi from main::@14 to main::@12 [phi:main::@14->main::@12]
  __b12_from___b14:
    // [51] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@14->main::@12#0] -- register_copy 
    jmp __b12
    // main::@12
  __b12:
    // [52] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuxx=vbuz1 
    ldx.z ch
    // [53] call keyboard_get_keycode 
    jsr keyboard_get_keycode
    // [54] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
    jmp __b26
    // main::@26
  __b26:
    // [55] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
    // [56] if((byte) main::key#0==(byte) $3f) goto main::@13 -- vbuaa_eq_vbuc1_then_la1 
    cmp #$3f
    beq __b13_from___b26
    jmp __b15
    // main::@15
  __b15:
    // [57] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuxx=vbuaa 
    tax
    // [58] call keyboard_key_pressed 
    // [113] phi from main::@15 to keyboard_key_pressed [phi:main::@15->keyboard_key_pressed]
  keyboard_key_pressed_from___b15:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@15->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
    // [59] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
    jmp __b27
    // main::@27
  __b27:
    // [60] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
    // [61] phi from main::@27 to main::@13 [phi:main::@27->main::@13]
  __b13_from___b27:
    // [61] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@27->main::@13#0] -- register_copy 
    jmp __b13
    // [61] phi from main::@26 to main::@13 [phi:main::@26->main::@13]
  __b13_from___b26:
    // [61] phi (byte) main::pressed#2 = (byte) 0 [phi:main::@26->main::@13#0] -- vbuaa=vbuc1 
    lda #0
    jmp __b13
    // main::@13
  __b13:
    // [62] if((byte) main::pressed#2==(byte) 0) goto main::@14 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b14
    jmp __b16
    // main::@16
  __b16:
    // [63] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11 -- vbuyy=vbuz1 
    ldy.z cur_pos
    // [64] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuaa=vbuz1 
    lda.z ch
    // [65] (byte) plot_chargen::shift#1 ← (byte) main::shift#9 -- vbuxx=vbuz1 
    ldx.z shift
    // [66] call plot_chargen 
    // [71] phi from main::@16 to plot_chargen [phi:main::@16->plot_chargen]
  plot_chargen_from___b16:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@16->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@16->plot_chargen#1] -- register_copy 
    // [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@16->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    jmp __b14
    // main::@14
  __b14:
    // [67] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc.z ch
    // [68] if((byte) main::ch#1!=(byte) $40) goto main::@12 -- vbuz1_neq_vbuc1_then_la1 
    lda #$40
    cmp.z ch
    bne __b12_from___b14
    // [20] phi from main::@14 to main::@5 [phi:main::@14->main::@5]
  __b5_from___b14:
    // [20] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#11 [phi:main::@14->main::@5#0] -- register_copy 
    jmp __b5
    // main::@2
  __b2:
    // [69] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // [70] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc.z sc
    bne !+
    inc.z sc+1
  !:
    // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
  __b1_from___b2:
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@2->main::@1#0] -- register_copy 
    jmp __b1
    str: .text "f1"
    .byte 0
    str1: .text "f3"
    .byte 0
    str2: .text "f5"
    .byte 0
    str3: .text "f7"
    .byte 0
}
  // plot_chargen
// Render 8x8 char (ch) as pixels on char canvas #pos
// plot_chargen(byte register(Y) pos, byte register(A) ch, byte register(X) shift)
plot_chargen: {
    .label __0 = 6
    .label __1 = 6
    .label __7 = $a
    .label chargen = 6
    .label sc = $a
    .label bits = 9
    .label y = 8
    // asm { sei  }
    sei
    // [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2 -- vwuz1=_word_vbuaa 
    sta.z __0
    lda #0
    sta.z __0+1
    // [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 -- vwuz1=vwuz1_rol_3 
    asl.z __1
    rol.z __1+1
    asl.z __1
    rol.z __1+1
    asl.z __1
    rol.z __1+1
    // [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN + (word~) plot_chargen::$1 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda.z chargen
    adc #<CHARGEN
    sta.z chargen
    lda.z chargen+1
    adc #>CHARGEN
    sta.z chargen+1
    // [76] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1 -- vbuxx_eq_0_then_la1 
    cpx #0
    beq __b1_from_plot_chargen
    jmp __b2
    // plot_chargen::@2
  __b2:
    // [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word) $800 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z chargen
    adc #<$800
    sta.z chargen
    lda.z chargen+1
    adc #>$800
    sta.z chargen+1
    // [78] phi from plot_chargen plot_chargen::@2 to plot_chargen::@1 [phi:plot_chargen/plot_chargen::@2->plot_chargen::@1]
  __b1_from_plot_chargen:
  __b1_from___b2:
    // [78] phi (byte*) plot_chargen::chargen#5 = (byte*) plot_chargen::chargen#0 [phi:plot_chargen/plot_chargen::@2->plot_chargen::@1#0] -- register_copy 
    jmp __b1
    // plot_chargen::@1
  __b1:
    // [79] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
    // [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2 -- vbuxx=vbuyy 
    tya
    tax
    // [81] call mul8u 
    // [103] phi from plot_chargen::@1 to mul8u [phi:plot_chargen::@1->mul8u]
  mul8u_from___b1:
    jsr mul8u
    // [82] (word) mul8u::return#2 ← (word) mul8u::res#2
    jmp __b9
    // plot_chargen::@9
  __b9:
    // [83] (word~) plot_chargen::$7 ← (word) mul8u::return#2
    // [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda.z sc
    adc #<SCREEN+$28+1
    sta.z sc
    lda.z sc+1
    adc #>SCREEN+$28+1
    sta.z sc+1
    // [85] phi from plot_chargen::@9 to plot_chargen::@3 [phi:plot_chargen::@9->plot_chargen::@3]
  __b3_from___b9:
    // [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#0 [phi:plot_chargen::@9->plot_chargen::@3#0] -- register_copy 
    // [85] phi (byte) plot_chargen::y#2 = (byte) 0 [phi:plot_chargen::@9->plot_chargen::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    jmp __b3
    // [85] phi from plot_chargen::@7 to plot_chargen::@3 [phi:plot_chargen::@7->plot_chargen::@3]
  __b3_from___b7:
    // [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#2 [phi:plot_chargen::@7->plot_chargen::@3#0] -- register_copy 
    // [85] phi (byte) plot_chargen::y#2 = (byte) plot_chargen::y#1 [phi:plot_chargen::@7->plot_chargen::@3#1] -- register_copy 
    jmp __b3
    // plot_chargen::@3
  __b3:
    // [86] (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#5 + (byte) plot_chargen::y#2) -- vbuz1=pbuz2_derefidx_vbuz3 
    ldy.z y
    lda (chargen),y
    sta.z bits
    // [87] phi from plot_chargen::@3 to plot_chargen::@4 [phi:plot_chargen::@3->plot_chargen::@4]
  __b4_from___b3:
    // [87] phi (byte) plot_chargen::x#2 = (byte) 0 [phi:plot_chargen::@3->plot_chargen::@4#0] -- vbuxx=vbuc1 
    ldx #0
    // [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#7 [phi:plot_chargen::@3->plot_chargen::@4#1] -- register_copy 
    // [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#0 [phi:plot_chargen::@3->plot_chargen::@4#2] -- register_copy 
    jmp __b4
    // [87] phi from plot_chargen::@5 to plot_chargen::@4 [phi:plot_chargen::@5->plot_chargen::@4]
  __b4_from___b5:
    // [87] phi (byte) plot_chargen::x#2 = (byte) plot_chargen::x#1 [phi:plot_chargen::@5->plot_chargen::@4#0] -- register_copy 
    // [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#1 [phi:plot_chargen::@5->plot_chargen::@4#1] -- register_copy 
    // [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#1 [phi:plot_chargen::@5->plot_chargen::@4#2] -- register_copy 
    jmp __b4
    // plot_chargen::@4
  __b4:
    // [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and.z bits
    // [89] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b5_from___b4
    // [90] phi from plot_chargen::@4 to plot_chargen::@6 [phi:plot_chargen::@4->plot_chargen::@6]
  __b6_from___b4:
    jmp __b6
    // plot_chargen::@6
  __b6:
    // [91] phi from plot_chargen::@6 to plot_chargen::@5 [phi:plot_chargen::@6->plot_chargen::@5]
  __b5_from___b6:
    // [91] phi (byte) plot_chargen::c#2 = (byte) '*' [phi:plot_chargen::@6->plot_chargen::@5#0] -- vbuaa=vbuc1 
    lda #'*'
    jmp __b5
    // [91] phi from plot_chargen::@4 to plot_chargen::@5 [phi:plot_chargen::@4->plot_chargen::@5]
  __b5_from___b4:
    // [91] phi (byte) plot_chargen::c#2 = (byte) '.' [phi:plot_chargen::@4->plot_chargen::@5#0] -- vbuaa=vbuc1 
    lda #'.'
    jmp __b5
    // plot_chargen::@5
  __b5:
    // [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
    // [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3 -- pbuz1=_inc_pbuz1 
    inc.z sc
    bne !+
    inc.z sc+1
  !:
    // [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl.z bits
    // [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [96] if((byte) plot_chargen::x#1!=(byte) 8) goto plot_chargen::@4 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne __b4_from___b5
    jmp __b7
    // plot_chargen::@7
  __b7:
    // [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$20
    clc
    adc.z sc
    sta.z sc
    bcc !+
    inc.z sc+1
  !:
    // [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [99] if((byte) plot_chargen::y#1!=(byte) 8) goto plot_chargen::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z y
    bne __b3_from___b7
    jmp __b8
    // plot_chargen::@8
  __b8:
    // [100] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
    // asm { cli  }
    cli
    jmp __breturn
    // plot_chargen::@return
  __breturn:
    // [102] return 
    rts
}
  // mul8u
// Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word
// mul8u(byte register(X) a)
mul8u: {
    .const b = $a
    .label mb = $c
    .label res = $a
    .label return = $a
    // [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
  __b1_from_mul8u:
    // [104] phi (word) mul8u::mb#2 = (word)(const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vwuc1 
    lda #<b
    sta.z mb
    lda #>b
    sta.z mb+1
    // [104] phi (word) mul8u::res#2 = (word) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z res
    lda #>0
    sta.z res+1
    // [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#1 [phi:mul8u->mul8u::@1#2] -- register_copy 
    jmp __b1
    // mul8u::@1
  __b1:
    // [105] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b2
    jmp __breturn
    // mul8u::@return
  __breturn:
    // [106] return 
    rts
    // mul8u::@2
  __b2:
    // [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
    // [108] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b3_from___b2
    jmp __b4
    // mul8u::@4
  __b4:
    // [109] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 
    lda.z res
    clc
    adc.z mb
    sta.z res
    lda.z res+1
    adc.z mb+1
    sta.z res+1
    // [110] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3]
  __b3_from___b2:
  __b3_from___b4:
    // [110] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy 
    jmp __b3
    // mul8u::@3
  __b3:
    // [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 -- vbuxx=vbuxx_ror_1 
    txa
    lsr
    tax
    // [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z mb
    rol.z mb+1
    // [104] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1]
  __b1_from___b3:
    // [104] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy 
    // [104] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy 
    // [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy 
    jmp __b1
}
  // keyboard_key_pressed
// Determines whether a specific key is currently pressed by accessing the matrix directly
// The key is a keyboard code defined from the keyboard matrix by %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7)
// All keys exist as as KEY_XXX constants.
// Returns zero if the key is not pressed and a non-zero value if the key is currently pressed
// keyboard_key_pressed(byte register(X) key)
keyboard_key_pressed: {
    // [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7 -- vbuyy=vbuxx_band_vbuc1 
    txa
    and #7
    tay
    // [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte) 3 -- vbuaa=vbuxx_ror_3 
    txa
    lsr
    lsr
    lsr
    // [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 -- vbuxx=vbuaa 
    tax
    // [117] call keyboard_matrix_read 
    jsr keyboard_matrix_read
    // [118] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0
    jmp __b1
    // keyboard_key_pressed::@1
  __b1:
    // [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2
    // [120] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#0) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuyy 
    and keyboard_matrix_col_bitmask,y
    jmp __breturn
    // keyboard_key_pressed::@return
  __breturn:
    // [121] return 
    rts
}
  // keyboard_matrix_read
// Read a single row of the keyboard matrix
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
// Returns the keys pressed on the row as bits according to the C64 key matrix.
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
// keyboard_matrix_read(byte register(X) rowid)
keyboard_matrix_read: {
    // [122] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx 
    lda keyboard_matrix_row_bitmask,x
    sta CIA1_PORT_A
    // [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 
    lda CIA1_PORT_B
    eor #$ff
    jmp __breturn
    // keyboard_matrix_read::@return
  __breturn:
    // [124] return 
    rts
}
  // keyboard_get_keycode
// Get the keycode corresponding to a specific screen code character
// ch is the character to get the key code for ($00-$3f)
// Returns the key code corresponding to the passed character. Only characters with a non-shifted key are handled.
// If there is no non-shifted key representing the char $3f is returned (representing RUN/STOP) .
// keyboard_get_keycode(byte register(X) ch)
keyboard_get_keycode: {
    // [125] (byte) keyboard_get_keycode::return#0 ← *((const byte*) keyboard_char_keycodes + (byte) keyboard_get_keycode::ch#0) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda keyboard_char_keycodes,x
    jmp __breturn
    // keyboard_get_keycode::@return
  __breturn:
    // [126] return 
    rts
}
  // print_str_at
// Print a string at a specific screen position
// print_str_at(byte* zp($a) str, byte* zp($c) at)
print_str_at: {
    .label at = $c
    .label str = $a
    // [128] phi from print_str_at print_str_at::@2 to print_str_at::@1 [phi:print_str_at/print_str_at::@2->print_str_at::@1]
  __b1_from_print_str_at:
  __b1_from___b2:
    // [128] phi (byte*) print_str_at::at#5 = (byte*) print_str_at::at#7 [phi:print_str_at/print_str_at::@2->print_str_at::@1#0] -- register_copy 
    // [128] phi (byte*) print_str_at::str#5 = (byte*) print_str_at::str#7 [phi:print_str_at/print_str_at::@2->print_str_at::@1#1] -- register_copy 
    jmp __b1
    // print_str_at::@1
  __b1:
    // [129] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne __b2
    jmp __breturn
    // print_str_at::@return
  __breturn:
    // [130] return 
    rts
    // print_str_at::@2
  __b2:
    // [131] *((byte*) print_str_at::at#5) ← *((byte*) print_str_at::str#5) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (at),y
    // [132] (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5 -- pbuz1=_inc_pbuz1 
    inc.z at
    bne !+
    inc.z at+1
  !:
    // [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp __b1_from___b2
}
  // File Data
  // Keycodes for each screen code character from $00-$3f.
  // Chars that do not have an unmodified keycode return $3f (representing RUN/STOP).
  keyboard_char_keycodes: .byte KEY_AT, KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, $3f, KEY_POUND, $3f, KEY_ARROW_UP, KEY_ARROW_LEFT, KEY_SPACE, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, KEY_ASTERISK, KEY_PLUS, KEY_COMMA, KEY_MINUS, KEY_DOT, KEY_SLASH, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_COLON, KEY_SEMICOLON, $3f, KEY_EQUALS, $3f, $3f
  // Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
  keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
  // Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
  keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __b3
Removing instruction jmp __b17
Removing instruction jmp __b18
Removing instruction jmp __b19
Removing instruction jmp __b4
Removing instruction jmp __b20
Removing instruction jmp __b5
Removing instruction jmp __b21
Removing instruction jmp __b28
Removing instruction jmp __b6
Removing instruction jmp __b22
Removing instruction jmp __b29
Removing instruction jmp __b7
Removing instruction jmp __b23
Removing instruction jmp __b30
Removing instruction jmp __b8
Removing instruction jmp __b24
Removing instruction jmp __b31
Removing instruction jmp __b9
Removing instruction jmp __b25
Removing instruction jmp __b10
Removing instruction jmp __b11
Removing instruction jmp __b12
Removing instruction jmp __b26
Removing instruction jmp __b15
Removing instruction jmp __b27
Removing instruction jmp __b13
Removing instruction jmp __b16
Removing instruction jmp __b14
Removing instruction jmp __b2
Removing instruction jmp __b1
Removing instruction jmp __b9
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b6
Removing instruction jmp __b5
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b4
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __bbegin with __b1
Replacing label __b4_from___b20 with __b4
Replacing label __b28_from___b21 with __b6
Replacing label __b29_from___b22 with __b7
Replacing label __b30_from___b23 with __b8
Replacing label __b31_from___b24 with __b9
Replacing label __b10_from___b25 with __b10
Replacing label __b12_from___b14 with __b12
Replacing label __b1_from_plot_chargen with __b1
Replacing label __b4_from___b5 with __b4
Replacing label __b3_from___b7 with __b3
Replacing label __b3_from___b2 with __b3
Replacing label __b1_from___b2 with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
Removing instruction __b3_from___b1:
Removing instruction print_str_at_from___b3:
Removing instruction __b17_from___b3:
Removing instruction print_str_at_from___b17:
Removing instruction __b18_from___b17:
Removing instruction print_str_at_from___b18:
Removing instruction __b19_from___b18:
Removing instruction print_str_at_from___b19:
Removing instruction __b4_from___b20:
Removing instruction keyboard_key_pressed_from___b5:
Removing instruction __b28_from___b21:
Removing instruction __b28:
Removing instruction __b6_from___b28:
Removing instruction keyboard_key_pressed_from___b6:
Removing instruction __b29_from___b22:
Removing instruction __b29:
Removing instruction __b7_from___b29:
Removing instruction keyboard_key_pressed_from___b7:
Removing instruction __b30_from___b23:
Removing instruction __b30:
Removing instruction __b8_from___b30:
Removing instruction keyboard_key_pressed_from___b8:
Removing instruction __b31_from___b24:
Removing instruction __b31:
Removing instruction __b9_from___b31:
Removing instruction keyboard_key_pressed_from___b9:
Removing instruction __b10_from___b25:
Removing instruction __b11_from___b10:
Removing instruction __b12_from___b11:
Removing instruction __b12_from___b14:
Removing instruction __b13_from___b27:
Removing instruction __b1_from_plot_chargen:
Removing instruction __b1_from___b2:
Removing instruction __b3_from___b7:
Removing instruction __b4_from___b5:
Removing instruction __b6_from___b4:
Removing instruction __b5_from___b6:
Removing instruction __b3_from___b2:
Removing instruction __b3_from___b4:
Removing instruction __b1_from_print_str_at:
Removing instruction __b1_from___b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction __b1_from_main:
Removing instruction __b3:
Removing instruction __b17:
Removing instruction __b18:
Removing instruction __b19:
Removing instruction __b4_from___b19:
Removing instruction plot_chargen_from___b4:
Removing instruction __b20:
Removing instruction __b5_from___b20:
Removing instruction __b21:
Removing instruction __b6_from___b21:
Removing instruction __b22:
Removing instruction __b7_from___b22:
Removing instruction __b23:
Removing instruction __b8_from___b23:
Removing instruction __b24:
Removing instruction __b9_from___b24:
Removing instruction __b25:
Removing instruction __b11_from___b25:
Removing instruction __b26:
Removing instruction __b15:
Removing instruction keyboard_key_pressed_from___b15:
Removing instruction __b27:
Removing instruction __b16:
Removing instruction plot_chargen_from___b16:
Removing instruction __b5_from___b14:
Removing instruction __b1_from___b2:
Removing instruction __b2:
Removing instruction mul8u_from___b1:
Removing instruction __b9:
Removing instruction __b3_from___b9:
Removing instruction __b4_from___b3:
Removing instruction __b6:
Removing instruction __b7:
Removing instruction __b8:
Removing instruction __breturn:
Removing instruction __b1_from_mul8u:
Removing instruction __breturn:
Removing instruction __b4:
Removing instruction __b1_from___b3:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Relabelling long label __b13_from___b26 to b1
Relabelling long label __b5_from___b4 to b1
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp __b4
Removing instruction jmp __b6
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __b9
Removing instruction jmp __b12
Removing instruction jmp __b3
Removing instruction jmp __b4
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [84] bcc __b2 to bcs
Fixing long branch [90] bcc __b2 to bcs

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte*) CHARGEN = (byte*) 53248
(const byte*) CIA1_PORT_A = (byte*) 56320
(const byte*) CIA1_PORT_B = (byte*) 56321
(const byte) KEY_0 = (byte) $23
(const byte) KEY_1 = (byte) $38
(const byte) KEY_2 = (byte) $3b
(const byte) KEY_3 = (byte) 8
(const byte) KEY_4 = (byte) $b
(const byte) KEY_5 = (byte) $10
(const byte) KEY_6 = (byte) $13
(const byte) KEY_7 = (byte) $18
(const byte) KEY_8 = (byte) $1b
(const byte) KEY_9 = (byte) $20
(const byte) KEY_A = (byte) $a
(const byte) KEY_ARROW_LEFT = (byte) $39
(const byte) KEY_ARROW_UP = (byte) $36
(const byte) KEY_ASTERISK = (byte) $31
(const byte) KEY_AT = (byte) $2e
(const byte) KEY_B = (byte) $1c
(const byte) KEY_C = (byte) $14
(const byte) KEY_COLON = (byte) $2d
(const byte) KEY_COMMA = (byte) $2f
(const byte) KEY_D = (byte) $12
(const byte) KEY_DOT = (byte) $2c
(const byte) KEY_E = (byte) $e
(const byte) KEY_EQUALS = (byte) $35
(const byte) KEY_F = (byte) $15
(const byte) KEY_F1 = (byte) 4
(const byte) KEY_F3 = (byte) 5
(const byte) KEY_F5 = (byte) 6
(const byte) KEY_F7 = (byte) 3
(const byte) KEY_G = (byte) $1a
(const byte) KEY_H = (byte) $1d
(const byte) KEY_I = (byte) $21
(const byte) KEY_J = (byte) $22
(const byte) KEY_K = (byte) $25
(const byte) KEY_L = (byte) $2a
(const byte) KEY_LSHIFT = (byte) $f
(const byte) KEY_M = (byte) $24
(const byte) KEY_MINUS = (byte) $2b
(const byte) KEY_N = (byte) $27
(const byte) KEY_O = (byte) $26
(const byte) KEY_P = (byte) $29
(const byte) KEY_PLUS = (byte) $28
(const byte) KEY_POUND = (byte) $30
(const byte) KEY_Q = (byte) $3e
(const byte) KEY_R = (byte) $11
(const byte) KEY_S = (byte) $d
(const byte) KEY_SEMICOLON = (byte) $32
(const byte) KEY_SLASH = (byte) $37
(const byte) KEY_SPACE = (byte) $3c
(const byte) KEY_T = (byte) $16
(const byte) KEY_U = (byte) $1e
(const byte) KEY_V = (byte) $1f
(const byte) KEY_W = (byte) 9
(const byte) KEY_X = (byte) $17
(const byte) KEY_Y = (byte) $19
(const byte) KEY_Z = (byte) $c
(const byte*) PROCPORT = (byte*) 1
(const byte*) SCREEN = (byte*) 1024
(const byte*) keyboard_char_keycodes[]  = { (const byte) KEY_AT, (const byte) KEY_A, (const byte) KEY_B, (const byte) KEY_C, (const byte) KEY_D, (const byte) KEY_E, (const byte) KEY_F, (const byte) KEY_G, (const byte) KEY_H, (const byte) KEY_I, (const byte) KEY_J, (const byte) KEY_K, (const byte) KEY_L, (const byte) KEY_M, (const byte) KEY_N, (const byte) KEY_O, (const byte) KEY_P, (const byte) KEY_Q, (const byte) KEY_R, (const byte) KEY_S, (const byte) KEY_T, (const byte) KEY_U, (const byte) KEY_V, (const byte) KEY_W, (const byte) KEY_X, (const byte) KEY_Y, (const byte) KEY_Z, (byte) $3f, (const byte) KEY_POUND, (byte) $3f, (const byte) KEY_ARROW_UP, (const byte) KEY_ARROW_LEFT, (const byte) KEY_SPACE, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (const byte) KEY_ASTERISK, (const byte) KEY_PLUS, (const byte) KEY_COMMA, (const byte) KEY_MINUS, (const byte) KEY_DOT, (const byte) KEY_SLASH, (const byte) KEY_0, (const byte) KEY_1, (const byte) KEY_2, (const byte) KEY_3, (const byte) KEY_4, (const byte) KEY_5, (const byte) KEY_6, (const byte) KEY_7, (const byte) KEY_8, (const byte) KEY_9, (const byte) KEY_COLON, (const byte) KEY_SEMICOLON, (byte) $3f, (const byte) KEY_EQUALS, (byte) $3f, (byte) $3f }
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
(label) keyboard_get_keycode::@return
(byte) keyboard_get_keycode::ch
(byte) keyboard_get_keycode::ch#0 reg byte x 103.0
(byte) keyboard_get_keycode::return
(byte) keyboard_get_keycode::return#0 reg byte a 34.33333333333333
(byte) keyboard_get_keycode::return#2 reg byte a 202.0
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
(byte~) keyboard_key_pressed::$2 reg byte a 4.0
(label) keyboard_key_pressed::@1
(label) keyboard_key_pressed::@return
(byte) keyboard_key_pressed::colidx
(byte) keyboard_key_pressed::colidx#0 reg byte y 0.6666666666666666
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::key#5 reg byte x 202.0
(byte) keyboard_key_pressed::key#6 reg byte x 52.5
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::return#0 reg byte a 19.75
(byte) keyboard_key_pressed::return#10 reg byte a 22.0
(byte) keyboard_key_pressed::return#11 reg byte a 22.0
(byte) keyboard_key_pressed::return#12 reg byte a 22.0
(byte) keyboard_key_pressed::return#13 reg byte a 22.0
(byte) keyboard_key_pressed::return#14 reg byte a 202.0
(byte) keyboard_key_pressed::return#2 reg byte a 22.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.0
(const byte*) keyboard_matrix_col_bitmask[(number) 8]  = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(label) keyboard_matrix_read::@return
(byte) keyboard_matrix_read::return
(byte) keyboard_matrix_read::return#0 reg byte a 1.3333333333333333
(byte) keyboard_matrix_read::return#2 reg byte a 4.0
(byte) keyboard_matrix_read::row_pressed_bits
(byte) keyboard_matrix_read::rowid
(byte) keyboard_matrix_read::rowid#0 reg byte x 4.0
(const byte*) keyboard_matrix_row_bitmask[(number) 8]  = { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f }
(void()) main()
(byte~) main::$15 reg byte a 22.0
(byte~) main::$18 reg byte a 22.0
(byte~) main::$21 reg byte a 22.0
(byte~) main::$24 reg byte a 22.0
(byte~) main::$27 reg byte a 22.0
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@16
(label) main::@17
(label) main::@18
(label) main::@19
(label) main::@2
(label) main::@20
(label) main::@21
(label) main::@22
(label) main::@23
(label) main::@24
(label) main::@25
(label) main::@26
(label) main::@27
(label) main::@28
(label) main::@29
(label) main::@3
(label) main::@30
(label) main::@31
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(byte) main::ch
(byte) main::ch#1 ch zp[1]:5 151.5
(byte) main::ch#2 ch zp[1]:5 25.25
(byte) main::cur_pos
(byte) main::cur_pos#11 cur_pos zp[1]:3 8.52
(byte) main::cur_pos#18 cur_pos zp[1]:3 3.6666666666666665
(byte) main::cur_pos#20 cur_pos zp[1]:3 3.6666666666666665
(byte) main::cur_pos#22 cur_pos zp[1]:3 3.6666666666666665
(byte) main::cur_pos#24 cur_pos zp[1]:3 18.666666666666664
(byte) main::i
(byte) main::i#1 i zp[1]:2 16.5
(byte) main::i#2 i zp[1]:2 11.0
(byte) main::key
(byte) main::key#0 reg byte a 151.5
(byte) main::pressed
(byte) main::pressed#1 reg byte a 202.0
(byte) main::pressed#2 reg byte a 202.0
(byte*) main::sc
(byte*) main::sc#1 sc zp[2]:6 22.0
(byte*) main::sc#2 sc zp[2]:6 14.666666666666666
(byte) main::shift
(byte) main::shift#9 shift zp[1]:4 5.315789473684211
(const byte*) main::str[(byte) 3]  = (byte*) "f1"
(const byte*) main::str1[(byte) 3]  = (byte*) "f3"
(const byte*) main::str2[(byte) 3]  = (byte*) "f5"
(const byte*) main::str3[(byte) 3]  = (byte*) "f7"
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
(byte~) mul8u::$1 reg byte a 2002.0
(label) mul8u::@1
(label) mul8u::@2
(label) mul8u::@3
(label) mul8u::@4
(label) mul8u::@return
(byte) mul8u::a
(byte) mul8u::a#0 reg byte x 1001.0
(byte) mul8u::a#1 reg byte x 2.0
(byte) mul8u::a#2 reg byte x 667.6666666666667
(byte) mul8u::b
(const byte) mul8u::b#0 b = (byte) $a
(word) mul8u::mb
(word) mul8u::mb#1 mb zp[2]:12 2002.0
(word) mul8u::mb#2 mb zp[2]:12 429.0
(word) mul8u::res
(word) mul8u::res#1 res zp[2]:10 2002.0
(word) mul8u::res#2 res zp[2]:10 500.83333333333337
(word) mul8u::res#6 res zp[2]:10 1001.0
(word) mul8u::return
(word) mul8u::return#2 return zp[2]:10 4.0
(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift)
(word~) plot_chargen::$0 zp[2]:6 4.0
(word~) plot_chargen::$1 zp[2]:6 4.0
(byte~) plot_chargen::$10 reg byte a 20002.0
(word~) plot_chargen::$7 zp[2]:10 4.0
(label) plot_chargen::@1
(label) plot_chargen::@2
(label) plot_chargen::@3
(label) plot_chargen::@4
(label) plot_chargen::@5
(label) plot_chargen::@6
(label) plot_chargen::@7
(label) plot_chargen::@8
(label) plot_chargen::@9
(label) plot_chargen::@return
(byte) plot_chargen::bits
(byte) plot_chargen::bits#0 bits zp[1]:9 2002.0
(byte) plot_chargen::bits#1 bits zp[1]:9 6667.333333333333
(byte) plot_chargen::bits#2 bits zp[1]:9 4429.142857142857
(byte) plot_chargen::c
(byte) plot_chargen::c#2 reg byte a 10001.0
(byte) plot_chargen::ch
(byte) plot_chargen::ch#1 reg byte a 101.0
(byte) plot_chargen::ch#2 reg byte a 50.5
(byte*) plot_chargen::chargen
(byte*) plot_chargen::chargen#0 chargen zp[2]:6 3.0
(byte*) plot_chargen::chargen#1 chargen zp[2]:6 4.0
(byte*) plot_chargen::chargen#5 chargen zp[2]:6 45.68181818181818
(byte) plot_chargen::pos
(byte) plot_chargen::pos#0 reg byte y 22.0
(byte) plot_chargen::pos#1 reg byte y 67.33333333333333
(byte) plot_chargen::pos#2 reg byte y 12.666666666666664
(byte*) plot_chargen::sc
(byte*) plot_chargen::sc#0 sc zp[2]:10 4.0
(byte*) plot_chargen::sc#1 sc zp[2]:10 5250.75
(byte*) plot_chargen::sc#2 sc zp[2]:10 667.3333333333334
(byte*) plot_chargen::sc#3 sc zp[2]:10 5167.333333333333
(byte*) plot_chargen::sc#7 sc zp[2]:10 1002.0
(byte) plot_chargen::shift
(byte) plot_chargen::shift#1 reg byte x 202.0
(byte) plot_chargen::shift#2 reg byte x 20.599999999999998
(byte) plot_chargen::x
(byte) plot_chargen::x#1 reg byte x 15001.5
(byte) plot_chargen::x#2 reg byte x 2500.25
(byte) plot_chargen::y
(byte) plot_chargen::y#1 y zp[1]:8 1501.5
(byte) plot_chargen::y#2 y zp[1]:8 231.0
(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at)
(label) print_str_at::@1
(label) print_str_at::@2
(label) print_str_at::@return
(byte*) print_str_at::at
(byte*) print_str_at::at#4 at zp[2]:12 11.0
(byte*) print_str_at::at#5 at zp[2]:12 11.666666666666666
(byte*) print_str_at::at#7 at zp[2]:12 2.0
(byte*) print_str_at::str
(byte*) print_str_at::str#4 str zp[2]:10 22.0
(byte*) print_str_at::str#5 str zp[2]:10 11.5
(byte*) print_str_at::str#7 str zp[2]:10 2.0

zp[1]:2 [ main::i#2 main::i#1 ]
zp[1]:3 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
zp[1]:4 [ main::shift#9 ]
zp[1]:5 [ main::ch#2 main::ch#1 ]
reg byte a [ main::pressed#2 main::pressed#1 ]
reg byte a [ plot_chargen::ch#2 plot_chargen::ch#1 ]
reg byte x [ plot_chargen::shift#2 plot_chargen::shift#1 ]
reg byte y [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
zp[2]:6 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 main::sc#2 main::sc#1 ]
zp[1]:8 [ plot_chargen::y#2 plot_chargen::y#1 ]
zp[1]:9 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
reg byte x [ plot_chargen::x#2 plot_chargen::x#1 ]
reg byte a [ plot_chargen::c#2 ]
reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
reg byte x [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
zp[2]:10 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 plot_chargen::$7 mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ]
zp[2]:12 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 mul8u::mb#2 mul8u::mb#1 ]
reg byte a [ keyboard_key_pressed::return#2 ]
reg byte a [ main::$15 ]
reg byte a [ keyboard_key_pressed::return#10 ]
reg byte a [ main::$18 ]
reg byte a [ keyboard_key_pressed::return#11 ]
reg byte a [ main::$21 ]
reg byte a [ keyboard_key_pressed::return#12 ]
reg byte a [ main::$24 ]
reg byte a [ keyboard_key_pressed::return#13 ]
reg byte a [ main::$27 ]
reg byte x [ keyboard_get_keycode::ch#0 ]
reg byte a [ keyboard_get_keycode::return#2 ]
reg byte a [ main::key#0 ]
reg byte a [ keyboard_key_pressed::return#14 ]
reg byte a [ plot_chargen::$10 ]
reg byte a [ mul8u::$1 ]
reg byte y [ keyboard_key_pressed::colidx#0 ]
reg byte a [ keyboard_key_pressed::rowidx#0 ]
reg byte x [ keyboard_matrix_read::rowid#0 ]
reg byte a [ keyboard_matrix_read::return#2 ]
reg byte a [ keyboard_key_pressed::$2 ]
reg byte a [ keyboard_key_pressed::return#0 ]
reg byte a [ keyboard_matrix_read::return#0 ]
reg byte a [ keyboard_get_keycode::return#0 ]


FINAL ASSEMBLER
Score: 628983

  // File Comments
// Allows analysis of the CHARGEN ROM font
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // The address of the CHARGEN character set
  .label CHARGEN = $d000
  // CIA#1 Port A: keyboard matrix columns and joystick #2
  .label CIA1_PORT_A = $dc00
  // CIA#1 Port B: keyboard matrix rows and joystick #1.
  .label CIA1_PORT_B = $dc01
  .const KEY_F7 = 3
  .const KEY_F1 = 4
  .const KEY_F3 = 5
  .const KEY_F5 = 6
  .const KEY_3 = 8
  .const KEY_W = 9
  .const KEY_A = $a
  .const KEY_4 = $b
  .const KEY_Z = $c
  .const KEY_S = $d
  .const KEY_E = $e
  .const KEY_LSHIFT = $f
  .const KEY_5 = $10
  .const KEY_R = $11
  .const KEY_D = $12
  .const KEY_6 = $13
  .const KEY_C = $14
  .const KEY_F = $15
  .const KEY_T = $16
  .const KEY_X = $17
  .const KEY_7 = $18
  .const KEY_Y = $19
  .const KEY_G = $1a
  .const KEY_8 = $1b
  .const KEY_B = $1c
  .const KEY_H = $1d
  .const KEY_U = $1e
  .const KEY_V = $1f
  .const KEY_9 = $20
  .const KEY_I = $21
  .const KEY_J = $22
  .const KEY_0 = $23
  .const KEY_M = $24
  .const KEY_K = $25
  .const KEY_O = $26
  .const KEY_N = $27
  .const KEY_PLUS = $28
  .const KEY_P = $29
  .const KEY_L = $2a
  .const KEY_MINUS = $2b
  .const KEY_DOT = $2c
  .const KEY_COLON = $2d
  .const KEY_AT = $2e
  .const KEY_COMMA = $2f
  .const KEY_POUND = $30
  .const KEY_ASTERISK = $31
  .const KEY_SEMICOLON = $32
  .const KEY_EQUALS = $35
  .const KEY_ARROW_UP = $36
  .const KEY_SLASH = $37
  .const KEY_1 = $38
  .const KEY_ARROW_LEFT = $39
  .const KEY_2 = $3b
  .const KEY_SPACE = $3c
  .const KEY_Q = $3e
  .label SCREEN = $400
  // @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: {
    .label sc = 6
    .label i = 2
    .label ch = 5
    // Which char canvas to use
    .label cur_pos = 3
    // Is shift pressed
    .label shift = 4
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (byte*) main::sc#2 = (const byte*) SCREEN [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z sc
    lda #>SCREEN
    sta.z sc+1
  // Clear screen
    // main::@1
  __b1:
    // for( byte* sc=SCREEN;sc<SCREEN+1000;sc++)
    // [6] if((byte*) main::sc#2<(const byte*) SCREEN+(word) $3e8) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 
    lda.z sc+1
    cmp #>SCREEN+$3e8
    bcs !__b2+
    jmp __b2
  !__b2:
    bne !+
    lda.z sc
    cmp #<SCREEN+$3e8
    bcs !__b2+
    jmp __b2
  !__b2:
  !:
    // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
    // main::@3
    // print_str_at("f1", SCREEN+1)
    // [8] call print_str_at 
    // [127] phi from main::@3 to print_str_at [phi:main::@3->print_str_at]
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1 [phi:main::@3->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta.z print_str_at.at
    lda #>SCREEN+1
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str [phi:main::@3->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_at.str
    lda #>str
    sta.z print_str_at.str+1
    jsr print_str_at
    // [9] phi from main::@3 to main::@17 [phi:main::@3->main::@17]
    // main::@17
    // print_str_at("f3", SCREEN+1+10)
    // [10] call print_str_at 
    // [127] phi from main::@17 to print_str_at [phi:main::@17->print_str_at]
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $a [phi:main::@17->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$a
    sta.z print_str_at.at
    lda #>SCREEN+1+$a
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str1 [phi:main::@17->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str_at.str
    lda #>str1
    sta.z print_str_at.str+1
    jsr print_str_at
    // [11] phi from main::@17 to main::@18 [phi:main::@17->main::@18]
    // main::@18
    // print_str_at("f5", SCREEN+1+20)
    // [12] call print_str_at 
    // [127] phi from main::@18 to print_str_at [phi:main::@18->print_str_at]
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $14 [phi:main::@18->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$14
    sta.z print_str_at.at
    lda #>SCREEN+1+$14
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str2 [phi:main::@18->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str2
    sta.z print_str_at.str
    lda #>str2
    sta.z print_str_at.str+1
    jsr print_str_at
    // [13] phi from main::@18 to main::@19 [phi:main::@18->main::@19]
    // main::@19
    // print_str_at("f7", SCREEN+1+30)
    // [14] call print_str_at 
    // [127] phi from main::@19 to print_str_at [phi:main::@19->print_str_at]
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN+(byte) 1+(byte) $1e [phi:main::@19->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$1e
    sta.z print_str_at.at
    lda #>SCREEN+1+$1e
    sta.z print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const byte*) main::str3 [phi:main::@19->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str3
    sta.z print_str_at.str
    lda #>str3
    sta.z print_str_at.str+1
    jsr print_str_at
    // [15] phi from main::@19 to main::@4 [phi:main::@19->main::@4]
    // [15] phi (byte) main::i#2 = (byte) 0 [phi:main::@19->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [15] phi from main::@20 to main::@4 [phi:main::@20->main::@4]
    // [15] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@20->main::@4#0] -- register_copy 
    // main::@4
  __b4:
    // plot_chargen(i, $20, 0)
    // [16] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuyy=vbuz1 
    ldy.z i
    // [17] call plot_chargen 
    // [71] phi from main::@4 to plot_chargen [phi:main::@4->plot_chargen]
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@4->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) 0 [phi:main::@4->plot_chargen#1] -- vbuxx=vbuc1 
    ldx #0
    // [71] phi (byte) plot_chargen::ch#2 = (byte) $20 [phi:main::@4->plot_chargen#2] -- vbuaa=vbuc1 
    lda #$20
    jsr plot_chargen
    // main::@20
    // for(byte i : 0..3 )
    // [18] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [19] if((byte) main::i#1!=(byte) 4) goto main::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp.z i
    bne __b4
    // [20] phi from main::@20 to main::@5 [phi:main::@20->main::@5]
    // [20] phi (byte) main::cur_pos#24 = (byte) 0 [phi:main::@20->main::@5#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cur_pos
    // main::@5
  __b5:
    // keyboard_key_pressed(KEY_F1)
    // [21] call keyboard_key_pressed 
    // [113] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1 [phi:main::@5->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F1
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F1)
    // [22] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
    // main::@21
    // [23] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
    // if(keyboard_key_pressed(KEY_F1)!=0)
    // [24] if((byte~) main::$15==(byte) 0) goto main::@28 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b6
    // [26] phi from main::@21 to main::@6 [phi:main::@21->main::@6]
    // [26] phi (byte) main::cur_pos#22 = (byte) 0 [phi:main::@21->main::@6#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cur_pos
    // [25] phi from main::@21 to main::@28 [phi:main::@21->main::@28]
    // main::@28
    // [26] phi from main::@28 to main::@6 [phi:main::@28->main::@6]
    // [26] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@28->main::@6#0] -- register_copy 
    // main::@6
  __b6:
    // keyboard_key_pressed(KEY_F3)
    // [27] call keyboard_key_pressed 
    // [113] phi from main::@6 to keyboard_key_pressed [phi:main::@6->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F3 [phi:main::@6->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F3
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F3)
    // [28] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
    // main::@22
    // [29] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
    // if(keyboard_key_pressed(KEY_F3)!=0)
    // [30] if((byte~) main::$18==(byte) 0) goto main::@29 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b7
    // [32] phi from main::@22 to main::@7 [phi:main::@22->main::@7]
    // [32] phi (byte) main::cur_pos#20 = (byte) 1 [phi:main::@22->main::@7#0] -- vbuz1=vbuc1 
    lda #1
    sta.z cur_pos
    // [31] phi from main::@22 to main::@29 [phi:main::@22->main::@29]
    // main::@29
    // [32] phi from main::@29 to main::@7 [phi:main::@29->main::@7]
    // [32] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@29->main::@7#0] -- register_copy 
    // main::@7
  __b7:
    // keyboard_key_pressed(KEY_F5)
    // [33] call keyboard_key_pressed 
    // [113] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F5 [phi:main::@7->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F5
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F5)
    // [34] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
    // main::@23
    // [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
    // if(keyboard_key_pressed(KEY_F5)!=0)
    // [36] if((byte~) main::$21==(byte) 0) goto main::@30 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b8
    // [38] phi from main::@23 to main::@8 [phi:main::@23->main::@8]
    // [38] phi (byte) main::cur_pos#18 = (byte) 2 [phi:main::@23->main::@8#0] -- vbuz1=vbuc1 
    lda #2
    sta.z cur_pos
    // [37] phi from main::@23 to main::@30 [phi:main::@23->main::@30]
    // main::@30
    // [38] phi from main::@30 to main::@8 [phi:main::@30->main::@8]
    // [38] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@30->main::@8#0] -- register_copy 
    // main::@8
  __b8:
    // keyboard_key_pressed(KEY_F7)
    // [39] call keyboard_key_pressed 
    // [113] phi from main::@8 to keyboard_key_pressed [phi:main::@8->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F7 [phi:main::@8->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F7
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F7)
    // [40] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
    // main::@24
    // [41] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
    // if(keyboard_key_pressed(KEY_F7)!=0)
    // [42] if((byte~) main::$24==(byte) 0) goto main::@31 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b9
    // [44] phi from main::@24 to main::@9 [phi:main::@24->main::@9]
    // [44] phi (byte) main::cur_pos#11 = (byte) 3 [phi:main::@24->main::@9#0] -- vbuz1=vbuc1 
    lda #3
    sta.z cur_pos
    // [43] phi from main::@24 to main::@31 [phi:main::@24->main::@31]
    // main::@31
    // [44] phi from main::@31 to main::@9 [phi:main::@31->main::@9]
    // [44] phi (byte) main::cur_pos#11 = (byte) main::cur_pos#18 [phi:main::@31->main::@9#0] -- register_copy 
    // main::@9
  __b9:
    // keyboard_key_pressed(KEY_LSHIFT)
    // [45] call keyboard_key_pressed 
    // [113] phi from main::@9 to keyboard_key_pressed [phi:main::@9->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_LSHIFT [phi:main::@9->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_LSHIFT
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_LSHIFT)
    // [46] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
    // main::@25
    // [47] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
    // if(keyboard_key_pressed(KEY_LSHIFT)!=0)
    // [48] if((byte~) main::$27!=(byte) 0) goto main::@10 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b10
    // [50] phi from main::@25 to main::@11 [phi:main::@25->main::@11]
    // [50] phi (byte) main::shift#9 = (byte) 0 [phi:main::@25->main::@11#0] -- vbuz1=vbuc1 
    lda #0
    sta.z shift
    jmp __b11
    // [49] phi from main::@25 to main::@10 [phi:main::@25->main::@10]
    // main::@10
  __b10:
    // [50] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
    // [50] phi (byte) main::shift#9 = (byte) 1 [phi:main::@10->main::@11#0] -- vbuz1=vbuc1 
    lda #1
    sta.z shift
    // main::@11
  __b11:
    // [51] phi from main::@11 to main::@12 [phi:main::@11->main::@12]
    // [51] phi (byte) main::ch#2 = (byte) 0 [phi:main::@11->main::@12#0] -- vbuz1=vbuc1 
    lda #0
    sta.z ch
  // Check for key presses - and plot char if found
    // [51] phi from main::@14 to main::@12 [phi:main::@14->main::@12]
    // [51] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@14->main::@12#0] -- register_copy 
    // main::@12
  __b12:
    // keyboard_get_keycode(ch)
    // [52] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuxx=vbuz1 
    ldx.z ch
    // [53] call keyboard_get_keycode 
    jsr keyboard_get_keycode
    // [54] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
    // main::@26
    // key = keyboard_get_keycode(ch)
    // [55] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
    // if(key!=$3f)
    // [56] if((byte) main::key#0==(byte) $3f) goto main::@13 -- vbuaa_eq_vbuc1_then_la1 
    cmp #$3f
    beq b1
    // main::@15
    // keyboard_key_pressed(key)
    // [57] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuxx=vbuaa 
    tax
    // [58] call keyboard_key_pressed 
    // [113] phi from main::@15 to keyboard_key_pressed [phi:main::@15->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@15->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
    // keyboard_key_pressed(key)
    // [59] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
    // main::@27
    // pressed = keyboard_key_pressed(key)
    // [60] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
    // [61] phi from main::@27 to main::@13 [phi:main::@27->main::@13]
    // [61] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@27->main::@13#0] -- register_copy 
    jmp __b13
    // [61] phi from main::@26 to main::@13 [phi:main::@26->main::@13]
  b1:
    // [61] phi (byte) main::pressed#2 = (byte) 0 [phi:main::@26->main::@13#0] -- vbuaa=vbuc1 
    lda #0
    // main::@13
  __b13:
    // if(pressed!=0)
    // [62] if((byte) main::pressed#2==(byte) 0) goto main::@14 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b14
    // main::@16
    // plot_chargen(cur_pos, ch, shift)
    // [63] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11 -- vbuyy=vbuz1 
    ldy.z cur_pos
    // [64] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuaa=vbuz1 
    lda.z ch
    // [65] (byte) plot_chargen::shift#1 ← (byte) main::shift#9 -- vbuxx=vbuz1 
    ldx.z shift
    // [66] call plot_chargen 
    // [71] phi from main::@16 to plot_chargen [phi:main::@16->plot_chargen]
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@16->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@16->plot_chargen#1] -- register_copy 
    // [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@16->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    // main::@14
  __b14:
    // for( byte ch : 0..$3f)
    // [67] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc.z ch
    // [68] if((byte) main::ch#1!=(byte) $40) goto main::@12 -- vbuz1_neq_vbuc1_then_la1 
    lda #$40
    cmp.z ch
    bne __b12
    // [20] phi from main::@14 to main::@5 [phi:main::@14->main::@5]
    // [20] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#11 [phi:main::@14->main::@5#0] -- register_copy 
    jmp __b5
    // main::@2
  __b2:
    // *sc = ' '
    // [69] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // for( byte* sc=SCREEN;sc<SCREEN+1000;sc++)
    // [70] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc.z sc
    bne !+
    inc.z sc+1
  !:
    // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@2->main::@1#0] -- register_copy 
    jmp __b1
    str: .text "f1"
    .byte 0
    str1: .text "f3"
    .byte 0
    str2: .text "f5"
    .byte 0
    str3: .text "f7"
    .byte 0
}
  // plot_chargen
// Render 8x8 char (ch) as pixels on char canvas #pos
// plot_chargen(byte register(Y) pos, byte register(A) ch, byte register(X) shift)
plot_chargen: {
    .label __0 = 6
    .label __1 = 6
    .label __7 = $a
    .label chargen = 6
    .label sc = $a
    .label bits = 9
    .label y = 8
    // asm
    // asm { sei  }
    sei
    // (word)ch
    // [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2 -- vwuz1=_word_vbuaa 
    sta.z __0
    lda #0
    sta.z __0+1
    // (word)ch*8
    // [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 -- vwuz1=vwuz1_rol_3 
    asl.z __1
    rol.z __1+1
    asl.z __1
    rol.z __1+1
    asl.z __1
    rol.z __1+1
    // chargen = CHARGEN+(word)ch*8
    // [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN + (word~) plot_chargen::$1 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda.z chargen
    adc #<CHARGEN
    sta.z chargen
    lda.z chargen+1
    adc #>CHARGEN
    sta.z chargen+1
    // if(shift!=0)
    // [76] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1 -- vbuxx_eq_0_then_la1 
    cpx #0
    beq __b1
    // plot_chargen::@2
    // chargen = chargen + $0800
    // [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word) $800 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z chargen
    adc #<$800
    sta.z chargen
    lda.z chargen+1
    adc #>$800
    sta.z chargen+1
    // [78] phi from plot_chargen plot_chargen::@2 to plot_chargen::@1 [phi:plot_chargen/plot_chargen::@2->plot_chargen::@1]
    // [78] phi (byte*) plot_chargen::chargen#5 = (byte*) plot_chargen::chargen#0 [phi:plot_chargen/plot_chargen::@2->plot_chargen::@1#0] -- register_copy 
    // plot_chargen::@1
  __b1:
    // *PROCPORT = $32
    // [79] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
    // mul8u(pos, 10)
    // [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2 -- vbuxx=vbuyy 
    tya
    tax
    // [81] call mul8u 
    // [103] phi from plot_chargen::@1 to mul8u [phi:plot_chargen::@1->mul8u]
    jsr mul8u
    // mul8u(pos, 10)
    // [82] (word) mul8u::return#2 ← (word) mul8u::res#2
    // plot_chargen::@9
    // [83] (word~) plot_chargen::$7 ← (word) mul8u::return#2
    // sc = SCREEN+40+1+mul8u(pos, 10)
    // [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda.z sc
    adc #<SCREEN+$28+1
    sta.z sc
    lda.z sc+1
    adc #>SCREEN+$28+1
    sta.z sc+1
    // [85] phi from plot_chargen::@9 to plot_chargen::@3 [phi:plot_chargen::@9->plot_chargen::@3]
    // [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#0 [phi:plot_chargen::@9->plot_chargen::@3#0] -- register_copy 
    // [85] phi (byte) plot_chargen::y#2 = (byte) 0 [phi:plot_chargen::@9->plot_chargen::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    // [85] phi from plot_chargen::@7 to plot_chargen::@3 [phi:plot_chargen::@7->plot_chargen::@3]
    // [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#2 [phi:plot_chargen::@7->plot_chargen::@3#0] -- register_copy 
    // [85] phi (byte) plot_chargen::y#2 = (byte) plot_chargen::y#1 [phi:plot_chargen::@7->plot_chargen::@3#1] -- register_copy 
    // plot_chargen::@3
  __b3:
    // bits = chargen[y]
    // [86] (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#5 + (byte) plot_chargen::y#2) -- vbuz1=pbuz2_derefidx_vbuz3 
    ldy.z y
    lda (chargen),y
    sta.z bits
    // [87] phi from plot_chargen::@3 to plot_chargen::@4 [phi:plot_chargen::@3->plot_chargen::@4]
    // [87] phi (byte) plot_chargen::x#2 = (byte) 0 [phi:plot_chargen::@3->plot_chargen::@4#0] -- vbuxx=vbuc1 
    ldx #0
    // [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#7 [phi:plot_chargen::@3->plot_chargen::@4#1] -- register_copy 
    // [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#0 [phi:plot_chargen::@3->plot_chargen::@4#2] -- register_copy 
    // [87] phi from plot_chargen::@5 to plot_chargen::@4 [phi:plot_chargen::@5->plot_chargen::@4]
    // [87] phi (byte) plot_chargen::x#2 = (byte) plot_chargen::x#1 [phi:plot_chargen::@5->plot_chargen::@4#0] -- register_copy 
    // [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#1 [phi:plot_chargen::@5->plot_chargen::@4#1] -- register_copy 
    // [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#1 [phi:plot_chargen::@5->plot_chargen::@4#2] -- register_copy 
    // plot_chargen::@4
  __b4:
    // bits & $80
    // [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and.z bits
    // if((bits & $80) != 0)
    // [89] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b1
    // [90] phi from plot_chargen::@4 to plot_chargen::@6 [phi:plot_chargen::@4->plot_chargen::@6]
    // plot_chargen::@6
    // [91] phi from plot_chargen::@6 to plot_chargen::@5 [phi:plot_chargen::@6->plot_chargen::@5]
    // [91] phi (byte) plot_chargen::c#2 = (byte) '*' [phi:plot_chargen::@6->plot_chargen::@5#0] -- vbuaa=vbuc1 
    lda #'*'
    jmp __b5
    // [91] phi from plot_chargen::@4 to plot_chargen::@5 [phi:plot_chargen::@4->plot_chargen::@5]
  b1:
    // [91] phi (byte) plot_chargen::c#2 = (byte) '.' [phi:plot_chargen::@4->plot_chargen::@5#0] -- vbuaa=vbuc1 
    lda #'.'
    // plot_chargen::@5
  __b5:
    // *sc = c
    // [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
    // sc++;
    // [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3 -- pbuz1=_inc_pbuz1 
    inc.z sc
    bne !+
    inc.z sc+1
  !:
    // bits = bits*2
    // [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl.z bits
    // for(byte x:0..7)
    // [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [96] if((byte) plot_chargen::x#1!=(byte) 8) goto plot_chargen::@4 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne __b4
    // plot_chargen::@7
    // sc = sc+32
    // [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$20
    clc
    adc.z sc
    sta.z sc
    bcc !+
    inc.z sc+1
  !:
    // for(byte y:0..7)
    // [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [99] if((byte) plot_chargen::y#1!=(byte) 8) goto plot_chargen::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z y
    bne __b3
    // plot_chargen::@8
    // *PROCPORT = $37
    // [100] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
    // asm
    // asm { cli  }
    cli
    // plot_chargen::@return
    // }
    // [102] return 
    rts
}
  // mul8u
// Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word
// mul8u(byte register(X) a)
mul8u: {
    .const b = $a
    .label mb = $c
    .label res = $a
    .label return = $a
    // [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
    // [104] phi (word) mul8u::mb#2 = (word)(const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vwuc1 
    lda #<b
    sta.z mb
    lda #>b
    sta.z mb+1
    // [104] phi (word) mul8u::res#2 = (word) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z res
    sta.z res+1
    // [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#1 [phi:mul8u->mul8u::@1#2] -- register_copy 
    // mul8u::@1
  __b1:
    // while(a!=0)
    // [105] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b2
    // mul8u::@return
    // }
    // [106] return 
    rts
    // mul8u::@2
  __b2:
    // a&1
    // [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
    // if( (a&1) != 0)
    // [108] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b3
    // mul8u::@4
    // res = res + mb
    // [109] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 
    lda.z res
    clc
    adc.z mb
    sta.z res
    lda.z res+1
    adc.z mb+1
    sta.z res+1
    // [110] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3]
    // [110] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy 
    // mul8u::@3
  __b3:
    // a = a>>1
    // [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 -- vbuxx=vbuxx_ror_1 
    txa
    lsr
    tax
    // mb = mb<<1
    // [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z mb
    rol.z mb+1
    // [104] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1]
    // [104] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy 
    // [104] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy 
    // [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy 
    jmp __b1
}
  // keyboard_key_pressed
// Determines whether a specific key is currently pressed by accessing the matrix directly
// The key is a keyboard code defined from the keyboard matrix by %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7)
// All keys exist as as KEY_XXX constants.
// Returns zero if the key is not pressed and a non-zero value if the key is currently pressed
// keyboard_key_pressed(byte register(X) key)
keyboard_key_pressed: {
    // colidx = key&7
    // [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7 -- vbuyy=vbuxx_band_vbuc1 
    txa
    and #7
    tay
    // rowidx = key>>3
    // [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte) 3 -- vbuaa=vbuxx_ror_3 
    txa
    lsr
    lsr
    lsr
    // keyboard_matrix_read(rowidx)
    // [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 -- vbuxx=vbuaa 
    tax
    // [117] call keyboard_matrix_read 
    jsr keyboard_matrix_read
    // [118] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0
    // keyboard_key_pressed::@1
    // [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2
    // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx]
    // [120] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx#0) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuyy 
    and keyboard_matrix_col_bitmask,y
    // keyboard_key_pressed::@return
    // }
    // [121] return 
    rts
}
  // keyboard_matrix_read
// Read a single row of the keyboard matrix
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
// Returns the keys pressed on the row as bits according to the C64 key matrix.
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
// keyboard_matrix_read(byte register(X) rowid)
keyboard_matrix_read: {
    // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid]
    // [122] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx 
    lda keyboard_matrix_row_bitmask,x
    sta CIA1_PORT_A
    // ~*CIA1_PORT_B
    // [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 
    lda CIA1_PORT_B
    eor #$ff
    // keyboard_matrix_read::@return
    // }
    // [124] return 
    rts
}
  // keyboard_get_keycode
// Get the keycode corresponding to a specific screen code character
// ch is the character to get the key code for ($00-$3f)
// Returns the key code corresponding to the passed character. Only characters with a non-shifted key are handled.
// If there is no non-shifted key representing the char $3f is returned (representing RUN/STOP) .
// keyboard_get_keycode(byte register(X) ch)
keyboard_get_keycode: {
    // return keyboard_char_keycodes[ch];
    // [125] (byte) keyboard_get_keycode::return#0 ← *((const byte*) keyboard_char_keycodes + (byte) keyboard_get_keycode::ch#0) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda keyboard_char_keycodes,x
    // keyboard_get_keycode::@return
    // }
    // [126] return 
    rts
}
  // print_str_at
// Print a string at a specific screen position
// print_str_at(byte* zp($a) str, byte* zp($c) at)
print_str_at: {
    .label at = $c
    .label str = $a
    // [128] phi from print_str_at print_str_at::@2 to print_str_at::@1 [phi:print_str_at/print_str_at::@2->print_str_at::@1]
    // [128] phi (byte*) print_str_at::at#5 = (byte*) print_str_at::at#7 [phi:print_str_at/print_str_at::@2->print_str_at::@1#0] -- register_copy 
    // [128] phi (byte*) print_str_at::str#5 = (byte*) print_str_at::str#7 [phi:print_str_at/print_str_at::@2->print_str_at::@1#1] -- register_copy 
    // print_str_at::@1
  __b1:
    // while(*str)
    // [129] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne __b2
    // print_str_at::@return
    // }
    // [130] return 
    rts
    // print_str_at::@2
  __b2:
    // *(at++) = *(str++)
    // [131] *((byte*) print_str_at::at#5) ← *((byte*) print_str_at::str#5) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    sta (at),y
    // *(at++) = *(str++);
    // [132] (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5 -- pbuz1=_inc_pbuz1 
    inc.z at
    bne !+
    inc.z at+1
  !:
    // [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp __b1
}
  // File Data
  // Keycodes for each screen code character from $00-$3f.
  // Chars that do not have an unmodified keycode return $3f (representing RUN/STOP).
  keyboard_char_keycodes: .byte KEY_AT, KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, $3f, KEY_POUND, $3f, KEY_ARROW_UP, KEY_ARROW_LEFT, KEY_SPACE, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, KEY_ASTERISK, KEY_PLUS, KEY_COMMA, KEY_MINUS, KEY_DOT, KEY_SLASH, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_COLON, KEY_SEMICOLON, $3f, KEY_EQUALS, $3f, $3f
  // Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
  keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
  // Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
  keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80

