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) @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) main::@24
Culled Empty Block (label) main::@18
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
  (byte*) PROCPORT#0 ← ((byte*)) (number) 1
  (byte*) CHARGEN#0 ← ((byte*)) (number) $d000
  (byte*) CIA1_PORT_A#0 ← ((byte*)) (number) $dc00
  (byte*) CIA1_PORT_B#0 ← ((byte*)) (number) $dc01
  to:@9
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 ← (number) 0
  (word) mul8u::mb#0 ← (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
@9: scope:[]  from @begin
  (byte) KEY_F7#0 ← (number) 3
  (byte) KEY_F1#0 ← (number) 4
  (byte) KEY_F3#0 ← (number) 5
  (byte) KEY_F5#0 ← (number) 6
  (byte) KEY_3#0 ← (number) 8
  (byte) KEY_W#0 ← (number) 9
  (byte) KEY_A#0 ← (number) $a
  (byte) KEY_4#0 ← (number) $b
  (byte) KEY_Z#0 ← (number) $c
  (byte) KEY_S#0 ← (number) $d
  (byte) KEY_E#0 ← (number) $e
  (byte) KEY_LSHIFT#0 ← (number) $f
  (byte) KEY_5#0 ← (number) $10
  (byte) KEY_R#0 ← (number) $11
  (byte) KEY_D#0 ← (number) $12
  (byte) KEY_6#0 ← (number) $13
  (byte) KEY_C#0 ← (number) $14
  (byte) KEY_F#0 ← (number) $15
  (byte) KEY_T#0 ← (number) $16
  (byte) KEY_X#0 ← (number) $17
  (byte) KEY_7#0 ← (number) $18
  (byte) KEY_Y#0 ← (number) $19
  (byte) KEY_G#0 ← (number) $1a
  (byte) KEY_8#0 ← (number) $1b
  (byte) KEY_B#0 ← (number) $1c
  (byte) KEY_H#0 ← (number) $1d
  (byte) KEY_U#0 ← (number) $1e
  (byte) KEY_V#0 ← (number) $1f
  (byte) KEY_9#0 ← (number) $20
  (byte) KEY_I#0 ← (number) $21
  (byte) KEY_J#0 ← (number) $22
  (byte) KEY_0#0 ← (number) $23
  (byte) KEY_M#0 ← (number) $24
  (byte) KEY_K#0 ← (number) $25
  (byte) KEY_O#0 ← (number) $26
  (byte) KEY_N#0 ← (number) $27
  (byte) KEY_PLUS#0 ← (number) $28
  (byte) KEY_P#0 ← (number) $29
  (byte) KEY_L#0 ← (number) $2a
  (byte) KEY_MINUS#0 ← (number) $2b
  (byte) KEY_DOT#0 ← (number) $2c
  (byte) KEY_COLON#0 ← (number) $2d
  (byte) KEY_AT#0 ← (number) $2e
  (byte) KEY_COMMA#0 ← (number) $2f
  (byte) KEY_POUND#0 ← (number) $30
  (byte) KEY_ASTERISK#0 ← (number) $31
  (byte) KEY_SEMICOLON#0 ← (number) $32
  (byte) KEY_EQUALS#0 ← (number) $35
  (byte) KEY_ARROW_UP#0 ← (number) $36
  (byte) KEY_SLASH#0 ← (number) $37
  (byte) KEY_1#0 ← (number) $38
  (byte) KEY_ARROW_LEFT#0 ← (number) $39
  (byte) KEY_2#0 ← (number) $3b
  (byte) KEY_SPACE#0 ← (number) $3c
  (byte) KEY_Q#0 ← (number) $3e
  (byte[]) keyboard_char_keycodes#0 ← { (byte) KEY_AT#0, (byte) KEY_A#0, (byte) KEY_B#0, (byte) KEY_C#0, (byte) KEY_D#0, (byte) KEY_E#0, (byte) KEY_F#0, (byte) KEY_G#0, (byte) KEY_H#0, (byte) KEY_I#0, (byte) KEY_J#0, (byte) KEY_K#0, (byte) KEY_L#0, (byte) KEY_M#0, (byte) KEY_N#0, (byte) KEY_O#0, (byte) KEY_P#0, (byte) KEY_Q#0, (byte) KEY_R#0, (byte) KEY_S#0, (byte) KEY_T#0, (byte) KEY_U#0, (byte) KEY_V#0, (byte) KEY_W#0, (byte) KEY_X#0, (byte) KEY_Y#0, (byte) KEY_Z#0, (number) $3f, (byte) KEY_POUND#0, (number) $3f, (byte) KEY_ARROW_UP#0, (byte) KEY_ARROW_LEFT#0, (byte) KEY_SPACE#0, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (number) $3f, (byte) KEY_ASTERISK#0, (byte) KEY_PLUS#0, (byte) KEY_COMMA#0, (byte) KEY_MINUS#0, (byte) KEY_DOT#0, (byte) KEY_SLASH#0, (byte) KEY_0#0, (byte) KEY_1#0, (byte) KEY_2#0, (byte) KEY_3#0, (byte) KEY_4#0, (byte) KEY_5#0, (byte) KEY_6#0, (byte) KEY_7#0, (byte) KEY_8#0, (byte) KEY_9#0, (byte) KEY_COLON#0, (byte) KEY_SEMICOLON#0, (number) $3f, (byte) KEY_EQUALS#0, (number) $3f, (number) $3f }
  (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f }
  (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 }
  to:@16
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 )
  *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1)
  (byte~) keyboard_matrix_read::$0 ← ~ *((byte*) CIA1_PORT_B#0)
  (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
keyboard_key_pressed: scope:[keyboard_key_pressed]  from main::@15 main::@5 main::@6 main::@7 main::@8 main::@9
  (byte) keyboard_key_pressed::key#6 ← phi( main::@15/(byte) keyboard_key_pressed::key#5 main::@5/(byte) keyboard_key_pressed::key#0 main::@6/(byte) keyboard_key_pressed::key#1 main::@7/(byte) keyboard_key_pressed::key#2 main::@8/(byte) keyboard_key_pressed::key#3 main::@9/(byte) keyboard_key_pressed::key#4 )
  (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 & *((byte[8]) keyboard_matrix_col_bitmask#0 + (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
keyboard_get_keycode: scope:[keyboard_get_keycode]  from main::@12
  (byte) keyboard_get_keycode::ch#1 ← phi( main::@12/(byte) keyboard_get_keycode::ch#0 )
  (byte) keyboard_get_keycode::return#0 ← *((byte[]) keyboard_char_keycodes#0 + (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
@16: scope:[]  from @9
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  to:@19
main: scope:[main]  from @19
  (byte*) main::sc#0 ← (byte*) SCREEN#0
  to:main::@1
main::@1: scope:[main]  from main main::@1
  (byte*) main::sc#2 ← phi( main/(byte*) main::sc#0 main::@1/(byte*) main::sc#1 )
  *((byte*) main::sc#2) ← (byte) ' '
  (byte*) main::sc#1 ← ++ (byte*) main::sc#2
  (byte*~) main::$11 ← (byte*) SCREEN#0 + (number) $3e8
  (bool~) main::$12 ← (byte*) main::sc#1 < (byte*~) main::$11
  if((bool~) main::$12) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte*~) main::$0 ← (byte*) SCREEN#0 + (number) 1
  (byte*) print_str_at::str#0 ← (const string) main::str
  (byte*) print_str_at::at#0 ← (byte*~) main::$0
  call print_str_at 
  to:main::@25
main::@25: scope:[main]  from main::@2
  (byte*~) main::$2 ← (byte*) SCREEN#0 + (number) 1
  (byte*~) main::$3 ← (byte*~) main::$2 + (number) $a
  (byte*) print_str_at::str#1 ← (const string) main::str1
  (byte*) print_str_at::at#1 ← (byte*~) main::$3
  call print_str_at 
  to:main::@26
main::@26: scope:[main]  from main::@25
  (byte*~) main::$5 ← (byte*) SCREEN#0 + (number) 1
  (byte*~) main::$6 ← (byte*~) main::$5 + (number) $14
  (byte*) print_str_at::str#2 ← (const string) main::str2
  (byte*) print_str_at::at#2 ← (byte*~) main::$6
  call print_str_at 
  to:main::@27
main::@27: scope:[main]  from main::@26
  (byte*~) main::$8 ← (byte*) SCREEN#0 + (number) 1
  (byte*~) main::$9 ← (byte*~) main::$8 + (number) $1e
  (byte*) print_str_at::str#3 ← (const string) main::str3
  (byte*) print_str_at::at#3 ← (byte*~) main::$9
  call print_str_at 
  to:main::@28
main::@28: scope:[main]  from main::@27
  (byte) main::i#0 ← (byte) 0
  to:main::@3
main::@3: scope:[main]  from main::@28 main::@29
  (byte) main::i#2 ← phi( main::@28/(byte) main::i#0 main::@29/(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::@29
main::@29: scope:[main]  from main::@3
  (byte) main::i#3 ← phi( main::@3/(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::@3
  to:main::@4
main::@4: scope:[main]  from main::@29
  (byte) main::cur_pos#0 ← (number) 0
  (byte) main::shift#0 ← (number) 0
  to:main::@5
main::@5: scope:[main]  from main::@17 main::@4
  (byte) main::cur_pos#25 ← phi( main::@17/(byte) main::cur_pos#26 main::@4/(byte) main::cur_pos#0 )
  (byte) keyboard_key_pressed::key#0 ← (byte) KEY_F1#0
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#1
  to:main::@30
main::@30: scope:[main]  from main::@5
  (byte) main::cur_pos#24 ← phi( main::@5/(byte) main::cur_pos#25 )
  (byte) keyboard_key_pressed::return#9 ← phi( main::@5/(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::@6
  to:main::@19
main::@6: scope:[main]  from main::@19 main::@30
  (byte) main::cur_pos#23 ← phi( main::@19/(byte) main::cur_pos#1 main::@30/(byte) main::cur_pos#24 )
  (byte) keyboard_key_pressed::key#1 ← (byte) KEY_F3#0
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#1
  to:main::@31
main::@31: scope:[main]  from main::@6
  (byte) main::cur_pos#22 ← phi( main::@6/(byte) main::cur_pos#23 )
  (byte) keyboard_key_pressed::return#10 ← phi( main::@6/(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::@7
  to:main::@20
main::@19: scope:[main]  from main::@30
  (byte) main::cur_pos#1 ← (number) 0
  to:main::@6
main::@7: scope:[main]  from main::@20 main::@31
  (byte) main::cur_pos#21 ← phi( main::@20/(byte) main::cur_pos#2 main::@31/(byte) main::cur_pos#22 )
  (byte) keyboard_key_pressed::key#2 ← (byte) KEY_F5#0
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#4 ← (byte) keyboard_key_pressed::return#1
  to:main::@32
main::@32: scope:[main]  from main::@7
  (byte) main::cur_pos#20 ← phi( main::@7/(byte) main::cur_pos#21 )
  (byte) keyboard_key_pressed::return#11 ← phi( main::@7/(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::@8
  to:main::@21
main::@20: scope:[main]  from main::@31
  (byte) main::cur_pos#2 ← (number) 1
  to:main::@7
main::@8: scope:[main]  from main::@21 main::@32
  (byte) main::cur_pos#19 ← phi( main::@21/(byte) main::cur_pos#3 main::@32/(byte) main::cur_pos#20 )
  (byte) keyboard_key_pressed::key#3 ← (byte) KEY_F7#0
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#5 ← (byte) keyboard_key_pressed::return#1
  to:main::@33
main::@33: scope:[main]  from main::@8
  (byte) main::cur_pos#18 ← phi( main::@8/(byte) main::cur_pos#19 )
  (byte) keyboard_key_pressed::return#12 ← phi( main::@8/(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::@9
  to:main::@22
main::@21: scope:[main]  from main::@32
  (byte) main::cur_pos#3 ← (number) 2
  to:main::@8
main::@9: scope:[main]  from main::@22 main::@33
  (byte) main::cur_pos#17 ← phi( main::@22/(byte) main::cur_pos#4 main::@33/(byte) main::cur_pos#18 )
  (byte) keyboard_key_pressed::key#4 ← (byte) KEY_LSHIFT#0
  call keyboard_key_pressed 
  (byte) keyboard_key_pressed::return#6 ← (byte) keyboard_key_pressed::return#1
  to:main::@34
main::@34: scope:[main]  from main::@9
  (byte) main::cur_pos#16 ← phi( main::@9/(byte) main::cur_pos#17 )
  (byte) keyboard_key_pressed::return#13 ← phi( main::@9/(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::@10
  to:main::@23
main::@22: scope:[main]  from main::@33
  (byte) main::cur_pos#4 ← (number) 3
  to:main::@9
main::@10: scope:[main]  from main::@34
  (byte) main::cur_pos#13 ← phi( main::@34/(byte) main::cur_pos#16 )
  (byte) main::shift#1 ← (number) 1
  to:main::@11
main::@23: scope:[main]  from main::@34
  (byte) main::cur_pos#14 ← phi( main::@34/(byte) main::cur_pos#16 )
  (byte) main::shift#2 ← (number) 0
  to:main::@11
main::@11: scope:[main]  from main::@10 main::@23
  (byte) main::shift#9 ← phi( main::@10/(byte) main::shift#1 main::@23/(byte) main::shift#2 )
  (byte) main::cur_pos#11 ← phi( main::@10/(byte) main::cur_pos#13 main::@23/(byte) main::cur_pos#14 )
  (byte) main::ch#0 ← (byte) 0
  to:main::@12
main::@12: scope:[main]  from main::@11 main::@14
  (byte) main::shift#7 ← phi( main::@11/(byte) main::shift#9 main::@14/(byte) main::shift#10 )
  (byte) main::cur_pos#9 ← phi( main::@11/(byte) main::cur_pos#11 main::@14/(byte) main::cur_pos#12 )
  (byte) main::ch#2 ← phi( main::@11/(byte) main::ch#0 main::@14/(byte) main::ch#1 )
  (byte) main::pressed#0 ← (number) 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::@35
main::@35: scope:[main]  from main::@12
  (byte) main::shift#5 ← phi( main::@12/(byte) main::shift#7 )
  (byte) main::cur_pos#7 ← phi( main::@12/(byte) main::cur_pos#9 )
  (byte) main::ch#7 ← phi( main::@12/(byte) main::ch#2 )
  (byte) main::pressed#3 ← phi( main::@12/(byte) main::pressed#0 )
  (byte) keyboard_get_keycode::return#4 ← phi( main::@12/(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::@13
  to:main::@15
main::@13: scope:[main]  from main::@35 main::@36
  (byte) main::shift#4 ← phi( main::@35/(byte) main::shift#5 main::@36/(byte) main::shift#6 )
  (byte) main::cur_pos#6 ← phi( main::@35/(byte) main::cur_pos#7 main::@36/(byte) main::cur_pos#8 )
  (byte) main::ch#5 ← phi( main::@35/(byte) main::ch#7 main::@36/(byte) main::ch#8 )
  (byte) main::pressed#2 ← phi( main::@35/(byte) main::pressed#3 main::@36/(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::@14
  to:main::@16
main::@15: scope:[main]  from main::@35
  (byte) main::shift#8 ← phi( main::@35/(byte) main::shift#5 )
  (byte) main::cur_pos#10 ← phi( main::@35/(byte) main::cur_pos#7 )
  (byte) main::ch#9 ← phi( main::@35/(byte) main::ch#7 )
  (byte) main::key#1 ← phi( main::@35/(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::@36
main::@36: scope:[main]  from main::@15
  (byte) main::shift#6 ← phi( main::@15/(byte) main::shift#8 )
  (byte) main::cur_pos#8 ← phi( main::@15/(byte) main::cur_pos#10 )
  (byte) main::ch#8 ← phi( main::@15/(byte) main::ch#9 )
  (byte) keyboard_key_pressed::return#14 ← phi( main::@15/(byte) keyboard_key_pressed::return#7 )
  (byte~) main::$32 ← (byte) keyboard_key_pressed::return#14
  (byte) main::pressed#1 ← (byte~) main::$32
  to:main::@13
main::@14: scope:[main]  from main::@13 main::@37
  (byte) main::shift#10 ← phi( main::@13/(byte) main::shift#4 main::@37/(byte) main::shift#11 )
  (byte) main::cur_pos#12 ← phi( main::@13/(byte) main::cur_pos#6 main::@37/(byte) main::cur_pos#15 )
  (byte) main::ch#3 ← phi( main::@13/(byte) main::ch#5 main::@37/(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::@12
  to:main::@17
main::@16: scope:[main]  from main::@13
  (byte) main::shift#3 ← phi( main::@13/(byte) main::shift#4 )
  (byte) main::ch#4 ← phi( main::@13/(byte) main::ch#5 )
  (byte) main::cur_pos#5 ← phi( main::@13/(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::@37
main::@37: scope:[main]  from main::@16
  (byte) main::shift#11 ← phi( main::@16/(byte) main::shift#3 )
  (byte) main::cur_pos#15 ← phi( main::@16/(byte) main::cur_pos#5 )
  (byte) main::ch#6 ← phi( main::@16/(byte) main::ch#4 )
  to:main::@14
main::@17: scope:[main]  from main::@14
  (byte) main::cur_pos#26 ← phi( main::@14/(byte) main::cur_pos#12 )
  if(true) goto main::@5
  to:main::@return
main::@return: scope:[main]  from main::@17
  return 
  to:@return
print_str_at: scope:[print_str_at]  from main::@2 main::@25 main::@26 main::@27
  (byte*) print_str_at::at#7 ← phi( main::@2/(byte*) print_str_at::at#0 main::@25/(byte*) print_str_at::at#1 main::@26/(byte*) print_str_at::at#2 main::@27/(byte*) print_str_at::at#3 )
  (byte*) print_str_at::str#7 ← phi( main::@2/(byte*) print_str_at::str#0 main::@25/(byte*) print_str_at::str#1 main::@26/(byte*) print_str_at::str#2 main::@27/(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 ← *((byte*) print_str_at::str#5) != (byte) '@'
  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
plot_chargen: scope:[plot_chargen]  from main::@16 main::@3
  (byte) plot_chargen::pos#3 ← phi( main::@16/(byte) plot_chargen::pos#1 main::@3/(byte) plot_chargen::pos#0 )
  (byte) plot_chargen::shift#2 ← phi( main::@16/(byte) plot_chargen::shift#1 main::@3/(byte) plot_chargen::shift#0 )
  (byte) plot_chargen::ch#2 ← phi( main::@16/(byte) plot_chargen::ch#1 main::@3/(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 ← (byte*) CHARGEN#0 + (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 )
  *((byte*) PROCPORT#0) ← (number) $32
  (byte*~) plot_chargen::$5 ← (byte*) SCREEN#0 + (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
  *((byte*) PROCPORT#0) ← (number) $37
  asm { cli  }
  to:plot_chargen::@return
plot_chargen::@return: scope:[plot_chargen]  from plot_chargen::@8
  return 
  to:@return
@19: scope:[]  from @16
  call main 
  to:@20
@20: scope:[]  from @19
  to:@end
@end: scope:[]  from @20

SYMBOL TABLE SSA
(label) @16
(label) @19
(label) @20
(label) @9
(label) @begin
(label) @end
(byte*) CHARGEN
(byte*) CHARGEN#0
(byte*) CIA1_PORT_A
(byte*) CIA1_PORT_A#0
(byte*) CIA1_PORT_B
(byte*) CIA1_PORT_B#0
(byte) KEY_0
(byte) KEY_0#0
(byte) KEY_1
(byte) KEY_1#0
(byte) KEY_2
(byte) KEY_2#0
(byte) KEY_3
(byte) KEY_3#0
(byte) KEY_4
(byte) KEY_4#0
(byte) KEY_5
(byte) KEY_5#0
(byte) KEY_6
(byte) KEY_6#0
(byte) KEY_7
(byte) KEY_7#0
(byte) KEY_8
(byte) KEY_8#0
(byte) KEY_9
(byte) KEY_9#0
(byte) KEY_A
(byte) KEY_A#0
(byte) KEY_ARROW_LEFT
(byte) KEY_ARROW_LEFT#0
(byte) KEY_ARROW_UP
(byte) KEY_ARROW_UP#0
(byte) KEY_ASTERISK
(byte) KEY_ASTERISK#0
(byte) KEY_AT
(byte) KEY_AT#0
(byte) KEY_B
(byte) KEY_B#0
(byte) KEY_C
(byte) KEY_C#0
(byte) KEY_COLON
(byte) KEY_COLON#0
(byte) KEY_COMMA
(byte) KEY_COMMA#0
(byte) KEY_D
(byte) KEY_D#0
(byte) KEY_DOT
(byte) KEY_DOT#0
(byte) KEY_E
(byte) KEY_E#0
(byte) KEY_EQUALS
(byte) KEY_EQUALS#0
(byte) KEY_F
(byte) KEY_F#0
(byte) KEY_F1
(byte) KEY_F1#0
(byte) KEY_F3
(byte) KEY_F3#0
(byte) KEY_F5
(byte) KEY_F5#0
(byte) KEY_F7
(byte) KEY_F7#0
(byte) KEY_G
(byte) KEY_G#0
(byte) KEY_H
(byte) KEY_H#0
(byte) KEY_I
(byte) KEY_I#0
(byte) KEY_J
(byte) KEY_J#0
(byte) KEY_K
(byte) KEY_K#0
(byte) KEY_L
(byte) KEY_L#0
(byte) KEY_LSHIFT
(byte) KEY_LSHIFT#0
(byte) KEY_M
(byte) KEY_M#0
(byte) KEY_MINUS
(byte) KEY_MINUS#0
(byte) KEY_N
(byte) KEY_N#0
(byte) KEY_O
(byte) KEY_O#0
(byte) KEY_P
(byte) KEY_P#0
(byte) KEY_PLUS
(byte) KEY_PLUS#0
(byte) KEY_POUND
(byte) KEY_POUND#0
(byte) KEY_Q
(byte) KEY_Q#0
(byte) KEY_R
(byte) KEY_R#0
(byte) KEY_S
(byte) KEY_S#0
(byte) KEY_SEMICOLON
(byte) KEY_SEMICOLON#0
(byte) KEY_SLASH
(byte) KEY_SLASH#0
(byte) KEY_SPACE
(byte) KEY_SPACE#0
(byte) KEY_T
(byte) KEY_T#0
(byte) KEY_U
(byte) KEY_U#0
(byte) KEY_V
(byte) KEY_V#0
(byte) KEY_W
(byte) KEY_W#0
(byte) KEY_X
(byte) KEY_X#0
(byte) KEY_Y
(byte) KEY_Y#0
(byte) KEY_Z
(byte) KEY_Z#0
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte[]) keyboard_char_keycodes
(byte[]) keyboard_char_keycodes#0
(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
(byte[8]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask#0
(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
(byte[8]) keyboard_matrix_row_bitmask
(byte[8]) keyboard_matrix_row_bitmask#0
(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::@19
(label) main::@2
(label) main::@20
(label) main::@21
(label) main::@22
(label) main::@23
(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::@32
(label) main::@33
(label) main::@34
(label) main::@35
(label) main::@36
(label) main::@37
(label) main::@4
(label) main::@5
(label) main::@6
(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::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 string) main::str = (string) "f1@"
(const string) main::str1 = (string) "f3@"
(const string) main::str2 = (string) "f5@"
(const string) main::str3 = (string) "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 (word) mul8u::res#0 ← (number) 0
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) 3 in (byte) KEY_F7#0 ← (number) 3
Adding number conversion cast (unumber) 4 in (byte) KEY_F1#0 ← (number) 4
Adding number conversion cast (unumber) 5 in (byte) KEY_F3#0 ← (number) 5
Adding number conversion cast (unumber) 6 in (byte) KEY_F5#0 ← (number) 6
Adding number conversion cast (unumber) 8 in (byte) KEY_3#0 ← (number) 8
Adding number conversion cast (unumber) 9 in (byte) KEY_W#0 ← (number) 9
Adding number conversion cast (unumber) $a in (byte) KEY_A#0 ← (number) $a
Adding number conversion cast (unumber) $b in (byte) KEY_4#0 ← (number) $b
Adding number conversion cast (unumber) $c in (byte) KEY_Z#0 ← (number) $c
Adding number conversion cast (unumber) $d in (byte) KEY_S#0 ← (number) $d
Adding number conversion cast (unumber) $e in (byte) KEY_E#0 ← (number) $e
Adding number conversion cast (unumber) $f in (byte) KEY_LSHIFT#0 ← (number) $f
Adding number conversion cast (unumber) $10 in (byte) KEY_5#0 ← (number) $10
Adding number conversion cast (unumber) $11 in (byte) KEY_R#0 ← (number) $11
Adding number conversion cast (unumber) $12 in (byte) KEY_D#0 ← (number) $12
Adding number conversion cast (unumber) $13 in (byte) KEY_6#0 ← (number) $13
Adding number conversion cast (unumber) $14 in (byte) KEY_C#0 ← (number) $14
Adding number conversion cast (unumber) $15 in (byte) KEY_F#0 ← (number) $15
Adding number conversion cast (unumber) $16 in (byte) KEY_T#0 ← (number) $16
Adding number conversion cast (unumber) $17 in (byte) KEY_X#0 ← (number) $17
Adding number conversion cast (unumber) $18 in (byte) KEY_7#0 ← (number) $18
Adding number conversion cast (unumber) $19 in (byte) KEY_Y#0 ← (number) $19
Adding number conversion cast (unumber) $1a in (byte) KEY_G#0 ← (number) $1a
Adding number conversion cast (unumber) $1b in (byte) KEY_8#0 ← (number) $1b
Adding number conversion cast (unumber) $1c in (byte) KEY_B#0 ← (number) $1c
Adding number conversion cast (unumber) $1d in (byte) KEY_H#0 ← (number) $1d
Adding number conversion cast (unumber) $1e in (byte) KEY_U#0 ← (number) $1e
Adding number conversion cast (unumber) $1f in (byte) KEY_V#0 ← (number) $1f
Adding number conversion cast (unumber) $20 in (byte) KEY_9#0 ← (number) $20
Adding number conversion cast (unumber) $21 in (byte) KEY_I#0 ← (number) $21
Adding number conversion cast (unumber) $22 in (byte) KEY_J#0 ← (number) $22
Adding number conversion cast (unumber) $23 in (byte) KEY_0#0 ← (number) $23
Adding number conversion cast (unumber) $24 in (byte) KEY_M#0 ← (number) $24
Adding number conversion cast (unumber) $25 in (byte) KEY_K#0 ← (number) $25
Adding number conversion cast (unumber) $26 in (byte) KEY_O#0 ← (number) $26
Adding number conversion cast (unumber) $27 in (byte) KEY_N#0 ← (number) $27
Adding number conversion cast (unumber) $28 in (byte) KEY_PLUS#0 ← (number) $28
Adding number conversion cast (unumber) $29 in (byte) KEY_P#0 ← (number) $29
Adding number conversion cast (unumber) $2a in (byte) KEY_L#0 ← (number) $2a
Adding number conversion cast (unumber) $2b in (byte) KEY_MINUS#0 ← (number) $2b
Adding number conversion cast (unumber) $2c in (byte) KEY_DOT#0 ← (number) $2c
Adding number conversion cast (unumber) $2d in (byte) KEY_COLON#0 ← (number) $2d
Adding number conversion cast (unumber) $2e in (byte) KEY_AT#0 ← (number) $2e
Adding number conversion cast (unumber) $2f in (byte) KEY_COMMA#0 ← (number) $2f
Adding number conversion cast (unumber) $30 in (byte) KEY_POUND#0 ← (number) $30
Adding number conversion cast (unumber) $31 in (byte) KEY_ASTERISK#0 ← (number) $31
Adding number conversion cast (unumber) $32 in (byte) KEY_SEMICOLON#0 ← (number) $32
Adding number conversion cast (unumber) $35 in (byte) KEY_EQUALS#0 ← (number) $35
Adding number conversion cast (unumber) $36 in (byte) KEY_ARROW_UP#0 ← (number) $36
Adding number conversion cast (unumber) $37 in (byte) KEY_SLASH#0 ← (number) $37
Adding number conversion cast (unumber) $38 in (byte) KEY_1#0 ← (number) $38
Adding number conversion cast (unumber) $39 in (byte) KEY_ARROW_LEFT#0 ← (number) $39
Adding number conversion cast (unumber) $3b in (byte) KEY_2#0 ← (number) $3b
Adding number conversion cast (unumber) $3c in (byte) KEY_SPACE#0 ← (number) $3c
Adding number conversion cast (unumber) $3e in (byte) KEY_Q#0 ← (number) $3e
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 ← (byte*) SCREEN#0 + (number) $3e8
Adding number conversion cast (unumber) 1 in (byte*~) main::$0 ← (byte*) SCREEN#0 + (number) 1
Adding number conversion cast (unumber) 1 in (byte*~) main::$2 ← (byte*) SCREEN#0 + (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 ← (byte*) SCREEN#0 + (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 ← (byte*) SCREEN#0 + (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 (byte) main::cur_pos#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::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) 0 in (byte) main::pressed#0 ← (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) 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 *((byte*) PROCPORT#0) ← (number) $32
Adding number conversion cast (unumber) $28 in (byte*~) plot_chargen::$5 ← (byte*) SCREEN#0 + (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 *((byte*) PROCPORT#0) ← (number) $37
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (byte) to elements in (byte[]) keyboard_char_keycodes#0 ← { (byte) KEY_AT#0, (byte) KEY_A#0, (byte) KEY_B#0, (byte) KEY_C#0, (byte) KEY_D#0, (byte) KEY_E#0, (byte) KEY_F#0, (byte) KEY_G#0, (byte) KEY_H#0, (byte) KEY_I#0, (byte) KEY_J#0, (byte) KEY_K#0, (byte) KEY_L#0, (byte) KEY_M#0, (byte) KEY_N#0, (byte) KEY_O#0, (byte) KEY_P#0, (byte) KEY_Q#0, (byte) KEY_R#0, (byte) KEY_S#0, (byte) KEY_T#0, (byte) KEY_U#0, (byte) KEY_V#0, (byte) KEY_W#0, (byte) KEY_X#0, (byte) KEY_Y#0, (byte) KEY_Z#0, (byte)(number) $3f, (byte) KEY_POUND#0, (byte)(number) $3f, (byte) KEY_ARROW_UP#0, (byte) KEY_ARROW_LEFT#0, (byte) KEY_SPACE#0, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte)(number) $3f, (byte) KEY_ASTERISK#0, (byte) KEY_PLUS#0, (byte) KEY_COMMA#0, (byte) KEY_MINUS#0, (byte) KEY_DOT#0, (byte) KEY_SLASH#0, (byte) KEY_0#0, (byte) KEY_1#0, (byte) KEY_2#0, (byte) KEY_3#0, (byte) KEY_4#0, (byte) KEY_5#0, (byte) KEY_6#0, (byte) KEY_7#0, (byte) KEY_8#0, (byte) KEY_9#0, (byte) KEY_COLON#0, (byte) KEY_SEMICOLON#0, (byte)(number) $3f, (byte) KEY_EQUALS#0, (byte)(number) $3f, (byte)(number) $3f }
Adding number conversion cast (byte) to elements in (byte[8]) keyboard_matrix_row_bitmask#0 ← { (byte)(number) $fe, (byte)(number) $fd, (byte)(number) $fb, (byte)(number) $f7, (byte)(number) $ef, (byte)(number) $df, (byte)(number) $bf, (byte)(number) $7f }
Adding number conversion cast (byte) to elements in (byte[8]) keyboard_matrix_col_bitmask#0 ← { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 }
Successful SSA optimization PassNAddArrayNumberTypeConversions
Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1
Inlining cast (byte*) CHARGEN#0 ← (byte*)(number) $d000
Inlining cast (byte*) CIA1_PORT_A#0 ← (byte*)(number) $dc00
Inlining cast (byte*) CIA1_PORT_B#0 ← (byte*)(number) $dc01
Inlining cast (word) mul8u::res#0 ← (unumber)(number) 0
Inlining cast (byte) KEY_F7#0 ← (unumber)(number) 3
Inlining cast (byte) KEY_F1#0 ← (unumber)(number) 4
Inlining cast (byte) KEY_F3#0 ← (unumber)(number) 5
Inlining cast (byte) KEY_F5#0 ← (unumber)(number) 6
Inlining cast (byte) KEY_3#0 ← (unumber)(number) 8
Inlining cast (byte) KEY_W#0 ← (unumber)(number) 9
Inlining cast (byte) KEY_A#0 ← (unumber)(number) $a
Inlining cast (byte) KEY_4#0 ← (unumber)(number) $b
Inlining cast (byte) KEY_Z#0 ← (unumber)(number) $c
Inlining cast (byte) KEY_S#0 ← (unumber)(number) $d
Inlining cast (byte) KEY_E#0 ← (unumber)(number) $e
Inlining cast (byte) KEY_LSHIFT#0 ← (unumber)(number) $f
Inlining cast (byte) KEY_5#0 ← (unumber)(number) $10
Inlining cast (byte) KEY_R#0 ← (unumber)(number) $11
Inlining cast (byte) KEY_D#0 ← (unumber)(number) $12
Inlining cast (byte) KEY_6#0 ← (unumber)(number) $13
Inlining cast (byte) KEY_C#0 ← (unumber)(number) $14
Inlining cast (byte) KEY_F#0 ← (unumber)(number) $15
Inlining cast (byte) KEY_T#0 ← (unumber)(number) $16
Inlining cast (byte) KEY_X#0 ← (unumber)(number) $17
Inlining cast (byte) KEY_7#0 ← (unumber)(number) $18
Inlining cast (byte) KEY_Y#0 ← (unumber)(number) $19
Inlining cast (byte) KEY_G#0 ← (unumber)(number) $1a
Inlining cast (byte) KEY_8#0 ← (unumber)(number) $1b
Inlining cast (byte) KEY_B#0 ← (unumber)(number) $1c
Inlining cast (byte) KEY_H#0 ← (unumber)(number) $1d
Inlining cast (byte) KEY_U#0 ← (unumber)(number) $1e
Inlining cast (byte) KEY_V#0 ← (unumber)(number) $1f
Inlining cast (byte) KEY_9#0 ← (unumber)(number) $20
Inlining cast (byte) KEY_I#0 ← (unumber)(number) $21
Inlining cast (byte) KEY_J#0 ← (unumber)(number) $22
Inlining cast (byte) KEY_0#0 ← (unumber)(number) $23
Inlining cast (byte) KEY_M#0 ← (unumber)(number) $24
Inlining cast (byte) KEY_K#0 ← (unumber)(number) $25
Inlining cast (byte) KEY_O#0 ← (unumber)(number) $26
Inlining cast (byte) KEY_N#0 ← (unumber)(number) $27
Inlining cast (byte) KEY_PLUS#0 ← (unumber)(number) $28
Inlining cast (byte) KEY_P#0 ← (unumber)(number) $29
Inlining cast (byte) KEY_L#0 ← (unumber)(number) $2a
Inlining cast (byte) KEY_MINUS#0 ← (unumber)(number) $2b
Inlining cast (byte) KEY_DOT#0 ← (unumber)(number) $2c
Inlining cast (byte) KEY_COLON#0 ← (unumber)(number) $2d
Inlining cast (byte) KEY_AT#0 ← (unumber)(number) $2e
Inlining cast (byte) KEY_COMMA#0 ← (unumber)(number) $2f
Inlining cast (byte) KEY_POUND#0 ← (unumber)(number) $30
Inlining cast (byte) KEY_ASTERISK#0 ← (unumber)(number) $31
Inlining cast (byte) KEY_SEMICOLON#0 ← (unumber)(number) $32
Inlining cast (byte) KEY_EQUALS#0 ← (unumber)(number) $35
Inlining cast (byte) KEY_ARROW_UP#0 ← (unumber)(number) $36
Inlining cast (byte) KEY_SLASH#0 ← (unumber)(number) $37
Inlining cast (byte) KEY_1#0 ← (unumber)(number) $38
Inlining cast (byte) KEY_ARROW_LEFT#0 ← (unumber)(number) $39
Inlining cast (byte) KEY_2#0 ← (unumber)(number) $3b
Inlining cast (byte) KEY_SPACE#0 ← (unumber)(number) $3c
Inlining cast (byte) KEY_Q#0 ← (unumber)(number) $3e
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
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#0 ← (unumber)(number) 0
Inlining cast (byte) main::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 (byte) main::pressed#0 ← (unumber)(number) 0
Inlining cast (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2
Inlining cast *((byte*) PROCPORT#0) ← (unumber)(number) $32
Inlining cast (byte) mul8u::b#0 ← (unumber)(number) $a
Inlining cast *((byte*) PROCPORT#0) ← (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 integer cast 0
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 3
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 8
Simplifying constant integer cast 9
Simplifying constant integer cast $a
Simplifying constant integer cast $b
Simplifying constant integer cast $c
Simplifying constant integer cast $d
Simplifying constant integer cast $e
Simplifying constant integer cast $f
Simplifying constant integer cast $10
Simplifying constant integer cast $11
Simplifying constant integer cast $12
Simplifying constant integer cast $13
Simplifying constant integer cast $14
Simplifying constant integer cast $15
Simplifying constant integer cast $16
Simplifying constant integer cast $17
Simplifying constant integer cast $18
Simplifying constant integer cast $19
Simplifying constant integer cast $1a
Simplifying constant integer cast $1b
Simplifying constant integer cast $1c
Simplifying constant integer cast $1d
Simplifying constant integer cast $1e
Simplifying constant integer cast $1f
Simplifying constant integer cast $20
Simplifying constant integer cast $21
Simplifying constant integer cast $22
Simplifying constant integer cast $23
Simplifying constant integer cast $24
Simplifying constant integer cast $25
Simplifying constant integer cast $26
Simplifying constant integer cast $27
Simplifying constant integer cast $28
Simplifying constant integer cast $29
Simplifying constant integer cast $2a
Simplifying constant integer cast $2b
Simplifying constant integer cast $2c
Simplifying constant integer cast $2d
Simplifying constant integer cast $2e
Simplifying constant integer cast $2f
Simplifying constant integer cast $30
Simplifying constant integer cast $31
Simplifying constant integer cast $32
Simplifying constant integer cast $35
Simplifying constant integer cast $36
Simplifying constant integer cast $37
Simplifying constant integer cast $38
Simplifying constant integer cast $39
Simplifying constant integer cast $3b
Simplifying constant integer cast $3c
Simplifying constant integer cast $3e
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $3f
Simplifying constant integer cast $fe
Simplifying constant integer cast $fd
Simplifying constant integer cast $fb
Simplifying constant integer cast $f7
Simplifying constant integer cast $ef
Simplifying constant integer cast $df
Simplifying constant integer cast $bf
Simplifying constant integer cast $7f
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast $10
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant integer cast $80
Simplifying constant integer cast 7
Simplifying constant integer cast 3
Simplifying constant pointer cast (byte*) 1024
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 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 0
Simplifying constant integer cast $3f
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) 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) 3
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 9
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) $b
Finalized unsigned number type (byte) $c
Finalized unsigned number type (byte) $d
Finalized unsigned number type (byte) $e
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $11
Finalized unsigned number type (byte) $12
Finalized unsigned number type (byte) $13
Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) $16
Finalized unsigned number type (byte) $17
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) $1a
Finalized unsigned number type (byte) $1b
Finalized unsigned number type (byte) $1c
Finalized unsigned number type (byte) $1d
Finalized unsigned number type (byte) $1e
Finalized unsigned number type (byte) $1f
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) $21
Finalized unsigned number type (byte) $22
Finalized unsigned number type (byte) $23
Finalized unsigned number type (byte) $24
Finalized unsigned number type (byte) $25
Finalized unsigned number type (byte) $26
Finalized unsigned number type (byte) $27
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $29
Finalized unsigned number type (byte) $2a
Finalized unsigned number type (byte) $2b
Finalized unsigned number type (byte) $2c
Finalized unsigned number type (byte) $2d
Finalized unsigned number type (byte) $2e
Finalized unsigned number type (byte) $2f
Finalized unsigned number type (byte) $30
Finalized unsigned number type (byte) $31
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) $35
Finalized unsigned number type (byte) $36
Finalized unsigned number type (byte) $37
Finalized unsigned number type (byte) $38
Finalized unsigned number type (byte) $39
Finalized unsigned number type (byte) $3b
Finalized unsigned number type (byte) $3c
Finalized unsigned number type (byte) $3e
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) 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) 0
Finalized unsigned number type (byte) $3f
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 [13] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [12] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0
Inversing boolean not [160] (bool~) main::$17 ← (byte~) main::$15 == (byte) 0 from [159] (bool~) main::$16 ← (byte~) main::$15 != (byte) 0
Inversing boolean not [169] (bool~) main::$20 ← (byte~) main::$18 == (byte) 0 from [168] (bool~) main::$19 ← (byte~) main::$18 != (byte) 0
Inversing boolean not [179] (bool~) main::$23 ← (byte~) main::$21 == (byte) 0 from [178] (bool~) main::$22 ← (byte~) main::$21 != (byte) 0
Inversing boolean not [189] (bool~) main::$26 ← (byte~) main::$24 == (byte) 0 from [188] (bool~) main::$25 ← (byte~) main::$24 != (byte) 0
Inversing boolean not [216] (bool~) main::$31 ← (byte) main::key#0 == (byte) $3f from [215] (bool~) main::$30 ← (byte) main::key#0 != (byte) $3f
Inversing boolean not [220] (bool~) main::$34 ← (byte) main::pressed#2 == (byte) 0 from [219] (bool~) main::$33 ← (byte) main::pressed#2 != (byte) 0
Inversing boolean not [258] (bool~) plot_chargen::$4 ← (byte) plot_chargen::shift#2 == (byte) 0 from [257] (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte) 0
Inversing boolean not [283] (bool~) plot_chargen::$12 ← (byte~) plot_chargen::$10 == (byte) 0 from [282] (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (word) mul8u::mb#0 = (byte) mul8u::b#1 
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*) 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
Self Phi Eliminated (byte) main::cur_pos#10
Self Phi Eliminated (byte) main::shift#10
Self Phi Eliminated (byte) plot_chargen::y#3
Self Phi Eliminated (byte*) plot_chargen::chargen#4
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) mul8u::mb#0 (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
Simple Condition (bool~) mul8u::$0 [9] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2
Simple Condition (bool~) mul8u::$3 [14] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4
Simple Condition (bool~) main::$12 [121] if((byte*) main::sc#1<(byte*~) main::$11) goto main::@1
Simple Condition (bool~) main::$14 [150] if((byte) main::i#1!=rangelast(0,3)) goto main::@3
Simple Condition (bool~) main::$17 [161] if((byte~) main::$15==(byte) 0) goto main::@6
Simple Condition (bool~) main::$20 [170] if((byte~) main::$18==(byte) 0) goto main::@7
Simple Condition (bool~) main::$23 [180] if((byte~) main::$21==(byte) 0) goto main::@8
Simple Condition (bool~) main::$26 [190] if((byte~) main::$24==(byte) 0) goto main::@9
Simple Condition (bool~) main::$28 [199] if((byte~) main::$27!=(byte) 0) goto main::@10
Simple Condition (bool~) main::$31 [217] if((byte) main::key#0==(byte) $3f) goto main::@13
Simple Condition (bool~) main::$34 [221] if((byte) main::pressed#2==(byte) 0) goto main::@14
Simple Condition (bool~) main::$36 [232] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@12
Simple Condition (bool~) print_str_at::$0 [245] if(*((byte*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2
Simple Condition (bool~) plot_chargen::$4 [259] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1
Simple Condition (bool~) plot_chargen::$12 [284] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5
Simple Condition (bool~) plot_chargen::$14 [292] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4
Simple Condition (bool~) plot_chargen::$16 [300] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [84] (byte[8]) keyboard_matrix_row_bitmask#0 ← { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f }
Constant right-side identified [85] (byte[8]) keyboard_matrix_col_bitmask#0 ← { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) PROCPORT#0 = (byte*) 1
Constant (const byte*) CHARGEN#0 = (byte*) 53248
Constant (const byte*) CIA1_PORT_A#0 = (byte*) 56320
Constant (const byte*) CIA1_PORT_B#0 = (byte*) 56321
Constant (const word) mul8u::res#0 = 0
Constant (const byte) KEY_F7#0 = 3
Constant (const byte) KEY_F1#0 = 4
Constant (const byte) KEY_F3#0 = 5
Constant (const byte) KEY_F5#0 = 6
Constant (const byte) KEY_3#0 = 8
Constant (const byte) KEY_W#0 = 9
Constant (const byte) KEY_A#0 = $a
Constant (const byte) KEY_4#0 = $b
Constant (const byte) KEY_Z#0 = $c
Constant (const byte) KEY_S#0 = $d
Constant (const byte) KEY_E#0 = $e
Constant (const byte) KEY_LSHIFT#0 = $f
Constant (const byte) KEY_5#0 = $10
Constant (const byte) KEY_R#0 = $11
Constant (const byte) KEY_D#0 = $12
Constant (const byte) KEY_6#0 = $13
Constant (const byte) KEY_C#0 = $14
Constant (const byte) KEY_F#0 = $15
Constant (const byte) KEY_T#0 = $16
Constant (const byte) KEY_X#0 = $17
Constant (const byte) KEY_7#0 = $18
Constant (const byte) KEY_Y#0 = $19
Constant (const byte) KEY_G#0 = $1a
Constant (const byte) KEY_8#0 = $1b
Constant (const byte) KEY_B#0 = $1c
Constant (const byte) KEY_H#0 = $1d
Constant (const byte) KEY_U#0 = $1e
Constant (const byte) KEY_V#0 = $1f
Constant (const byte) KEY_9#0 = $20
Constant (const byte) KEY_I#0 = $21
Constant (const byte) KEY_J#0 = $22
Constant (const byte) KEY_0#0 = $23
Constant (const byte) KEY_M#0 = $24
Constant (const byte) KEY_K#0 = $25
Constant (const byte) KEY_O#0 = $26
Constant (const byte) KEY_N#0 = $27
Constant (const byte) KEY_PLUS#0 = $28
Constant (const byte) KEY_P#0 = $29
Constant (const byte) KEY_L#0 = $2a
Constant (const byte) KEY_MINUS#0 = $2b
Constant (const byte) KEY_DOT#0 = $2c
Constant (const byte) KEY_COLON#0 = $2d
Constant (const byte) KEY_AT#0 = $2e
Constant (const byte) KEY_COMMA#0 = $2f
Constant (const byte) KEY_POUND#0 = $30
Constant (const byte) KEY_ASTERISK#0 = $31
Constant (const byte) KEY_SEMICOLON#0 = $32
Constant (const byte) KEY_EQUALS#0 = $35
Constant (const byte) KEY_ARROW_UP#0 = $36
Constant (const byte) KEY_SLASH#0 = $37
Constant (const byte) KEY_1#0 = $38
Constant (const byte) KEY_ARROW_LEFT#0 = $39
Constant (const byte) KEY_2#0 = $3b
Constant (const byte) KEY_SPACE#0 = $3c
Constant (const byte) KEY_Q#0 = $3e
Constant (const byte[8]) keyboard_matrix_row_bitmask#0 = { $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f }
Constant (const byte[8]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, $10, $20, $40, $80 }
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) print_str_at::str#0 = main::str
Constant (const byte*) print_str_at::str#1 = main::str1
Constant (const byte*) print_str_at::str#2 = main::str2
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) main::cur_pos#1 = 0
Constant (const byte) main::cur_pos#2 = 1
Constant (const byte) main::cur_pos#3 = 2
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) 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 byte*) main::sc#0 = SCREEN#0
Constant (const byte) keyboard_key_pressed::key#0 = KEY_F1#0
Constant (const byte) keyboard_key_pressed::key#1 = KEY_F3#0
Constant (const byte) keyboard_key_pressed::key#2 = KEY_F5#0
Constant (const byte) keyboard_key_pressed::key#3 = KEY_F7#0
Constant (const byte) keyboard_key_pressed::key#4 = KEY_LSHIFT#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [240] if(true) goto main::@5
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [148] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [150] if(main::i#1!=rangelast(0,3)) goto main::@3 to (number) 4
Resolved ranged next value [230] main::ch#1 ← ++ main::ch#2 to ++
Resolved ranged comparison value [232] if(main::ch#1!=rangelast(0,$3f)) goto main::@12 to (number) $40
Resolved ranged next value [290] plot_chargen::x#1 ← ++ plot_chargen::x#2 to ++
Resolved ranged comparison value [292] if(plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 to (number) 8
Resolved ranged next value [298] plot_chargen::y#1 ← ++ plot_chargen::y#2 to ++
Resolved ranged comparison value [300] 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::@3
Adding number conversion cast (unumber) $40 in if((byte) main::ch#1!=(number) $40) goto main::@12
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
Self Phi Eliminated (byte*) plot_chargen::chargen#3
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte*) plot_chargen::chargen#3 (byte*) plot_chargen::chargen#5
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [9] (byte[]) keyboard_char_keycodes#0 ← { (const byte) KEY_AT#0, (const byte) KEY_A#0, (const byte) KEY_B#0, (const byte) KEY_C#0, (const byte) KEY_D#0, (const byte) KEY_E#0, (const byte) KEY_F#0, (const byte) KEY_G#0, (const byte) KEY_H#0, (const byte) KEY_I#0, (const byte) KEY_J#0, (const byte) KEY_K#0, (const byte) KEY_L#0, (const byte) KEY_M#0, (const byte) KEY_N#0, (const byte) KEY_O#0, (const byte) KEY_P#0, (const byte) KEY_Q#0, (const byte) KEY_R#0, (const byte) KEY_S#0, (const byte) KEY_T#0, (const byte) KEY_U#0, (const byte) KEY_V#0, (const byte) KEY_W#0, (const byte) KEY_X#0, (const byte) KEY_Y#0, (const byte) KEY_Z#0, (byte) $3f, (const byte) KEY_POUND#0, (byte) $3f, (const byte) KEY_ARROW_UP#0, (const byte) KEY_ARROW_LEFT#0, (const byte) KEY_SPACE#0, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (const byte) KEY_ASTERISK#0, (const byte) KEY_PLUS#0, (const byte) KEY_COMMA#0, (const byte) KEY_MINUS#0, (const byte) KEY_DOT#0, (const byte) KEY_SLASH#0, (const byte) KEY_0#0, (const byte) KEY_1#0, (const byte) KEY_2#0, (const byte) KEY_3#0, (const byte) KEY_4#0, (const byte) KEY_5#0, (const byte) KEY_6#0, (const byte) KEY_7#0, (const byte) KEY_8#0, (const byte) KEY_9#0, (const byte) KEY_COLON#0, (const byte) KEY_SEMICOLON#0, (byte) $3f, (const byte) KEY_EQUALS#0, (byte) $3f, (byte) $3f }
Constant right-side identified [27] (byte*~) main::$11 ← (const byte*) SCREEN#0 + (word) $3e8
Constant right-side identified [29] (byte*) print_str_at::at#0 ← (const byte*) SCREEN#0 + (byte) 1
Constant right-side identified [31] (byte*~) main::$2 ← (const byte*) SCREEN#0 + (byte) 1
Constant right-side identified [34] (byte*~) main::$5 ← (const byte*) SCREEN#0 + (byte) 1
Constant right-side identified [37] (byte*~) main::$8 ← (const byte*) SCREEN#0 + (byte) 1
Constant right-side identified [104] (byte*~) plot_chargen::$5 ← (const byte*) SCREEN#0 + (byte) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte[]) keyboard_char_keycodes#0 = { KEY_AT#0, KEY_A#0, KEY_B#0, KEY_C#0, KEY_D#0, KEY_E#0, KEY_F#0, KEY_G#0, KEY_H#0, KEY_I#0, KEY_J#0, KEY_K#0, KEY_L#0, KEY_M#0, KEY_N#0, KEY_O#0, KEY_P#0, KEY_Q#0, KEY_R#0, KEY_S#0, KEY_T#0, KEY_U#0, KEY_V#0, KEY_W#0, KEY_X#0, KEY_Y#0, KEY_Z#0, $3f, KEY_POUND#0, $3f, KEY_ARROW_UP#0, KEY_ARROW_LEFT#0, KEY_SPACE#0, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, KEY_ASTERISK#0, KEY_PLUS#0, KEY_COMMA#0, KEY_MINUS#0, KEY_DOT#0, KEY_SLASH#0, KEY_0#0, KEY_1#0, KEY_2#0, KEY_3#0, KEY_4#0, KEY_5#0, KEY_6#0, KEY_7#0, KEY_8#0, KEY_9#0, KEY_COLON#0, KEY_SEMICOLON#0, $3f, KEY_EQUALS#0, $3f, $3f }
Constant (const byte*) main::$11 = SCREEN#0+$3e8
Constant (const byte*) print_str_at::at#0 = SCREEN#0+1
Constant (const byte*) main::$2 = SCREEN#0+1
Constant (const byte*) main::$5 = SCREEN#0+1
Constant (const byte*) main::$8 = SCREEN#0+1
Constant (const byte*) plot_chargen::$5 = SCREEN#0+$28
Successful SSA optimization Pass2ConstantIdentification
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 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::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*) main::sc#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#0
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 string) main::str1
Constant inlined main::shift#1 = (byte) 1
Constant inlined print_str_at::str#2 = (const string) main::str2
Constant inlined print_str_at::at#3 = (const byte*) SCREEN#0+(byte) 1+(byte) $1e
Constant inlined print_str_at::str#3 = (const string) main::str3
Constant inlined print_str_at::at#2 = (const byte*) SCREEN#0+(byte) 1+(byte) $14
Constant inlined plot_chargen::c#0 = (byte) '.'
Constant inlined print_str_at::at#1 = (const byte*) SCREEN#0+(byte) 1+(byte) $a
Constant inlined plot_chargen::c#1 = (byte) '*'
Constant inlined print_str_at::at#0 = (const byte*) SCREEN#0+(byte) 1
Constant inlined print_str_at::str#0 = (const string) main::str
Constant inlined main::$11 = (const byte*) SCREEN#0+(word) $3e8
Constant inlined main::shift#2 = (byte) 0
Constant inlined main::i#0 = (byte) 0
Constant inlined plot_chargen::$6 = (const byte*) SCREEN#0+(byte) $28+(byte) 1
Constant inlined plot_chargen::$5 = (const byte*) SCREEN#0+(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#0
Constant inlined plot_chargen::ch#0 = (byte) $20
Constant inlined keyboard_key_pressed::key#1 = (const byte) KEY_F3#0
Constant inlined keyboard_key_pressed::key#4 = (const byte) KEY_LSHIFT#0
Constant inlined keyboard_key_pressed::key#2 = (const byte) KEY_F5#0
Constant inlined keyboard_key_pressed::key#3 = (const byte) KEY_F7#0
Constant inlined main::sc#0 = (const byte*) SCREEN#0
Constant inlined main::cur_pos#3 = (byte) 2
Constant inlined mul8u::res#0 = (byte) 0
Constant inlined main::cur_pos#4 = (byte) 3
Constant inlined main::cur_pos#1 = (byte) 0
Constant inlined main::$2 = (const byte*) SCREEN#0+(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#0+(byte) 1
Constant inlined plot_chargen::y#0 = (byte) 0
Constant inlined main::$8 = (const byte*) SCREEN#0+(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::@38(between main::@1 and main::@1)
Added new block during phi lifting main::@39(between main::@29 and main::@3)
Added new block during phi lifting main::@40(between main::@30 and main::@6)
Added new block during phi lifting main::@41(between main::@31 and main::@7)
Added new block during phi lifting main::@42(between main::@32 and main::@8)
Added new block during phi lifting main::@43(between main::@33 and main::@9)
Added new block during phi lifting main::@44(between main::@14 and main::@12)
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 @9
Adding NOP phi() at start of @16
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::@2
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::@28
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::@19
Adding NOP phi() at start of main::@20
Adding NOP phi() at start of main::@21
Adding NOP phi() at start of main::@22
Adding NOP phi() at start of main::@23
Adding NOP phi() at start of main::@37
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of plot_chargen::@6
Adding NOP phi() at start of mul8u::@3
CALL GRAPH
Calls in [] to main:4 
Calls in [main] to print_str_at:13 print_str_at:15 print_str_at:17 print_str_at:19 plot_chargen:24 keyboard_key_pressed:29 keyboard_key_pressed:35 keyboard_key_pressed:41 keyboard_key_pressed:47 keyboard_key_pressed:53 keyboard_get_keycode:61 keyboard_key_pressed:67 plot_chargen:79 
Calls in [plot_chargen] to mul8u:103 
Calls in [keyboard_key_pressed] to keyboard_matrix_read:154 

Created 29 initial phi equivalence classes
Coalesced [23] plot_chargen::pos#6 ← plot_chargen::pos#0
Coalesced [66] keyboard_key_pressed::key#7 ← keyboard_key_pressed::key#5
Coalesced [70] main::pressed#4 ← main::pressed#1
Coalesced [76] plot_chargen::ch#3 ← plot_chargen::ch#1
Coalesced [77] plot_chargen::shift#3 ← plot_chargen::shift#1
Coalesced [78] plot_chargen::pos#5 ← plot_chargen::pos#1
Coalesced [83] main::cur_pos#27 ← main::cur_pos#11
Coalesced [84] main::ch#10 ← main::ch#1
Coalesced [86] main::cur_pos#31 ← main::cur_pos#18
Coalesced [87] main::cur_pos#30 ← main::cur_pos#20
Coalesced [88] main::cur_pos#29 ← main::cur_pos#22
Coalesced (already) [89] main::cur_pos#28 ← main::cur_pos#24
Coalesced [90] main::i#4 ← main::i#1
Coalesced [91] main::sc#3 ← main::sc#1
Coalesced [99] plot_chargen::chargen#11 ← plot_chargen::chargen#1
Coalesced [107] plot_chargen::sc#9 ← plot_chargen::sc#0
Coalesced [110] plot_chargen::bits#5 ← plot_chargen::bits#0
Coalesced [111] plot_chargen::sc#10 ← plot_chargen::sc#7
Coalesced [128] plot_chargen::y#7 ← plot_chargen::y#1
Coalesced [129] plot_chargen::sc#8 ← plot_chargen::sc#2
Coalesced [130] plot_chargen::bits#6 ← plot_chargen::bits#1
Coalesced [131] plot_chargen::sc#11 ← plot_chargen::sc#1
Coalesced [132] plot_chargen::x#5 ← plot_chargen::x#1
Coalesced [133] plot_chargen::chargen#10 ← plot_chargen::chargen#0
Coalesced [134] mul8u::a#7 ← mul8u::a#1
Coalesced [142] mul8u::res#9 ← mul8u::res#1
Coalesced [146] mul8u::a#8 ← mul8u::a#0
Coalesced [147] mul8u::res#7 ← mul8u::res#6
Coalesced [148] mul8u::mb#6 ← mul8u::mb#1
Coalesced (already) [149] mul8u::res#8 ← mul8u::res#2
Coalesced [165] print_str_at::str#8 ← print_str_at::str#7
Coalesced [166] print_str_at::at#8 ← print_str_at::at#7
Coalesced [173] print_str_at::str#9 ← print_str_at::str#4
Coalesced [174] print_str_at::at#9 ← print_str_at::at#4
Coalesced down to 21 phi equivalence classes
Culled Empty Block (label) @9
Culled Empty Block (label) @16
Culled Empty Block (label) @20
Culled Empty Block (label) main::@28
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::@19
Culled Empty Block (label) main::@20
Culled Empty Block (label) main::@21
Culled Empty Block (label) main::@22
Culled Empty Block (label) main::@23
Culled Empty Block (label) main::@37
Culled Empty Block (label) main::@17
Culled Empty Block (label) main::@44
Culled Empty Block (label) main::@39
Culled Empty Block (label) main::@38
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::@5 to main::@4
Renumbering block main::@6 to main::@5
Renumbering block main::@7 to main::@6
Renumbering block main::@8 to main::@7
Renumbering block main::@9 to main::@8
Renumbering block main::@10 to main::@9
Renumbering block main::@11 to main::@10
Renumbering block main::@12 to main::@11
Renumbering block main::@13 to main::@12
Renumbering block main::@14 to main::@13
Renumbering block main::@15 to main::@14
Renumbering block main::@16 to main::@15
Renumbering block main::@25 to main::@16
Renumbering block main::@26 to main::@17
Renumbering block main::@27 to main::@18
Renumbering block main::@29 to main::@19
Renumbering block main::@30 to main::@20
Renumbering block main::@31 to main::@21
Renumbering block main::@32 to main::@22
Renumbering block main::@33 to main::@23
Renumbering block main::@34 to main::@24
Renumbering block main::@35 to main::@25
Renumbering block main::@36 to main::@26
Renumbering block main::@40 to main::@27
Renumbering block main::@41 to main::@28
Renumbering block main::@42 to main::@29
Renumbering block main::@43 to main::@30
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@16
Adding NOP phi() at start of main::@17
Adding NOP phi() at start of main::@18
Adding NOP phi() at start of main::@27
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::@9
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()
main: scope:[main]  from @1
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [5] (byte*) main::sc#2 ← phi( main/(const byte*) SCREEN#0 main::@1/(byte*) main::sc#1 )
  [6] *((byte*) main::sc#2) ← (byte) ' '
  [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2
  [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word) $3e8) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  [9] phi()
  [10] call print_str_at 
  to:main::@16
main::@16: scope:[main]  from main::@2
  [11] phi()
  [12] call print_str_at 
  to:main::@17
main::@17: scope:[main]  from main::@16
  [13] phi()
  [14] call print_str_at 
  to:main::@18
main::@18: scope:[main]  from main::@17
  [15] phi()
  [16] call print_str_at 
  to:main::@3
main::@3: scope:[main]  from main::@18 main::@19
  [17] (byte) main::i#2 ← phi( main::@18/(byte) 0 main::@19/(byte) main::i#1 )
  [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2
  [19] call plot_chargen 
  to:main::@19
main::@19: scope:[main]  from main::@3
  [20] (byte) main::i#1 ← ++ (byte) main::i#2
  [21] if((byte) main::i#1!=(byte) 4) goto main::@3
  to:main::@4
main::@4: scope:[main]  from main::@13 main::@19
  [22] (byte) main::cur_pos#24 ← phi( main::@13/(byte) main::cur_pos#11 main::@19/(byte) 0 )
  [23] call keyboard_key_pressed 
  [24] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
  to:main::@20
main::@20: scope:[main]  from main::@4
  [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
  [26] if((byte~) main::$15==(byte) 0) goto main::@27
  to:main::@5
main::@27: scope:[main]  from main::@20
  [27] phi()
  to:main::@5
main::@5: scope:[main]  from main::@20 main::@27
  [28] (byte) main::cur_pos#22 ← phi( main::@20/(byte) 0 main::@27/(byte) main::cur_pos#24 )
  [29] call keyboard_key_pressed 
  [30] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
  to:main::@21
main::@21: scope:[main]  from main::@5
  [31] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
  [32] if((byte~) main::$18==(byte) 0) goto main::@28
  to:main::@6
main::@28: scope:[main]  from main::@21
  [33] phi()
  to:main::@6
main::@6: scope:[main]  from main::@21 main::@28
  [34] (byte) main::cur_pos#20 ← phi( main::@21/(byte) 1 main::@28/(byte) main::cur_pos#22 )
  [35] call keyboard_key_pressed 
  [36] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
  to:main::@22
main::@22: scope:[main]  from main::@6
  [37] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
  [38] if((byte~) main::$21==(byte) 0) goto main::@29
  to:main::@7
main::@29: scope:[main]  from main::@22
  [39] phi()
  to:main::@7
main::@7: scope:[main]  from main::@22 main::@29
  [40] (byte) main::cur_pos#18 ← phi( main::@22/(byte) 2 main::@29/(byte) main::cur_pos#20 )
  [41] call keyboard_key_pressed 
  [42] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
  to:main::@23
main::@23: scope:[main]  from main::@7
  [43] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
  [44] if((byte~) main::$24==(byte) 0) goto main::@30
  to:main::@8
main::@30: scope:[main]  from main::@23
  [45] phi()
  to:main::@8
main::@8: scope:[main]  from main::@23 main::@30
  [46] (byte) main::cur_pos#11 ← phi( main::@23/(byte) 3 main::@30/(byte) main::cur_pos#18 )
  [47] call keyboard_key_pressed 
  [48] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
  to:main::@24
main::@24: scope:[main]  from main::@8
  [49] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
  [50] if((byte~) main::$27!=(byte) 0) goto main::@9
  to:main::@10
main::@9: scope:[main]  from main::@24
  [51] phi()
  to:main::@10
main::@10: scope:[main]  from main::@24 main::@9
  [52] (byte) main::shift#9 ← phi( main::@9/(byte) 1 main::@24/(byte) 0 )
  to:main::@11
main::@11: scope:[main]  from main::@10 main::@13
  [53] (byte) main::ch#2 ← phi( main::@10/(byte) 0 main::@13/(byte) main::ch#1 )
  [54] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2
  [55] call keyboard_get_keycode 
  [56] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
  to:main::@25
main::@25: scope:[main]  from main::@11
  [57] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
  [58] if((byte) main::key#0==(byte) $3f) goto main::@12
  to:main::@14
main::@14: scope:[main]  from main::@25
  [59] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0
  [60] call keyboard_key_pressed 
  [61] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
  to:main::@26
main::@26: scope:[main]  from main::@14
  [62] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
  to:main::@12
main::@12: scope:[main]  from main::@25 main::@26
  [63] (byte) main::pressed#2 ← phi( main::@25/(byte) 0 main::@26/(byte) main::pressed#1 )
  [64] if((byte) main::pressed#2==(byte) 0) goto main::@13
  to:main::@15
main::@15: scope:[main]  from main::@12
  [65] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11
  [66] (byte) plot_chargen::ch#1 ← (byte) main::ch#2
  [67] (byte) plot_chargen::shift#1 ← (byte) main::shift#9
  [68] call plot_chargen 
  to:main::@13
main::@13: scope:[main]  from main::@12 main::@15
  [69] (byte) main::ch#1 ← ++ (byte) main::ch#2
  [70] if((byte) main::ch#1!=(byte) $40) goto main::@11
  to:main::@4
plot_chargen: scope:[plot_chargen]  from main::@15 main::@3
  [71] (byte) plot_chargen::pos#2 ← phi( main::@15/(byte) plot_chargen::pos#1 main::@3/(byte) plot_chargen::pos#0 )
  [71] (byte) plot_chargen::shift#2 ← phi( main::@15/(byte) plot_chargen::shift#1 main::@3/(byte) 0 )
  [71] (byte) plot_chargen::ch#2 ← phi( main::@15/(byte) plot_chargen::ch#1 main::@3/(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#0 + (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#0) ← (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#0+(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#0) ← (byte) $37
  asm { cli  }
  to:plot_chargen::@return
plot_chargen::@return: scope:[plot_chargen]  from plot_chargen::@8
  [102] return 
  to:@return
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/(const byte) mul8u::b#0 mul8u::@3/(word) mul8u::mb#1 )
  [104] (word) mul8u::res#2 ← phi( mul8u/(byte) 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
keyboard_key_pressed: scope:[keyboard_key_pressed]  from main::@14 main::@4 main::@5 main::@6 main::@7 main::@8
  [113] (byte) keyboard_key_pressed::key#6 ← phi( main::@14/(byte) keyboard_key_pressed::key#5 main::@4/(const byte) KEY_F1#0 main::@5/(const byte) KEY_F3#0 main::@6/(const byte) KEY_F5#0 main::@7/(const byte) KEY_F7#0 main::@8/(const byte) KEY_LSHIFT#0 )
  [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[8]) keyboard_matrix_col_bitmask#0 + (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
keyboard_matrix_read: scope:[keyboard_matrix_read]  from keyboard_key_pressed
  [122] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0)
  [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0)
  to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read]  from keyboard_matrix_read
  [124] return 
  to:@return
keyboard_get_keycode: scope:[keyboard_get_keycode]  from main::@11
  [125] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (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
print_str_at: scope:[print_str_at]  from main::@16 main::@17 main::@18 main::@2
  [127] (byte*) print_str_at::at#7 ← phi( main::@2/(const byte*) SCREEN#0+(byte) 1 main::@16/(const byte*) SCREEN#0+(byte) 1+(byte) $a main::@17/(const byte*) SCREEN#0+(byte) 1+(byte) $14 main::@18/(const byte*) SCREEN#0+(byte) 1+(byte) $1e )
  [127] (byte*) print_str_at::str#7 ← phi( main::@2/(const string) main::str main::@16/(const string) main::str1 main::@17/(const string) main::str2 main::@18/(const string) 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*) print_str_at::str#5)!=(byte) '@') 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*) CHARGEN
(byte*) CIA1_PORT_A
(byte*) CIA1_PORT_B
(byte) KEY_0
(byte) KEY_1
(byte) KEY_2
(byte) KEY_3
(byte) KEY_4
(byte) KEY_5
(byte) KEY_6
(byte) KEY_7
(byte) KEY_8
(byte) KEY_9
(byte) KEY_A
(byte) KEY_ARROW_LEFT
(byte) KEY_ARROW_UP
(byte) KEY_ASTERISK
(byte) KEY_AT
(byte) KEY_B
(byte) KEY_C
(byte) KEY_COLON
(byte) KEY_COMMA
(byte) KEY_D
(byte) KEY_DOT
(byte) KEY_E
(byte) KEY_EQUALS
(byte) KEY_F
(byte) KEY_F1
(byte) KEY_F3
(byte) KEY_F5
(byte) KEY_F7
(byte) KEY_G
(byte) KEY_H
(byte) KEY_I
(byte) KEY_J
(byte) KEY_K
(byte) KEY_L
(byte) KEY_LSHIFT
(byte) KEY_M
(byte) KEY_MINUS
(byte) KEY_N
(byte) KEY_O
(byte) KEY_P
(byte) KEY_PLUS
(byte) KEY_POUND
(byte) KEY_Q
(byte) KEY_R
(byte) KEY_S
(byte) KEY_SEMICOLON
(byte) KEY_SLASH
(byte) KEY_SPACE
(byte) KEY_T
(byte) KEY_U
(byte) KEY_V
(byte) KEY_W
(byte) KEY_X
(byte) KEY_Y
(byte) KEY_Z
(byte*) PROCPORT
(byte*) SCREEN
(byte[]) keyboard_char_keycodes
(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[8]) keyboard_matrix_col_bitmask
(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
(byte[8]) keyboard_matrix_row_bitmask
(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 16.5
(byte*) main::sc#2 16.5
(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 zero page equivalence class [ keyboard_key_pressed::return#2 ]
Added variable main::$15 to zero page equivalence class [ main::$15 ]
Added variable keyboard_key_pressed::return#10 to zero page equivalence class [ keyboard_key_pressed::return#10 ]
Added variable main::$18 to zero page equivalence class [ main::$18 ]
Added variable keyboard_key_pressed::return#11 to zero page equivalence class [ keyboard_key_pressed::return#11 ]
Added variable main::$21 to zero page equivalence class [ main::$21 ]
Added variable keyboard_key_pressed::return#12 to zero page equivalence class [ keyboard_key_pressed::return#12 ]
Added variable main::$24 to zero page equivalence class [ main::$24 ]
Added variable keyboard_key_pressed::return#13 to zero page equivalence class [ keyboard_key_pressed::return#13 ]
Added variable main::$27 to zero page equivalence class [ main::$27 ]
Added variable keyboard_get_keycode::ch#0 to zero page equivalence class [ keyboard_get_keycode::ch#0 ]
Added variable keyboard_get_keycode::return#2 to zero page equivalence class [ keyboard_get_keycode::return#2 ]
Added variable main::key#0 to zero page equivalence class [ main::key#0 ]
Added variable keyboard_key_pressed::return#14 to zero page equivalence class [ keyboard_key_pressed::return#14 ]
Added variable plot_chargen::$0 to zero page equivalence class [ plot_chargen::$0 ]
Added variable plot_chargen::$1 to zero page equivalence class [ plot_chargen::$1 ]
Added variable mul8u::return#2 to zero page equivalence class [ mul8u::return#2 ]
Added variable plot_chargen::$7 to zero page equivalence class [ plot_chargen::$7 ]
Added variable plot_chargen::$10 to zero page equivalence class [ plot_chargen::$10 ]
Added variable mul8u::$1 to zero page equivalence class [ mul8u::$1 ]
Added variable keyboard_key_pressed::colidx#0 to zero page equivalence class [ keyboard_key_pressed::colidx#0 ]
Added variable keyboard_key_pressed::rowidx#0 to zero page equivalence class [ keyboard_key_pressed::rowidx#0 ]
Added variable keyboard_matrix_read::rowid#0 to zero page equivalence class [ keyboard_matrix_read::rowid#0 ]
Added variable keyboard_matrix_read::return#2 to zero page equivalence class [ keyboard_matrix_read::return#2 ]
Added variable keyboard_key_pressed::$2 to zero page equivalence class [ keyboard_key_pressed::$2 ]
Added variable keyboard_key_pressed::return#0 to zero page equivalence class [ keyboard_key_pressed::return#0 ]
Added variable keyboard_matrix_read::return#0 to zero page equivalence class [ keyboard_matrix_read::return#0 ]
Added variable keyboard_get_keycode::return#0 to zero page 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 ZP_WORD:2 [ main::sc#2 main::sc#1 ]
Allocated zp ZP_BYTE:4 [ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
Allocated zp ZP_BYTE:6 [ main::shift#9 ]
Allocated zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ]
Allocated zp ZP_BYTE:8 [ main::pressed#2 main::pressed#1 ]
Allocated zp ZP_BYTE:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ]
Allocated zp ZP_BYTE:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ]
Allocated zp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
Allocated zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ]
Allocated zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ]
Allocated zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Allocated zp ZP_WORD:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ]
Allocated zp ZP_BYTE:18 [ plot_chargen::x#2 plot_chargen::x#1 ]
Allocated zp ZP_BYTE:19 [ plot_chargen::c#2 ]
Allocated zp ZP_BYTE:20 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
Allocated zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ]
Allocated zp ZP_WORD:23 [ mul8u::mb#2 mul8u::mb#1 ]
Allocated zp ZP_BYTE:25 [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
Allocated zp ZP_WORD:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ]
Allocated zp ZP_WORD:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]
Allocated zp ZP_BYTE:30 [ keyboard_key_pressed::return#2 ]
Allocated zp ZP_BYTE:31 [ main::$15 ]
Allocated zp ZP_BYTE:32 [ keyboard_key_pressed::return#10 ]
Allocated zp ZP_BYTE:33 [ main::$18 ]
Allocated zp ZP_BYTE:34 [ keyboard_key_pressed::return#11 ]
Allocated zp ZP_BYTE:35 [ main::$21 ]
Allocated zp ZP_BYTE:36 [ keyboard_key_pressed::return#12 ]
Allocated zp ZP_BYTE:37 [ main::$24 ]
Allocated zp ZP_BYTE:38 [ keyboard_key_pressed::return#13 ]
Allocated zp ZP_BYTE:39 [ main::$27 ]
Allocated zp ZP_BYTE:40 [ keyboard_get_keycode::ch#0 ]
Allocated zp ZP_BYTE:41 [ keyboard_get_keycode::return#2 ]
Allocated zp ZP_BYTE:42 [ main::key#0 ]
Allocated zp ZP_BYTE:43 [ keyboard_key_pressed::return#14 ]
Allocated zp ZP_WORD:44 [ plot_chargen::$0 ]
Allocated zp ZP_WORD:46 [ plot_chargen::$1 ]
Allocated zp ZP_WORD:48 [ mul8u::return#2 ]
Allocated zp ZP_WORD:50 [ plot_chargen::$7 ]
Allocated zp ZP_BYTE:52 [ plot_chargen::$10 ]
Allocated zp ZP_BYTE:53 [ mul8u::$1 ]
Allocated zp ZP_BYTE:54 [ keyboard_key_pressed::colidx#0 ]
Allocated zp ZP_BYTE:55 [ keyboard_key_pressed::rowidx#0 ]
Allocated zp ZP_BYTE:56 [ keyboard_matrix_read::rowid#0 ]
Allocated zp ZP_BYTE:57 [ keyboard_matrix_read::return#2 ]
Allocated zp ZP_BYTE:58 [ keyboard_key_pressed::$2 ]
Allocated zp ZP_BYTE:59 [ keyboard_key_pressed::return#0 ]
Allocated zp ZP_BYTE:60 [ keyboard_matrix_read::return#0 ]
Allocated zp ZP_BYTE:61 [ keyboard_get_keycode::return#0 ]

INITIAL ASM
  // File Comments
// Allows analysis of the CHARGEN ROM font
  // Basic 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
    .label cur_pos = 5
    .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#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta sc
    lda #>SCREEN
    sta sc+1
    jmp b1
  // Clear screen
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
    // [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda sc+1
    cmp #>SCREEN+$3e8
    bcc b1_from_b1
    bne !+
    lda sc
    cmp #<SCREEN+$3e8
    bcc b1_from_b1
  !:
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [10] call print_str_at 
    // [127] phi from main::@2 to print_str_at [phi:main::@2->print_str_at]
  print_str_at_from_b2:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte) 1 [phi:main::@2->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta print_str_at.at
    lda #>SCREEN+1
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str [phi:main::@2->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str
    sta print_str_at.str
    lda #>str
    sta print_str_at.str+1
    jsr print_str_at
    // [11] phi from main::@2 to main::@16 [phi:main::@2->main::@16]
  b16_from_b2:
    jmp b16
    // main::@16
  b16:
    // [12] call print_str_at 
    // [127] phi from main::@16 to print_str_at [phi:main::@16->print_str_at]
  print_str_at_from_b16:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte) 1+(byte) $a [phi:main::@16->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$a
    sta print_str_at.at
    lda #>SCREEN+1+$a
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str1 [phi:main::@16->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str_at.str
    lda #>str1
    sta print_str_at.str+1
    jsr print_str_at
    // [13] phi from main::@16 to main::@17 [phi:main::@16->main::@17]
  b17_from_b16:
    jmp b17
    // main::@17
  b17:
    // [14] 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#0+(byte) 1+(byte) $14 [phi:main::@17->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$14
    sta print_str_at.at
    lda #>SCREEN+1+$14
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str2 [phi:main::@17->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str2
    sta print_str_at.str
    lda #>str2
    sta print_str_at.str+1
    jsr print_str_at
    // [15] phi from main::@17 to main::@18 [phi:main::@17->main::@18]
  b18_from_b17:
    jmp b18
    // main::@18
  b18:
    // [16] 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#0+(byte) 1+(byte) $1e [phi:main::@18->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$1e
    sta print_str_at.at
    lda #>SCREEN+1+$1e
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str3 [phi:main::@18->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str3
    sta print_str_at.str
    lda #>str3
    sta print_str_at.str+1
    jsr print_str_at
    // [17] phi from main::@18 to main::@3 [phi:main::@18->main::@3]
  b3_from_b18:
    // [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@18->main::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b3
    // [17] phi from main::@19 to main::@3 [phi:main::@19->main::@3]
  b3_from_b19:
    // [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@19->main::@3#0] -- register_copy 
    jmp b3
    // main::@3
  b3:
    // [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuz1=vbuz2 
    lda i
    sta plot_chargen.pos
    // [19] call plot_chargen 
    // [71] phi from main::@3 to plot_chargen [phi:main::@3->plot_chargen]
  plot_chargen_from_b3:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@3->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) 0 [phi:main::@3->plot_chargen#1] -- vbuz1=vbuc1 
    lda #0
    sta plot_chargen.shift
    // [71] phi (byte) plot_chargen::ch#2 = (byte) $20 [phi:main::@3->plot_chargen#2] -- vbuz1=vbuc1 
    lda #$20
    sta plot_chargen.ch
    jsr plot_chargen
    jmp b19
    // main::@19
  b19:
    // [20] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
    // [21] if((byte) main::i#1!=(byte) 4) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp i
    bne b3_from_b19
    // [22] phi from main::@19 to main::@4 [phi:main::@19->main::@4]
  b4_from_b19:
    // [22] phi (byte) main::cur_pos#24 = (byte) 0 [phi:main::@19->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b4
    // main::@4
  b4:
    // [23] call keyboard_key_pressed 
    // [113] phi from main::@4 to keyboard_key_pressed [phi:main::@4->keyboard_key_pressed]
  keyboard_key_pressed_from_b4:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1#0 [phi:main::@4->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F1
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [24] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return
    sta keyboard_key_pressed.return_2
    jmp b20
    // main::@20
  b20:
    // [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_2
    sta _15
    // [26] if((byte~) main::$15==(byte) 0) goto main::@27 -- vbuz1_eq_0_then_la1 
    lda _15
    cmp #0
    beq b27_from_b20
    // [28] phi from main::@20 to main::@5 [phi:main::@20->main::@5]
  b5_from_b20:
    // [28] phi (byte) main::cur_pos#22 = (byte) 0 [phi:main::@20->main::@5#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b5
    // [27] phi from main::@20 to main::@27 [phi:main::@20->main::@27]
  b27_from_b20:
    jmp b27
    // main::@27
  b27:
    // [28] phi from main::@27 to main::@5 [phi:main::@27->main::@5]
  b5_from_b27:
    // [28] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@27->main::@5#0] -- register_copy 
    jmp b5
    // main::@5
  b5:
    // [29] 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_F3#0 [phi:main::@5->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F3
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [30] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return
    sta keyboard_key_pressed.return_10
    jmp b21
    // main::@21
  b21:
    // [31] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_10
    sta _18
    // [32] if((byte~) main::$18==(byte) 0) goto main::@28 -- vbuz1_eq_0_then_la1 
    lda _18
    cmp #0
    beq b28_from_b21
    // [34] phi from main::@21 to main::@6 [phi:main::@21->main::@6]
  b6_from_b21:
    // [34] phi (byte) main::cur_pos#20 = (byte) 1 [phi:main::@21->main::@6#0] -- vbuz1=vbuc1 
    lda #1
    sta cur_pos
    jmp b6
    // [33] phi from main::@21 to main::@28 [phi:main::@21->main::@28]
  b28_from_b21:
    jmp b28
    // main::@28
  b28:
    // [34] phi from main::@28 to main::@6 [phi:main::@28->main::@6]
  b6_from_b28:
    // [34] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@28->main::@6#0] -- register_copy 
    jmp b6
    // main::@6
  b6:
    // [35] 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_F5#0 [phi:main::@6->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F5
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [36] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return
    sta keyboard_key_pressed.return_11
    jmp b22
    // main::@22
  b22:
    // [37] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_11
    sta _21
    // [38] if((byte~) main::$21==(byte) 0) goto main::@29 -- vbuz1_eq_0_then_la1 
    lda _21
    cmp #0
    beq b29_from_b22
    // [40] phi from main::@22 to main::@7 [phi:main::@22->main::@7]
  b7_from_b22:
    // [40] phi (byte) main::cur_pos#18 = (byte) 2 [phi:main::@22->main::@7#0] -- vbuz1=vbuc1 
    lda #2
    sta cur_pos
    jmp b7
    // [39] phi from main::@22 to main::@29 [phi:main::@22->main::@29]
  b29_from_b22:
    jmp b29
    // main::@29
  b29:
    // [40] phi from main::@29 to main::@7 [phi:main::@29->main::@7]
  b7_from_b29:
    // [40] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@29->main::@7#0] -- register_copy 
    jmp b7
    // main::@7
  b7:
    // [41] 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_F7#0 [phi:main::@7->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F7
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [42] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return
    sta keyboard_key_pressed.return_12
    jmp b23
    // main::@23
  b23:
    // [43] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_12
    sta _24
    // [44] if((byte~) main::$24==(byte) 0) goto main::@30 -- vbuz1_eq_0_then_la1 
    lda _24
    cmp #0
    beq b30_from_b23
    // [46] phi from main::@23 to main::@8 [phi:main::@23->main::@8]
  b8_from_b23:
    // [46] phi (byte) main::cur_pos#11 = (byte) 3 [phi:main::@23->main::@8#0] -- vbuz1=vbuc1 
    lda #3
    sta cur_pos
    jmp b8
    // [45] phi from main::@23 to main::@30 [phi:main::@23->main::@30]
  b30_from_b23:
    jmp b30
    // main::@30
  b30:
    // [46] phi from main::@30 to main::@8 [phi:main::@30->main::@8]
  b8_from_b30:
    // [46] phi (byte) main::cur_pos#11 = (byte) main::cur_pos#18 [phi:main::@30->main::@8#0] -- register_copy 
    jmp b8
    // main::@8
  b8:
    // [47] 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_LSHIFT#0 [phi:main::@8->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_LSHIFT
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
    // [48] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return
    sta keyboard_key_pressed.return_13
    jmp b24
    // main::@24
  b24:
    // [49] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_13
    sta _27
    // [50] if((byte~) main::$27!=(byte) 0) goto main::@9 -- vbuz1_neq_0_then_la1 
    lda _27
    cmp #0
    bne b9_from_b24
    // [52] phi from main::@24 to main::@10 [phi:main::@24->main::@10]
  b10_from_b24:
    // [52] phi (byte) main::shift#9 = (byte) 0 [phi:main::@24->main::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta shift
    jmp b10
    // [51] phi from main::@24 to main::@9 [phi:main::@24->main::@9]
  b9_from_b24:
    jmp b9
    // main::@9
  b9:
    // [52] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  b10_from_b9:
    // [52] phi (byte) main::shift#9 = (byte) 1 [phi:main::@9->main::@10#0] -- vbuz1=vbuc1 
    lda #1
    sta shift
    jmp b10
    // main::@10
  b10:
    // [53] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  b11_from_b10:
    // [53] phi (byte) main::ch#2 = (byte) 0 [phi:main::@10->main::@11#0] -- vbuz1=vbuc1 
    lda #0
    sta ch
    jmp b11
  // Check for key presses - and plot char if found
    // [53] phi from main::@13 to main::@11 [phi:main::@13->main::@11]
  b11_from_b13:
    // [53] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@13->main::@11#0] -- register_copy 
    jmp b11
    // main::@11
  b11:
    // [54] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuz1=vbuz2 
    lda ch
    sta keyboard_get_keycode.ch
    // [55] call keyboard_get_keycode 
    jsr keyboard_get_keycode
    // [56] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0 -- vbuz1=vbuz2 
    lda keyboard_get_keycode.return
    sta keyboard_get_keycode.return_2
    jmp b25
    // main::@25
  b25:
    // [57] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2 -- vbuz1=vbuz2 
    lda keyboard_get_keycode.return_2
    sta key
    // [58] if((byte) main::key#0==(byte) $3f) goto main::@12 -- vbuz1_eq_vbuc1_then_la1 
    lda #$3f
    cmp key
    beq b12_from_b25
    jmp b14
    // main::@14
  b14:
    // [59] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuz1=vbuz2 
    lda key
    sta keyboard_key_pressed.key
    // [60] call keyboard_key_pressed 
    // [113] phi from main::@14 to keyboard_key_pressed [phi:main::@14->keyboard_key_pressed]
  keyboard_key_pressed_from_b14:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@14->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
    // [61] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return
    sta keyboard_key_pressed.return_14
    jmp b26
    // main::@26
  b26:
    // [62] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_14
    sta pressed
    // [63] phi from main::@26 to main::@12 [phi:main::@26->main::@12]
  b12_from_b26:
    // [63] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@26->main::@12#0] -- register_copy 
    jmp b12
    // [63] phi from main::@25 to main::@12 [phi:main::@25->main::@12]
  b12_from_b25:
    // [63] phi (byte) main::pressed#2 = (byte) 0 [phi:main::@25->main::@12#0] -- vbuz1=vbuc1 
    lda #0
    sta pressed
    jmp b12
    // main::@12
  b12:
    // [64] if((byte) main::pressed#2==(byte) 0) goto main::@13 -- vbuz1_eq_0_then_la1 
    lda pressed
    cmp #0
    beq b13
    jmp b15
    // main::@15
  b15:
    // [65] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11 -- vbuz1=vbuz2 
    lda cur_pos
    sta plot_chargen.pos
    // [66] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuz1=vbuz2 
    lda ch
    sta plot_chargen.ch
    // [67] (byte) plot_chargen::shift#1 ← (byte) main::shift#9 -- vbuz1=vbuz2 
    lda shift
    sta plot_chargen.shift
    // [68] call plot_chargen 
    // [71] phi from main::@15 to plot_chargen [phi:main::@15->plot_chargen]
  plot_chargen_from_b15:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@15->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@15->plot_chargen#1] -- register_copy 
    // [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@15->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    jmp b13
    // main::@13
  b13:
    // [69] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
    // [70] if((byte) main::ch#1!=(byte) $40) goto main::@11 -- vbuz1_neq_vbuc1_then_la1 
    lda #$40
    cmp ch
    bne b11_from_b13
    // [22] phi from main::@13 to main::@4 [phi:main::@13->main::@4]
  b4_from_b13:
    // [22] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#11 [phi:main::@13->main::@4#0] -- register_copy 
    jmp b4
    str: .text "f1@"
    str1: .text "f3@"
    str2: .text "f5@"
    str3: .text "f7@"
}
  // plot_chargen
// Render 8x8 char (ch) as pixels on char canvas #pos
// plot_chargen(byte zeropage($b) pos, byte zeropage(9) ch, byte zeropage($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 ch
    sta _0
    lda #0
    sta _0+1
    // [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 -- vwuz1=vwuz2_rol_3 
    lda _0
    asl
    sta _1
    lda _0+1
    rol
    sta _1+1
    asl _1
    rol _1+1
    asl _1
    rol _1+1
    // [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN#0 + (word~) plot_chargen::$1 -- pbuz1=pbuc1_plus_vwuz2 
    lda _1
    clc
    adc #<CHARGEN
    sta chargen
    lda _1+1
    adc #>CHARGEN
    sta chargen+1
    // [76] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1 -- vbuz1_eq_0_then_la1 
    lda 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 chargen
    adc #<$800
    sta chargen
    lda chargen+1
    adc #>$800
    sta 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#0) ← (byte) $32 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
    // [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2 -- vbuz1=vbuz2 
    lda pos
    sta 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 mul8u.res
    sta mul8u.return
    lda mul8u.res+1
    sta mul8u.return+1
    jmp b9
    // plot_chargen::@9
  b9:
    // [83] (word~) plot_chargen::$7 ← (word) mul8u::return#2 -- vwuz1=vwuz2 
    lda mul8u.return
    sta _7
    lda mul8u.return+1
    sta _7+1
    // [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN#0+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 -- pbuz1=pbuc1_plus_vwuz2 
    lda _7
    clc
    adc #<SCREEN+$28+1
    sta sc
    lda _7+1
    adc #>SCREEN+$28+1
    sta 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 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 y
    lda (chargen),y
    sta 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 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 bits
    sta _10
    // [89] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5 -- vbuz1_eq_0_then_la1 
    lda _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 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 c
    jmp b5
    // plot_chargen::@5
  b5:
    // [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 -- _deref_pbuz1=vbuz2 
    lda c
    ldy #0
    sta (sc),y
    // [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
    // [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl bits
    // [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2 -- vbuz1=_inc_vbuz1 
    inc x
    // [96] if((byte) plot_chargen::x#1!=(byte) 8) goto plot_chargen::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp 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 sc
    sta sc
    bcc !+
    inc sc+1
  !:
    // [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc y
    // [99] if((byte) plot_chargen::y#1!=(byte) 8) goto plot_chargen::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp y
    bne b3_from_b7
    jmp b8
    // plot_chargen::@8
  b8:
    // [100] *((const byte*) PROCPORT#0) ← (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 zeropage($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 = (const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vbuc1 
    lda #<b
    sta mb
    lda #>b
    sta mb+1
    // [104] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta res
    lda #>0
    sta 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 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 a
    sta _1
    // [108] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuz1_eq_0_then_la1 
    lda _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 res
    clc
    adc mb
    sta res
    lda res+1
    adc mb+1
    sta 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 a
    // [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl mb
    rol 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 zeropage($19) key)
keyboard_key_pressed: {
    .label _2 = $3a
    .label colidx = $36
    .label rowidx = $37
    .label return = $3b
    .label return_2 = $1e
    .label key = $19
    .label return_10 = $20
    .label return_11 = $22
    .label return_12 = $24
    .label return_13 = $26
    .label return_14 = $2b
    // [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and key
    sta colidx
    // [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte) 3 -- vbuz1=vbuz2_ror_3 
    lda key
    lsr
    lsr
    lsr
    sta rowidx
    // [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 -- vbuz1=vbuz2 
    lda rowidx
    sta 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 keyboard_matrix_read.return
    sta keyboard_matrix_read.return_2
    jmp b1
    // keyboard_key_pressed::@1
  b1:
    // [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 
    lda keyboard_matrix_read.return_2
    sta _2
    // [120] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 
    lda _2
    ldy colidx
    and keyboard_matrix_col_bitmask,y
    sta 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 zeropage($38) rowid)
keyboard_matrix_read: {
    .label return = $3c
    .label rowid = $38
    .label return_2 = $39
    // [122] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 
    ldy rowid
    lda keyboard_matrix_row_bitmask,y
    sta CIA1_PORT_A
    // [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuz1=_bnot__deref_pbuc1 
    lda CIA1_PORT_B
    eor #$ff
    sta 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 zeropage($28) ch)
keyboard_get_keycode: {
    .label return = $3d
    .label ch = $28
    .label return_2 = $29
    // [125] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy ch
    lda keyboard_char_keycodes,y
    sta 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* zeropage($1a) str, byte* zeropage($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*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 
    ldy #0
    lda (str),y
    cmp #'@'
    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 at
    bne !+
    inc at+1
  !:
    // [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5 -- pbuz1=_inc_pbuz1 
    inc str
    bne !+
    inc str+1
  !:
    jmp b1_from_b2
}
  // File Data
  // 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
  // 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

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a reg byte y 
Statement [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word) $3e8) goto main::@1 [ main::sc#1 ] ( main:2 [ main::sc#1 ] ) always clobbers reg byte a 
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:19 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] main:2::plot_chargen:68 [ 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 ZP_BYTE:4 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE: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 ZP_BYTE:6 [ main::shift#9 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE: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:19 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] main:2::plot_chargen:68 [ 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#0 + (word~) plot_chargen::$1 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] main:2::plot_chargen:68 [ 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#0) ← (byte) $32 [ plot_chargen::pos#2 plot_chargen::chargen#5 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#5 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::chargen#5 mul8u::return#2 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::$7 ] main:2::plot_chargen:68 [ 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#0+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 [ plot_chargen::chargen#5 plot_chargen::sc#0 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::sc#0 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] main:2::plot_chargen:68 [ 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 ZP_BYTE: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:19 [ 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:68 [ 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 ZP_BYTE:4 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ plot_chargen::x#2 plot_chargen::x#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE: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 ZP_BYTE:6 [ main::shift#9 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE: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:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] main:2::plot_chargen:68 [ 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#0) ← (byte) $37 [ ] ( main:2::plot_chargen:19 [ main::i#2 ] main:2::plot_chargen:68 [ 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:19::mul8u:81 [ main::i#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] main:2::plot_chargen:68::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 ZP_BYTE: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:23 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:29 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:35 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:41 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:47 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:60 [ 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 ZP_BYTE:54 [ keyboard_key_pressed::colidx#0 ]
Statement [122] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::keyboard_key_pressed:23::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:29::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:35::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:41::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:47::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:60::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#0) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_key_pressed:23::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:29::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:35::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:41::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:47::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:60::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*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2 [ 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 ] main:2::print_str_at:16 [ 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: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 ] main:2::print_str_at:16 [ print_str_at::str#5 print_str_at::at#5 ] ) always clobbers reg byte a reg byte y 
Statement [6] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a reg byte y 
Statement [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word) $3e8) goto main::@1 [ main::sc#1 ] ( main:2 [ main::sc#1 ] ) always clobbers reg byte a 
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:19 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$0 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::$1 ] main:2::plot_chargen:68 [ 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#0 + (word~) plot_chargen::$1 [ plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::shift#2 plot_chargen::pos#2 plot_chargen::chargen#0 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] main:2::plot_chargen:68 [ 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#0) ← (byte) $32 [ plot_chargen::pos#2 plot_chargen::chargen#5 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::pos#2 plot_chargen::chargen#5 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::chargen#5 mul8u::return#2 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::$7 ] main:2::plot_chargen:68 [ 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#0+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 [ plot_chargen::chargen#5 plot_chargen::sc#0 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::sc#0 ] main:2::plot_chargen:68 [ 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:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#7 plot_chargen::bits#0 ] main:2::plot_chargen:68 [ 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:19 [ 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:68 [ 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:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::sc#2 ] main:2::plot_chargen:68 [ 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#0) ← (byte) $37 [ ] ( main:2::plot_chargen:19 [ main::i#2 ] main:2::plot_chargen:68 [ 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:19::mul8u:81 [ main::i#2 plot_chargen::chargen#5 mul8u::res#2 mul8u::a#2 mul8u::mb#2 mul8u::$1 ] main:2::plot_chargen:68::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:19::mul8u:81 [ main::i#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] main:2::plot_chargen:68::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:23 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:29 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:35 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:41 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:47 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:60 [ 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#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::keyboard_key_pressed:23::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:29::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:35::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:41::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:47::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:60::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#0) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_key_pressed:23::keyboard_matrix_read:117 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:29::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:35::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:41::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:47::keyboard_matrix_read:117 [ main::cur_pos#11 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:60::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*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2 [ 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 ] main:2::print_str_at:16 [ 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: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 ] main:2::print_str_at:16 [ print_str_at::str#5 print_str_at::at#5 ] ) always clobbers reg byte a reg byte y 
Potential registers zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] : zp ZP_WORD:2 , 
Potential registers zp ZP_BYTE:4 [ main::i#2 main::i#1 ] : zp ZP_BYTE:4 , reg byte x , 
Potential registers zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ] : zp ZP_BYTE:5 , reg byte x , 
Potential registers zp ZP_BYTE:6 [ main::shift#9 ] : zp ZP_BYTE:6 , reg byte x , 
Potential registers zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] : zp ZP_BYTE:7 , reg byte x , 
Potential registers zp ZP_BYTE:8 [ main::pressed#2 main::pressed#1 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ] : zp ZP_BYTE:11 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] : zp ZP_WORD:12 , 
Potential registers zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] : zp ZP_BYTE:14 , reg byte x , 
Potential registers zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , 
Potential registers zp ZP_WORD:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] : zp ZP_WORD:16 , 
Potential registers zp ZP_BYTE:18 [ plot_chargen::x#2 plot_chargen::x#1 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , 
Potential registers zp ZP_BYTE:19 [ plot_chargen::c#2 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] : zp ZP_WORD:21 , 
Potential registers zp ZP_WORD:23 [ mul8u::mb#2 mul8u::mb#1 ] : zp ZP_WORD:23 , 
Potential registers zp ZP_BYTE:25 [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] : zp ZP_WORD:26 , 
Potential registers zp ZP_WORD:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] : zp ZP_WORD:28 , 
Potential registers zp ZP_BYTE:30 [ keyboard_key_pressed::return#2 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:31 [ main::$15 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:32 [ keyboard_key_pressed::return#10 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:33 [ main::$18 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:34 [ keyboard_key_pressed::return#11 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:35 [ main::$21 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:36 [ keyboard_key_pressed::return#12 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:37 [ main::$24 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:38 [ keyboard_key_pressed::return#13 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:39 [ main::$27 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:40 [ keyboard_get_keycode::ch#0 ] : zp ZP_BYTE:40 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:41 [ keyboard_get_keycode::return#2 ] : zp ZP_BYTE:41 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:42 [ main::key#0 ] : zp ZP_BYTE:42 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:43 [ keyboard_key_pressed::return#14 ] : zp ZP_BYTE:43 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:44 [ plot_chargen::$0 ] : zp ZP_WORD:44 , 
Potential registers zp ZP_WORD:46 [ plot_chargen::$1 ] : zp ZP_WORD:46 , 
Potential registers zp ZP_WORD:48 [ mul8u::return#2 ] : zp ZP_WORD:48 , 
Potential registers zp ZP_WORD:50 [ plot_chargen::$7 ] : zp ZP_WORD:50 , 
Potential registers zp ZP_BYTE:52 [ plot_chargen::$10 ] : zp ZP_BYTE:52 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:53 [ mul8u::$1 ] : zp ZP_BYTE:53 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:54 [ keyboard_key_pressed::colidx#0 ] : zp ZP_BYTE:54 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:55 [ keyboard_key_pressed::rowidx#0 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:56 [ keyboard_matrix_read::rowid#0 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:57 [ keyboard_matrix_read::return#2 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:58 [ keyboard_key_pressed::$2 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:59 [ keyboard_key_pressed::return#0 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:60 [ keyboard_matrix_read::return#0 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:61 [ keyboard_get_keycode::return#0 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [plot_chargen] 20,002: zp ZP_BYTE:52 [ plot_chargen::$10 ] 17,501.75: zp ZP_BYTE:18 [ plot_chargen::x#2 plot_chargen::x#1 ] 13,098.48: zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] 12,091.42: zp ZP_WORD:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] 10,001: zp ZP_BYTE:19 [ plot_chargen::c#2 ] 1,732.5: zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] 222.6: zp ZP_BYTE:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] 151.5: zp ZP_BYTE:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] 102: zp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ] 52.68: zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] 4: zp ZP_WORD:44 [ plot_chargen::$0 ] 4: zp ZP_WORD:46 [ plot_chargen::$1 ] 4: zp ZP_WORD:50 [ plot_chargen::$7 ] 
Uplift Scope [mul8u] 3,503.83: zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] 2,431: zp ZP_WORD:23 [ mul8u::mb#2 mul8u::mb#1 ] 2,002: zp ZP_BYTE:53 [ mul8u::$1 ] 1,670.67: zp ZP_BYTE:20 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] 4: zp ZP_WORD:48 [ mul8u::return#2 ] 
Uplift Scope [main] 404: zp ZP_BYTE:8 [ main::pressed#2 main::pressed#1 ] 176.75: zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] 151.5: zp ZP_BYTE:42 [ main::key#0 ] 38.19: zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ] 33: zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] 27.5: zp ZP_BYTE:4 [ main::i#2 main::i#1 ] 22: zp ZP_BYTE:31 [ main::$15 ] 22: zp ZP_BYTE:33 [ main::$18 ] 22: zp ZP_BYTE:35 [ main::$21 ] 22: zp ZP_BYTE:37 [ main::$24 ] 22: zp ZP_BYTE:39 [ main::$27 ] 5.32: zp ZP_BYTE:6 [ main::shift#9 ] 
Uplift Scope [keyboard_key_pressed] 254.5: zp ZP_BYTE:25 [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ] 202: zp ZP_BYTE:43 [ keyboard_key_pressed::return#14 ] 22: zp ZP_BYTE:30 [ keyboard_key_pressed::return#2 ] 22: zp ZP_BYTE:32 [ keyboard_key_pressed::return#10 ] 22: zp ZP_BYTE:34 [ keyboard_key_pressed::return#11 ] 22: zp ZP_BYTE:36 [ keyboard_key_pressed::return#12 ] 22: zp ZP_BYTE:38 [ keyboard_key_pressed::return#13 ] 19.75: zp ZP_BYTE:59 [ keyboard_key_pressed::return#0 ] 4: zp ZP_BYTE:55 [ keyboard_key_pressed::rowidx#0 ] 4: zp ZP_BYTE:58 [ keyboard_key_pressed::$2 ] 0.67: zp ZP_BYTE:54 [ keyboard_key_pressed::colidx#0 ] 
Uplift Scope [keyboard_get_keycode] 202: zp ZP_BYTE:41 [ keyboard_get_keycode::return#2 ] 103: zp ZP_BYTE:40 [ keyboard_get_keycode::ch#0 ] 34.33: zp ZP_BYTE:61 [ keyboard_get_keycode::return#0 ] 
Uplift Scope [print_str_at] 35.5: zp ZP_WORD:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] 24.67: zp ZP_WORD:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] 
Uplift Scope [keyboard_matrix_read] 4: zp ZP_BYTE:56 [ keyboard_matrix_read::rowid#0 ] 4: zp ZP_BYTE:57 [ keyboard_matrix_read::return#2 ] 1.33: zp ZP_BYTE: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 ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] zp ZP_WORD: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 ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] zp ZP_BYTE:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] zp ZP_BYTE:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] zp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#1 plot_chargen::pos#0 ] zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] zp ZP_WORD:44 [ plot_chargen::$0 ] zp ZP_WORD:46 [ plot_chargen::$1 ] zp ZP_WORD:50 [ plot_chargen::$7 ] 
Limited combination testing to 100 combinations of 10368 possible.
Uplifting [mul8u] best 810626 combination zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD: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 ZP_WORD:48 [ mul8u::return#2 ] 
Uplifting [main] best 808826 combination reg byte a [ main::pressed#2 main::pressed#1 ] zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] reg byte a [ main::key#0 ] zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ] zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] zp ZP_BYTE:4 [ main::i#2 main::i#1 ] zp ZP_BYTE:31 [ main::$15 ] zp ZP_BYTE:33 [ main::$18 ] zp ZP_BYTE:35 [ main::$21 ] zp ZP_BYTE:37 [ main::$24 ] zp ZP_BYTE:39 [ main::$27 ] zp ZP_BYTE: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 ZP_BYTE:34 [ keyboard_key_pressed::return#11 ] zp ZP_BYTE:36 [ keyboard_key_pressed::return#12 ] zp ZP_BYTE:38 [ keyboard_key_pressed::return#13 ] zp ZP_BYTE:59 [ keyboard_key_pressed::return#0 ] zp ZP_BYTE:55 [ keyboard_key_pressed::rowidx#0 ] zp ZP_BYTE:58 [ keyboard_key_pressed::$2 ] zp ZP_BYTE: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 ZP_WORD:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] zp ZP_WORD: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 ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Uplifting [plot_chargen] best 806763 combination zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ]
Uplifting [plot_chargen] best 806763 combination zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 ZP_BYTE:7 [ main::ch#2 main::ch#1 ]
Uplifting [main] best 806457 combination zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE:4 [ main::i#2 main::i#1 ]
Uplifting [main] best 805822 combination zp ZP_BYTE:4 [ main::i#2 main::i#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ main::$15 ]
Uplifting [main] best 805762 combination reg byte a [ main::$15 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:33 [ main::$18 ]
Uplifting [main] best 805702 combination reg byte a [ main::$18 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 ZP_BYTE:35 [ main::$21 ]
Uplifting [main] best 805582 combination reg byte a [ main::$21 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 ZP_BYTE:37 [ main::$24 ]
Uplifting [main] best 805462 combination reg byte a [ main::$24 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 ZP_BYTE:39 [ main::$27 ]
Uplifting [main] best 805342 combination reg byte a [ main::$27 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 ZP_BYTE:6 [ main::shift#9 ]
Uplifting [main] best 804889 combination zp ZP_BYTE:6 [ main::shift#9 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE: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 with common assignment [ zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] ] with [ zp ZP_WORD:46 [ plot_chargen::$1 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] ] with [ zp ZP_WORD:50 [ plot_chargen::$7 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] ] with [ zp ZP_WORD:48 [ mul8u::return#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 ] ] with [ zp ZP_WORD:44 [ plot_chargen::$0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD: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 ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] - score: 1
Allocated (was zp ZP_WORD:12) zp ZP_WORD:8 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 ]
Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:10 [ plot_chargen::y#2 plot_chargen::y#1 ]
Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:11 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Allocated (was zp ZP_WORD:16) zp ZP_WORD:12 [ 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 ZP_WORD:23) zp ZP_WORD:14 [ mul8u::mb#2 mul8u::mb#1 ]
Allocated (was zp ZP_WORD:26) zp ZP_WORD:16 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ]
Allocated (was zp ZP_WORD:28) zp ZP_WORD:18 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Allows analysis of the CHARGEN ROM font
  // Basic 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 = 2
    .label i = 4
    .label ch = 7
    .label cur_pos = 5
    .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#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta sc
    lda #>SCREEN
    sta sc+1
    jmp b1
  // Clear screen
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
    // [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda sc+1
    cmp #>SCREEN+$3e8
    bcc b1_from_b1
    bne !+
    lda sc
    cmp #<SCREEN+$3e8
    bcc b1_from_b1
  !:
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [10] call print_str_at 
    // [127] phi from main::@2 to print_str_at [phi:main::@2->print_str_at]
  print_str_at_from_b2:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte) 1 [phi:main::@2->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta print_str_at.at
    lda #>SCREEN+1
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str [phi:main::@2->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str
    sta print_str_at.str
    lda #>str
    sta print_str_at.str+1
    jsr print_str_at
    // [11] phi from main::@2 to main::@16 [phi:main::@2->main::@16]
  b16_from_b2:
    jmp b16
    // main::@16
  b16:
    // [12] call print_str_at 
    // [127] phi from main::@16 to print_str_at [phi:main::@16->print_str_at]
  print_str_at_from_b16:
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte) 1+(byte) $a [phi:main::@16->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$a
    sta print_str_at.at
    lda #>SCREEN+1+$a
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str1 [phi:main::@16->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str_at.str
    lda #>str1
    sta print_str_at.str+1
    jsr print_str_at
    // [13] phi from main::@16 to main::@17 [phi:main::@16->main::@17]
  b17_from_b16:
    jmp b17
    // main::@17
  b17:
    // [14] 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#0+(byte) 1+(byte) $14 [phi:main::@17->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$14
    sta print_str_at.at
    lda #>SCREEN+1+$14
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str2 [phi:main::@17->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str2
    sta print_str_at.str
    lda #>str2
    sta print_str_at.str+1
    jsr print_str_at
    // [15] phi from main::@17 to main::@18 [phi:main::@17->main::@18]
  b18_from_b17:
    jmp b18
    // main::@18
  b18:
    // [16] 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#0+(byte) 1+(byte) $1e [phi:main::@18->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$1e
    sta print_str_at.at
    lda #>SCREEN+1+$1e
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str3 [phi:main::@18->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str3
    sta print_str_at.str
    lda #>str3
    sta print_str_at.str+1
    jsr print_str_at
    // [17] phi from main::@18 to main::@3 [phi:main::@18->main::@3]
  b3_from_b18:
    // [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@18->main::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b3
    // [17] phi from main::@19 to main::@3 [phi:main::@19->main::@3]
  b3_from_b19:
    // [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@19->main::@3#0] -- register_copy 
    jmp b3
    // main::@3
  b3:
    // [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuyy=vbuz1 
    ldy i
    // [19] call plot_chargen 
    // [71] phi from main::@3 to plot_chargen [phi:main::@3->plot_chargen]
  plot_chargen_from_b3:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@3->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) 0 [phi:main::@3->plot_chargen#1] -- vbuxx=vbuc1 
    ldx #0
    // [71] phi (byte) plot_chargen::ch#2 = (byte) $20 [phi:main::@3->plot_chargen#2] -- vbuaa=vbuc1 
    lda #$20
    jsr plot_chargen
    jmp b19
    // main::@19
  b19:
    // [20] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
    // [21] if((byte) main::i#1!=(byte) 4) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp i
    bne b3_from_b19
    // [22] phi from main::@19 to main::@4 [phi:main::@19->main::@4]
  b4_from_b19:
    // [22] phi (byte) main::cur_pos#24 = (byte) 0 [phi:main::@19->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b4
    // main::@4
  b4:
    // [23] call keyboard_key_pressed 
    // [113] phi from main::@4 to keyboard_key_pressed [phi:main::@4->keyboard_key_pressed]
  keyboard_key_pressed_from_b4:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1#0 [phi:main::@4->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F1
    jsr keyboard_key_pressed
    // [24] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
    jmp b20
    // main::@20
  b20:
    // [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
    // [26] if((byte~) main::$15==(byte) 0) goto main::@27 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b27_from_b20
    // [28] phi from main::@20 to main::@5 [phi:main::@20->main::@5]
  b5_from_b20:
    // [28] phi (byte) main::cur_pos#22 = (byte) 0 [phi:main::@20->main::@5#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b5
    // [27] phi from main::@20 to main::@27 [phi:main::@20->main::@27]
  b27_from_b20:
    jmp b27
    // main::@27
  b27:
    // [28] phi from main::@27 to main::@5 [phi:main::@27->main::@5]
  b5_from_b27:
    // [28] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@27->main::@5#0] -- register_copy 
    jmp b5
    // main::@5
  b5:
    // [29] 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_F3#0 [phi:main::@5->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F3
    jsr keyboard_key_pressed
    // [30] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
    jmp b21
    // main::@21
  b21:
    // [31] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
    // [32] if((byte~) main::$18==(byte) 0) goto main::@28 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b28_from_b21
    // [34] phi from main::@21 to main::@6 [phi:main::@21->main::@6]
  b6_from_b21:
    // [34] phi (byte) main::cur_pos#20 = (byte) 1 [phi:main::@21->main::@6#0] -- vbuz1=vbuc1 
    lda #1
    sta cur_pos
    jmp b6
    // [33] phi from main::@21 to main::@28 [phi:main::@21->main::@28]
  b28_from_b21:
    jmp b28
    // main::@28
  b28:
    // [34] phi from main::@28 to main::@6 [phi:main::@28->main::@6]
  b6_from_b28:
    // [34] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@28->main::@6#0] -- register_copy 
    jmp b6
    // main::@6
  b6:
    // [35] 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_F5#0 [phi:main::@6->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F5
    jsr keyboard_key_pressed
    // [36] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
    jmp b22
    // main::@22
  b22:
    // [37] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
    // [38] if((byte~) main::$21==(byte) 0) goto main::@29 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b29_from_b22
    // [40] phi from main::@22 to main::@7 [phi:main::@22->main::@7]
  b7_from_b22:
    // [40] phi (byte) main::cur_pos#18 = (byte) 2 [phi:main::@22->main::@7#0] -- vbuz1=vbuc1 
    lda #2
    sta cur_pos
    jmp b7
    // [39] phi from main::@22 to main::@29 [phi:main::@22->main::@29]
  b29_from_b22:
    jmp b29
    // main::@29
  b29:
    // [40] phi from main::@29 to main::@7 [phi:main::@29->main::@7]
  b7_from_b29:
    // [40] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@29->main::@7#0] -- register_copy 
    jmp b7
    // main::@7
  b7:
    // [41] 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_F7#0 [phi:main::@7->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F7
    jsr keyboard_key_pressed
    // [42] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
    jmp b23
    // main::@23
  b23:
    // [43] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
    // [44] if((byte~) main::$24==(byte) 0) goto main::@30 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b30_from_b23
    // [46] phi from main::@23 to main::@8 [phi:main::@23->main::@8]
  b8_from_b23:
    // [46] phi (byte) main::cur_pos#11 = (byte) 3 [phi:main::@23->main::@8#0] -- vbuz1=vbuc1 
    lda #3
    sta cur_pos
    jmp b8
    // [45] phi from main::@23 to main::@30 [phi:main::@23->main::@30]
  b30_from_b23:
    jmp b30
    // main::@30
  b30:
    // [46] phi from main::@30 to main::@8 [phi:main::@30->main::@8]
  b8_from_b30:
    // [46] phi (byte) main::cur_pos#11 = (byte) main::cur_pos#18 [phi:main::@30->main::@8#0] -- register_copy 
    jmp b8
    // main::@8
  b8:
    // [47] 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_LSHIFT#0 [phi:main::@8->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_LSHIFT
    jsr keyboard_key_pressed
    // [48] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
    jmp b24
    // main::@24
  b24:
    // [49] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
    // [50] if((byte~) main::$27!=(byte) 0) goto main::@9 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne b9_from_b24
    // [52] phi from main::@24 to main::@10 [phi:main::@24->main::@10]
  b10_from_b24:
    // [52] phi (byte) main::shift#9 = (byte) 0 [phi:main::@24->main::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta shift
    jmp b10
    // [51] phi from main::@24 to main::@9 [phi:main::@24->main::@9]
  b9_from_b24:
    jmp b9
    // main::@9
  b9:
    // [52] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  b10_from_b9:
    // [52] phi (byte) main::shift#9 = (byte) 1 [phi:main::@9->main::@10#0] -- vbuz1=vbuc1 
    lda #1
    sta shift
    jmp b10
    // main::@10
  b10:
    // [53] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  b11_from_b10:
    // [53] phi (byte) main::ch#2 = (byte) 0 [phi:main::@10->main::@11#0] -- vbuz1=vbuc1 
    lda #0
    sta ch
    jmp b11
  // Check for key presses - and plot char if found
    // [53] phi from main::@13 to main::@11 [phi:main::@13->main::@11]
  b11_from_b13:
    // [53] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@13->main::@11#0] -- register_copy 
    jmp b11
    // main::@11
  b11:
    // [54] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuxx=vbuz1 
    ldx ch
    // [55] call keyboard_get_keycode 
    jsr keyboard_get_keycode
    // [56] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
    jmp b25
    // main::@25
  b25:
    // [57] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
    // [58] if((byte) main::key#0==(byte) $3f) goto main::@12 -- vbuaa_eq_vbuc1_then_la1 
    cmp #$3f
    beq b12_from_b25
    jmp b14
    // main::@14
  b14:
    // [59] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuxx=vbuaa 
    tax
    // [60] call keyboard_key_pressed 
    // [113] phi from main::@14 to keyboard_key_pressed [phi:main::@14->keyboard_key_pressed]
  keyboard_key_pressed_from_b14:
    // [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@14->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
    // [61] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
    jmp b26
    // main::@26
  b26:
    // [62] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
    // [63] phi from main::@26 to main::@12 [phi:main::@26->main::@12]
  b12_from_b26:
    // [63] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@26->main::@12#0] -- register_copy 
    jmp b12
    // [63] phi from main::@25 to main::@12 [phi:main::@25->main::@12]
  b12_from_b25:
    // [63] phi (byte) main::pressed#2 = (byte) 0 [phi:main::@25->main::@12#0] -- vbuaa=vbuc1 
    lda #0
    jmp b12
    // main::@12
  b12:
    // [64] if((byte) main::pressed#2==(byte) 0) goto main::@13 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b13
    jmp b15
    // main::@15
  b15:
    // [65] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11 -- vbuyy=vbuz1 
    ldy cur_pos
    // [66] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuaa=vbuz1 
    lda ch
    // [67] (byte) plot_chargen::shift#1 ← (byte) main::shift#9 -- vbuxx=vbuz1 
    ldx shift
    // [68] call plot_chargen 
    // [71] phi from main::@15 to plot_chargen [phi:main::@15->plot_chargen]
  plot_chargen_from_b15:
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@15->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@15->plot_chargen#1] -- register_copy 
    // [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@15->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    jmp b13
    // main::@13
  b13:
    // [69] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
    // [70] if((byte) main::ch#1!=(byte) $40) goto main::@11 -- vbuz1_neq_vbuc1_then_la1 
    lda #$40
    cmp ch
    bne b11_from_b13
    // [22] phi from main::@13 to main::@4 [phi:main::@13->main::@4]
  b4_from_b13:
    // [22] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#11 [phi:main::@13->main::@4#0] -- register_copy 
    jmp b4
    str: .text "f1@"
    str1: .text "f3@"
    str2: .text "f5@"
    str3: .text "f7@"
}
  // 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 = 8
    .label _1 = 8
    .label _7 = $c
    .label chargen = 8
    .label sc = $c
    .label bits = $b
    .label y = $a
    // asm { sei  }
    sei
    // [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2 -- vwuz1=_word_vbuaa 
    sta _0
    lda #0
    sta _0+1
    // [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 -- vwuz1=vwuz1_rol_3 
    asl _1
    rol _1+1
    asl _1
    rol _1+1
    asl _1
    rol _1+1
    // [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN#0 + (word~) plot_chargen::$1 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda chargen
    adc #<CHARGEN
    sta chargen
    lda chargen+1
    adc #>CHARGEN
    sta 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 chargen
    adc #<$800
    sta chargen
    lda chargen+1
    adc #>$800
    sta 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#0) ← (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#0+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda sc
    adc #<SCREEN+$28+1
    sta sc
    lda sc+1
    adc #>SCREEN+$28+1
    sta 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 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 y
    lda (chargen),y
    sta 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 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 sc
    bne !+
    inc sc+1
  !:
    // [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl 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 sc
    sta sc
    bcc !+
    inc sc+1
  !:
    // [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc y
    // [99] if((byte) plot_chargen::y#1!=(byte) 8) goto plot_chargen::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp y
    bne b3_from_b7
    jmp b8
    // plot_chargen::@8
  b8:
    // [100] *((const byte*) PROCPORT#0) ← (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 = $e
    .label res = $c
    .label return = $c
    // [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
  b1_from_mul8u:
    // [104] phi (word) mul8u::mb#2 = (const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vbuc1 
    lda #<b
    sta mb
    lda #>b
    sta mb+1
    // [104] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta res
    lda #>0
    sta 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 res
    clc
    adc mb
    sta res
    lda res+1
    adc mb+1
    sta 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 mb
    rol 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[8]) keyboard_matrix_col_bitmask#0 + (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#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (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#0) -- 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#0 + (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* zeropage($10) str, byte* zeropage($12) at)
print_str_at: {
    .label at = $12
    .label str = $10
    // [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*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 
    ldy #0
    lda (str),y
    cmp #'@'
    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 at
    bne !+
    inc at+1
  !:
    // [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5 -- pbuz1=_inc_pbuz1 
    inc str
    bne !+
    inc str+1
  !:
    jmp b1_from_b2
}
  // File Data
  // 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
  // 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

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b16
Removing instruction jmp b17
Removing instruction jmp b18
Removing instruction jmp b3
Removing instruction jmp b19
Removing instruction jmp b4
Removing instruction jmp b20
Removing instruction jmp b27
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 b9
Removing instruction jmp b10
Removing instruction jmp b11
Removing instruction jmp b25
Removing instruction jmp b14
Removing instruction jmp b26
Removing instruction jmp b12
Removing instruction jmp b15
Removing instruction jmp b13
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 b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b3_from_b19 with b3
Replacing label b27_from_b20 with b5
Replacing label b28_from_b21 with b6
Replacing label b29_from_b22 with b7
Replacing label b30_from_b23 with b8
Replacing label b9_from_b24 with b9
Replacing label b11_from_b13 with b11
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 b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction b2_from_b1:
Removing instruction print_str_at_from_b2:
Removing instruction b16_from_b2:
Removing instruction print_str_at_from_b16:
Removing instruction b17_from_b16:
Removing instruction print_str_at_from_b17:
Removing instruction b18_from_b17:
Removing instruction print_str_at_from_b18:
Removing instruction b3_from_b19:
Removing instruction keyboard_key_pressed_from_b4:
Removing instruction b27_from_b20:
Removing instruction b27:
Removing instruction b5_from_b27:
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 b9_from_b24:
Removing instruction b10_from_b9:
Removing instruction b11_from_b10:
Removing instruction b11_from_b13:
Removing instruction b12_from_b26:
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 b2:
Removing instruction b16:
Removing instruction b17:
Removing instruction b18:
Removing instruction b3_from_b18:
Removing instruction plot_chargen_from_b3:
Removing instruction b19:
Removing instruction b4_from_b19:
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 b10_from_b24:
Removing instruction b25:
Removing instruction b14:
Removing instruction keyboard_key_pressed_from_b14:
Removing instruction b26:
Removing instruction b15:
Removing instruction plot_chargen_from_b15:
Removing instruction b4_from_b13:
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 b12_from_b25 to b2
Relabelling long label b5_from_b4 to b2
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b6
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp b11
Removing instruction jmp b3
Removing instruction jmp b4
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) CHARGEN
(const byte*) CHARGEN#0 CHARGEN = (byte*) 53248
(byte*) CIA1_PORT_A
(const byte*) CIA1_PORT_A#0 CIA1_PORT_A = (byte*) 56320
(byte*) CIA1_PORT_B
(const byte*) CIA1_PORT_B#0 CIA1_PORT_B = (byte*) 56321
(byte) KEY_0
(const byte) KEY_0#0 KEY_0 = (byte) $23
(byte) KEY_1
(const byte) KEY_1#0 KEY_1 = (byte) $38
(byte) KEY_2
(const byte) KEY_2#0 KEY_2 = (byte) $3b
(byte) KEY_3
(const byte) KEY_3#0 KEY_3 = (byte) 8
(byte) KEY_4
(const byte) KEY_4#0 KEY_4 = (byte) $b
(byte) KEY_5
(const byte) KEY_5#0 KEY_5 = (byte) $10
(byte) KEY_6
(const byte) KEY_6#0 KEY_6 = (byte) $13
(byte) KEY_7
(const byte) KEY_7#0 KEY_7 = (byte) $18
(byte) KEY_8
(const byte) KEY_8#0 KEY_8 = (byte) $1b
(byte) KEY_9
(const byte) KEY_9#0 KEY_9 = (byte) $20
(byte) KEY_A
(const byte) KEY_A#0 KEY_A = (byte) $a
(byte) KEY_ARROW_LEFT
(const byte) KEY_ARROW_LEFT#0 KEY_ARROW_LEFT = (byte) $39
(byte) KEY_ARROW_UP
(const byte) KEY_ARROW_UP#0 KEY_ARROW_UP = (byte) $36
(byte) KEY_ASTERISK
(const byte) KEY_ASTERISK#0 KEY_ASTERISK = (byte) $31
(byte) KEY_AT
(const byte) KEY_AT#0 KEY_AT = (byte) $2e
(byte) KEY_B
(const byte) KEY_B#0 KEY_B = (byte) $1c
(byte) KEY_C
(const byte) KEY_C#0 KEY_C = (byte) $14
(byte) KEY_COLON
(const byte) KEY_COLON#0 KEY_COLON = (byte) $2d
(byte) KEY_COMMA
(const byte) KEY_COMMA#0 KEY_COMMA = (byte) $2f
(byte) KEY_D
(const byte) KEY_D#0 KEY_D = (byte) $12
(byte) KEY_DOT
(const byte) KEY_DOT#0 KEY_DOT = (byte) $2c
(byte) KEY_E
(const byte) KEY_E#0 KEY_E = (byte) $e
(byte) KEY_EQUALS
(const byte) KEY_EQUALS#0 KEY_EQUALS = (byte) $35
(byte) KEY_F
(const byte) KEY_F#0 KEY_F = (byte) $15
(byte) KEY_F1
(const byte) KEY_F1#0 KEY_F1 = (byte) 4
(byte) KEY_F3
(const byte) KEY_F3#0 KEY_F3 = (byte) 5
(byte) KEY_F5
(const byte) KEY_F5#0 KEY_F5 = (byte) 6
(byte) KEY_F7
(const byte) KEY_F7#0 KEY_F7 = (byte) 3
(byte) KEY_G
(const byte) KEY_G#0 KEY_G = (byte) $1a
(byte) KEY_H
(const byte) KEY_H#0 KEY_H = (byte) $1d
(byte) KEY_I
(const byte) KEY_I#0 KEY_I = (byte) $21
(byte) KEY_J
(const byte) KEY_J#0 KEY_J = (byte) $22
(byte) KEY_K
(const byte) KEY_K#0 KEY_K = (byte) $25
(byte) KEY_L
(const byte) KEY_L#0 KEY_L = (byte) $2a
(byte) KEY_LSHIFT
(const byte) KEY_LSHIFT#0 KEY_LSHIFT = (byte) $f
(byte) KEY_M
(const byte) KEY_M#0 KEY_M = (byte) $24
(byte) KEY_MINUS
(const byte) KEY_MINUS#0 KEY_MINUS = (byte) $2b
(byte) KEY_N
(const byte) KEY_N#0 KEY_N = (byte) $27
(byte) KEY_O
(const byte) KEY_O#0 KEY_O = (byte) $26
(byte) KEY_P
(const byte) KEY_P#0 KEY_P = (byte) $29
(byte) KEY_PLUS
(const byte) KEY_PLUS#0 KEY_PLUS = (byte) $28
(byte) KEY_POUND
(const byte) KEY_POUND#0 KEY_POUND = (byte) $30
(byte) KEY_Q
(const byte) KEY_Q#0 KEY_Q = (byte) $3e
(byte) KEY_R
(const byte) KEY_R#0 KEY_R = (byte) $11
(byte) KEY_S
(const byte) KEY_S#0 KEY_S = (byte) $d
(byte) KEY_SEMICOLON
(const byte) KEY_SEMICOLON#0 KEY_SEMICOLON = (byte) $32
(byte) KEY_SLASH
(const byte) KEY_SLASH#0 KEY_SLASH = (byte) $37
(byte) KEY_SPACE
(const byte) KEY_SPACE#0 KEY_SPACE = (byte) $3c
(byte) KEY_T
(const byte) KEY_T#0 KEY_T = (byte) $16
(byte) KEY_U
(const byte) KEY_U#0 KEY_U = (byte) $1e
(byte) KEY_V
(const byte) KEY_V#0 KEY_V = (byte) $1f
(byte) KEY_W
(const byte) KEY_W#0 KEY_W = (byte) 9
(byte) KEY_X
(const byte) KEY_X#0 KEY_X = (byte) $17
(byte) KEY_Y
(const byte) KEY_Y#0 KEY_Y = (byte) $19
(byte) KEY_Z
(const byte) KEY_Z#0 KEY_Z = (byte) $c
(byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = (byte*) 1
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte[]) keyboard_char_keycodes
(const byte[]) keyboard_char_keycodes#0 keyboard_char_keycodes = { (const byte) KEY_AT#0, (const byte) KEY_A#0, (const byte) KEY_B#0, (const byte) KEY_C#0, (const byte) KEY_D#0, (const byte) KEY_E#0, (const byte) KEY_F#0, (const byte) KEY_G#0, (const byte) KEY_H#0, (const byte) KEY_I#0, (const byte) KEY_J#0, (const byte) KEY_K#0, (const byte) KEY_L#0, (const byte) KEY_M#0, (const byte) KEY_N#0, (const byte) KEY_O#0, (const byte) KEY_P#0, (const byte) KEY_Q#0, (const byte) KEY_R#0, (const byte) KEY_S#0, (const byte) KEY_T#0, (const byte) KEY_U#0, (const byte) KEY_V#0, (const byte) KEY_W#0, (const byte) KEY_X#0, (const byte) KEY_Y#0, (const byte) KEY_Z#0, (byte) $3f, (const byte) KEY_POUND#0, (byte) $3f, (const byte) KEY_ARROW_UP#0, (const byte) KEY_ARROW_LEFT#0, (const byte) KEY_SPACE#0, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (byte) $3f, (const byte) KEY_ASTERISK#0, (const byte) KEY_PLUS#0, (const byte) KEY_COMMA#0, (const byte) KEY_MINUS#0, (const byte) KEY_DOT#0, (const byte) KEY_SLASH#0, (const byte) KEY_0#0, (const byte) KEY_1#0, (const byte) KEY_2#0, (const byte) KEY_3#0, (const byte) KEY_4#0, (const byte) KEY_5#0, (const byte) KEY_6#0, (const byte) KEY_7#0, (const byte) KEY_8#0, (const byte) KEY_9#0, (const byte) KEY_COLON#0, (const byte) KEY_SEMICOLON#0, (byte) $3f, (const byte) KEY_EQUALS#0, (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
(byte[8]) keyboard_matrix_col_bitmask
(const byte[8]) keyboard_matrix_col_bitmask#0 keyboard_matrix_col_bitmask = { (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
(byte[8]) keyboard_matrix_row_bitmask
(const byte[8]) keyboard_matrix_row_bitmask#0 keyboard_matrix_row_bitmask = { (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::@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 ZP_BYTE:7 151.5
(byte) main::ch#2 ch zp ZP_BYTE:7 25.25
(byte) main::cur_pos
(byte) main::cur_pos#11 cur_pos zp ZP_BYTE:5 8.52
(byte) main::cur_pos#18 cur_pos zp ZP_BYTE:5 3.6666666666666665
(byte) main::cur_pos#20 cur_pos zp ZP_BYTE:5 3.6666666666666665
(byte) main::cur_pos#22 cur_pos zp ZP_BYTE:5 3.6666666666666665
(byte) main::cur_pos#24 cur_pos zp ZP_BYTE:5 18.666666666666664
(byte) main::i
(byte) main::i#1 i zp ZP_BYTE:4 16.5
(byte) main::i#2 i zp ZP_BYTE:4 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 ZP_WORD:2 16.5
(byte*) main::sc#2 sc zp ZP_WORD:2 16.5
(byte) main::shift
(byte) main::shift#9 shift zp ZP_BYTE:6 5.315789473684211
(const string) main::str str = (string) "f1@"
(const string) main::str1 str1 = (string) "f3@"
(const string) main::str2 str2 = (string) "f5@"
(const string) main::str3 str3 = (string) "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 ZP_WORD:14 2002.0
(word) mul8u::mb#2 mb zp ZP_WORD:14 429.0
(word) mul8u::res
(word) mul8u::res#1 res zp ZP_WORD:12 2002.0
(word) mul8u::res#2 res zp ZP_WORD:12 500.83333333333337
(word) mul8u::res#6 res zp ZP_WORD:12 1001.0
(word) mul8u::return
(word) mul8u::return#2 return zp ZP_WORD:12 4.0
(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift)
(word~) plot_chargen::$0 $0 zp ZP_WORD:8 4.0
(word~) plot_chargen::$1 $1 zp ZP_WORD:8 4.0
(byte~) plot_chargen::$10 reg byte a 20002.0
(word~) plot_chargen::$7 $7 zp ZP_WORD:12 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 ZP_BYTE:11 2002.0
(byte) plot_chargen::bits#1 bits zp ZP_BYTE:11 6667.333333333333
(byte) plot_chargen::bits#2 bits zp ZP_BYTE:11 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 ZP_WORD:8 3.0
(byte*) plot_chargen::chargen#1 chargen zp ZP_WORD:8 4.0
(byte*) plot_chargen::chargen#5 chargen zp ZP_WORD:8 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 ZP_WORD:12 4.0
(byte*) plot_chargen::sc#1 sc zp ZP_WORD:12 5250.75
(byte*) plot_chargen::sc#2 sc zp ZP_WORD:12 667.3333333333334
(byte*) plot_chargen::sc#3 sc zp ZP_WORD:12 5167.333333333333
(byte*) plot_chargen::sc#7 sc zp ZP_WORD:12 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 ZP_BYTE:10 1501.5
(byte) plot_chargen::y#2 y zp ZP_BYTE:10 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 ZP_WORD:18 11.0
(byte*) print_str_at::at#5 at zp ZP_WORD:18 11.666666666666666
(byte*) print_str_at::at#7 at zp ZP_WORD:18 2.0
(byte*) print_str_at::str
(byte*) print_str_at::str#4 str zp ZP_WORD:16 22.0
(byte*) print_str_at::str#5 str zp ZP_WORD:16 11.5
(byte*) print_str_at::str#7 str zp ZP_WORD:16 2.0

zp ZP_WORD:2 [ main::sc#2 main::sc#1 ]
zp ZP_BYTE:4 [ main::i#2 main::i#1 ]
zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#11 ]
zp ZP_BYTE:6 [ main::shift#9 ]
zp ZP_BYTE:7 [ 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 ZP_WORD:8 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 ]
zp ZP_BYTE:10 [ plot_chargen::y#2 plot_chargen::y#1 ]
zp ZP_BYTE:11 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
zp ZP_WORD:12 [ 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 ]
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 ]
zp ZP_WORD:14 [ mul8u::mb#2 mul8u::mb#1 ]
reg byte x [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
zp ZP_WORD:16 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ]
zp ZP_WORD:18 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]
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: 628893

  // File Comments
// Allows analysis of the CHARGEN ROM font
  // Basic 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 = 2
    .label i = 4
    .label ch = 7
    .label cur_pos = 5
    .label shift = 6
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (byte*) main::sc#2 = (const byte*) SCREEN#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta sc
    lda #>SCREEN
    sta sc+1
  // Clear screen
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    // main::@1
  b1:
    // *sc = ' '
    // [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // for( byte* sc=SCREEN;sc<SCREEN+1000;sc++)
    // [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
    // [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word) $3e8) goto main::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda sc+1
    cmp #>SCREEN+$3e8
    bcc b1
    bne !+
    lda sc
    cmp #<SCREEN+$3e8
    bcc b1
  !:
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // print_str_at("f1", SCREEN+1)
    // [10] call print_str_at 
    // [127] phi from main::@2 to print_str_at [phi:main::@2->print_str_at]
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte) 1 [phi:main::@2->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta print_str_at.at
    lda #>SCREEN+1
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str [phi:main::@2->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str
    sta print_str_at.str
    lda #>str
    sta print_str_at.str+1
    jsr print_str_at
    // [11] phi from main::@2 to main::@16 [phi:main::@2->main::@16]
    // main::@16
    // print_str_at("f3", SCREEN+1+10)
    // [12] call print_str_at 
    // [127] phi from main::@16 to print_str_at [phi:main::@16->print_str_at]
    // [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte) 1+(byte) $a [phi:main::@16->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$a
    sta print_str_at.at
    lda #>SCREEN+1+$a
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str1 [phi:main::@16->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str_at.str
    lda #>str1
    sta print_str_at.str+1
    jsr print_str_at
    // [13] phi from main::@16 to main::@17 [phi:main::@16->main::@17]
    // main::@17
    // print_str_at("f5", SCREEN+1+20)
    // [14] 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#0+(byte) 1+(byte) $14 [phi:main::@17->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$14
    sta print_str_at.at
    lda #>SCREEN+1+$14
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str2 [phi:main::@17->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str2
    sta print_str_at.str
    lda #>str2
    sta print_str_at.str+1
    jsr print_str_at
    // [15] phi from main::@17 to main::@18 [phi:main::@17->main::@18]
    // main::@18
    // print_str_at("f7", SCREEN+1+30)
    // [16] 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#0+(byte) 1+(byte) $1e [phi:main::@18->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1+$1e
    sta print_str_at.at
    lda #>SCREEN+1+$1e
    sta print_str_at.at+1
    // [127] phi (byte*) print_str_at::str#7 = (const string) main::str3 [phi:main::@18->print_str_at#1] -- pbuz1=pbuc1 
    lda #<str3
    sta print_str_at.str
    lda #>str3
    sta print_str_at.str+1
    jsr print_str_at
    // [17] phi from main::@18 to main::@3 [phi:main::@18->main::@3]
    // [17] phi (byte) main::i#2 = (byte) 0 [phi:main::@18->main::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    // [17] phi from main::@19 to main::@3 [phi:main::@19->main::@3]
    // [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@19->main::@3#0] -- register_copy 
    // main::@3
  b3:
    // plot_chargen(i, $20, 0)
    // [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuyy=vbuz1 
    ldy i
    // [19] call plot_chargen 
    // [71] phi from main::@3 to plot_chargen [phi:main::@3->plot_chargen]
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@3->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) 0 [phi:main::@3->plot_chargen#1] -- vbuxx=vbuc1 
    ldx #0
    // [71] phi (byte) plot_chargen::ch#2 = (byte) $20 [phi:main::@3->plot_chargen#2] -- vbuaa=vbuc1 
    lda #$20
    jsr plot_chargen
    // main::@19
    // for(byte i : 0..3 )
    // [20] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
    // [21] if((byte) main::i#1!=(byte) 4) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp i
    bne b3
    // [22] phi from main::@19 to main::@4 [phi:main::@19->main::@4]
    // [22] phi (byte) main::cur_pos#24 = (byte) 0 [phi:main::@19->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    // main::@4
  b4:
    // keyboard_key_pressed(KEY_F1)
    // [23] call keyboard_key_pressed 
    // [113] phi from main::@4 to keyboard_key_pressed [phi:main::@4->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1#0 [phi:main::@4->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F1
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F1)
    // [24] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
    // main::@20
    // [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
    // if(keyboard_key_pressed(KEY_F1)!=0)
    // [26] if((byte~) main::$15==(byte) 0) goto main::@27 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b5
    // [28] phi from main::@20 to main::@5 [phi:main::@20->main::@5]
    // [28] phi (byte) main::cur_pos#22 = (byte) 0 [phi:main::@20->main::@5#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    // [27] phi from main::@20 to main::@27 [phi:main::@20->main::@27]
    // main::@27
    // [28] phi from main::@27 to main::@5 [phi:main::@27->main::@5]
    // [28] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@27->main::@5#0] -- register_copy 
    // main::@5
  b5:
    // keyboard_key_pressed(KEY_F3)
    // [29] 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_F3#0 [phi:main::@5->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F3
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F3)
    // [30] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
    // main::@21
    // [31] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
    // if(keyboard_key_pressed(KEY_F3)!=0)
    // [32] if((byte~) main::$18==(byte) 0) goto main::@28 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b6
    // [34] phi from main::@21 to main::@6 [phi:main::@21->main::@6]
    // [34] phi (byte) main::cur_pos#20 = (byte) 1 [phi:main::@21->main::@6#0] -- vbuz1=vbuc1 
    lda #1
    sta cur_pos
    // [33] phi from main::@21 to main::@28 [phi:main::@21->main::@28]
    // main::@28
    // [34] phi from main::@28 to main::@6 [phi:main::@28->main::@6]
    // [34] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@28->main::@6#0] -- register_copy 
    // main::@6
  b6:
    // keyboard_key_pressed(KEY_F5)
    // [35] 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_F5#0 [phi:main::@6->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F5
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F5)
    // [36] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
    // main::@22
    // [37] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
    // if(keyboard_key_pressed(KEY_F5)!=0)
    // [38] if((byte~) main::$21==(byte) 0) goto main::@29 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b7
    // [40] phi from main::@22 to main::@7 [phi:main::@22->main::@7]
    // [40] phi (byte) main::cur_pos#18 = (byte) 2 [phi:main::@22->main::@7#0] -- vbuz1=vbuc1 
    lda #2
    sta cur_pos
    // [39] phi from main::@22 to main::@29 [phi:main::@22->main::@29]
    // main::@29
    // [40] phi from main::@29 to main::@7 [phi:main::@29->main::@7]
    // [40] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@29->main::@7#0] -- register_copy 
    // main::@7
  b7:
    // keyboard_key_pressed(KEY_F7)
    // [41] 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_F7#0 [phi:main::@7->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F7
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_F7)
    // [42] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
    // main::@23
    // [43] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
    // if(keyboard_key_pressed(KEY_F7)!=0)
    // [44] if((byte~) main::$24==(byte) 0) goto main::@30 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b8
    // [46] phi from main::@23 to main::@8 [phi:main::@23->main::@8]
    // [46] phi (byte) main::cur_pos#11 = (byte) 3 [phi:main::@23->main::@8#0] -- vbuz1=vbuc1 
    lda #3
    sta cur_pos
    // [45] phi from main::@23 to main::@30 [phi:main::@23->main::@30]
    // main::@30
    // [46] phi from main::@30 to main::@8 [phi:main::@30->main::@8]
    // [46] phi (byte) main::cur_pos#11 = (byte) main::cur_pos#18 [phi:main::@30->main::@8#0] -- register_copy 
    // main::@8
  b8:
    // keyboard_key_pressed(KEY_LSHIFT)
    // [47] 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_LSHIFT#0 [phi:main::@8->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_LSHIFT
    jsr keyboard_key_pressed
    // keyboard_key_pressed(KEY_LSHIFT)
    // [48] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
    // main::@24
    // [49] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
    // if(keyboard_key_pressed(KEY_LSHIFT)!=0)
    // [50] if((byte~) main::$27!=(byte) 0) goto main::@9 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne b9
    // [52] phi from main::@24 to main::@10 [phi:main::@24->main::@10]
    // [52] phi (byte) main::shift#9 = (byte) 0 [phi:main::@24->main::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta shift
    jmp b10
    // [51] phi from main::@24 to main::@9 [phi:main::@24->main::@9]
    // main::@9
  b9:
    // [52] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
    // [52] phi (byte) main::shift#9 = (byte) 1 [phi:main::@9->main::@10#0] -- vbuz1=vbuc1 
    lda #1
    sta shift
    // main::@10
  b10:
    // [53] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
    // [53] phi (byte) main::ch#2 = (byte) 0 [phi:main::@10->main::@11#0] -- vbuz1=vbuc1 
    lda #0
    sta ch
  // Check for key presses - and plot char if found
    // [53] phi from main::@13 to main::@11 [phi:main::@13->main::@11]
    // [53] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@13->main::@11#0] -- register_copy 
    // main::@11
  b11:
    // keyboard_get_keycode(ch)
    // [54] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuxx=vbuz1 
    ldx ch
    // [55] call keyboard_get_keycode 
    jsr keyboard_get_keycode
    // [56] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
    // main::@25
    // key = keyboard_get_keycode(ch)
    // [57] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
    // if(key!=$3f)
    // [58] if((byte) main::key#0==(byte) $3f) goto main::@12 -- vbuaa_eq_vbuc1_then_la1 
    cmp #$3f
    beq b2
    // main::@14
    // keyboard_key_pressed(key)
    // [59] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuxx=vbuaa 
    tax
    // [60] call keyboard_key_pressed 
    // [113] phi from main::@14 to keyboard_key_pressed [phi:main::@14->keyboard_key_pressed]
    // [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@14->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
    // keyboard_key_pressed(key)
    // [61] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
    // main::@26
    // pressed = keyboard_key_pressed(key)
    // [62] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
    // [63] phi from main::@26 to main::@12 [phi:main::@26->main::@12]
    // [63] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@26->main::@12#0] -- register_copy 
    jmp b12
    // [63] phi from main::@25 to main::@12 [phi:main::@25->main::@12]
  b2:
    // [63] phi (byte) main::pressed#2 = (byte) 0 [phi:main::@25->main::@12#0] -- vbuaa=vbuc1 
    lda #0
    // main::@12
  b12:
    // if(pressed!=0)
    // [64] if((byte) main::pressed#2==(byte) 0) goto main::@13 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b13
    // main::@15
    // plot_chargen(cur_pos, ch, shift)
    // [65] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#11 -- vbuyy=vbuz1 
    ldy cur_pos
    // [66] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuaa=vbuz1 
    lda ch
    // [67] (byte) plot_chargen::shift#1 ← (byte) main::shift#9 -- vbuxx=vbuz1 
    ldx shift
    // [68] call plot_chargen 
    // [71] phi from main::@15 to plot_chargen [phi:main::@15->plot_chargen]
    // [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@15->plot_chargen#0] -- register_copy 
    // [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@15->plot_chargen#1] -- register_copy 
    // [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@15->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    // main::@13
  b13:
    // for( byte ch : 0..$3f)
    // [69] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
    // [70] if((byte) main::ch#1!=(byte) $40) goto main::@11 -- vbuz1_neq_vbuc1_then_la1 
    lda #$40
    cmp ch
    bne b11
    // [22] phi from main::@13 to main::@4 [phi:main::@13->main::@4]
    // [22] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#11 [phi:main::@13->main::@4#0] -- register_copy 
    jmp b4
    str: .text "f1@"
    str1: .text "f3@"
    str2: .text "f5@"
    str3: .text "f7@"
}
  // 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 = 8
    .label _1 = 8
    .label _7 = $c
    .label chargen = 8
    .label sc = $c
    .label bits = $b
    .label y = $a
    // asm
    // asm { sei  }
    sei
    // (word)ch
    // [73] (word~) plot_chargen::$0 ← (word)(byte) plot_chargen::ch#2 -- vwuz1=_word_vbuaa 
    sta _0
    lda #0
    sta _0+1
    // (word)ch*8
    // [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte) 3 -- vwuz1=vwuz1_rol_3 
    asl _1
    rol _1+1
    asl _1
    rol _1+1
    asl _1
    rol _1+1
    // chargen = CHARGEN+(word)ch*8
    // [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN#0 + (word~) plot_chargen::$1 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda chargen
    adc #<CHARGEN
    sta chargen
    lda chargen+1
    adc #>CHARGEN
    sta 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 chargen
    adc #<$800
    sta chargen
    lda chargen+1
    adc #>$800
    sta 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#0) ← (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#0+(byte) $28+(byte) 1 + (word~) plot_chargen::$7 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda sc
    adc #<SCREEN+$28+1
    sta sc
    lda sc+1
    adc #>SCREEN+$28+1
    sta 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 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 y
    lda (chargen),y
    sta 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 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 b2
    // [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]
  b2:
    // [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 sc
    bne !+
    inc sc+1
  !:
    // bits = bits*2
    // [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl 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 sc
    sta sc
    bcc !+
    inc sc+1
  !:
    // for(byte y:0..7)
    // [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc y
    // [99] if((byte) plot_chargen::y#1!=(byte) 8) goto plot_chargen::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp y
    bne b3
    // plot_chargen::@8
    // *PROCPORT = $37
    // [100] *((const byte*) PROCPORT#0) ← (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 = $e
    .label res = $c
    .label return = $c
    // [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
    // [104] phi (word) mul8u::mb#2 = (const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vbuc1 
    lda #<b
    sta mb
    lda #>b
    sta mb+1
    // [104] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta res
    sta 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 res
    clc
    adc mb
    sta res
    lda res+1
    adc mb+1
    sta 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 mb
    rol 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[8]) keyboard_matrix_col_bitmask#0 + (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#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (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#0) -- 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#0 + (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* zeropage($10) str, byte* zeropage($12) at)
print_str_at: {
    .label at = $12
    .label str = $10
    // [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*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 
    ldy #0
    lda (str),y
    cmp #'@'
    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 at
    bne !+
    inc at+1
  !:
    // [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5 -- pbuz1=_inc_pbuz1 
    inc str
    bne !+
    inc str+1
  !:
    jmp b1
}
  // File Data
  // 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
  // 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

