Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) PROCPORT_DDR#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) PROCPORT_RAM_ALL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 48
  (byte) PROCPORT_RAM_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) 53
  (byte) PROCPORT_RAM_CHARROM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 49
  (byte) PROCPORT_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) 54
  (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) 55
  (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) 53248
  (word) SPRITE_PTRS#0 ← (word/signed word/dword/signed dword) 1016
  (byte*) SPRITES_XPOS#0 ← ((byte*)) (word/dword/signed dword) 53248
  (byte*) SPRITES_YPOS#0 ← ((byte*)) (word/dword/signed dword) 53249
  (byte*) SPRITES_XMSB#0 ← ((byte*)) (word/dword/signed dword) 53264
  (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) 53266
  (byte*) SPRITES_ENABLE#0 ← ((byte*)) (word/dword/signed dword) 53269
  (byte*) SPRITES_EXPAND_Y#0 ← ((byte*)) (word/dword/signed dword) 53271
  (byte*) SPRITES_PRIORITY#0 ← ((byte*)) (word/dword/signed dword) 53275
  (byte*) SPRITES_MC#0 ← ((byte*)) (word/dword/signed dword) 53276
  (byte*) SPRITES_EXPAND_X#0 ← ((byte*)) (word/dword/signed dword) 53277
  (byte*) BORDERCOL#0 ← ((byte*)) (word/dword/signed dword) 53280
  (byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) 53281
  (byte*) BGCOL1#0 ← ((byte*)) (word/dword/signed dword) 53281
  (byte*) BGCOL2#0 ← ((byte*)) (word/dword/signed dword) 53282
  (byte*) BGCOL3#0 ← ((byte*)) (word/dword/signed dword) 53283
  (byte*) BGCOL4#0 ← ((byte*)) (word/dword/signed dword) 53284
  (byte*) SPRITES_MC1#0 ← ((byte*)) (word/dword/signed dword) 53285
  (byte*) SPRITES_MC2#0 ← ((byte*)) (word/dword/signed dword) 53286
  (byte*) SPRITES_COLS#0 ← ((byte*)) (word/dword/signed dword) 53287
  (byte*) VIC_CONTROL#0 ← ((byte*)) (word/dword/signed dword) 53265
  (byte*) D011#0 ← ((byte*)) (word/dword/signed dword) 53265
  (byte) VIC_RST8#0 ← (byte/word/signed word/dword/signed dword) 128
  (byte) VIC_ECM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 64
  (byte) VIC_BMM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 32
  (byte) VIC_DEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16
  (byte) VIC_RSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) VIC_CONTROL2#0 ← ((byte*)) (word/dword/signed dword) 53270
  (byte*) D016#0 ← ((byte*)) (word/dword/signed dword) 53270
  (byte) VIC_MCM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16
  (byte) VIC_CSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) D018#0 ← ((byte*)) (word/dword/signed dword) 53272
  (byte*) VIC_MEMORY#0 ← ((byte*)) (word/dword/signed dword) 53272
  (byte*) LIGHTPEN_X#0 ← ((byte*)) (word/dword/signed dword) 53267
  (byte*) LIGHTPEN_Y#0 ← ((byte*)) (word/dword/signed dword) 53268
  (byte*) IRQ_STATUS#0 ← ((byte*)) (word/dword/signed dword) 53273
  (byte*) IRQ_ENABLE#0 ← ((byte*)) (word/dword/signed dword) 53274
  (byte) IRQ_RASTER#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) IRQ_COLLISION_BG#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) IRQ_COLLISION_SPRITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) IRQ_LIGHTPEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) COLS#0 ← ((byte*)) (word/dword/signed dword) 55296
  (byte*) CIA1_PORT_A#0 ← ((byte*)) (word/dword/signed dword) 56320
  (byte*) CIA1_PORT_B#0 ← ((byte*)) (word/dword/signed dword) 56321
  (byte*) CIA1_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) 56322
  (byte*) CIA1_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) 56323
  (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) 56333
  (byte) CIA_INTERRUPT_CLEAR#0 ← (byte/signed byte/word/signed word/dword/signed dword) 127
  (byte*) CIA2_PORT_A#0 ← ((byte*)) (word/dword/signed dword) 56576
  (byte*) CIA2_PORT_B#0 ← ((byte*)) (word/dword/signed dword) 56577
  (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) 56578
  (byte*) CIA2_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) 56579
  (byte*) CIA2_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) 56589
  (void()**) KERNEL_IRQ#0 ← ((void()**)) (word/signed word/dword/signed dword) 788
  (void()**) HARDWARE_IRQ#0 ← ((void()**)) (word/dword/signed dword) 65534
  (byte) BLACK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) WHITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) RED#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) CYAN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte) PURPLE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 5
  (byte) BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte) YELLOW#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte) ORANGE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte) BROWN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 9
  (byte) PINK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte) DARK_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 11
  (byte) GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 12
  (byte) LIGHT_GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 13
  (byte) LIGHT_BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 14
  (byte) LIGHT_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 15
  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 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (word) mul8u::mb#0 ← ((word)) (byte) mul8u::b#1
  to:mul8u::@1
mul8u::@1: scope:[mul8u]  from mul8u mul8u::@4
  (word) mul8u::mb#5 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@4/(word) mul8u::mb#1 )
  (word) mul8u::res#4 ← phi( mul8u/(word) mul8u::res#0 mul8u::@4/(word) mul8u::res#6 )
  (byte) mul8u::a#2 ← phi( mul8u/(byte) mul8u::a#5 mul8u::@4/(byte) mul8u::a#0 )
  (bool~) mul8u::$0 ← (byte) mul8u::a#2 != (byte/signed byte/word/signed word/dword/signed dword) 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 )
  (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte/signed byte/word/signed word/dword/signed dword) 1
  (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 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 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) mul8u::a#0 ← (byte~) mul8u::$5
  (word~) mul8u::$6 ← (word) mul8u::mb#2 << (byte/signed byte/word/signed word/dword/signed dword) 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_DEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) KEY_RETURN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) KEY_CRSR_RIGHT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) KEY_F7#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte) KEY_F1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) KEY_F3#0 ← (byte/signed byte/word/signed word/dword/signed dword) 5
  (byte) KEY_F5#0 ← (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte) KEY_CRSR_DOWN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte) KEY_3#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte) KEY_W#0 ← (byte/signed byte/word/signed word/dword/signed dword) 9
  (byte) KEY_A#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte) KEY_4#0 ← (byte/signed byte/word/signed word/dword/signed dword) 11
  (byte) KEY_Z#0 ← (byte/signed byte/word/signed word/dword/signed dword) 12
  (byte) KEY_S#0 ← (byte/signed byte/word/signed word/dword/signed dword) 13
  (byte) KEY_E#0 ← (byte/signed byte/word/signed word/dword/signed dword) 14
  (byte) KEY_LSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 15
  (byte) KEY_5#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16
  (byte) KEY_R#0 ← (byte/signed byte/word/signed word/dword/signed dword) 17
  (byte) KEY_D#0 ← (byte/signed byte/word/signed word/dword/signed dword) 18
  (byte) KEY_6#0 ← (byte/signed byte/word/signed word/dword/signed dword) 19
  (byte) KEY_C#0 ← (byte/signed byte/word/signed word/dword/signed dword) 20
  (byte) KEY_F#0 ← (byte/signed byte/word/signed word/dword/signed dword) 21
  (byte) KEY_T#0 ← (byte/signed byte/word/signed word/dword/signed dword) 22
  (byte) KEY_X#0 ← (byte/signed byte/word/signed word/dword/signed dword) 23
  (byte) KEY_7#0 ← (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte) KEY_Y#0 ← (byte/signed byte/word/signed word/dword/signed dword) 25
  (byte) KEY_G#0 ← (byte/signed byte/word/signed word/dword/signed dword) 26
  (byte) KEY_8#0 ← (byte/signed byte/word/signed word/dword/signed dword) 27
  (byte) KEY_B#0 ← (byte/signed byte/word/signed word/dword/signed dword) 28
  (byte) KEY_H#0 ← (byte/signed byte/word/signed word/dword/signed dword) 29
  (byte) KEY_U#0 ← (byte/signed byte/word/signed word/dword/signed dword) 30
  (byte) KEY_V#0 ← (byte/signed byte/word/signed word/dword/signed dword) 31
  (byte) KEY_9#0 ← (byte/signed byte/word/signed word/dword/signed dword) 32
  (byte) KEY_I#0 ← (byte/signed byte/word/signed word/dword/signed dword) 33
  (byte) KEY_J#0 ← (byte/signed byte/word/signed word/dword/signed dword) 34
  (byte) KEY_0#0 ← (byte/signed byte/word/signed word/dword/signed dword) 35
  (byte) KEY_M#0 ← (byte/signed byte/word/signed word/dword/signed dword) 36
  (byte) KEY_K#0 ← (byte/signed byte/word/signed word/dword/signed dword) 37
  (byte) KEY_O#0 ← (byte/signed byte/word/signed word/dword/signed dword) 38
  (byte) KEY_N#0 ← (byte/signed byte/word/signed word/dword/signed dword) 39
  (byte) KEY_PLUS#0 ← (byte/signed byte/word/signed word/dword/signed dword) 40
  (byte) KEY_P#0 ← (byte/signed byte/word/signed word/dword/signed dword) 41
  (byte) KEY_L#0 ← (byte/signed byte/word/signed word/dword/signed dword) 42
  (byte) KEY_MINUS#0 ← (byte/signed byte/word/signed word/dword/signed dword) 43
  (byte) KEY_DOT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 44
  (byte) KEY_COLON#0 ← (byte/signed byte/word/signed word/dword/signed dword) 45
  (byte) KEY_AT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 46
  (byte) KEY_COMMA#0 ← (byte/signed byte/word/signed word/dword/signed dword) 47
  (byte) KEY_POUND#0 ← (byte/signed byte/word/signed word/dword/signed dword) 48
  (byte) KEY_ASTERISK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 49
  (byte) KEY_SEMICOLON#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte) KEY_HOME#0 ← (byte/signed byte/word/signed word/dword/signed dword) 51
  (byte) KEY_RSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 52
  (byte) KEY_EQUALS#0 ← (byte/signed byte/word/signed word/dword/signed dword) 53
  (byte) KEY_ARROW_UP#0 ← (byte/signed byte/word/signed word/dword/signed dword) 54
  (byte) KEY_SLASH#0 ← (byte/signed byte/word/signed word/dword/signed dword) 55
  (byte) KEY_1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 56
  (byte) KEY_ARROW_LEFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 57
  (byte) KEY_CTRL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 58
  (byte) KEY_2#0 ← (byte/signed byte/word/signed word/dword/signed dword) 59
  (byte) KEY_SPACE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 60
  (byte) KEY_COMMODORE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 61
  (byte) KEY_Q#0 ← (byte/signed byte/word/signed word/dword/signed dword) 62
  (byte) KEY_RUNSTOP#0 ← (byte/signed byte/word/signed word/dword/signed dword) 63
  (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/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP#0, (byte) KEY_ARROW_LEFT#0, (byte) KEY_SPACE#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (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/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
  (byte[8]) keyboard_matrix_row_bitmask#0 ← { (byte/word/signed word/dword/signed dword) 254, (byte/word/signed word/dword/signed dword) 253, (byte/word/signed word/dword/signed dword) 251, (byte/word/signed word/dword/signed dword) 247, (byte/word/signed word/dword/signed dword) 239, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 191, (byte/signed byte/word/signed word/dword/signed dword) 127 }
  (byte[8]) keyboard_matrix_col_bitmask#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 16, (byte/signed byte/word/signed word/dword/signed dword) 32, (byte/signed byte/word/signed word/dword/signed dword) 64, (byte/word/signed word/dword/signed dword) 128 }
  to:@13
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::@21 main::@3 main::@4 main::@5 main::@6 main::@7
  (byte) keyboard_key_pressed::key#6 ← phi( main::@21/(byte) keyboard_key_pressed::key#5 main::@3/(byte) keyboard_key_pressed::key#0 main::@4/(byte) keyboard_key_pressed::key#1 main::@5/(byte) keyboard_key_pressed::key#2 main::@6/(byte) keyboard_key_pressed::key#3 main::@7/(byte) keyboard_key_pressed::key#4 )
  (byte~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#6 & (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte) keyboard_key_pressed::colidx#0 ← (byte~) keyboard_key_pressed::$0
  (byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key#6 >> (byte/signed byte/word/signed word/dword/signed dword) 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::@10
  (byte) keyboard_get_keycode::ch#1 ← phi( main::@10/(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
@13: scope:[]  from @9
  (byte[8]) keyboard_events#0 ← { fill( 8, 0) }
  (byte) keyboard_events_size#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) keyboard_modifiers#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) KEY_MODIFIER_LSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) KEY_MODIFIER_RSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) KEY_MODIFIER_CTRL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) KEY_MODIFIER_COMMODORE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT#0 | (byte) KEY_MODIFIER_RSHIFT#0
  (byte) KEY_MODIFIER_SHIFT#0 ← (byte~) $0
  (byte[8]) keyboard_scan_values#0 ← { fill( 8, 0) }
  to:@16
@16: scope:[]  from @13
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  to:@19
main: scope:[main]  from @19
  (byte*) SCREEN#1 ← phi( @19/(byte*) SCREEN#8 )
  (byte*) main::sc#0 ← (byte*) SCREEN#1
  to:main::@1
main::@1: scope:[main]  from main main::@1
  (byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#1 main::@1/(byte*) SCREEN#2 )
  (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::$0 ← (byte*) SCREEN#2 + (word/signed word/dword/signed dword) 1000
  (bool~) main::$1 ← (byte*) main::sc#1 < (byte*~) main::$0
  if((bool~) main::$1) goto main::@1
  to:main::@13
main::@13: scope:[main]  from main::@1
  (byte*) SCREEN#3 ← phi( main::@1/(byte*) SCREEN#2 )
  (byte*~) main::$2 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) print_str_at::str#0 ← (const string) main::str
  (byte*) print_str_at::at#0 ← (byte*~) main::$2
  call print_str_at 
  to:main::@25
main::@25: scope:[main]  from main::@13
  (byte*) SCREEN#4 ← phi( main::@13/(byte*) SCREEN#3 )
  (byte*~) main::$4 ← (byte*) SCREEN#4 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*~) main::$5 ← (byte*~) main::$4 + (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte*) print_str_at::str#1 ← (const string) main::str1
  (byte*) print_str_at::at#1 ← (byte*~) main::$5
  call print_str_at 
  to:main::@26
main::@26: scope:[main]  from main::@25
  (byte*) SCREEN#5 ← phi( main::@25/(byte*) SCREEN#4 )
  (byte*~) main::$7 ← (byte*) SCREEN#5 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*~) main::$8 ← (byte*~) main::$7 + (byte/signed byte/word/signed word/dword/signed dword) 20
  (byte*) print_str_at::str#2 ← (const string) main::str2
  (byte*) print_str_at::at#2 ← (byte*~) main::$8
  call print_str_at 
  to:main::@27
main::@27: scope:[main]  from main::@26
  (byte*) SCREEN#6 ← phi( main::@26/(byte*) SCREEN#5 )
  (byte*~) main::$10 ← (byte*) SCREEN#6 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*~) main::$11 ← (byte*~) main::$10 + (byte/signed byte/word/signed word/dword/signed dword) 30
  (byte*) print_str_at::str#3 ← (const string) main::str3
  (byte*) print_str_at::at#3 ← (byte*~) main::$11
  call print_str_at 
  to:main::@28
main::@28: scope:[main]  from main::@27
  (byte*) SCREEN#13 ← phi( main::@27/(byte*) SCREEN#6 )
  (byte) main::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@2
main::@2: scope:[main]  from main::@28 main::@29
  (byte*) SCREEN#11 ← phi( main::@28/(byte*) SCREEN#13 main::@29/(byte*) SCREEN#14 )
  (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 ← (byte/signed byte/word/signed word/dword/signed dword) 32
  (byte) plot_chargen::shift#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  call plot_chargen 
  to:main::@29
main::@29: scope:[main]  from main::@2
  (byte*) SCREEN#14 ← phi( main::@2/(byte*) SCREEN#11 )
  (byte) main::i#3 ← phi( main::@2/(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::@2
  to:main::@14
main::@14: scope:[main]  from main::@29
  (byte*) SCREEN#39 ← phi( main::@29/(byte*) SCREEN#14 )
  (byte) main::cur_pos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) main::shift#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@3
main::@3: scope:[main]  from main::@14 main::@23
  (byte*) SCREEN#38 ← phi( main::@14/(byte*) SCREEN#39 main::@23/(byte*) SCREEN#40 )
  (byte) main::cur_pos#25 ← phi( main::@14/(byte) main::cur_pos#0 main::@23/(byte) main::cur_pos#26 )
  (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::@3
  (byte*) SCREEN#37 ← phi( main::@3/(byte*) SCREEN#38 )
  (byte) main::cur_pos#24 ← phi( main::@3/(byte) main::cur_pos#25 )
  (byte) keyboard_key_pressed::return#9 ← phi( main::@3/(byte) keyboard_key_pressed::return#2 )
  (byte~) main::$15 ← (byte) keyboard_key_pressed::return#9
  (bool~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) main::$17 ← ! (bool~) main::$16
  if((bool~) main::$17) goto main::@4
  to:main::@15
main::@4: scope:[main]  from main::@15 main::@30
  (byte*) SCREEN#35 ← phi( main::@15/(byte*) SCREEN#36 main::@30/(byte*) SCREEN#37 )
  (byte) main::cur_pos#23 ← phi( main::@15/(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::@4
  (byte*) SCREEN#34 ← phi( main::@4/(byte*) SCREEN#35 )
  (byte) main::cur_pos#22 ← phi( main::@4/(byte) main::cur_pos#23 )
  (byte) keyboard_key_pressed::return#10 ← phi( main::@4/(byte) keyboard_key_pressed::return#3 )
  (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
  (bool~) main::$19 ← (byte~) main::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) main::$20 ← ! (bool~) main::$19
  if((bool~) main::$20) goto main::@5
  to:main::@16
main::@15: scope:[main]  from main::@30
  (byte*) SCREEN#36 ← phi( main::@30/(byte*) SCREEN#37 )
  (byte) main::cur_pos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@4
main::@5: scope:[main]  from main::@16 main::@31
  (byte*) SCREEN#32 ← phi( main::@16/(byte*) SCREEN#33 main::@31/(byte*) SCREEN#34 )
  (byte) main::cur_pos#21 ← phi( main::@16/(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::@5
  (byte*) SCREEN#31 ← phi( main::@5/(byte*) SCREEN#32 )
  (byte) main::cur_pos#20 ← phi( main::@5/(byte) main::cur_pos#21 )
  (byte) keyboard_key_pressed::return#11 ← phi( main::@5/(byte) keyboard_key_pressed::return#4 )
  (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
  (bool~) main::$22 ← (byte~) main::$21 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) main::$23 ← ! (bool~) main::$22
  if((bool~) main::$23) goto main::@6
  to:main::@17
main::@16: scope:[main]  from main::@31
  (byte*) SCREEN#33 ← phi( main::@31/(byte*) SCREEN#34 )
  (byte) main::cur_pos#2 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  to:main::@5
main::@6: scope:[main]  from main::@17 main::@32
  (byte*) SCREEN#29 ← phi( main::@17/(byte*) SCREEN#30 main::@32/(byte*) SCREEN#31 )
  (byte) main::cur_pos#19 ← phi( main::@17/(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::@6
  (byte*) SCREEN#28 ← phi( main::@6/(byte*) SCREEN#29 )
  (byte) main::cur_pos#18 ← phi( main::@6/(byte) main::cur_pos#19 )
  (byte) keyboard_key_pressed::return#12 ← phi( main::@6/(byte) keyboard_key_pressed::return#5 )
  (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
  (bool~) main::$25 ← (byte~) main::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) main::$26 ← ! (bool~) main::$25
  if((bool~) main::$26) goto main::@7
  to:main::@18
main::@17: scope:[main]  from main::@32
  (byte*) SCREEN#30 ← phi( main::@32/(byte*) SCREEN#31 )
  (byte) main::cur_pos#3 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  to:main::@6
main::@7: scope:[main]  from main::@18 main::@33
  (byte*) SCREEN#26 ← phi( main::@18/(byte*) SCREEN#27 main::@33/(byte*) SCREEN#28 )
  (byte) main::cur_pos#17 ← phi( main::@18/(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::@7
  (byte*) SCREEN#25 ← phi( main::@7/(byte*) SCREEN#26 )
  (byte) main::cur_pos#16 ← phi( main::@7/(byte) main::cur_pos#17 )
  (byte) keyboard_key_pressed::return#13 ← phi( main::@7/(byte) keyboard_key_pressed::return#6 )
  (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
  (bool~) main::$28 ← (byte~) main::$27 != (byte/signed byte/word/signed word/dword/signed dword) 0
  if((bool~) main::$28) goto main::@8
  to:main::@19
main::@18: scope:[main]  from main::@33
  (byte*) SCREEN#27 ← phi( main::@33/(byte*) SCREEN#28 )
  (byte) main::cur_pos#4 ← (byte/signed byte/word/signed word/dword/signed dword) 3
  to:main::@7
main::@8: scope:[main]  from main::@34
  (byte*) SCREEN#23 ← phi( main::@34/(byte*) SCREEN#25 )
  (byte) main::cur_pos#14 ← phi( main::@34/(byte) main::cur_pos#16 )
  (byte) main::shift#1 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  to:main::@9
main::@19: scope:[main]  from main::@34
  (byte*) SCREEN#22 ← phi( main::@34/(byte*) SCREEN#25 )
  (byte) main::cur_pos#13 ← phi( main::@34/(byte) main::cur_pos#16 )
  (byte) main::shift#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@9
main::@9: scope:[main]  from main::@19 main::@8
  (byte*) SCREEN#21 ← phi( main::@19/(byte*) SCREEN#22 main::@8/(byte*) SCREEN#23 )
  (byte) main::shift#10 ← phi( main::@19/(byte) main::shift#2 main::@8/(byte) main::shift#1 )
  (byte) main::cur_pos#12 ← phi( main::@19/(byte) main::cur_pos#13 main::@8/(byte) main::cur_pos#14 )
  (byte) main::ch#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@10
main::@10: scope:[main]  from main::@12 main::@9
  (byte*) SCREEN#18 ← phi( main::@12/(byte*) SCREEN#20 main::@9/(byte*) SCREEN#21 )
  (byte) main::shift#7 ← phi( main::@12/(byte) main::shift#9 main::@9/(byte) main::shift#10 )
  (byte) main::cur_pos#9 ← phi( main::@12/(byte) main::cur_pos#11 main::@9/(byte) main::cur_pos#12 )
  (byte) main::ch#2 ← phi( main::@12/(byte) main::ch#1 main::@9/(byte) main::ch#0 )
  (byte) main::pressed#0 ← (byte/signed byte/word/signed word/dword/signed dword) 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::@10
  (byte*) SCREEN#16 ← phi( main::@10/(byte*) SCREEN#18 )
  (byte) main::shift#5 ← phi( main::@10/(byte) main::shift#7 )
  (byte) main::cur_pos#7 ← phi( main::@10/(byte) main::cur_pos#9 )
  (byte) main::ch#7 ← phi( main::@10/(byte) main::ch#2 )
  (byte) main::pressed#3 ← phi( main::@10/(byte) main::pressed#0 )
  (byte) keyboard_get_keycode::return#4 ← phi( main::@10/(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 != (byte/signed byte/word/signed word/dword/signed dword) 63
  (bool~) main::$31 ← ! (bool~) main::$30
  if((bool~) main::$31) goto main::@11
  to:main::@21
main::@11: scope:[main]  from main::@35 main::@36
  (byte*) SCREEN#15 ← phi( main::@35/(byte*) SCREEN#16 main::@36/(byte*) SCREEN#17 )
  (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 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) main::$34 ← ! (bool~) main::$33
  if((bool~) main::$34) goto main::@12
  to:main::@22
main::@21: scope:[main]  from main::@35
  (byte*) SCREEN#19 ← phi( main::@35/(byte*) SCREEN#16 )
  (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::@21
  (byte*) SCREEN#17 ← phi( main::@21/(byte*) SCREEN#19 )
  (byte) main::shift#6 ← phi( main::@21/(byte) main::shift#8 )
  (byte) main::cur_pos#8 ← phi( main::@21/(byte) main::cur_pos#10 )
  (byte) main::ch#8 ← phi( main::@21/(byte) main::ch#9 )
  (byte) keyboard_key_pressed::return#14 ← phi( main::@21/(byte) keyboard_key_pressed::return#7 )
  (byte~) main::$32 ← (byte) keyboard_key_pressed::return#14
  (byte) main::pressed#1 ← (byte~) main::$32
  to:main::@11
main::@12: scope:[main]  from main::@11 main::@37
  (byte*) SCREEN#20 ← phi( main::@11/(byte*) SCREEN#15 main::@37/(byte*) SCREEN#24 )
  (byte) main::shift#9 ← phi( main::@11/(byte) main::shift#4 main::@37/(byte) main::shift#11 )
  (byte) main::cur_pos#11 ← phi( main::@11/(byte) main::cur_pos#6 main::@37/(byte) main::cur_pos#15 )
  (byte) main::ch#3 ← phi( main::@11/(byte) main::ch#5 main::@37/(byte) main::ch#6 )
  (byte) main::ch#1 ← (byte) main::ch#3 + rangenext(0,63)
  (bool~) main::$36 ← (byte) main::ch#1 != rangelast(0,63)
  if((bool~) main::$36) goto main::@10
  to:main::@23
main::@22: scope:[main]  from main::@11
  (byte*) SCREEN#12 ← phi( main::@11/(byte*) SCREEN#15 )
  (byte) main::shift#3 ← phi( main::@11/(byte) main::shift#4 )
  (byte) main::ch#4 ← phi( main::@11/(byte) main::ch#5 )
  (byte) main::cur_pos#5 ← phi( main::@11/(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::@22
  (byte*) SCREEN#24 ← phi( main::@22/(byte*) SCREEN#12 )
  (byte) main::shift#11 ← phi( main::@22/(byte) main::shift#3 )
  (byte) main::cur_pos#15 ← phi( main::@22/(byte) main::cur_pos#5 )
  (byte) main::ch#6 ← phi( main::@22/(byte) main::ch#4 )
  to:main::@12
main::@23: scope:[main]  from main::@12
  (byte*) SCREEN#40 ← phi( main::@12/(byte*) SCREEN#20 )
  (byte) main::cur_pos#26 ← phi( main::@12/(byte) main::cur_pos#11 )
  if(true) goto main::@3
  to:main::@return
main::@return: scope:[main]  from main::@23
  return 
  to:@return
print_str_at: scope:[print_str_at]  from main::@13 main::@25 main::@26 main::@27
  (byte*) print_str_at::at#7 ← phi( main::@13/(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::@13/(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::@2 main::@22
  (byte) plot_chargen::pos#3 ← phi( main::@2/(byte) plot_chargen::pos#0 main::@22/(byte) plot_chargen::pos#1 )
  (byte*) SCREEN#9 ← phi( main::@2/(byte*) SCREEN#11 main::@22/(byte*) SCREEN#12 )
  (byte) plot_chargen::shift#2 ← phi( main::@2/(byte) plot_chargen::shift#0 main::@22/(byte) plot_chargen::shift#1 )
  (byte) plot_chargen::ch#2 ← phi( main::@2/(byte) plot_chargen::ch#0 main::@22/(byte) plot_chargen::ch#1 )
  asm { sei  }
  (word~) plot_chargen::$0 ← ((word)) (byte) plot_chargen::ch#2
  (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte*~) plot_chargen::$2 ← (byte*) CHARGEN#0 + (word~) plot_chargen::$1
  (byte*) plot_chargen::chargen#0 ← (byte*~) plot_chargen::$2
  (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) plot_chargen::$4 ← ! (bool~) plot_chargen::$3
  if((bool~) plot_chargen::$4) goto plot_chargen::@1
  to:plot_chargen::@5
plot_chargen::@1: scope:[plot_chargen]  from plot_chargen plot_chargen::@5
  (byte*) plot_chargen::chargen#6 ← phi( plot_chargen/(byte*) plot_chargen::chargen#0 plot_chargen::@5/(byte*) plot_chargen::chargen#1 )
  (byte) plot_chargen::pos#2 ← phi( plot_chargen/(byte) plot_chargen::pos#3 plot_chargen::@5/(byte) plot_chargen::pos#4 )
  (byte*) SCREEN#7 ← phi( plot_chargen/(byte*) SCREEN#9 plot_chargen::@5/(byte*) SCREEN#10 )
  *((byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte*~) plot_chargen::$6 ← (byte*) SCREEN#7 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (byte*~) plot_chargen::$7 ← (byte*~) plot_chargen::$6 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2
  (byte) mul8u::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
  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::$8 ← (word) mul8u::return#4
  (byte*~) plot_chargen::$9 ← (byte*~) plot_chargen::$7 + (word~) plot_chargen::$8
  (byte*) plot_chargen::sc#0 ← (byte*~) plot_chargen::$9
  (byte) plot_chargen::y#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:plot_chargen::@2
plot_chargen::@5: scope:[plot_chargen]  from plot_chargen
  (byte) plot_chargen::pos#4 ← phi( plot_chargen/(byte) plot_chargen::pos#3 )
  (byte*) SCREEN#10 ← phi( plot_chargen/(byte*) SCREEN#9 )
  (byte*) plot_chargen::chargen#2 ← phi( plot_chargen/(byte*) plot_chargen::chargen#0 )
  (byte*~) plot_chargen::$5 ← (byte*) plot_chargen::chargen#2 + (word/signed word/dword/signed dword) 2048
  (byte*) plot_chargen::chargen#1 ← (byte*~) plot_chargen::$5
  to:plot_chargen::@1
plot_chargen::@2: 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/signed byte/word/signed word/dword/signed dword) 0
  to:plot_chargen::@3
plot_chargen::@3: scope:[plot_chargen]  from plot_chargen::@2 plot_chargen::@4
  (byte*) plot_chargen::chargen#8 ← phi( plot_chargen::@2/(byte*) plot_chargen::chargen#3 plot_chargen::@4/(byte*) plot_chargen::chargen#7 )
  (byte) plot_chargen::y#5 ← phi( plot_chargen::@2/(byte) plot_chargen::y#2 plot_chargen::@4/(byte) plot_chargen::y#4 )
  (byte) plot_chargen::x#3 ← phi( plot_chargen::@2/(byte) plot_chargen::x#0 plot_chargen::@4/(byte) plot_chargen::x#1 )
  (byte*) plot_chargen::sc#5 ← phi( plot_chargen::@2/(byte*) plot_chargen::sc#7 plot_chargen::@4/(byte*) plot_chargen::sc#1 )
  (byte) plot_chargen::bits#2 ← phi( plot_chargen::@2/(byte) plot_chargen::bits#0 plot_chargen::@4/(byte) plot_chargen::bits#1 )
  (byte) plot_chargen::c#0 ← (byte) '.'
  (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte/word/signed word/dword/signed dword) 128
  (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) plot_chargen::$12 ← ! (bool~) plot_chargen::$11
  if((bool~) plot_chargen::$12) goto plot_chargen::@4
  to:plot_chargen::@6
plot_chargen::@4: scope:[plot_chargen]  from plot_chargen::@3 plot_chargen::@6
  (byte*) plot_chargen::chargen#7 ← phi( plot_chargen::@3/(byte*) plot_chargen::chargen#8 plot_chargen::@6/(byte*) plot_chargen::chargen#9 )
  (byte) plot_chargen::y#4 ← phi( plot_chargen::@3/(byte) plot_chargen::y#5 plot_chargen::@6/(byte) plot_chargen::y#6 )
  (byte) plot_chargen::x#2 ← phi( plot_chargen::@3/(byte) plot_chargen::x#3 plot_chargen::@6/(byte) plot_chargen::x#4 )
  (byte) plot_chargen::bits#3 ← phi( plot_chargen::@3/(byte) plot_chargen::bits#2 plot_chargen::@6/(byte) plot_chargen::bits#4 )
  (byte*) plot_chargen::sc#3 ← phi( plot_chargen::@3/(byte*) plot_chargen::sc#5 plot_chargen::@6/(byte*) plot_chargen::sc#6 )
  (byte) plot_chargen::c#2 ← phi( plot_chargen::@3/(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
  (byte~) plot_chargen::$13 ← (byte) plot_chargen::bits#3 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) plot_chargen::bits#1 ← (byte~) 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::@3
  to:plot_chargen::@7
plot_chargen::@6: scope:[plot_chargen]  from plot_chargen::@3
  (byte*) plot_chargen::chargen#9 ← phi( plot_chargen::@3/(byte*) plot_chargen::chargen#8 )
  (byte) plot_chargen::y#6 ← phi( plot_chargen::@3/(byte) plot_chargen::y#5 )
  (byte) plot_chargen::x#4 ← phi( plot_chargen::@3/(byte) plot_chargen::x#3 )
  (byte) plot_chargen::bits#4 ← phi( plot_chargen::@3/(byte) plot_chargen::bits#2 )
  (byte*) plot_chargen::sc#6 ← phi( plot_chargen::@3/(byte*) plot_chargen::sc#5 )
  (byte) plot_chargen::c#1 ← (byte) '*'
  to:plot_chargen::@4
plot_chargen::@7: scope:[plot_chargen]  from plot_chargen::@4
  (byte*) plot_chargen::chargen#4 ← phi( plot_chargen::@4/(byte*) plot_chargen::chargen#7 )
  (byte) plot_chargen::y#3 ← phi( plot_chargen::@4/(byte) plot_chargen::y#4 )
  (byte*) plot_chargen::sc#4 ← phi( plot_chargen::@4/(byte*) plot_chargen::sc#1 )
  (byte*~) plot_chargen::$15 ← (byte*) plot_chargen::sc#4 + (byte/signed byte/word/signed word/dword/signed dword) 32
  (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::@2
  to:plot_chargen::@8
plot_chargen::@8: scope:[plot_chargen]  from plot_chargen::@7
  *((byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  to:plot_chargen::@return
plot_chargen::@return: scope:[plot_chargen]  from plot_chargen::@8
  return 
  to:@return
@19: scope:[]  from @16
  (byte*) SCREEN#8 ← phi( @16/(byte*) SCREEN#0 )
  call main 
  to:@20
@20: scope:[]  from @19
  to:@end
@end: scope:[]  from @20

SYMBOL TABLE SSA
(byte~) $0
(label) @13
(label) @16
(label) @19
(label) @20
(label) @9
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL#0
(byte*) BGCOL1
(byte*) BGCOL1#0
(byte*) BGCOL2
(byte*) BGCOL2#0
(byte*) BGCOL3
(byte*) BGCOL3#0
(byte*) BGCOL4
(byte*) BGCOL4#0
(byte) BLACK
(byte) BLACK#0
(byte) BLUE
(byte) BLUE#0
(byte*) BORDERCOL
(byte*) BORDERCOL#0
(byte) BROWN
(byte) BROWN#0
(byte*) CHARGEN
(byte*) CHARGEN#0
(byte*) CIA1_INTERRUPT
(byte*) CIA1_INTERRUPT#0
(byte*) CIA1_PORT_A
(byte*) CIA1_PORT_A#0
(byte*) CIA1_PORT_A_DDR
(byte*) CIA1_PORT_A_DDR#0
(byte*) CIA1_PORT_B
(byte*) CIA1_PORT_B#0
(byte*) CIA1_PORT_B_DDR
(byte*) CIA1_PORT_B_DDR#0
(byte*) CIA2_INTERRUPT
(byte*) CIA2_INTERRUPT#0
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A#0
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_A_DDR#0
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B#0
(byte*) CIA2_PORT_B_DDR
(byte*) CIA2_PORT_B_DDR#0
(byte) CIA_INTERRUPT_CLEAR
(byte) CIA_INTERRUPT_CLEAR#0
(byte*) COLS
(byte*) COLS#0
(byte) CYAN
(byte) CYAN#0
(byte*) D011
(byte*) D011#0
(byte*) D016
(byte*) D016#0
(byte*) D018
(byte*) D018#0
(byte) DARK_GREY
(byte) DARK_GREY#0
(byte) GREEN
(byte) GREEN#0
(byte) GREY
(byte) GREY#0
(void()**) HARDWARE_IRQ
(void()**) HARDWARE_IRQ#0
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_BG#0
(byte) IRQ_COLLISION_SPRITE
(byte) IRQ_COLLISION_SPRITE#0
(byte*) IRQ_ENABLE
(byte*) IRQ_ENABLE#0
(byte) IRQ_LIGHTPEN
(byte) IRQ_LIGHTPEN#0
(byte) IRQ_RASTER
(byte) IRQ_RASTER#0
(byte*) IRQ_STATUS
(byte*) IRQ_STATUS#0
(void()**) KERNEL_IRQ
(void()**) KERNEL_IRQ#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_COMMODORE
(byte) KEY_COMMODORE#0
(byte) KEY_CRSR_DOWN
(byte) KEY_CRSR_DOWN#0
(byte) KEY_CRSR_RIGHT
(byte) KEY_CRSR_RIGHT#0
(byte) KEY_CTRL
(byte) KEY_CTRL#0
(byte) KEY_D
(byte) KEY_D#0
(byte) KEY_DEL
(byte) KEY_DEL#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_HOME
(byte) KEY_HOME#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_MODIFIER_COMMODORE
(byte) KEY_MODIFIER_COMMODORE#0
(byte) KEY_MODIFIER_CTRL
(byte) KEY_MODIFIER_CTRL#0
(byte) KEY_MODIFIER_LSHIFT
(byte) KEY_MODIFIER_LSHIFT#0
(byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_RSHIFT#0
(byte) KEY_MODIFIER_SHIFT
(byte) KEY_MODIFIER_SHIFT#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_RETURN
(byte) KEY_RETURN#0
(byte) KEY_RSHIFT
(byte) KEY_RSHIFT#0
(byte) KEY_RUNSTOP
(byte) KEY_RUNSTOP#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*) LIGHTPEN_X
(byte*) LIGHTPEN_X#0
(byte*) LIGHTPEN_Y
(byte*) LIGHTPEN_Y#0
(byte) LIGHT_BLUE
(byte) LIGHT_BLUE#0
(byte) LIGHT_GREEN
(byte) LIGHT_GREEN#0
(byte) LIGHT_GREY
(byte) LIGHT_GREY#0
(byte) ORANGE
(byte) ORANGE#0
(byte) PINK
(byte) PINK#0
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte) PROCPORT_BASIC_KERNEL_IO
(byte) PROCPORT_BASIC_KERNEL_IO#0
(byte*) PROCPORT_DDR
(byte*) PROCPORT_DDR#0
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_DDR_MEMORY_MASK#0
(byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_KERNEL_IO#0
(byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_ALL#0
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_CHARROM#0
(byte) PROCPORT_RAM_IO
(byte) PROCPORT_RAM_IO#0
(byte) PURPLE
(byte) PURPLE#0
(byte*) RASTER
(byte*) RASTER#0
(byte) RED
(byte) RED#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) SCREEN#1
(byte*) SCREEN#10
(byte*) SCREEN#11
(byte*) SCREEN#12
(byte*) SCREEN#13
(byte*) SCREEN#14
(byte*) SCREEN#15
(byte*) SCREEN#16
(byte*) SCREEN#17
(byte*) SCREEN#18
(byte*) SCREEN#19
(byte*) SCREEN#2
(byte*) SCREEN#20
(byte*) SCREEN#21
(byte*) SCREEN#22
(byte*) SCREEN#23
(byte*) SCREEN#24
(byte*) SCREEN#25
(byte*) SCREEN#26
(byte*) SCREEN#27
(byte*) SCREEN#28
(byte*) SCREEN#29
(byte*) SCREEN#3
(byte*) SCREEN#30
(byte*) SCREEN#31
(byte*) SCREEN#32
(byte*) SCREEN#33
(byte*) SCREEN#34
(byte*) SCREEN#35
(byte*) SCREEN#36
(byte*) SCREEN#37
(byte*) SCREEN#38
(byte*) SCREEN#39
(byte*) SCREEN#4
(byte*) SCREEN#40
(byte*) SCREEN#5
(byte*) SCREEN#6
(byte*) SCREEN#7
(byte*) SCREEN#8
(byte*) SCREEN#9
(byte*) SPRITES_COLS
(byte*) SPRITES_COLS#0
(byte*) SPRITES_ENABLE
(byte*) SPRITES_ENABLE#0
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_X#0
(byte*) SPRITES_EXPAND_Y
(byte*) SPRITES_EXPAND_Y#0
(byte*) SPRITES_MC
(byte*) SPRITES_MC#0
(byte*) SPRITES_MC1
(byte*) SPRITES_MC1#0
(byte*) SPRITES_MC2
(byte*) SPRITES_MC2#0
(byte*) SPRITES_PRIORITY
(byte*) SPRITES_PRIORITY#0
(byte*) SPRITES_XMSB
(byte*) SPRITES_XMSB#0
(byte*) SPRITES_XPOS
(byte*) SPRITES_XPOS#0
(byte*) SPRITES_YPOS
(byte*) SPRITES_YPOS#0
(word) SPRITE_PTRS
(word) SPRITE_PTRS#0
(byte) VIC_BMM
(byte) VIC_BMM#0
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL#0
(byte*) VIC_CONTROL2
(byte*) VIC_CONTROL2#0
(byte) VIC_CSEL
(byte) VIC_CSEL#0
(byte) VIC_DEN
(byte) VIC_DEN#0
(byte) VIC_ECM
(byte) VIC_ECM#0
(byte) VIC_MCM
(byte) VIC_MCM#0
(byte*) VIC_MEMORY
(byte*) VIC_MEMORY#0
(byte) VIC_RSEL
(byte) VIC_RSEL#0
(byte) VIC_RST8
(byte) VIC_RST8#0
(byte) WHITE
(byte) WHITE#0
(byte) YELLOW
(byte) YELLOW#0
(byte[]) keyboard_char_keycodes
(byte[]) keyboard_char_keycodes#0
(byte[8]) keyboard_events
(byte[8]) keyboard_events#0
(byte) keyboard_events_size
(byte) keyboard_events_size#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)
(byte~) 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
(byte) keyboard_modifiers
(byte) keyboard_modifiers#0
(byte[8]) keyboard_scan_values
(byte[8]) keyboard_scan_values#0
(void()) main()
(byte*~) main::$0
(bool~) main::$1
(byte*~) main::$10
(byte*~) main::$11
(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
(bool~) main::$30
(bool~) main::$31
(byte~) main::$32
(bool~) main::$33
(bool~) main::$34
(bool~) main::$36
(byte*~) main::$4
(byte*~) main::$5
(byte*~) main::$7
(byte*~) main::$8
(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::@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
(byte~) 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
(word~) plot_chargen::$1
(byte~) plot_chargen::$10
(bool~) plot_chargen::$11
(bool~) plot_chargen::$12
(byte~) 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
(byte*~) plot_chargen::$7
(word~) 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

Culled Empty Block (label) @20
Successful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not [88] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [87] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [261] (bool~) main::$17 ← (byte~) main::$15 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [260] (bool~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [270] (bool~) main::$20 ← (byte~) main::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [269] (bool~) main::$19 ← (byte~) main::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [281] (bool~) main::$23 ← (byte~) main::$21 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [280] (bool~) main::$22 ← (byte~) main::$21 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [292] (bool~) main::$26 ← (byte~) main::$24 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [291] (bool~) main::$25 ← (byte~) main::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [321] (bool~) main::$31 ← (byte) main::key#0 == (byte/signed byte/word/signed word/dword/signed dword) 63 from [320] (bool~) main::$30 ← (byte) main::key#0 != (byte/signed byte/word/signed word/dword/signed dword) 63
Inversing boolean not [325] (bool~) main::$34 ← (byte) main::pressed#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [324] (bool~) main::$33 ← (byte) main::pressed#2 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [363] (bool~) plot_chargen::$4 ← (byte) plot_chargen::shift#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [362] (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [388] (bool~) plot_chargen::$12 ← (byte~) plot_chargen::$10 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [387] (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte/signed byte/word/signed word/dword/signed dword) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) mul8u::a#2 = (byte) mul8u::a#3 (byte) mul8u::a#6 
Alias (word) mul8u::mb#3 = (word) mul8u::mb#4 (word) mul8u::mb#5 
Alias (word) mul8u::res#2 = (word) mul8u::res#5 (word) mul8u::res#4 (word) mul8u::return#0 (word) mul8u::res#3 (word) mul8u::return#3 (word) mul8u::return#1 
Alias (byte) mul8u::a#0 = (byte~) mul8u::$5 
Alias (word) mul8u::mb#1 = (word~) mul8u::$6 
Alias (word) mul8u::res#1 = (word~) mul8u::$4 
Alias (byte) keyboard_matrix_read::return#0 = (byte) keyboard_matrix_read::row_pressed_bits#0 (byte~) keyboard_matrix_read::$0 (byte) keyboard_matrix_read::return#3 (byte) keyboard_matrix_read::return#1 
Alias (byte) keyboard_key_pressed::colidx#0 = (byte~) keyboard_key_pressed::$0 (byte) keyboard_key_pressed::colidx#1 
Alias (byte) keyboard_key_pressed::rowidx#0 = (byte~) keyboard_key_pressed::$1 
Alias (byte) keyboard_matrix_read::return#2 = (byte) keyboard_matrix_read::return#4 
Alias (byte) keyboard_key_pressed::return#0 = (byte~) keyboard_key_pressed::$3 (byte) keyboard_key_pressed::return#8 (byte) keyboard_key_pressed::return#1 
Alias (byte) keyboard_get_keycode::return#0 = (byte) keyboard_get_keycode::return#3 (byte) keyboard_get_keycode::return#1 
Alias (byte) KEY_MODIFIER_SHIFT#0 = (byte~) $0 
Alias (byte*) SCREEN#13 = (byte*) SCREEN#3 (byte*) SCREEN#2 (byte*) SCREEN#4 (byte*) SCREEN#5 (byte*) SCREEN#6 
Alias (byte*) print_str_at::at#0 = (byte*~) main::$2 
Alias (byte*) print_str_at::at#1 = (byte*~) main::$5 
Alias (byte*) print_str_at::at#2 = (byte*~) main::$8 
Alias (byte*) print_str_at::at#3 = (byte*~) main::$11 
Alias (byte) main::i#2 = (byte) main::i#3 
Alias (byte*) SCREEN#11 = (byte*) SCREEN#14 (byte*) SCREEN#39 
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*) SCREEN#36 = (byte*) SCREEN#37 (byte*) SCREEN#38 
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*) SCREEN#33 = (byte*) SCREEN#34 (byte*) SCREEN#35 
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*) SCREEN#30 = (byte*) SCREEN#31 (byte*) SCREEN#32 
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*) SCREEN#27 = (byte*) SCREEN#28 (byte*) SCREEN#29 
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*) SCREEN#22 = (byte*) SCREEN#25 (byte*) SCREEN#26 (byte*) SCREEN#23 
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*) SCREEN#16 = (byte*) SCREEN#18 (byte*) SCREEN#19 (byte*) SCREEN#17 
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*) SCREEN#12 = (byte*) SCREEN#15 (byte*) SCREEN#24 
Alias (byte) main::cur_pos#11 = (byte) main::cur_pos#26 
Alias (byte*) SCREEN#20 = (byte*) SCREEN#40 
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::$9 
Alias (byte*) SCREEN#10 = (byte*) SCREEN#9 
Alias (byte) plot_chargen::pos#3 = (byte) plot_chargen::pos#4 
Alias (byte*) plot_chargen::chargen#1 = (byte*~) plot_chargen::$5 
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 
Alias (byte*) SCREEN#0 = (byte*) SCREEN#8 
Successful SSA optimization Pass2AliasElimination
Alias (byte) mul8u::a#2 = (byte) mul8u::a#4 
Alias (word) mul8u::mb#2 = (word) mul8u::mb#3 
Alias (byte*) SCREEN#21 = (byte*) SCREEN#33 (byte*) SCREEN#36 (byte*) SCREEN#30 (byte*) SCREEN#27 (byte*) SCREEN#22 
Alias (byte) main::cur_pos#12 = (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#11 
Alias (byte) main::shift#11 = (byte) main::shift#5 (byte) main::shift#9 
Alias (byte*) SCREEN#12 = (byte*) SCREEN#16 (byte*) SCREEN#20 
Alias (byte*) SCREEN#10 = (byte*) SCREEN#7 
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*) SCREEN#13
Self Phi Eliminated (byte*) SCREEN#11
Self Phi Eliminated (byte) main::cur_pos#10
Self Phi Eliminated (byte) main::shift#11
Self Phi Eliminated (byte*) SCREEN#12
Self Phi Eliminated (byte) plot_chargen::y#3
Self Phi Eliminated (byte*) plot_chargen::chargen#4
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte) mul8u::b#1 (byte) mul8u::b#0
Redundant Phi (byte) mul8u::a#5 (byte) mul8u::a#1
Redundant Phi (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0
Redundant Phi (byte) keyboard_get_keycode::ch#1 (byte) keyboard_get_keycode::ch#0
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
Redundant Phi (byte*) SCREEN#13 (byte*) SCREEN#1
Redundant Phi (byte*) SCREEN#11 (byte*) SCREEN#13
Redundant Phi (byte) main::cur_pos#10 (byte) main::cur_pos#12
Redundant Phi (byte) main::shift#11 (byte) main::shift#10
Redundant Phi (byte*) SCREEN#12 (byte*) SCREEN#21
Redundant Phi (byte) plot_chargen::y#3 (byte) plot_chargen::y#2
Redundant Phi (byte*) plot_chargen::chargen#4 (byte*) plot_chargen::chargen#3
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) mul8u::$0 [84] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2
Simple Condition (bool~) mul8u::$3 [89] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4
Simple Condition (bool~) main::$1 [216] if((byte*) main::sc#1<(byte*~) main::$0) goto main::@1
Simple Condition (bool~) main::$14 [250] if((byte) main::i#1!=rangelast(0,3)) goto main::@2
Simple Condition (bool~) main::$17 [262] if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4
Simple Condition (bool~) main::$20 [271] if((byte~) main::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@5
Simple Condition (bool~) main::$23 [282] if((byte~) main::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6
Simple Condition (bool~) main::$26 [293] if((byte~) main::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@7
Simple Condition (bool~) main::$28 [303] if((byte~) main::$27!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@8
Simple Condition (bool~) main::$31 [322] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11
Simple Condition (bool~) main::$34 [326] if((byte) main::pressed#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12
Simple Condition (bool~) main::$36 [337] if((byte) main::ch#1!=rangelast(0,63)) goto main::@10
Simple Condition (bool~) print_str_at::$0 [350] if(*((byte*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2
Simple Condition (bool~) plot_chargen::$4 [364] if((byte) plot_chargen::shift#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@1
Simple Condition (bool~) plot_chargen::$12 [389] if((byte~) plot_chargen::$10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@4
Simple Condition (bool~) plot_chargen::$14 [397] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@3
Simple Condition (bool~) plot_chargen::$16 [405] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0
Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7
Constant (const byte*) PROCPORT#0 = ((byte*))1
Constant (const byte) PROCPORT_RAM_ALL#0 = 48
Constant (const byte) PROCPORT_RAM_IO#0 = 53
Constant (const byte) PROCPORT_RAM_CHARROM#0 = 49
Constant (const byte) PROCPORT_KERNEL_IO#0 = 54
Constant (const byte) PROCPORT_BASIC_KERNEL_IO#0 = 55
Constant (const byte*) CHARGEN#0 = ((byte*))53248
Constant (const word) SPRITE_PTRS#0 = 1016
Constant (const byte*) SPRITES_XPOS#0 = ((byte*))53248
Constant (const byte*) SPRITES_YPOS#0 = ((byte*))53249
Constant (const byte*) SPRITES_XMSB#0 = ((byte*))53264
Constant (const byte*) RASTER#0 = ((byte*))53266
Constant (const byte*) SPRITES_ENABLE#0 = ((byte*))53269
Constant (const byte*) SPRITES_EXPAND_Y#0 = ((byte*))53271
Constant (const byte*) SPRITES_PRIORITY#0 = ((byte*))53275
Constant (const byte*) SPRITES_MC#0 = ((byte*))53276
Constant (const byte*) SPRITES_EXPAND_X#0 = ((byte*))53277
Constant (const byte*) BORDERCOL#0 = ((byte*))53280
Constant (const byte*) BGCOL#0 = ((byte*))53281
Constant (const byte*) BGCOL1#0 = ((byte*))53281
Constant (const byte*) BGCOL2#0 = ((byte*))53282
Constant (const byte*) BGCOL3#0 = ((byte*))53283
Constant (const byte*) BGCOL4#0 = ((byte*))53284
Constant (const byte*) SPRITES_MC1#0 = ((byte*))53285
Constant (const byte*) SPRITES_MC2#0 = ((byte*))53286
Constant (const byte*) SPRITES_COLS#0 = ((byte*))53287
Constant (const byte*) VIC_CONTROL#0 = ((byte*))53265
Constant (const byte*) D011#0 = ((byte*))53265
Constant (const byte) VIC_RST8#0 = 128
Constant (const byte) VIC_ECM#0 = 64
Constant (const byte) VIC_BMM#0 = 32
Constant (const byte) VIC_DEN#0 = 16
Constant (const byte) VIC_RSEL#0 = 8
Constant (const byte*) VIC_CONTROL2#0 = ((byte*))53270
Constant (const byte*) D016#0 = ((byte*))53270
Constant (const byte) VIC_MCM#0 = 16
Constant (const byte) VIC_CSEL#0 = 8
Constant (const byte*) D018#0 = ((byte*))53272
Constant (const byte*) VIC_MEMORY#0 = ((byte*))53272
Constant (const byte*) LIGHTPEN_X#0 = ((byte*))53267
Constant (const byte*) LIGHTPEN_Y#0 = ((byte*))53268
Constant (const byte*) IRQ_STATUS#0 = ((byte*))53273
Constant (const byte*) IRQ_ENABLE#0 = ((byte*))53274
Constant (const byte) IRQ_RASTER#0 = 1
Constant (const byte) IRQ_COLLISION_BG#0 = 2
Constant (const byte) IRQ_COLLISION_SPRITE#0 = 4
Constant (const byte) IRQ_LIGHTPEN#0 = 8
Constant (const byte*) COLS#0 = ((byte*))55296
Constant (const byte*) CIA1_PORT_A#0 = ((byte*))56320
Constant (const byte*) CIA1_PORT_B#0 = ((byte*))56321
Constant (const byte*) CIA1_PORT_A_DDR#0 = ((byte*))56322
Constant (const byte*) CIA1_PORT_B_DDR#0 = ((byte*))56323
Constant (const byte*) CIA1_INTERRUPT#0 = ((byte*))56333
Constant (const byte) CIA_INTERRUPT_CLEAR#0 = 127
Constant (const byte*) CIA2_PORT_A#0 = ((byte*))56576
Constant (const byte*) CIA2_PORT_B#0 = ((byte*))56577
Constant (const byte*) CIA2_PORT_A_DDR#0 = ((byte*))56578
Constant (const byte*) CIA2_PORT_B_DDR#0 = ((byte*))56579
Constant (const byte*) CIA2_INTERRUPT#0 = ((byte*))56589
Constant (const void()**) KERNEL_IRQ#0 = ((void()**))788
Constant (const void()**) HARDWARE_IRQ#0 = ((void()**))65534
Constant (const byte) BLACK#0 = 0
Constant (const byte) WHITE#0 = 1
Constant (const byte) RED#0 = 2
Constant (const byte) CYAN#0 = 3
Constant (const byte) PURPLE#0 = 4
Constant (const byte) GREEN#0 = 5
Constant (const byte) BLUE#0 = 6
Constant (const byte) YELLOW#0 = 7
Constant (const byte) ORANGE#0 = 8
Constant (const byte) BROWN#0 = 9
Constant (const byte) PINK#0 = 10
Constant (const byte) DARK_GREY#0 = 11
Constant (const byte) GREY#0 = 12
Constant (const byte) LIGHT_GREEN#0 = 13
Constant (const byte) LIGHT_BLUE#0 = 14
Constant (const byte) LIGHT_GREY#0 = 15
Constant (const word) mul8u::res#0 = 0
Constant (const byte) KEY_DEL#0 = 0
Constant (const byte) KEY_RETURN#0 = 1
Constant (const byte) KEY_CRSR_RIGHT#0 = 2
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_CRSR_DOWN#0 = 7
Constant (const byte) KEY_3#0 = 8
Constant (const byte) KEY_W#0 = 9
Constant (const byte) KEY_A#0 = 10
Constant (const byte) KEY_4#0 = 11
Constant (const byte) KEY_Z#0 = 12
Constant (const byte) KEY_S#0 = 13
Constant (const byte) KEY_E#0 = 14
Constant (const byte) KEY_LSHIFT#0 = 15
Constant (const byte) KEY_5#0 = 16
Constant (const byte) KEY_R#0 = 17
Constant (const byte) KEY_D#0 = 18
Constant (const byte) KEY_6#0 = 19
Constant (const byte) KEY_C#0 = 20
Constant (const byte) KEY_F#0 = 21
Constant (const byte) KEY_T#0 = 22
Constant (const byte) KEY_X#0 = 23
Constant (const byte) KEY_7#0 = 24
Constant (const byte) KEY_Y#0 = 25
Constant (const byte) KEY_G#0 = 26
Constant (const byte) KEY_8#0 = 27
Constant (const byte) KEY_B#0 = 28
Constant (const byte) KEY_H#0 = 29
Constant (const byte) KEY_U#0 = 30
Constant (const byte) KEY_V#0 = 31
Constant (const byte) KEY_9#0 = 32
Constant (const byte) KEY_I#0 = 33
Constant (const byte) KEY_J#0 = 34
Constant (const byte) KEY_0#0 = 35
Constant (const byte) KEY_M#0 = 36
Constant (const byte) KEY_K#0 = 37
Constant (const byte) KEY_O#0 = 38
Constant (const byte) KEY_N#0 = 39
Constant (const byte) KEY_PLUS#0 = 40
Constant (const byte) KEY_P#0 = 41
Constant (const byte) KEY_L#0 = 42
Constant (const byte) KEY_MINUS#0 = 43
Constant (const byte) KEY_DOT#0 = 44
Constant (const byte) KEY_COLON#0 = 45
Constant (const byte) KEY_AT#0 = 46
Constant (const byte) KEY_COMMA#0 = 47
Constant (const byte) KEY_POUND#0 = 48
Constant (const byte) KEY_ASTERISK#0 = 49
Constant (const byte) KEY_SEMICOLON#0 = 50
Constant (const byte) KEY_HOME#0 = 51
Constant (const byte) KEY_RSHIFT#0 = 52
Constant (const byte) KEY_EQUALS#0 = 53
Constant (const byte) KEY_ARROW_UP#0 = 54
Constant (const byte) KEY_SLASH#0 = 55
Constant (const byte) KEY_1#0 = 56
Constant (const byte) KEY_ARROW_LEFT#0 = 57
Constant (const byte) KEY_CTRL#0 = 58
Constant (const byte) KEY_2#0 = 59
Constant (const byte) KEY_SPACE#0 = 60
Constant (const byte) KEY_COMMODORE#0 = 61
Constant (const byte) KEY_Q#0 = 62
Constant (const byte) KEY_RUNSTOP#0 = 63
Constant (const byte[8]) keyboard_matrix_row_bitmask#0 = { 254, 253, 251, 247, 239, 223, 191, 127 }
Constant (const byte[8]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 }
Constant (const byte[8]) keyboard_events#0 = { fill( 8, 0) }
Constant (const byte) keyboard_events_size#0 = 0
Constant (const byte) keyboard_modifiers#0 = 0
Constant (const byte) KEY_MODIFIER_LSHIFT#0 = 1
Constant (const byte) KEY_MODIFIER_RSHIFT#0 = 2
Constant (const byte) KEY_MODIFIER_CTRL#0 = 4
Constant (const byte) KEY_MODIFIER_COMMODORE#0 = 8
Constant (const byte[8]) keyboard_scan_values#0 = { fill( 8, 0) }
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 = 32
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 = 10
Constant (const byte) plot_chargen::y#0 = 0
Constant (const byte) plot_chargen::x#0 = 0
Constant (const byte) plot_chargen::c#0 = '.'
Constant (const byte) plot_chargen::c#1 = '*'
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) mul8u::mb#0 = ((word))mul8u::b#0
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, 63, KEY_POUND#0, 63, KEY_ARROW_UP#0, KEY_ARROW_LEFT#0, KEY_SPACE#0, 63, 63, 63, 63, 63, 63, 63, 63, 63, 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, 63, KEY_EQUALS#0, 63, 63 }
Constant (const byte) KEY_MODIFIER_SHIFT#0 = KEY_MODIFIER_LSHIFT#0|KEY_MODIFIER_RSHIFT#0
Constant (const byte*) main::sc#0 = SCREEN#0
Constant (const byte*) main::$0 = SCREEN#0+1000
Constant (const byte*) print_str_at::at#0 = SCREEN#0+1
Constant (const byte*) main::$4 = SCREEN#0+1
Constant (const byte*) main::$7 = SCREEN#0+1
Constant (const byte*) main::$10 = SCREEN#0+1
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
Constant (const byte*) print_str_at::at#1 = main::$4+10
Constant (const byte*) print_str_at::at#2 = main::$7+20
Constant (const byte*) print_str_at::at#3 = main::$10+30
Successful SSA optimization Pass2ConstantIdentification
Consolidated constant in assignment plot_chargen::$7
Successful SSA optimization Pass2ConstantAdditionElimination
if() condition always true - replacing block destination [80] if(true) goto main::@3
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization PassNEliminateUnusedVars
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Resolved ranged next value main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value if(main::i#1!=rangelast(0,3)) goto main::@2 to (byte/signed byte/word/signed word/dword/signed dword) 4
Resolved ranged next value main::ch#1 ← ++ main::ch#2 to ++
Resolved ranged comparison value if(main::ch#1!=rangelast(0,63)) goto main::@10 to (byte/signed byte/word/signed word/dword/signed dword) 64
Resolved ranged next value plot_chargen::x#1 ← ++ plot_chargen::x#2 to ++
Resolved ranged comparison value if(plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@3 to (byte/signed byte/word/signed word/dword/signed dword) 8
Resolved ranged next value plot_chargen::y#1 ← ++ plot_chargen::y#2 to ++
Resolved ranged comparison value if(plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@2 to (byte/signed byte/word/signed word/dword/signed dword) 8
Culled Empty Block (label) mul8u::@3
Culled Empty Block (label) @9
Culled Empty Block (label) @13
Culled Empty Block (label) @16
Culled Empty Block (label) main::@28
Culled Empty Block (label) main::@14
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@37
Culled Empty Block (label) main::@23
Successful SSA optimization Pass2CullEmptyBlocks
Self Phi Eliminated (byte*) SCREEN#21
Self Phi Eliminated (byte*) plot_chargen::chargen#3
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) SCREEN#21 (const byte*) SCREEN#0
Redundant Phi (byte*) plot_chargen::chargen#3 (byte*) plot_chargen::chargen#5
Successful SSA optimization Pass2RedundantPhiElimination
Redundant Phi (byte*) SCREEN#10 (const byte*) SCREEN#0
Successful SSA optimization Pass2RedundantPhiElimination
Constant (const byte*) plot_chargen::$6 = SCREEN#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) plot_chargen::$7 = plot_chargen::$6+40+1
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const word) mul8u::res#0
Inlining constant with var siblings (const word) mul8u::mb#0
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#0
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#1
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#2
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#3
Inlining constant with var siblings (const byte) keyboard_key_pressed::key#4
Inlining constant with var siblings (const byte) main::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/signed byte/word/signed word/dword/signed dword) 1
Constant inlined print_str_at::str#2 = (const string) main::str2
Constant inlined print_str_at::at#3 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 30
Constant inlined print_str_at::str#3 = (const string) main::str3
Constant inlined print_str_at::at#2 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 20
Constant inlined plot_chargen::c#0 = (byte) '.'
Constant inlined print_str_at::at#1 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 10
Constant inlined plot_chargen::c#1 = (byte) '*'
Constant inlined print_str_at::at#0 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined print_str_at::str#0 = (const string) main::str
Constant inlined main::$10 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::shift#2 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined plot_chargen::$7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined plot_chargen::$6 = (const byte*) SCREEN#0
Constant inlined plot_chargen::shift#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::ch#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined keyboard_key_pressed::key#0 = (const byte) KEY_F1#0
Constant inlined plot_chargen::ch#0 = (byte/signed byte/word/signed word/dword/signed dword) 32
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 mul8u::mb#0 = ((word))(const byte) mul8u::b#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/signed byte/word/signed word/dword/signed dword) 2
Constant inlined mul8u::res#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::cur_pos#4 = (byte/signed byte/word/signed word/dword/signed dword) 3
Constant inlined main::cur_pos#1 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::cur_pos#2 = (byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::$0 = (const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000
Constant inlined main::cur_pos#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::$4 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined plot_chargen::y#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::$7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::pressed#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined plot_chargen::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Successful SSA optimization Pass2ConstantInlining
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::@2)
Added new block during phi lifting main::@40(between main::@12 and main::@3)
Added new block during phi lifting main::@41(between main::@30 and main::@4)
Added new block during phi lifting main::@42(between main::@31 and main::@5)
Added new block during phi lifting main::@43(between main::@32 and main::@6)
Added new block during phi lifting main::@44(between main::@33 and main::@7)
Added new block during phi lifting main::@45(between main::@12 and main::@10)
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::@2)
Added new block during phi lifting plot_chargen::@12(between plot_chargen::@4 and plot_chargen::@3)
Added new block during phi lifting mul8u::@10(between mul8u::@2 and mul8u::@4)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @19
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@13
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::@15
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::@19
Adding NOP phi() at start of plot_chargen::@6
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to print_str_at:10 print_str_at:12 print_str_at:14 print_str_at:16 plot_chargen:20 keyboard_key_pressed:24 keyboard_key_pressed:30 keyboard_key_pressed:36 keyboard_key_pressed:42 keyboard_key_pressed:48 keyboard_get_keycode:56 keyboard_key_pressed:62 plot_chargen:74 
Calls in [plot_chargen] to mul8u:96 
Calls in [keyboard_key_pressed] to keyboard_matrix_read:146 

Created 29 initial phi equivalence classes
Coalesced [19] plot_chargen::pos#5 ← plot_chargen::pos#0
Coalesced [61] keyboard_key_pressed::key#7 ← keyboard_key_pressed::key#5
Coalesced [65] main::pressed#4 ← main::pressed#1
Coalesced [71] plot_chargen::ch#3 ← plot_chargen::ch#1
Coalesced [72] plot_chargen::shift#3 ← plot_chargen::shift#1
Coalesced [73] plot_chargen::pos#6 ← plot_chargen::pos#1
Coalesced [77] main::cur_pos#27 ← main::cur_pos#12
Coalesced [78] main::ch#10 ← main::ch#1
Coalesced [79] main::cur_pos#31 ← main::cur_pos#18
Coalesced [80] main::cur_pos#30 ← main::cur_pos#20
Coalesced [81] main::cur_pos#29 ← main::cur_pos#22
Coalesced (already) [82] main::cur_pos#28 ← main::cur_pos#24
Coalesced [83] main::i#4 ← main::i#1
Coalesced [84] main::sc#3 ← main::sc#1
Coalesced [92] plot_chargen::chargen#11 ← plot_chargen::chargen#1
Coalesced [100] plot_chargen::sc#9 ← plot_chargen::sc#0
Coalesced [103] plot_chargen::bits#5 ← plot_chargen::bits#0
Coalesced [104] plot_chargen::sc#10 ← plot_chargen::sc#7
Coalesced [121] plot_chargen::y#7 ← plot_chargen::y#1
Coalesced [122] plot_chargen::sc#8 ← plot_chargen::sc#2
Coalesced [123] plot_chargen::bits#6 ← plot_chargen::bits#1
Coalesced [124] plot_chargen::sc#11 ← plot_chargen::sc#1
Coalesced [125] plot_chargen::x#5 ← plot_chargen::x#1
Coalesced [126] plot_chargen::chargen#10 ← plot_chargen::chargen#0
Coalesced [127] mul8u::a#7 ← mul8u::a#1
Coalesced [134] mul8u::res#9 ← mul8u::res#1
Coalesced [138] mul8u::a#8 ← mul8u::a#0
Coalesced [139] mul8u::res#7 ← mul8u::res#6
Coalesced [140] mul8u::mb#6 ← mul8u::mb#1
Coalesced (already) [141] mul8u::res#8 ← mul8u::res#2
Coalesced [157] print_str_at::str#8 ← print_str_at::str#7
Coalesced [158] print_str_at::at#8 ← print_str_at::at#7
Coalesced [165] print_str_at::str#9 ← print_str_at::str#4
Coalesced [166] print_str_at::at#9 ← print_str_at::at#4
Coalesced down to 21 phi equivalence classes
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@16
Culled Empty Block (label) main::@17
Culled Empty Block (label) main::@18
Culled Empty Block (label) main::@40
Culled Empty Block (label) main::@45
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::@10
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @19
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@13
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::@19
Adding NOP phi() at start of main::@44
Adding NOP phi() at start of main::@43
Adding NOP phi() at start of main::@42
Adding NOP phi() at start of main::@41
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:@19
@19: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @19
  [3] phi()
main: scope:[main]  from @19
  [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/signed word/dword/signed dword) 1000) goto main::@1
  to:main::@13
main::@13: scope:[main]  from main::@1
  [9] phi()
  [10] call print_str_at 
  to:main::@25
main::@25: scope:[main]  from main::@13
  [11] phi()
  [12] call print_str_at 
  to:main::@26
main::@26: scope:[main]  from main::@25
  [13] phi()
  [14] call print_str_at 
  to:main::@27
main::@27: scope:[main]  from main::@26
  [15] phi()
  [16] call print_str_at 
  to:main::@2
main::@2: scope:[main]  from main::@27 main::@29
  [17] (byte) main::i#2 ← phi( main::@27/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@29/(byte) main::i#1 )
  [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2
  [19] call plot_chargen 
  to:main::@29
main::@29: scope:[main]  from main::@2
  [20] (byte) main::i#1 ← ++ (byte) main::i#2
  [21] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@12 main::@29
  [22] (byte) main::cur_pos#24 ← phi( main::@29/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@12/(byte) main::cur_pos#12 )
  [23] call keyboard_key_pressed 
  [24] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
  to:main::@30
main::@30: scope:[main]  from main::@3
  [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
  [26] if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@41
  to:main::@4
main::@4: scope:[main]  from main::@30 main::@41
  [27] (byte) main::cur_pos#22 ← phi( main::@30/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@41/(byte) main::cur_pos#24 )
  [28] call keyboard_key_pressed 
  [29] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
  to:main::@31
main::@31: scope:[main]  from main::@4
  [30] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
  [31] if((byte~) main::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@42
  to:main::@5
main::@5: scope:[main]  from main::@31 main::@42
  [32] (byte) main::cur_pos#20 ← phi( main::@31/(byte/signed byte/word/signed word/dword/signed dword) 1 main::@42/(byte) main::cur_pos#22 )
  [33] call keyboard_key_pressed 
  [34] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
  to:main::@32
main::@32: scope:[main]  from main::@5
  [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
  [36] if((byte~) main::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@43
  to:main::@6
main::@6: scope:[main]  from main::@32 main::@43
  [37] (byte) main::cur_pos#18 ← phi( main::@32/(byte/signed byte/word/signed word/dword/signed dword) 2 main::@43/(byte) main::cur_pos#20 )
  [38] call keyboard_key_pressed 
  [39] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
  to:main::@33
main::@33: scope:[main]  from main::@6
  [40] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
  [41] if((byte~) main::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@44
  to:main::@7
main::@7: scope:[main]  from main::@33 main::@44
  [42] (byte) main::cur_pos#12 ← phi( main::@33/(byte/signed byte/word/signed word/dword/signed dword) 3 main::@44/(byte) main::cur_pos#18 )
  [43] call keyboard_key_pressed 
  [44] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
  to:main::@34
main::@34: scope:[main]  from main::@7
  [45] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
  [46] if((byte~) main::$27!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9
  to:main::@19
main::@19: scope:[main]  from main::@34
  [47] phi()
  to:main::@9
main::@9: scope:[main]  from main::@19 main::@34
  [48] (byte) main::shift#10 ← phi( main::@19/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@34/(byte/signed byte/word/signed word/dword/signed dword) 1 )
  to:main::@10
main::@10: scope:[main]  from main::@12 main::@9
  [49] (byte) main::ch#2 ← phi( main::@12/(byte) main::ch#1 main::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 )
  [50] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2
  [51] call keyboard_get_keycode 
  [52] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
  to:main::@35
main::@35: scope:[main]  from main::@10
  [53] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
  [54] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11
  to:main::@21
main::@21: scope:[main]  from main::@35
  [55] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0
  [56] call keyboard_key_pressed 
  [57] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
  to:main::@36
main::@36: scope:[main]  from main::@21
  [58] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
  to:main::@11
main::@11: scope:[main]  from main::@35 main::@36
  [59] (byte) main::pressed#2 ← phi( main::@35/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@36/(byte) main::pressed#1 )
  [60] if((byte) main::pressed#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12
  to:main::@22
main::@22: scope:[main]  from main::@11
  [61] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#12
  [62] (byte) plot_chargen::ch#1 ← (byte) main::ch#2
  [63] (byte) plot_chargen::shift#1 ← (byte) main::shift#10
  [64] call plot_chargen 
  to:main::@12
main::@12: scope:[main]  from main::@11 main::@22
  [65] (byte) main::ch#1 ← ++ (byte) main::ch#2
  [66] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10
  to:main::@3
main::@44: scope:[main]  from main::@33
  [67] phi()
  to:main::@7
main::@43: scope:[main]  from main::@32
  [68] phi()
  to:main::@6
main::@42: scope:[main]  from main::@31
  [69] phi()
  to:main::@5
main::@41: scope:[main]  from main::@30
  [70] phi()
  to:main::@4
plot_chargen: scope:[plot_chargen]  from main::@2 main::@22
  [71] (byte) plot_chargen::pos#2 ← phi( main::@2/(byte) plot_chargen::pos#0 main::@22/(byte) plot_chargen::pos#1 )
  [71] (byte) plot_chargen::shift#2 ← phi( main::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@22/(byte) plot_chargen::shift#1 )
  [71] (byte) plot_chargen::ch#2 ← phi( main::@2/(byte/signed byte/word/signed word/dword/signed dword) 32 main::@22/(byte) plot_chargen::ch#1 )
  asm { sei  }
  [73] (word~) plot_chargen::$0 ← ((word)) (byte) plot_chargen::ch#2
  [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte/signed byte/word/signed word/dword/signed dword) 3
  [75] (byte*) plot_chargen::chargen#0 ← (const byte*) CHARGEN#0 + (word~) plot_chargen::$1
  [76] if((byte) plot_chargen::shift#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@1
  to:plot_chargen::@5
plot_chargen::@5: scope:[plot_chargen]  from plot_chargen
  [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word/signed word/dword/signed dword) 2048
  to:plot_chargen::@1
plot_chargen::@1: scope:[plot_chargen]  from plot_chargen plot_chargen::@5
  [78] (byte*) plot_chargen::chargen#5 ← phi( plot_chargen/(byte*) plot_chargen::chargen#0 plot_chargen::@5/(byte*) plot_chargen::chargen#1 )
  [79] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  [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::$8 ← (word) mul8u::return#2
  [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 1 + (word~) plot_chargen::$8
  to:plot_chargen::@2
plot_chargen::@2: 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/signed byte/word/signed word/dword/signed dword) 0 )
  [86] (byte) plot_chargen::bits#0 ← *((byte*) plot_chargen::chargen#5 + (byte) plot_chargen::y#2)
  to:plot_chargen::@3
plot_chargen::@3: scope:[plot_chargen]  from plot_chargen::@2 plot_chargen::@4
  [87] (byte) plot_chargen::x#2 ← phi( plot_chargen::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 plot_chargen::@4/(byte) plot_chargen::x#1 )
  [87] (byte*) plot_chargen::sc#3 ← phi( plot_chargen::@2/(byte*) plot_chargen::sc#7 plot_chargen::@4/(byte*) plot_chargen::sc#1 )
  [87] (byte) plot_chargen::bits#2 ← phi( plot_chargen::@2/(byte) plot_chargen::bits#0 plot_chargen::@4/(byte) plot_chargen::bits#1 )
  [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte/word/signed word/dword/signed dword) 128
  [89] if((byte~) plot_chargen::$10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@4
  to:plot_chargen::@6
plot_chargen::@6: scope:[plot_chargen]  from plot_chargen::@3
  [90] phi()
  to:plot_chargen::@4
plot_chargen::@4: scope:[plot_chargen]  from plot_chargen::@3 plot_chargen::@6
  [91] (byte) plot_chargen::c#2 ← phi( plot_chargen::@3/(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/signed byte/word/signed word/dword/signed dword) 1
  [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2
  [96] if((byte) plot_chargen::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@3
  to:plot_chargen::@7
plot_chargen::@7: scope:[plot_chargen]  from plot_chargen::@4
  [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32
  [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2
  [99] if((byte) plot_chargen::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@2
  to:plot_chargen::@8
plot_chargen::@8: scope:[plot_chargen]  from plot_chargen::@7
  [100] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  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::@4
  [104] (word) mul8u::mb#2 ← phi( mul8u/((word))(const byte) mul8u::b#0 mul8u::@4/(word) mul8u::mb#1 )
  [104] (word) mul8u::res#2 ← phi( mul8u/(byte/signed byte/word/signed word/dword/signed dword) 0 mul8u::@4/(word) mul8u::res#6 )
  [104] (byte) mul8u::a#2 ← phi( mul8u/(byte) mul8u::a#1 mul8u::@4/(byte) mul8u::a#0 )
  [105] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 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/signed byte/word/signed word/dword/signed dword) 1
  [108] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4
  to:mul8u::@7
mul8u::@7: scope:[mul8u]  from mul8u::@2
  [109] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2
  to:mul8u::@4
mul8u::@4: scope:[mul8u]  from mul8u::@2 mul8u::@7
  [110] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@7/(word) mul8u::res#1 )
  [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  to:mul8u::@1
keyboard_key_pressed: scope:[keyboard_key_pressed]  from main::@21 main::@3 main::@4 main::@5 main::@6 main::@7
  [113] (byte) keyboard_key_pressed::key#6 ← phi( main::@21/(byte) keyboard_key_pressed::key#5 main::@3/(const byte) KEY_F1#0 main::@4/(const byte) KEY_F3#0 main::@5/(const byte) KEY_F5#0 main::@6/(const byte) KEY_F7#0 main::@7/(const byte) KEY_LSHIFT#0 )
  [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte/signed byte/word/signed word/dword/signed dword) 7
  [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte/signed byte/word/signed word/dword/signed dword) 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::@2
keyboard_key_pressed::@2: 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::@2
  [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::@10
  [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::@13 main::@25 main::@26 main::@27
  [127] (byte*) print_str_at::at#7 ← phi( main::@13/(const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 main::@25/(const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 10 main::@26/(const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 20 main::@27/(const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 30 )
  [127] (byte*) print_str_at::str#7 ← phi( main::@13/(const string) main::str main::@25/(const string) main::str1 main::@26/(const string) main::str2 main::@27/(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*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
(byte*) BGCOL3
(byte*) BGCOL4
(byte) BLACK
(byte) BLUE
(byte*) BORDERCOL
(byte) BROWN
(byte*) CHARGEN
(byte*) CIA1_INTERRUPT
(byte*) CIA1_PORT_A
(byte*) CIA1_PORT_A_DDR
(byte*) CIA1_PORT_B
(byte*) CIA1_PORT_B_DDR
(byte*) CIA2_INTERRUPT
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B_DDR
(byte) CIA_INTERRUPT_CLEAR
(byte*) COLS
(byte) CYAN
(byte*) D011
(byte*) D016
(byte*) D018
(byte) DARK_GREY
(byte) GREEN
(byte) GREY
(void()**) HARDWARE_IRQ
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_SPRITE
(byte*) IRQ_ENABLE
(byte) IRQ_LIGHTPEN
(byte) IRQ_RASTER
(byte*) IRQ_STATUS
(void()**) KERNEL_IRQ
(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_COMMODORE
(byte) KEY_CRSR_DOWN
(byte) KEY_CRSR_RIGHT
(byte) KEY_CTRL
(byte) KEY_D
(byte) KEY_DEL
(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_HOME
(byte) KEY_I
(byte) KEY_J
(byte) KEY_K
(byte) KEY_L
(byte) KEY_LSHIFT
(byte) KEY_M
(byte) KEY_MINUS
(byte) KEY_MODIFIER_COMMODORE
(byte) KEY_MODIFIER_CTRL
(byte) KEY_MODIFIER_LSHIFT
(byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT
(byte) KEY_N
(byte) KEY_O
(byte) KEY_P
(byte) KEY_PLUS
(byte) KEY_POUND
(byte) KEY_Q
(byte) KEY_R
(byte) KEY_RETURN
(byte) KEY_RSHIFT
(byte) KEY_RUNSTOP
(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*) LIGHTPEN_X
(byte*) LIGHTPEN_Y
(byte) LIGHT_BLUE
(byte) LIGHT_GREEN
(byte) LIGHT_GREY
(byte) ORANGE
(byte) PINK
(byte*) PROCPORT
(byte) PROCPORT_BASIC_KERNEL_IO
(byte*) PROCPORT_DDR
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_IO
(byte) PURPLE
(byte*) RASTER
(byte) RED
(byte*) SCREEN
(byte*) SPRITES_COLS
(byte*) SPRITES_ENABLE
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_Y
(byte*) SPRITES_MC
(byte*) SPRITES_MC1
(byte*) SPRITES_MC2
(byte*) SPRITES_PRIORITY
(byte*) SPRITES_XMSB
(byte*) SPRITES_XPOS
(byte*) SPRITES_YPOS
(word) SPRITE_PTRS
(byte) VIC_BMM
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL2
(byte) VIC_CSEL
(byte) VIC_DEN
(byte) VIC_ECM
(byte) VIC_MCM
(byte*) VIC_MEMORY
(byte) VIC_RSEL
(byte) VIC_RST8
(byte) WHITE
(byte) YELLOW
(byte[]) keyboard_char_keycodes
(byte[8]) keyboard_events
(byte) keyboard_events_size
(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
(byte) keyboard_modifiers
(byte[8]) keyboard_scan_values
(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#12 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#10 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::$8 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 51.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#12 ]
[ main::shift#10 ]
[ 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#0 plot_chargen::pos#1 ]
[ 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::$8 to zero page equivalence class [ plot_chargen::$8 ]
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#12 ]
[ main::shift#10 ]
[ 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#0 plot_chargen::pos#1 ]
[ 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::$8 ]
[ 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#12 ]
Allocated zp ZP_BYTE:6 [ main::shift#10 ]
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#0 plot_chargen::pos#1 ]
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::$8 ]
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
//SEG0 File Comments
// Allows analysis of the CHARGEN ROM font
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 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
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @19 [phi:@begin->@19]
b19_from_bbegin:
  jmp b19
//SEG5 @19
b19:
//SEG6 [2] call main 
//SEG7 [4] phi from @19 to main [phi:@19->main]
main_from_b19:
  jsr main
//SEG8 [3] phi from @19 to @end [phi:@19->@end]
bend_from_b19:
  jmp bend
//SEG9 @end
bend:
//SEG10 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
  //SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG12 [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
  //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
  //SEG14 [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
  //SEG15 main::@1
  b1:
  //SEG16 [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG17 [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG18 [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) 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
  !:
  //SEG19 [9] phi from main::@1 to main::@13 [phi:main::@1->main::@13]
  b13_from_b1:
    jmp b13
  //SEG20 main::@13
  b13:
  //SEG21 [10] call print_str_at 
  //SEG22 [127] phi from main::@13 to print_str_at [phi:main::@13->print_str_at]
  print_str_at_from_b13:
  //SEG23 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@13->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta print_str_at.at
    lda #>SCREEN+1
    sta print_str_at.at+1
  //SEG24 [127] phi (byte*) print_str_at::str#7 = (const string) main::str [phi:main::@13->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
  //SEG25 [11] phi from main::@13 to main::@25 [phi:main::@13->main::@25]
  b25_from_b13:
    jmp b25
  //SEG26 main::@25
  b25:
  //SEG27 [12] call print_str_at 
  //SEG28 [127] phi from main::@25 to print_str_at [phi:main::@25->print_str_at]
  print_str_at_from_b25:
  //SEG29 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 10 [phi:main::@25->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
  //SEG30 [127] phi (byte*) print_str_at::str#7 = (const string) main::str1 [phi:main::@25->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
  //SEG31 [13] phi from main::@25 to main::@26 [phi:main::@25->main::@26]
  b26_from_b25:
    jmp b26
  //SEG32 main::@26
  b26:
  //SEG33 [14] call print_str_at 
  //SEG34 [127] phi from main::@26 to print_str_at [phi:main::@26->print_str_at]
  print_str_at_from_b26:
  //SEG35 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 20 [phi:main::@26->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
  //SEG36 [127] phi (byte*) print_str_at::str#7 = (const string) main::str2 [phi:main::@26->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
  //SEG37 [15] phi from main::@26 to main::@27 [phi:main::@26->main::@27]
  b27_from_b26:
    jmp b27
  //SEG38 main::@27
  b27:
  //SEG39 [16] call print_str_at 
  //SEG40 [127] phi from main::@27 to print_str_at [phi:main::@27->print_str_at]
  print_str_at_from_b27:
  //SEG41 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 30 [phi:main::@27->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
  //SEG42 [127] phi (byte*) print_str_at::str#7 = (const string) main::str3 [phi:main::@27->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
  //SEG43 [17] phi from main::@27 to main::@2 [phi:main::@27->main::@2]
  b2_from_b27:
  //SEG44 [17] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@27->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b2
  //SEG45 [17] phi from main::@29 to main::@2 [phi:main::@29->main::@2]
  b2_from_b29:
  //SEG46 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@29->main::@2#0] -- register_copy 
    jmp b2
  //SEG47 main::@2
  b2:
  //SEG48 [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuz1=vbuz2 
    lda i
    sta plot_chargen.pos
  //SEG49 [19] call plot_chargen 
  //SEG50 [71] phi from main::@2 to plot_chargen [phi:main::@2->plot_chargen]
  plot_chargen_from_b2:
  //SEG51 [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@2->plot_chargen#0] -- register_copy 
  //SEG52 [71] phi (byte) plot_chargen::shift#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->plot_chargen#1] -- vbuz1=vbuc1 
    lda #0
    sta plot_chargen.shift
  //SEG53 [71] phi (byte) plot_chargen::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 32 [phi:main::@2->plot_chargen#2] -- vbuz1=vbuc1 
    lda #$20
    sta plot_chargen.ch
    jsr plot_chargen
    jmp b29
  //SEG54 main::@29
  b29:
  //SEG55 [20] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG56 [21] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #4
    bne b2_from_b29
  //SEG57 [22] phi from main::@29 to main::@3 [phi:main::@29->main::@3]
  b3_from_b29:
  //SEG58 [22] phi (byte) main::cur_pos#24 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@29->main::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b3
  //SEG59 main::@3
  b3:
  //SEG60 [23] call keyboard_key_pressed 
  //SEG61 [113] phi from main::@3 to keyboard_key_pressed [phi:main::@3->keyboard_key_pressed]
  keyboard_key_pressed_from_b3:
  //SEG62 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1#0 [phi:main::@3->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F1
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
  //SEG63 [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 b30
  //SEG64 main::@30
  b30:
  //SEG65 [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_2
    sta _15
  //SEG66 [26] if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@41 -- vbuz1_eq_0_then_la1 
    lda _15
    cmp #0
    beq b41_from_b30
  //SEG67 [27] phi from main::@30 to main::@4 [phi:main::@30->main::@4]
  b4_from_b30:
  //SEG68 [27] phi (byte) main::cur_pos#22 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@30->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b4
  //SEG69 main::@4
  b4:
  //SEG70 [28] call keyboard_key_pressed 
  //SEG71 [113] phi from main::@4 to keyboard_key_pressed [phi:main::@4->keyboard_key_pressed]
  keyboard_key_pressed_from_b4:
  //SEG72 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F3#0 [phi:main::@4->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F3
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
  //SEG73 [29] (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 b31
  //SEG74 main::@31
  b31:
  //SEG75 [30] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_10
    sta _18
  //SEG76 [31] if((byte~) main::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@42 -- vbuz1_eq_0_then_la1 
    lda _18
    cmp #0
    beq b42_from_b31
  //SEG77 [32] phi from main::@31 to main::@5 [phi:main::@31->main::@5]
  b5_from_b31:
  //SEG78 [32] phi (byte) main::cur_pos#20 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@31->main::@5#0] -- vbuz1=vbuc1 
    lda #1
    sta cur_pos
    jmp b5
  //SEG79 main::@5
  b5:
  //SEG80 [33] call keyboard_key_pressed 
  //SEG81 [113] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed]
  keyboard_key_pressed_from_b5:
  //SEG82 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F5#0 [phi:main::@5->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F5
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
  //SEG83 [34] (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 b32
  //SEG84 main::@32
  b32:
  //SEG85 [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_11
    sta _21
  //SEG86 [36] if((byte~) main::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@43 -- vbuz1_eq_0_then_la1 
    lda _21
    cmp #0
    beq b43_from_b32
  //SEG87 [37] phi from main::@32 to main::@6 [phi:main::@32->main::@6]
  b6_from_b32:
  //SEG88 [37] phi (byte) main::cur_pos#18 = (byte/signed byte/word/signed word/dword/signed dword) 2 [phi:main::@32->main::@6#0] -- vbuz1=vbuc1 
    lda #2
    sta cur_pos
    jmp b6
  //SEG89 main::@6
  b6:
  //SEG90 [38] call keyboard_key_pressed 
  //SEG91 [113] phi from main::@6 to keyboard_key_pressed [phi:main::@6->keyboard_key_pressed]
  keyboard_key_pressed_from_b6:
  //SEG92 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F7#0 [phi:main::@6->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_F7
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
  //SEG93 [39] (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 b33
  //SEG94 main::@33
  b33:
  //SEG95 [40] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_12
    sta _24
  //SEG96 [41] if((byte~) main::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@44 -- vbuz1_eq_0_then_la1 
    lda _24
    cmp #0
    beq b44_from_b33
  //SEG97 [42] phi from main::@33 to main::@7 [phi:main::@33->main::@7]
  b7_from_b33:
  //SEG98 [42] phi (byte) main::cur_pos#12 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@33->main::@7#0] -- vbuz1=vbuc1 
    lda #3
    sta cur_pos
    jmp b7
  //SEG99 main::@7
  b7:
  //SEG100 [43] call keyboard_key_pressed 
  //SEG101 [113] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed]
  keyboard_key_pressed_from_b7:
  //SEG102 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_LSHIFT#0 [phi:main::@7->keyboard_key_pressed#0] -- vbuz1=vbuc1 
    lda #KEY_LSHIFT
    sta keyboard_key_pressed.key
    jsr keyboard_key_pressed
  //SEG103 [44] (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 b34
  //SEG104 main::@34
  b34:
  //SEG105 [45] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_13
    sta _27
  //SEG106 [46] if((byte~) main::$27!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9 -- vbuz1_neq_0_then_la1 
    lda _27
    cmp #0
    bne b9_from_b34
  //SEG107 [47] phi from main::@34 to main::@19 [phi:main::@34->main::@19]
  b19_from_b34:
    jmp b19
  //SEG108 main::@19
  b19:
  //SEG109 [48] phi from main::@19 to main::@9 [phi:main::@19->main::@9]
  b9_from_b19:
  //SEG110 [48] phi (byte) main::shift#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@19->main::@9#0] -- vbuz1=vbuc1 
    lda #0
    sta shift
    jmp b9
  //SEG111 [48] phi from main::@34 to main::@9 [phi:main::@34->main::@9]
  b9_from_b34:
  //SEG112 [48] phi (byte) main::shift#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@34->main::@9#0] -- vbuz1=vbuc1 
    lda #1
    sta shift
    jmp b9
  //SEG113 main::@9
  b9:
  //SEG114 [49] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  b10_from_b9:
  //SEG115 [49] phi (byte) main::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@9->main::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta ch
    jmp b10
  // Check for key presses - and plot char if found
  //SEG116 [49] phi from main::@12 to main::@10 [phi:main::@12->main::@10]
  b10_from_b12:
  //SEG117 [49] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@12->main::@10#0] -- register_copy 
    jmp b10
  //SEG118 main::@10
  b10:
  //SEG119 [50] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuz1=vbuz2 
    lda ch
    sta keyboard_get_keycode.ch
  //SEG120 [51] call keyboard_get_keycode 
    jsr keyboard_get_keycode
  //SEG121 [52] (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 b35
  //SEG122 main::@35
  b35:
  //SEG123 [53] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2 -- vbuz1=vbuz2 
    lda keyboard_get_keycode.return_2
    sta key
  //SEG124 [54] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 -- vbuz1_eq_vbuc1_then_la1 
    lda key
    cmp #$3f
    beq b11_from_b35
    jmp b21
  //SEG125 main::@21
  b21:
  //SEG126 [55] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuz1=vbuz2 
    lda key
    sta keyboard_key_pressed.key
  //SEG127 [56] call keyboard_key_pressed 
  //SEG128 [113] phi from main::@21 to keyboard_key_pressed [phi:main::@21->keyboard_key_pressed]
  keyboard_key_pressed_from_b21:
  //SEG129 [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@21->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
  //SEG130 [57] (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 b36
  //SEG131 main::@36
  b36:
  //SEG132 [58] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14 -- vbuz1=vbuz2 
    lda keyboard_key_pressed.return_14
    sta pressed
  //SEG133 [59] phi from main::@36 to main::@11 [phi:main::@36->main::@11]
  b11_from_b36:
  //SEG134 [59] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@36->main::@11#0] -- register_copy 
    jmp b11
  //SEG135 [59] phi from main::@35 to main::@11 [phi:main::@35->main::@11]
  b11_from_b35:
  //SEG136 [59] phi (byte) main::pressed#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@35->main::@11#0] -- vbuz1=vbuc1 
    lda #0
    sta pressed
    jmp b11
  //SEG137 main::@11
  b11:
  //SEG138 [60] if((byte) main::pressed#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 -- vbuz1_eq_0_then_la1 
    lda pressed
    cmp #0
    beq b12
    jmp b22
  //SEG139 main::@22
  b22:
  //SEG140 [61] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#12 -- vbuz1=vbuz2 
    lda cur_pos
    sta plot_chargen.pos
  //SEG141 [62] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuz1=vbuz2 
    lda ch
    sta plot_chargen.ch
  //SEG142 [63] (byte) plot_chargen::shift#1 ← (byte) main::shift#10 -- vbuz1=vbuz2 
    lda shift
    sta plot_chargen.shift
  //SEG143 [64] call plot_chargen 
  //SEG144 [71] phi from main::@22 to plot_chargen [phi:main::@22->plot_chargen]
  plot_chargen_from_b22:
  //SEG145 [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@22->plot_chargen#0] -- register_copy 
  //SEG146 [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@22->plot_chargen#1] -- register_copy 
  //SEG147 [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@22->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    jmp b12
  //SEG148 main::@12
  b12:
  //SEG149 [65] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
  //SEG150 [66] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 -- vbuz1_neq_vbuc1_then_la1 
    lda ch
    cmp #$40
    bne b10_from_b12
  //SEG151 [22] phi from main::@12 to main::@3 [phi:main::@12->main::@3]
  b3_from_b12:
  //SEG152 [22] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#12 [phi:main::@12->main::@3#0] -- register_copy 
    jmp b3
  //SEG153 [67] phi from main::@33 to main::@44 [phi:main::@33->main::@44]
  b44_from_b33:
    jmp b44
  //SEG154 main::@44
  b44:
  //SEG155 [42] phi from main::@44 to main::@7 [phi:main::@44->main::@7]
  b7_from_b44:
  //SEG156 [42] phi (byte) main::cur_pos#12 = (byte) main::cur_pos#18 [phi:main::@44->main::@7#0] -- register_copy 
    jmp b7
  //SEG157 [68] phi from main::@32 to main::@43 [phi:main::@32->main::@43]
  b43_from_b32:
    jmp b43
  //SEG158 main::@43
  b43:
  //SEG159 [37] phi from main::@43 to main::@6 [phi:main::@43->main::@6]
  b6_from_b43:
  //SEG160 [37] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@43->main::@6#0] -- register_copy 
    jmp b6
  //SEG161 [69] phi from main::@31 to main::@42 [phi:main::@31->main::@42]
  b42_from_b31:
    jmp b42
  //SEG162 main::@42
  b42:
  //SEG163 [32] phi from main::@42 to main::@5 [phi:main::@42->main::@5]
  b5_from_b42:
  //SEG164 [32] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@42->main::@5#0] -- register_copy 
    jmp b5
  //SEG165 [70] phi from main::@30 to main::@41 [phi:main::@30->main::@41]
  b41_from_b30:
    jmp b41
  //SEG166 main::@41
  b41:
  //SEG167 [27] phi from main::@41 to main::@4 [phi:main::@41->main::@4]
  b4_from_b41:
  //SEG168 [27] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@41->main::@4#0] -- register_copy 
    jmp b4
    str: .text "f1@"
    str1: .text "f3@"
    str2: .text "f5@"
    str3: .text "f7@"
}
//SEG169 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 _8 = $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
  //SEG170 asm { sei  }
    sei
  //SEG171 [73] (word~) plot_chargen::$0 ← ((word)) (byte) plot_chargen::ch#2 -- vwuz1=_word_vbuz2 
    lda ch
    sta _0
    lda #0
    sta _0+1
  //SEG172 [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte/signed byte/word/signed word/dword/signed dword) 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
  //SEG173 [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
  //SEG174 [76] if((byte) plot_chargen::shift#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@1 -- vbuz1_eq_0_then_la1 
    lda shift
    cmp #0
    beq b1_from_plot_chargen
    jmp b5
  //SEG175 plot_chargen::@5
  b5:
  //SEG176 [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word/signed word/dword/signed dword) 2048 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda chargen
    adc #<$800
    sta chargen
    lda chargen+1
    adc #>$800
    sta chargen+1
  //SEG177 [78] phi from plot_chargen plot_chargen::@5 to plot_chargen::@1 [phi:plot_chargen/plot_chargen::@5->plot_chargen::@1]
  b1_from_plot_chargen:
  b1_from_b5:
  //SEG178 [78] phi (byte*) plot_chargen::chargen#5 = (byte*) plot_chargen::chargen#0 [phi:plot_chargen/plot_chargen::@5->plot_chargen::@1#0] -- register_copy 
    jmp b1
  //SEG179 plot_chargen::@1
  b1:
  //SEG180 [79] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG181 [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2 -- vbuz1=vbuz2 
    lda pos
    sta mul8u.a
  //SEG182 [81] call mul8u 
  //SEG183 [103] phi from plot_chargen::@1 to mul8u [phi:plot_chargen::@1->mul8u]
  mul8u_from_b1:
    jsr mul8u
  //SEG184 [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
  //SEG185 plot_chargen::@9
  b9:
  //SEG186 [83] (word~) plot_chargen::$8 ← (word) mul8u::return#2 -- vwuz1=vwuz2 
    lda mul8u.return
    sta _8
    lda mul8u.return+1
    sta _8+1
  //SEG187 [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 1 + (word~) plot_chargen::$8 -- pbuz1=pbuc1_plus_vwuz2 
    lda _8
    clc
    adc #<SCREEN+$28+1
    sta sc
    lda _8+1
    adc #>SCREEN+$28+1
    sta sc+1
  //SEG188 [85] phi from plot_chargen::@9 to plot_chargen::@2 [phi:plot_chargen::@9->plot_chargen::@2]
  b2_from_b9:
  //SEG189 [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#0 [phi:plot_chargen::@9->plot_chargen::@2#0] -- register_copy 
  //SEG190 [85] phi (byte) plot_chargen::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plot_chargen::@9->plot_chargen::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b2
  //SEG191 [85] phi from plot_chargen::@7 to plot_chargen::@2 [phi:plot_chargen::@7->plot_chargen::@2]
  b2_from_b7:
  //SEG192 [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#2 [phi:plot_chargen::@7->plot_chargen::@2#0] -- register_copy 
  //SEG193 [85] phi (byte) plot_chargen::y#2 = (byte) plot_chargen::y#1 [phi:plot_chargen::@7->plot_chargen::@2#1] -- register_copy 
    jmp b2
  //SEG194 plot_chargen::@2
  b2:
  //SEG195 [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
  //SEG196 [87] phi from plot_chargen::@2 to plot_chargen::@3 [phi:plot_chargen::@2->plot_chargen::@3]
  b3_from_b2:
  //SEG197 [87] phi (byte) plot_chargen::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plot_chargen::@2->plot_chargen::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta x
  //SEG198 [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#7 [phi:plot_chargen::@2->plot_chargen::@3#1] -- register_copy 
  //SEG199 [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#0 [phi:plot_chargen::@2->plot_chargen::@3#2] -- register_copy 
    jmp b3
  //SEG200 [87] phi from plot_chargen::@4 to plot_chargen::@3 [phi:plot_chargen::@4->plot_chargen::@3]
  b3_from_b4:
  //SEG201 [87] phi (byte) plot_chargen::x#2 = (byte) plot_chargen::x#1 [phi:plot_chargen::@4->plot_chargen::@3#0] -- register_copy 
  //SEG202 [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#1 [phi:plot_chargen::@4->plot_chargen::@3#1] -- register_copy 
  //SEG203 [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#1 [phi:plot_chargen::@4->plot_chargen::@3#2] -- register_copy 
    jmp b3
  //SEG204 plot_chargen::@3
  b3:
  //SEG205 [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte/word/signed word/dword/signed dword) 128 -- vbuz1=vbuz2_band_vbuc1 
    lda #$80
    and bits
    sta _10
  //SEG206 [89] if((byte~) plot_chargen::$10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@4 -- vbuz1_eq_0_then_la1 
    lda _10
    cmp #0
    beq b4_from_b3
  //SEG207 [90] phi from plot_chargen::@3 to plot_chargen::@6 [phi:plot_chargen::@3->plot_chargen::@6]
  b6_from_b3:
    jmp b6
  //SEG208 plot_chargen::@6
  b6:
  //SEG209 [91] phi from plot_chargen::@6 to plot_chargen::@4 [phi:plot_chargen::@6->plot_chargen::@4]
  b4_from_b6:
  //SEG210 [91] phi (byte) plot_chargen::c#2 = (byte) '*' [phi:plot_chargen::@6->plot_chargen::@4#0] -- vbuz1=vbuc1 
    lda #'*'
    sta c
    jmp b4
  //SEG211 [91] phi from plot_chargen::@3 to plot_chargen::@4 [phi:plot_chargen::@3->plot_chargen::@4]
  b4_from_b3:
  //SEG212 [91] phi (byte) plot_chargen::c#2 = (byte) '.' [phi:plot_chargen::@3->plot_chargen::@4#0] -- vbuz1=vbuc1 
    lda #'.'
    sta c
    jmp b4
  //SEG213 plot_chargen::@4
  b4:
  //SEG214 [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 -- _deref_pbuz1=vbuz2 
    lda c
    ldy #0
    sta (sc),y
  //SEG215 [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG216 [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1 
    asl bits
  //SEG217 [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2 -- vbuz1=_inc_vbuz1 
    inc x
  //SEG218 [96] if((byte) plot_chargen::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda x
    cmp #8
    bne b3_from_b4
    jmp b7
  //SEG219 plot_chargen::@7
  b7:
  //SEG220 [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$20
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG221 [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG222 [99] if((byte) plot_chargen::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #8
    bne b2_from_b7
    jmp b8
  //SEG223 plot_chargen::@8
  b8:
  //SEG224 [100] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG225 asm { cli  }
    cli
    jmp breturn
  //SEG226 plot_chargen::@return
  breturn:
  //SEG227 [102] return 
    rts
}
//SEG228 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
  //SEG229 [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
  b1_from_mul8u:
  //SEG230 [104] phi (word) mul8u::mb#2 = ((word))(const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vbuc1 
    lda #<b
    sta mb
    lda #>b
    sta mb+1
  //SEG231 [104] phi (word) mul8u::res#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta res
    lda #>0
    sta res+1
  //SEG232 [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#1 [phi:mul8u->mul8u::@1#2] -- register_copy 
    jmp b1
  //SEG233 mul8u::@1
  b1:
  //SEG234 [105] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -- vbuz1_neq_0_then_la1 
    lda a
    cmp #0
    bne b2
    jmp breturn
  //SEG235 mul8u::@return
  breturn:
  //SEG236 [106] return 
    rts
  //SEG237 mul8u::@2
  b2:
  //SEG238 [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and a
    sta _1
  //SEG239 [108] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -- vbuz1_eq_0_then_la1 
    lda _1
    cmp #0
    beq b4_from_b2
    jmp b7
  //SEG240 mul8u::@7
  b7:
  //SEG241 [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
  //SEG242 [110] phi from mul8u::@2 mul8u::@7 to mul8u::@4 [phi:mul8u::@2/mul8u::@7->mul8u::@4]
  b4_from_b2:
  b4_from_b7:
  //SEG243 [110] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@7->mul8u::@4#0] -- register_copy 
    jmp b4
  //SEG244 mul8u::@4
  b4:
  //SEG245 [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_ror_1 
    lsr a
  //SEG246 [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 
    asl mb
    rol mb+1
  //SEG247 [104] phi from mul8u::@4 to mul8u::@1 [phi:mul8u::@4->mul8u::@1]
  b1_from_b4:
  //SEG248 [104] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@4->mul8u::@1#0] -- register_copy 
  //SEG249 [104] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@4->mul8u::@1#1] -- register_copy 
  //SEG250 [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#0 [phi:mul8u::@4->mul8u::@1#2] -- register_copy 
    jmp b1
}
//SEG251 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
  //SEG252 [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and key
    sta colidx
  //SEG253 [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz2_ror_3 
    lda key
    lsr
    lsr
    lsr
    sta rowidx
  //SEG254 [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 -- vbuz1=vbuz2 
    lda rowidx
    sta keyboard_matrix_read.rowid
  //SEG255 [117] call keyboard_matrix_read 
    jsr keyboard_matrix_read
  //SEG256 [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 b2
  //SEG257 keyboard_key_pressed::@2
  b2:
  //SEG258 [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 
    lda keyboard_matrix_read.return_2
    sta _2
  //SEG259 [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
  //SEG260 keyboard_key_pressed::@return
  breturn:
  //SEG261 [121] return 
    rts
}
//SEG262 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
  //SEG263 [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
  //SEG264 [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
  //SEG265 keyboard_matrix_read::@return
  breturn:
  //SEG266 [124] return 
    rts
}
//SEG267 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
  //SEG268 [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
  //SEG269 keyboard_get_keycode::@return
  breturn:
  //SEG270 [126] return 
    rts
}
//SEG271 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
  //SEG272 [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:
  //SEG273 [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 
  //SEG274 [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
  //SEG275 print_str_at::@1
  b1:
  //SEG276 [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
  //SEG277 print_str_at::@return
  breturn:
  //SEG278 [130] return 
    rts
  //SEG279 print_str_at::@2
  b2:
  //SEG280 [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
  //SEG281 [132] (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5 -- pbuz1=_inc_pbuz1 
    inc at
    bne !+
    inc at+1
  !:
  //SEG282 [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
}
  // 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/signed word/dword/signed dword) 1000) 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:64 [ main::cur_pos#12 main::shift#10 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#0 plot_chargen::pos#1 ]
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#12 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::shift#10 ]
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/signed byte/word/signed word/dword/signed dword) 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:64 [ main::cur_pos#12 main::shift#10 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:64 [ main::cur_pos#12 main::shift#10 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/signed word/dword/signed dword) 2048 [ 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:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] ) always clobbers reg byte a 
Statement [79] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ 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:64 [ main::cur_pos#12 main::shift#10 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:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 mul8u::return#2 ] ) always clobbers reg byte a 
Statement [83] (word~) plot_chargen::$8 ← (word) mul8u::return#2 [ plot_chargen::chargen#5 plot_chargen::$8 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::$8 ] main:2::plot_chargen:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 plot_chargen::$8 ] ) always clobbers reg byte a 
Statement [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 1 + (word~) plot_chargen::$8 [ 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:64 [ main::cur_pos#12 main::shift#10 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:64 [ main::cur_pos#12 main::shift#10 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 [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 plot_chargen::$10 ] ( 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 plot_chargen::$10 ] main:2::plot_chargen:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 plot_chargen::$10 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a 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 a as potential for zp ZP_BYTE:18 [ plot_chargen::x#2 plot_chargen::x#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:64 [ main::cur_pos#12 main::shift#10 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#12 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ main::shift#10 ]
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/signed byte/word/signed word/dword/signed dword) 32 [ 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:64 [ main::cur_pos#12 main::shift#10 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/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2::plot_chargen:19 [ main::i#2 ] main:2::plot_chargen:64 [ main::cur_pos#12 main::shift#10 main::ch#2 ] ) always clobbers reg byte a 
Statement [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 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:64::mul8u:81 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 mul8u::res#2 mul8u::a#2 mul8u::mb#2 mul8u::$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 [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:64::mul8u:81 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a 
Statement [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
Statement [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte/signed byte/word/signed word/dword/signed dword) 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:28 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 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 [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) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::return#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:28::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:38::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:43::keyboard_matrix_read:117 [ main::cur_pos#12 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:56::keyboard_matrix_read:117 [ main::cur_pos#12 main::shift#10 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:28::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:38::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:43::keyboard_matrix_read:117 [ main::cur_pos#12 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:56::keyboard_matrix_read:117 [ main::cur_pos#12 main::shift#10 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/signed word/dword/signed dword) 1000) 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:64 [ main::cur_pos#12 main::shift#10 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/signed byte/word/signed word/dword/signed dword) 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:64 [ main::cur_pos#12 main::shift#10 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:64 [ main::cur_pos#12 main::shift#10 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/signed word/dword/signed dword) 2048 [ 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:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::pos#2 plot_chargen::chargen#1 ] ) always clobbers reg byte a 
Statement [79] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ 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:64 [ main::cur_pos#12 main::shift#10 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:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 mul8u::return#2 ] ) always clobbers reg byte a 
Statement [83] (word~) plot_chargen::$8 ← (word) mul8u::return#2 [ plot_chargen::chargen#5 plot_chargen::$8 ] ( main:2::plot_chargen:19 [ main::i#2 plot_chargen::chargen#5 plot_chargen::$8 ] main:2::plot_chargen:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 plot_chargen::$8 ] ) always clobbers reg byte a 
Statement [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 1 + (word~) plot_chargen::$8 [ 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:64 [ main::cur_pos#12 main::shift#10 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:64 [ main::cur_pos#12 main::shift#10 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 [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 plot_chargen::$10 ] ( 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 plot_chargen::$10 ] main:2::plot_chargen:64 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 plot_chargen::y#2 plot_chargen::bits#2 plot_chargen::sc#3 plot_chargen::x#2 plot_chargen::$10 ] ) always clobbers reg byte a 
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:64 [ main::cur_pos#12 main::shift#10 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/signed byte/word/signed word/dword/signed dword) 32 [ 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:64 [ main::cur_pos#12 main::shift#10 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/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2::plot_chargen:19 [ main::i#2 ] main:2::plot_chargen:64 [ main::cur_pos#12 main::shift#10 main::ch#2 ] ) always clobbers reg byte a 
Statement [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 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:64::mul8u:81 [ main::cur_pos#12 main::shift#10 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:64::mul8u:81 [ main::cur_pos#12 main::shift#10 main::ch#2 plot_chargen::chargen#5 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a 
Statement [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::key#6 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a 
Statement [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte/signed byte/word/signed word/dword/signed dword) 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:28 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ) always clobbers reg byte a 
Statement [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) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::return#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:28::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:38::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:43::keyboard_matrix_read:117 [ main::cur_pos#12 keyboard_key_pressed::colidx#0 ] main:2::keyboard_key_pressed:56::keyboard_matrix_read:117 [ main::cur_pos#12 main::shift#10 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:28::keyboard_matrix_read:117 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:33::keyboard_matrix_read:117 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:38::keyboard_matrix_read:117 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:43::keyboard_matrix_read:117 [ main::cur_pos#12 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:56::keyboard_matrix_read:117 [ main::cur_pos#12 main::shift#10 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#12 ] : zp ZP_BYTE:5 , reg byte x , 
Potential registers zp ZP_BYTE:6 [ main::shift#10 ] : 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#0 plot_chargen::pos#1 ] : 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 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 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 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::$8 ] : 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 ] 152.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#0 plot_chargen::pos#1 ] 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::$8 ] 
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#12 ] 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#10 ] 
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#0 plot_chargen::pos#1 ] 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::$8 ] 
Limited combination testing to 100 combinations of 4608 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#12 ] 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#10 ] 
Limited combination testing to 100 combinations of 262144 possible.
Uplifting [keyboard_key_pressed] best 807989 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 2359296 possible.
Uplifting [keyboard_get_keycode] best 806783 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 806783 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 806765 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 806765 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 806765 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 806765 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 806459 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 806459 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 806153 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#0 plot_chargen::pos#1 ]
Uplifting [plot_chargen] best 805824 combination reg byte y [ plot_chargen::pos#2 plot_chargen::pos#0 plot_chargen::pos#1 ] 
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#12 ]
Uplifting [main] best 805824 combination zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#12 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::i#2 main::i#1 ]
Uplifting [main] best 805824 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 805764 combination reg byte a [ main::$15 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:33 [ main::$18 ]
Uplifting [main] best 805704 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 805644 combination reg byte a [ keyboard_key_pressed::return#11 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:35 [ main::$21 ]
Uplifting [main] best 805584 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 805524 combination reg byte a [ keyboard_key_pressed::return#12 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:37 [ main::$24 ]
Uplifting [main] best 805464 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 805404 combination reg byte a [ keyboard_key_pressed::return#13 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:39 [ main::$27 ]
Uplifting [main] best 805344 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 804891 combination reg byte a [ keyboard_key_pressed::return#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ main::shift#10 ]
Uplifting [main] best 804891 combination zp ZP_BYTE:6 [ main::shift#10 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:55 [ keyboard_key_pressed::rowidx#0 ]
Uplifting [keyboard_key_pressed] best 804887 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 804881 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::$8 ] ] - 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::$8 ] ] with [ zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] ] with [ zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 ] ]
Coalescing zero page register [ zp ZP_WORD:2 [ main::sc#2 main::sc#1 plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 ] ] with [ zp ZP_WORD:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] ]
Coalescing zero page register [ zp ZP_BYTE:4 [ main::i#2 main::i#1 ] ] with [ zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#12 ] ]
Coalescing zero page register [ 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::$8 mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] with [ zp ZP_WORD:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] ]
Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:5 [ main::shift#10 ]
Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:6 [ main::ch#2 main::ch#1 ]
Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:7 [ plot_chargen::y#2 plot_chargen::y#1 ]
Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:8 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
Allocated (was zp ZP_WORD:16) zp ZP_WORD:9 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 plot_chargen::$8 mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]
Allocated (was zp ZP_WORD:23) zp ZP_WORD:11 [ mul8u::mb#2 mul8u::mb#1 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Allows analysis of the CHARGEN ROM font
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 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
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @19 [phi:@begin->@19]
b19_from_bbegin:
  jmp b19
//SEG5 @19
b19:
//SEG6 [2] call main 
//SEG7 [4] phi from @19 to main [phi:@19->main]
main_from_b19:
  jsr main
//SEG8 [3] phi from @19 to @end [phi:@19->@end]
bend_from_b19:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
    .label sc = 2
    .label i = 4
    .label ch = 6
    .label cur_pos = 4
    .label shift = 5
  //SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG12 [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
  //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
  //SEG14 [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
  //SEG15 main::@1
  b1:
  //SEG16 [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG17 [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG18 [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) 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
  !:
  //SEG19 [9] phi from main::@1 to main::@13 [phi:main::@1->main::@13]
  b13_from_b1:
    jmp b13
  //SEG20 main::@13
  b13:
  //SEG21 [10] call print_str_at 
  //SEG22 [127] phi from main::@13 to print_str_at [phi:main::@13->print_str_at]
  print_str_at_from_b13:
  //SEG23 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@13->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta print_str_at.at
    lda #>SCREEN+1
    sta print_str_at.at+1
  //SEG24 [127] phi (byte*) print_str_at::str#7 = (const string) main::str [phi:main::@13->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
  //SEG25 [11] phi from main::@13 to main::@25 [phi:main::@13->main::@25]
  b25_from_b13:
    jmp b25
  //SEG26 main::@25
  b25:
  //SEG27 [12] call print_str_at 
  //SEG28 [127] phi from main::@25 to print_str_at [phi:main::@25->print_str_at]
  print_str_at_from_b25:
  //SEG29 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 10 [phi:main::@25->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
  //SEG30 [127] phi (byte*) print_str_at::str#7 = (const string) main::str1 [phi:main::@25->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
  //SEG31 [13] phi from main::@25 to main::@26 [phi:main::@25->main::@26]
  b26_from_b25:
    jmp b26
  //SEG32 main::@26
  b26:
  //SEG33 [14] call print_str_at 
  //SEG34 [127] phi from main::@26 to print_str_at [phi:main::@26->print_str_at]
  print_str_at_from_b26:
  //SEG35 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 20 [phi:main::@26->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
  //SEG36 [127] phi (byte*) print_str_at::str#7 = (const string) main::str2 [phi:main::@26->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
  //SEG37 [15] phi from main::@26 to main::@27 [phi:main::@26->main::@27]
  b27_from_b26:
    jmp b27
  //SEG38 main::@27
  b27:
  //SEG39 [16] call print_str_at 
  //SEG40 [127] phi from main::@27 to print_str_at [phi:main::@27->print_str_at]
  print_str_at_from_b27:
  //SEG41 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 30 [phi:main::@27->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
  //SEG42 [127] phi (byte*) print_str_at::str#7 = (const string) main::str3 [phi:main::@27->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
  //SEG43 [17] phi from main::@27 to main::@2 [phi:main::@27->main::@2]
  b2_from_b27:
  //SEG44 [17] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@27->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b2
  //SEG45 [17] phi from main::@29 to main::@2 [phi:main::@29->main::@2]
  b2_from_b29:
  //SEG46 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@29->main::@2#0] -- register_copy 
    jmp b2
  //SEG47 main::@2
  b2:
  //SEG48 [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuyy=vbuz1 
    ldy i
  //SEG49 [19] call plot_chargen 
  //SEG50 [71] phi from main::@2 to plot_chargen [phi:main::@2->plot_chargen]
  plot_chargen_from_b2:
  //SEG51 [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@2->plot_chargen#0] -- register_copy 
  //SEG52 [71] phi (byte) plot_chargen::shift#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->plot_chargen#1] -- vbuxx=vbuc1 
    ldx #0
  //SEG53 [71] phi (byte) plot_chargen::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 32 [phi:main::@2->plot_chargen#2] -- vbuaa=vbuc1 
    lda #$20
    jsr plot_chargen
    jmp b29
  //SEG54 main::@29
  b29:
  //SEG55 [20] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG56 [21] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #4
    bne b2_from_b29
  //SEG57 [22] phi from main::@29 to main::@3 [phi:main::@29->main::@3]
  b3_from_b29:
  //SEG58 [22] phi (byte) main::cur_pos#24 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@29->main::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b3
  //SEG59 main::@3
  b3:
  //SEG60 [23] call keyboard_key_pressed 
  //SEG61 [113] phi from main::@3 to keyboard_key_pressed [phi:main::@3->keyboard_key_pressed]
  keyboard_key_pressed_from_b3:
  //SEG62 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1#0 [phi:main::@3->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F1
    jsr keyboard_key_pressed
  //SEG63 [24] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
    jmp b30
  //SEG64 main::@30
  b30:
  //SEG65 [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
  //SEG66 [26] if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@41 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b41_from_b30
  //SEG67 [27] phi from main::@30 to main::@4 [phi:main::@30->main::@4]
  b4_from_b30:
  //SEG68 [27] phi (byte) main::cur_pos#22 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@30->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
    jmp b4
  //SEG69 main::@4
  b4:
  //SEG70 [28] call keyboard_key_pressed 
  //SEG71 [113] phi from main::@4 to keyboard_key_pressed [phi:main::@4->keyboard_key_pressed]
  keyboard_key_pressed_from_b4:
  //SEG72 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F3#0 [phi:main::@4->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F3
    jsr keyboard_key_pressed
  //SEG73 [29] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
    jmp b31
  //SEG74 main::@31
  b31:
  //SEG75 [30] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
  //SEG76 [31] if((byte~) main::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@42 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b42_from_b31
  //SEG77 [32] phi from main::@31 to main::@5 [phi:main::@31->main::@5]
  b5_from_b31:
  //SEG78 [32] phi (byte) main::cur_pos#20 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@31->main::@5#0] -- vbuz1=vbuc1 
    lda #1
    sta cur_pos
    jmp b5
  //SEG79 main::@5
  b5:
  //SEG80 [33] call keyboard_key_pressed 
  //SEG81 [113] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed]
  keyboard_key_pressed_from_b5:
  //SEG82 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F5#0 [phi:main::@5->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F5
    jsr keyboard_key_pressed
  //SEG83 [34] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
    jmp b32
  //SEG84 main::@32
  b32:
  //SEG85 [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
  //SEG86 [36] if((byte~) main::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@43 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b43_from_b32
  //SEG87 [37] phi from main::@32 to main::@6 [phi:main::@32->main::@6]
  b6_from_b32:
  //SEG88 [37] phi (byte) main::cur_pos#18 = (byte/signed byte/word/signed word/dword/signed dword) 2 [phi:main::@32->main::@6#0] -- vbuz1=vbuc1 
    lda #2
    sta cur_pos
    jmp b6
  //SEG89 main::@6
  b6:
  //SEG90 [38] call keyboard_key_pressed 
  //SEG91 [113] phi from main::@6 to keyboard_key_pressed [phi:main::@6->keyboard_key_pressed]
  keyboard_key_pressed_from_b6:
  //SEG92 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F7#0 [phi:main::@6->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F7
    jsr keyboard_key_pressed
  //SEG93 [39] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
    jmp b33
  //SEG94 main::@33
  b33:
  //SEG95 [40] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
  //SEG96 [41] if((byte~) main::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@44 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b44_from_b33
  //SEG97 [42] phi from main::@33 to main::@7 [phi:main::@33->main::@7]
  b7_from_b33:
  //SEG98 [42] phi (byte) main::cur_pos#12 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@33->main::@7#0] -- vbuz1=vbuc1 
    lda #3
    sta cur_pos
    jmp b7
  //SEG99 main::@7
  b7:
  //SEG100 [43] call keyboard_key_pressed 
  //SEG101 [113] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed]
  keyboard_key_pressed_from_b7:
  //SEG102 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_LSHIFT#0 [phi:main::@7->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_LSHIFT
    jsr keyboard_key_pressed
  //SEG103 [44] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
    jmp b34
  //SEG104 main::@34
  b34:
  //SEG105 [45] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
  //SEG106 [46] if((byte~) main::$27!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne b9_from_b34
  //SEG107 [47] phi from main::@34 to main::@19 [phi:main::@34->main::@19]
  b19_from_b34:
    jmp b19
  //SEG108 main::@19
  b19:
  //SEG109 [48] phi from main::@19 to main::@9 [phi:main::@19->main::@9]
  b9_from_b19:
  //SEG110 [48] phi (byte) main::shift#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@19->main::@9#0] -- vbuz1=vbuc1 
    lda #0
    sta shift
    jmp b9
  //SEG111 [48] phi from main::@34 to main::@9 [phi:main::@34->main::@9]
  b9_from_b34:
  //SEG112 [48] phi (byte) main::shift#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@34->main::@9#0] -- vbuz1=vbuc1 
    lda #1
    sta shift
    jmp b9
  //SEG113 main::@9
  b9:
  //SEG114 [49] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  b10_from_b9:
  //SEG115 [49] phi (byte) main::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@9->main::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta ch
    jmp b10
  // Check for key presses - and plot char if found
  //SEG116 [49] phi from main::@12 to main::@10 [phi:main::@12->main::@10]
  b10_from_b12:
  //SEG117 [49] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@12->main::@10#0] -- register_copy 
    jmp b10
  //SEG118 main::@10
  b10:
  //SEG119 [50] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuxx=vbuz1 
    ldx ch
  //SEG120 [51] call keyboard_get_keycode 
    jsr keyboard_get_keycode
  //SEG121 [52] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
    jmp b35
  //SEG122 main::@35
  b35:
  //SEG123 [53] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
  //SEG124 [54] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 -- vbuaa_eq_vbuc1_then_la1 
    cmp #$3f
    beq b11_from_b35
    jmp b21
  //SEG125 main::@21
  b21:
  //SEG126 [55] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuxx=vbuaa 
    tax
  //SEG127 [56] call keyboard_key_pressed 
  //SEG128 [113] phi from main::@21 to keyboard_key_pressed [phi:main::@21->keyboard_key_pressed]
  keyboard_key_pressed_from_b21:
  //SEG129 [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@21->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
  //SEG130 [57] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
    jmp b36
  //SEG131 main::@36
  b36:
  //SEG132 [58] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
  //SEG133 [59] phi from main::@36 to main::@11 [phi:main::@36->main::@11]
  b11_from_b36:
  //SEG134 [59] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@36->main::@11#0] -- register_copy 
    jmp b11
  //SEG135 [59] phi from main::@35 to main::@11 [phi:main::@35->main::@11]
  b11_from_b35:
  //SEG136 [59] phi (byte) main::pressed#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@35->main::@11#0] -- vbuaa=vbuc1 
    lda #0
    jmp b11
  //SEG137 main::@11
  b11:
  //SEG138 [60] if((byte) main::pressed#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b12
    jmp b22
  //SEG139 main::@22
  b22:
  //SEG140 [61] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#12 -- vbuyy=vbuz1 
    ldy cur_pos
  //SEG141 [62] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuaa=vbuz1 
    lda ch
  //SEG142 [63] (byte) plot_chargen::shift#1 ← (byte) main::shift#10 -- vbuxx=vbuz1 
    ldx shift
  //SEG143 [64] call plot_chargen 
  //SEG144 [71] phi from main::@22 to plot_chargen [phi:main::@22->plot_chargen]
  plot_chargen_from_b22:
  //SEG145 [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@22->plot_chargen#0] -- register_copy 
  //SEG146 [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@22->plot_chargen#1] -- register_copy 
  //SEG147 [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@22->plot_chargen#2] -- register_copy 
    jsr plot_chargen
    jmp b12
  //SEG148 main::@12
  b12:
  //SEG149 [65] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
  //SEG150 [66] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 -- vbuz1_neq_vbuc1_then_la1 
    lda ch
    cmp #$40
    bne b10_from_b12
  //SEG151 [22] phi from main::@12 to main::@3 [phi:main::@12->main::@3]
  b3_from_b12:
  //SEG152 [22] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#12 [phi:main::@12->main::@3#0] -- register_copy 
    jmp b3
  //SEG153 [67] phi from main::@33 to main::@44 [phi:main::@33->main::@44]
  b44_from_b33:
    jmp b44
  //SEG154 main::@44
  b44:
  //SEG155 [42] phi from main::@44 to main::@7 [phi:main::@44->main::@7]
  b7_from_b44:
  //SEG156 [42] phi (byte) main::cur_pos#12 = (byte) main::cur_pos#18 [phi:main::@44->main::@7#0] -- register_copy 
    jmp b7
  //SEG157 [68] phi from main::@32 to main::@43 [phi:main::@32->main::@43]
  b43_from_b32:
    jmp b43
  //SEG158 main::@43
  b43:
  //SEG159 [37] phi from main::@43 to main::@6 [phi:main::@43->main::@6]
  b6_from_b43:
  //SEG160 [37] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@43->main::@6#0] -- register_copy 
    jmp b6
  //SEG161 [69] phi from main::@31 to main::@42 [phi:main::@31->main::@42]
  b42_from_b31:
    jmp b42
  //SEG162 main::@42
  b42:
  //SEG163 [32] phi from main::@42 to main::@5 [phi:main::@42->main::@5]
  b5_from_b42:
  //SEG164 [32] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@42->main::@5#0] -- register_copy 
    jmp b5
  //SEG165 [70] phi from main::@30 to main::@41 [phi:main::@30->main::@41]
  b41_from_b30:
    jmp b41
  //SEG166 main::@41
  b41:
  //SEG167 [27] phi from main::@41 to main::@4 [phi:main::@41->main::@4]
  b4_from_b41:
  //SEG168 [27] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@41->main::@4#0] -- register_copy 
    jmp b4
    str: .text "f1@"
    str1: .text "f3@"
    str2: .text "f5@"
    str3: .text "f7@"
}
//SEG169 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 = 2
    .label _1 = 2
    .label _8 = 9
    .label chargen = 2
    .label sc = 9
    .label bits = 8
    .label y = 7
  //SEG170 asm { sei  }
    sei
  //SEG171 [73] (word~) plot_chargen::$0 ← ((word)) (byte) plot_chargen::ch#2 -- vwuz1=_word_vbuaa 
    sta _0
    lda #0
    sta _0+1
  //SEG172 [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 
    asl _1
    rol _1+1
    asl _1
    rol _1+1
    asl _1
    rol _1+1
  //SEG173 [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
  //SEG174 [76] if((byte) plot_chargen::shift#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@1 -- vbuxx_eq_0_then_la1 
    cpx #0
    beq b1_from_plot_chargen
    jmp b5
  //SEG175 plot_chargen::@5
  b5:
  //SEG176 [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word/signed word/dword/signed dword) 2048 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda chargen
    adc #<$800
    sta chargen
    lda chargen+1
    adc #>$800
    sta chargen+1
  //SEG177 [78] phi from plot_chargen plot_chargen::@5 to plot_chargen::@1 [phi:plot_chargen/plot_chargen::@5->plot_chargen::@1]
  b1_from_plot_chargen:
  b1_from_b5:
  //SEG178 [78] phi (byte*) plot_chargen::chargen#5 = (byte*) plot_chargen::chargen#0 [phi:plot_chargen/plot_chargen::@5->plot_chargen::@1#0] -- register_copy 
    jmp b1
  //SEG179 plot_chargen::@1
  b1:
  //SEG180 [79] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG181 [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2 -- vbuxx=vbuyy 
    tya
    tax
  //SEG182 [81] call mul8u 
  //SEG183 [103] phi from plot_chargen::@1 to mul8u [phi:plot_chargen::@1->mul8u]
  mul8u_from_b1:
    jsr mul8u
  //SEG184 [82] (word) mul8u::return#2 ← (word) mul8u::res#2
    jmp b9
  //SEG185 plot_chargen::@9
  b9:
  //SEG186 [83] (word~) plot_chargen::$8 ← (word) mul8u::return#2
  //SEG187 [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 1 + (word~) plot_chargen::$8 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda sc
    adc #<SCREEN+$28+1
    sta sc
    lda sc+1
    adc #>SCREEN+$28+1
    sta sc+1
  //SEG188 [85] phi from plot_chargen::@9 to plot_chargen::@2 [phi:plot_chargen::@9->plot_chargen::@2]
  b2_from_b9:
  //SEG189 [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#0 [phi:plot_chargen::@9->plot_chargen::@2#0] -- register_copy 
  //SEG190 [85] phi (byte) plot_chargen::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plot_chargen::@9->plot_chargen::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b2
  //SEG191 [85] phi from plot_chargen::@7 to plot_chargen::@2 [phi:plot_chargen::@7->plot_chargen::@2]
  b2_from_b7:
  //SEG192 [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#2 [phi:plot_chargen::@7->plot_chargen::@2#0] -- register_copy 
  //SEG193 [85] phi (byte) plot_chargen::y#2 = (byte) plot_chargen::y#1 [phi:plot_chargen::@7->plot_chargen::@2#1] -- register_copy 
    jmp b2
  //SEG194 plot_chargen::@2
  b2:
  //SEG195 [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
  //SEG196 [87] phi from plot_chargen::@2 to plot_chargen::@3 [phi:plot_chargen::@2->plot_chargen::@3]
  b3_from_b2:
  //SEG197 [87] phi (byte) plot_chargen::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plot_chargen::@2->plot_chargen::@3#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG198 [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#7 [phi:plot_chargen::@2->plot_chargen::@3#1] -- register_copy 
  //SEG199 [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#0 [phi:plot_chargen::@2->plot_chargen::@3#2] -- register_copy 
    jmp b3
  //SEG200 [87] phi from plot_chargen::@4 to plot_chargen::@3 [phi:plot_chargen::@4->plot_chargen::@3]
  b3_from_b4:
  //SEG201 [87] phi (byte) plot_chargen::x#2 = (byte) plot_chargen::x#1 [phi:plot_chargen::@4->plot_chargen::@3#0] -- register_copy 
  //SEG202 [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#1 [phi:plot_chargen::@4->plot_chargen::@3#1] -- register_copy 
  //SEG203 [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#1 [phi:plot_chargen::@4->plot_chargen::@3#2] -- register_copy 
    jmp b3
  //SEG204 plot_chargen::@3
  b3:
  //SEG205 [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte/word/signed word/dword/signed dword) 128 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and bits
  //SEG206 [89] if((byte~) plot_chargen::$10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4_from_b3
  //SEG207 [90] phi from plot_chargen::@3 to plot_chargen::@6 [phi:plot_chargen::@3->plot_chargen::@6]
  b6_from_b3:
    jmp b6
  //SEG208 plot_chargen::@6
  b6:
  //SEG209 [91] phi from plot_chargen::@6 to plot_chargen::@4 [phi:plot_chargen::@6->plot_chargen::@4]
  b4_from_b6:
  //SEG210 [91] phi (byte) plot_chargen::c#2 = (byte) '*' [phi:plot_chargen::@6->plot_chargen::@4#0] -- vbuaa=vbuc1 
    lda #'*'
    jmp b4
  //SEG211 [91] phi from plot_chargen::@3 to plot_chargen::@4 [phi:plot_chargen::@3->plot_chargen::@4]
  b4_from_b3:
  //SEG212 [91] phi (byte) plot_chargen::c#2 = (byte) '.' [phi:plot_chargen::@3->plot_chargen::@4#0] -- vbuaa=vbuc1 
    lda #'.'
    jmp b4
  //SEG213 plot_chargen::@4
  b4:
  //SEG214 [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
  //SEG215 [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG216 [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1 
    asl bits
  //SEG217 [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG218 [96] if((byte) plot_chargen::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b3_from_b4
    jmp b7
  //SEG219 plot_chargen::@7
  b7:
  //SEG220 [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$20
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG221 [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG222 [99] if((byte) plot_chargen::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #8
    bne b2_from_b7
    jmp b8
  //SEG223 plot_chargen::@8
  b8:
  //SEG224 [100] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG225 asm { cli  }
    cli
    jmp breturn
  //SEG226 plot_chargen::@return
  breturn:
  //SEG227 [102] return 
    rts
}
//SEG228 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 = $b
    .label res = 9
    .label return = 9
  //SEG229 [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
  b1_from_mul8u:
  //SEG230 [104] phi (word) mul8u::mb#2 = ((word))(const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vbuc1 
    lda #<b
    sta mb
    lda #>b
    sta mb+1
  //SEG231 [104] phi (word) mul8u::res#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta res
    lda #>0
    sta res+1
  //SEG232 [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#1 [phi:mul8u->mul8u::@1#2] -- register_copy 
    jmp b1
  //SEG233 mul8u::@1
  b1:
  //SEG234 [105] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b2
    jmp breturn
  //SEG235 mul8u::@return
  breturn:
  //SEG236 [106] return 
    rts
  //SEG237 mul8u::@2
  b2:
  //SEG238 [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG239 [108] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4_from_b2
    jmp b7
  //SEG240 mul8u::@7
  b7:
  //SEG241 [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
  //SEG242 [110] phi from mul8u::@2 mul8u::@7 to mul8u::@4 [phi:mul8u::@2/mul8u::@7->mul8u::@4]
  b4_from_b2:
  b4_from_b7:
  //SEG243 [110] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@7->mul8u::@4#0] -- register_copy 
    jmp b4
  //SEG244 mul8u::@4
  b4:
  //SEG245 [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_ror_1 
    txa
    lsr
    tax
  //SEG246 [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 
    asl mb
    rol mb+1
  //SEG247 [104] phi from mul8u::@4 to mul8u::@1 [phi:mul8u::@4->mul8u::@1]
  b1_from_b4:
  //SEG248 [104] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@4->mul8u::@1#0] -- register_copy 
  //SEG249 [104] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@4->mul8u::@1#1] -- register_copy 
  //SEG250 [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#0 [phi:mul8u::@4->mul8u::@1#2] -- register_copy 
    jmp b1
}
//SEG251 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: {
  //SEG252 [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuyy=vbuxx_band_vbuc1 
    txa
    and #7
    tay
  //SEG253 [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuxx_ror_3 
    txa
    lsr
    lsr
    lsr
  //SEG254 [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 -- vbuxx=vbuaa 
    tax
  //SEG255 [117] call keyboard_matrix_read 
    jsr keyboard_matrix_read
  //SEG256 [118] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0
    jmp b2
  //SEG257 keyboard_key_pressed::@2
  b2:
  //SEG258 [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2
  //SEG259 [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
  //SEG260 keyboard_key_pressed::@return
  breturn:
  //SEG261 [121] return 
    rts
}
//SEG262 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: {
  //SEG263 [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
  //SEG264 [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
  //SEG265 keyboard_matrix_read::@return
  breturn:
  //SEG266 [124] return 
    rts
}
//SEG267 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: {
  //SEG268 [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
  //SEG269 keyboard_get_keycode::@return
  breturn:
  //SEG270 [126] return 
    rts
}
//SEG271 print_str_at
// Print a string at a specific screen position
// print_str_at(byte* zeropage(2) str, byte* zeropage(9) at)
print_str_at: {
    .label at = 9
    .label str = 2
  //SEG272 [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:
  //SEG273 [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 
  //SEG274 [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
  //SEG275 print_str_at::@1
  b1:
  //SEG276 [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
  //SEG277 print_str_at::@return
  breturn:
  //SEG278 [130] return 
    rts
  //SEG279 print_str_at::@2
  b2:
  //SEG280 [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
  //SEG281 [132] (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5 -- pbuz1=_inc_pbuz1 
    inc at
    bne !+
    inc at+1
  !:
  //SEG282 [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
}
  // 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 b19
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b13
Removing instruction jmp b25
Removing instruction jmp b26
Removing instruction jmp b27
Removing instruction jmp b2
Removing instruction jmp b29
Removing instruction jmp b3
Removing instruction jmp b30
Removing instruction jmp b4
Removing instruction jmp b31
Removing instruction jmp b5
Removing instruction jmp b32
Removing instruction jmp b6
Removing instruction jmp b33
Removing instruction jmp b7
Removing instruction jmp b34
Removing instruction jmp b19
Removing instruction jmp b9
Removing instruction jmp b10
Removing instruction jmp b35
Removing instruction jmp b21
Removing instruction jmp b36
Removing instruction jmp b11
Removing instruction jmp b22
Removing instruction jmp b12
Removing instruction jmp b44
Removing instruction jmp b43
Removing instruction jmp b42
Removing instruction jmp b41
Removing instruction jmp b5
Removing instruction jmp b1
Removing instruction jmp b9
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b6
Removing instruction jmp b4
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b7
Removing instruction jmp b4
Removing instruction jmp b2
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 b2_from_b29 with b2
Replacing label b41_from_b30 with b41
Replacing label b42_from_b31 with b42
Replacing label b43_from_b32 with b43
Replacing label b44_from_b33 with b44
Replacing label b10_from_b12 with b10
Replacing label b1_from_plot_chargen with b1
Replacing label b3_from_b4 with b3
Replacing label b2_from_b7 with b2
Replacing label b4_from_b2 with b4
Replacing label b1_from_b2 with b1
Removing instruction b19_from_bbegin:
Removing instruction b19:
Removing instruction main_from_b19:
Removing instruction bend_from_b19:
Removing instruction b1_from_b1:
Removing instruction b13_from_b1:
Removing instruction print_str_at_from_b13:
Removing instruction b25_from_b13:
Removing instruction print_str_at_from_b25:
Removing instruction b26_from_b25:
Removing instruction print_str_at_from_b26:
Removing instruction b27_from_b26:
Removing instruction print_str_at_from_b27:
Removing instruction b2_from_b29:
Removing instruction keyboard_key_pressed_from_b3:
Removing instruction keyboard_key_pressed_from_b4:
Removing instruction keyboard_key_pressed_from_b5:
Removing instruction keyboard_key_pressed_from_b6:
Removing instruction keyboard_key_pressed_from_b7:
Removing instruction b19_from_b34:
Removing instruction b9_from_b19:
Removing instruction b10_from_b9:
Removing instruction b10_from_b12:
Removing instruction b11_from_b36:
Removing instruction b44_from_b33:
Removing instruction b7_from_b44:
Removing instruction b43_from_b32:
Removing instruction b6_from_b43:
Removing instruction b42_from_b31:
Removing instruction b5_from_b42:
Removing instruction b41_from_b30:
Removing instruction b4_from_b41:
Removing instruction b1_from_plot_chargen:
Removing instruction b1_from_b5:
Removing instruction b2_from_b7:
Removing instruction b3_from_b4:
Removing instruction b6_from_b3:
Removing instruction b4_from_b6:
Removing instruction b4_from_b2:
Removing instruction b4_from_b7:
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 b13:
Removing instruction b25:
Removing instruction b26:
Removing instruction b27:
Removing instruction b2_from_b27:
Removing instruction plot_chargen_from_b2:
Removing instruction b29:
Removing instruction b3_from_b29:
Removing instruction b30:
Removing instruction b4_from_b30:
Removing instruction b31:
Removing instruction b5_from_b31:
Removing instruction b32:
Removing instruction b6_from_b32:
Removing instruction b33:
Removing instruction b7_from_b33:
Removing instruction b34:
Removing instruction b19:
Removing instruction b35:
Removing instruction b21:
Removing instruction keyboard_key_pressed_from_b21:
Removing instruction b36:
Removing instruction b22:
Removing instruction plot_chargen_from_b22:
Removing instruction b3_from_b12:
Removing instruction b5:
Removing instruction mul8u_from_b1:
Removing instruction b9:
Removing instruction b2_from_b9:
Removing instruction b3_from_b2:
Removing instruction b6:
Removing instruction b7:
Removing instruction b8:
Removing instruction breturn:
Removing instruction b1_from_mul8u:
Removing instruction breturn:
Removing instruction b7:
Removing instruction b1_from_b4:
Removing instruction b2:
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
Skipping double jump to b4 in beq b41
Skipping double jump to b5 in beq b42
Skipping double jump to b6 in beq b43
Skipping double jump to b7 in beq b44
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label b9_from_b34 to b8
Relabelling long label b11_from_b35 to b13
Relabelling long label b4_from_b3 to b5
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b10
Removing instruction jmp b2
Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b44:
Removing instruction b43:
Removing instruction b42:
Removing instruction b41:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction jmp b7
Removing unreachable instruction jmp b6
Removing unreachable instruction jmp b5
Removing unreachable instruction jmp b4
Succesful ASM optimization Pass5UnreachableCodeElimination

FINAL SYMBOL TABLE
(label) @19
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
(byte*) BGCOL3
(byte*) BGCOL4
(byte) BLACK
(byte) BLUE
(byte*) BORDERCOL
(byte) BROWN
(byte*) CHARGEN
(const byte*) CHARGEN#0 CHARGEN = ((byte*))(word/dword/signed dword) 53248
(byte*) CIA1_INTERRUPT
(byte*) CIA1_PORT_A
(const byte*) CIA1_PORT_A#0 CIA1_PORT_A = ((byte*))(word/dword/signed dword) 56320
(byte*) CIA1_PORT_A_DDR
(byte*) CIA1_PORT_B
(const byte*) CIA1_PORT_B#0 CIA1_PORT_B = ((byte*))(word/dword/signed dword) 56321
(byte*) CIA1_PORT_B_DDR
(byte*) CIA2_INTERRUPT
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B_DDR
(byte) CIA_INTERRUPT_CLEAR
(byte*) COLS
(byte) CYAN
(byte*) D011
(byte*) D016
(byte*) D018
(byte) DARK_GREY
(byte) GREEN
(byte) GREY
(void()**) HARDWARE_IRQ
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_SPRITE
(byte*) IRQ_ENABLE
(byte) IRQ_LIGHTPEN
(byte) IRQ_RASTER
(byte*) IRQ_STATUS
(void()**) KERNEL_IRQ
(byte) KEY_0
(const byte) KEY_0#0 KEY_0 = (byte/signed byte/word/signed word/dword/signed dword) 35
(byte) KEY_1
(const byte) KEY_1#0 KEY_1 = (byte/signed byte/word/signed word/dword/signed dword) 56
(byte) KEY_2
(const byte) KEY_2#0 KEY_2 = (byte/signed byte/word/signed word/dword/signed dword) 59
(byte) KEY_3
(const byte) KEY_3#0 KEY_3 = (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) KEY_4
(const byte) KEY_4#0 KEY_4 = (byte/signed byte/word/signed word/dword/signed dword) 11
(byte) KEY_5
(const byte) KEY_5#0 KEY_5 = (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) KEY_6
(const byte) KEY_6#0 KEY_6 = (byte/signed byte/word/signed word/dword/signed dword) 19
(byte) KEY_7
(const byte) KEY_7#0 KEY_7 = (byte/signed byte/word/signed word/dword/signed dword) 24
(byte) KEY_8
(const byte) KEY_8#0 KEY_8 = (byte/signed byte/word/signed word/dword/signed dword) 27
(byte) KEY_9
(const byte) KEY_9#0 KEY_9 = (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) KEY_A
(const byte) KEY_A#0 KEY_A = (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) KEY_ARROW_LEFT
(const byte) KEY_ARROW_LEFT#0 KEY_ARROW_LEFT = (byte/signed byte/word/signed word/dword/signed dword) 57
(byte) KEY_ARROW_UP
(const byte) KEY_ARROW_UP#0 KEY_ARROW_UP = (byte/signed byte/word/signed word/dword/signed dword) 54
(byte) KEY_ASTERISK
(const byte) KEY_ASTERISK#0 KEY_ASTERISK = (byte/signed byte/word/signed word/dword/signed dword) 49
(byte) KEY_AT
(const byte) KEY_AT#0 KEY_AT = (byte/signed byte/word/signed word/dword/signed dword) 46
(byte) KEY_B
(const byte) KEY_B#0 KEY_B = (byte/signed byte/word/signed word/dword/signed dword) 28
(byte) KEY_C
(const byte) KEY_C#0 KEY_C = (byte/signed byte/word/signed word/dword/signed dword) 20
(byte) KEY_COLON
(const byte) KEY_COLON#0 KEY_COLON = (byte/signed byte/word/signed word/dword/signed dword) 45
(byte) KEY_COMMA
(const byte) KEY_COMMA#0 KEY_COMMA = (byte/signed byte/word/signed word/dword/signed dword) 47
(byte) KEY_COMMODORE
(byte) KEY_CRSR_DOWN
(byte) KEY_CRSR_RIGHT
(byte) KEY_CTRL
(byte) KEY_D
(const byte) KEY_D#0 KEY_D = (byte/signed byte/word/signed word/dword/signed dword) 18
(byte) KEY_DEL
(byte) KEY_DOT
(const byte) KEY_DOT#0 KEY_DOT = (byte/signed byte/word/signed word/dword/signed dword) 44
(byte) KEY_E
(const byte) KEY_E#0 KEY_E = (byte/signed byte/word/signed word/dword/signed dword) 14
(byte) KEY_EQUALS
(const byte) KEY_EQUALS#0 KEY_EQUALS = (byte/signed byte/word/signed word/dword/signed dword) 53
(byte) KEY_F
(const byte) KEY_F#0 KEY_F = (byte/signed byte/word/signed word/dword/signed dword) 21
(byte) KEY_F1
(const byte) KEY_F1#0 KEY_F1 = (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_F3
(const byte) KEY_F3#0 KEY_F3 = (byte/signed byte/word/signed word/dword/signed dword) 5
(byte) KEY_F5
(const byte) KEY_F5#0 KEY_F5 = (byte/signed byte/word/signed word/dword/signed dword) 6
(byte) KEY_F7
(const byte) KEY_F7#0 KEY_F7 = (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) KEY_G
(const byte) KEY_G#0 KEY_G = (byte/signed byte/word/signed word/dword/signed dword) 26
(byte) KEY_H
(const byte) KEY_H#0 KEY_H = (byte/signed byte/word/signed word/dword/signed dword) 29
(byte) KEY_HOME
(byte) KEY_I
(const byte) KEY_I#0 KEY_I = (byte/signed byte/word/signed word/dword/signed dword) 33
(byte) KEY_J
(const byte) KEY_J#0 KEY_J = (byte/signed byte/word/signed word/dword/signed dword) 34
(byte) KEY_K
(const byte) KEY_K#0 KEY_K = (byte/signed byte/word/signed word/dword/signed dword) 37
(byte) KEY_L
(const byte) KEY_L#0 KEY_L = (byte/signed byte/word/signed word/dword/signed dword) 42
(byte) KEY_LSHIFT
(const byte) KEY_LSHIFT#0 KEY_LSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 15
(byte) KEY_M
(const byte) KEY_M#0 KEY_M = (byte/signed byte/word/signed word/dword/signed dword) 36
(byte) KEY_MINUS
(const byte) KEY_MINUS#0 KEY_MINUS = (byte/signed byte/word/signed word/dword/signed dword) 43
(byte) KEY_MODIFIER_COMMODORE
(byte) KEY_MODIFIER_CTRL
(byte) KEY_MODIFIER_LSHIFT
(byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT
(byte) KEY_N
(const byte) KEY_N#0 KEY_N = (byte/signed byte/word/signed word/dword/signed dword) 39
(byte) KEY_O
(const byte) KEY_O#0 KEY_O = (byte/signed byte/word/signed word/dword/signed dword) 38
(byte) KEY_P
(const byte) KEY_P#0 KEY_P = (byte/signed byte/word/signed word/dword/signed dword) 41
(byte) KEY_PLUS
(const byte) KEY_PLUS#0 KEY_PLUS = (byte/signed byte/word/signed word/dword/signed dword) 40
(byte) KEY_POUND
(const byte) KEY_POUND#0 KEY_POUND = (byte/signed byte/word/signed word/dword/signed dword) 48
(byte) KEY_Q
(const byte) KEY_Q#0 KEY_Q = (byte/signed byte/word/signed word/dword/signed dword) 62
(byte) KEY_R
(const byte) KEY_R#0 KEY_R = (byte/signed byte/word/signed word/dword/signed dword) 17
(byte) KEY_RETURN
(byte) KEY_RSHIFT
(byte) KEY_RUNSTOP
(byte) KEY_S
(const byte) KEY_S#0 KEY_S = (byte/signed byte/word/signed word/dword/signed dword) 13
(byte) KEY_SEMICOLON
(const byte) KEY_SEMICOLON#0 KEY_SEMICOLON = (byte/signed byte/word/signed word/dword/signed dword) 50
(byte) KEY_SLASH
(const byte) KEY_SLASH#0 KEY_SLASH = (byte/signed byte/word/signed word/dword/signed dword) 55
(byte) KEY_SPACE
(const byte) KEY_SPACE#0 KEY_SPACE = (byte/signed byte/word/signed word/dword/signed dword) 60
(byte) KEY_T
(const byte) KEY_T#0 KEY_T = (byte/signed byte/word/signed word/dword/signed dword) 22
(byte) KEY_U
(const byte) KEY_U#0 KEY_U = (byte/signed byte/word/signed word/dword/signed dword) 30
(byte) KEY_V
(const byte) KEY_V#0 KEY_V = (byte/signed byte/word/signed word/dword/signed dword) 31
(byte) KEY_W
(const byte) KEY_W#0 KEY_W = (byte/signed byte/word/signed word/dword/signed dword) 9
(byte) KEY_X
(const byte) KEY_X#0 KEY_X = (byte/signed byte/word/signed word/dword/signed dword) 23
(byte) KEY_Y
(const byte) KEY_Y#0 KEY_Y = (byte/signed byte/word/signed word/dword/signed dword) 25
(byte) KEY_Z
(const byte) KEY_Z#0 KEY_Z = (byte/signed byte/word/signed word/dword/signed dword) 12
(byte*) LIGHTPEN_X
(byte*) LIGHTPEN_Y
(byte) LIGHT_BLUE
(byte) LIGHT_GREEN
(byte) LIGHT_GREY
(byte) ORANGE
(byte) PINK
(byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 1
(byte) PROCPORT_BASIC_KERNEL_IO
(byte*) PROCPORT_DDR
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_IO
(byte) PURPLE
(byte*) RASTER
(byte) RED
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte*) SPRITES_COLS
(byte*) SPRITES_ENABLE
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_Y
(byte*) SPRITES_MC
(byte*) SPRITES_MC1
(byte*) SPRITES_MC2
(byte*) SPRITES_PRIORITY
(byte*) SPRITES_XMSB
(byte*) SPRITES_XPOS
(byte*) SPRITES_YPOS
(word) SPRITE_PTRS
(byte) VIC_BMM
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL2
(byte) VIC_CSEL
(byte) VIC_DEN
(byte) VIC_ECM
(byte) VIC_MCM
(byte*) VIC_MEMORY
(byte) VIC_RSEL
(byte) VIC_RST8
(byte) WHITE
(byte) YELLOW
(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/signed byte/word/signed word/dword/signed dword) 63, (const byte) KEY_POUND#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (const byte) KEY_ARROW_UP#0, (const byte) KEY_ARROW_LEFT#0, (const byte) KEY_SPACE#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (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/signed byte/word/signed word/dword/signed dword) 63, (const byte) KEY_EQUALS#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
(byte[8]) keyboard_events
(byte) keyboard_events_size
(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::@2
(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/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 16, (byte/signed byte/word/signed word/dword/signed dword) 32, (byte/signed byte/word/signed word/dword/signed dword) 64, (byte/word/signed word/dword/signed dword) 128 }
(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/word/signed word/dword/signed dword) 254, (byte/word/signed word/dword/signed dword) 253, (byte/word/signed word/dword/signed dword) 251, (byte/word/signed word/dword/signed dword) 247, (byte/word/signed word/dword/signed dword) 239, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 191, (byte/signed byte/word/signed word/dword/signed dword) 127 }
(byte) keyboard_modifiers
(byte[8]) keyboard_scan_values
(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::@19
(label) main::@2
(label) main::@21
(label) main::@22
(label) main::@25
(label) main::@26
(label) main::@27
(label) main::@29
(label) main::@3
(label) main::@30
(label) main::@31
(label) main::@32
(label) main::@33
(label) main::@34
(label) main::@35
(label) main::@36
(label) main::@4
(label) main::@41
(label) main::@42
(label) main::@43
(label) main::@44
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@9
(byte) main::ch
(byte) main::ch#1 ch zp ZP_BYTE:6 151.5
(byte) main::ch#2 ch zp ZP_BYTE:6 25.25
(byte) main::cur_pos
(byte) main::cur_pos#12 cur_pos zp ZP_BYTE:4 8.52
(byte) main::cur_pos#18 cur_pos zp ZP_BYTE:4 3.6666666666666665
(byte) main::cur_pos#20 cur_pos zp ZP_BYTE:4 3.6666666666666665
(byte) main::cur_pos#22 cur_pos zp ZP_BYTE:4 3.6666666666666665
(byte) main::cur_pos#24 cur_pos zp ZP_BYTE:4 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#10 shift zp ZP_BYTE:5 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::@4
(label) mul8u::@7
(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/signed byte/word/signed word/dword/signed dword) 10
(word) mul8u::mb
(word) mul8u::mb#1 mb zp ZP_WORD:11 2002.0
(word) mul8u::mb#2 mb zp ZP_WORD:11 429.0
(word) mul8u::res
(word) mul8u::res#1 res zp ZP_WORD:9 2002.0
(word) mul8u::res#2 res zp ZP_WORD:9 500.83333333333337
(word) mul8u::res#6 res zp ZP_WORD:9 1001.0
(word) mul8u::return
(word) mul8u::return#2 return zp ZP_WORD:9 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:2 4.0
(word~) plot_chargen::$1 $1 zp ZP_WORD:2 4.0
(byte~) plot_chargen::$10 reg byte a 20002.0
(word~) plot_chargen::$8 $8 zp ZP_WORD:9 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:8 2002.0
(byte) plot_chargen::bits#1 bits zp ZP_BYTE:8 6667.333333333333
(byte) plot_chargen::bits#2 bits zp ZP_BYTE:8 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 51.5
(byte*) plot_chargen::chargen
(byte*) plot_chargen::chargen#0 chargen zp ZP_WORD:2 3.0
(byte*) plot_chargen::chargen#1 chargen zp ZP_WORD:2 4.0
(byte*) plot_chargen::chargen#5 chargen zp ZP_WORD:2 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:9 4.0
(byte*) plot_chargen::sc#1 sc zp ZP_WORD:9 5250.75
(byte*) plot_chargen::sc#2 sc zp ZP_WORD:9 667.3333333333334
(byte*) plot_chargen::sc#3 sc zp ZP_WORD:9 5167.333333333333
(byte*) plot_chargen::sc#7 sc zp ZP_WORD:9 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:7 1501.5
(byte) plot_chargen::y#2 y zp ZP_BYTE:7 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:9 11.0
(byte*) print_str_at::at#5 at zp ZP_WORD:9 11.666666666666666
(byte*) print_str_at::at#7 at zp ZP_WORD:9 2.0
(byte*) print_str_at::str
(byte*) print_str_at::str#4 str zp ZP_WORD:2 22.0
(byte*) print_str_at::str#5 str zp ZP_WORD:2 11.5
(byte*) print_str_at::str#7 str zp ZP_WORD:2 2.0

zp ZP_WORD:2 [ main::sc#2 main::sc#1 plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 plot_chargen::$1 plot_chargen::$0 print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ]
zp ZP_BYTE:4 [ 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#12 ]
zp ZP_BYTE:5 [ main::shift#10 ]
zp ZP_BYTE:6 [ 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#0 plot_chargen::pos#1 ]
zp ZP_BYTE:7 [ plot_chargen::y#2 plot_chargen::y#1 ]
zp ZP_BYTE:8 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ]
zp ZP_WORD:9 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 plot_chargen::$8 mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ]
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:11 [ mul8u::mb#2 mul8u::mb#1 ]
reg byte x [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ]
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

//SEG0 File Comments
// Allows analysis of the CHARGEN ROM font
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 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
//SEG3 @begin
//SEG4 [1] phi from @begin to @19 [phi:@begin->@19]
//SEG5 @19
//SEG6 [2] call main 
//SEG7 [4] phi from @19 to main [phi:@19->main]
//SEG8 [3] phi from @19 to @end [phi:@19->@end]
//SEG9 @end
//SEG10 main
main: {
    .label sc = 2
    .label i = 4
    .label ch = 6
    .label cur_pos = 4
    .label shift = 5
  //SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
  //SEG12 [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
  //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  //SEG14 [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
  //SEG15 main::@1
  b1:
  //SEG16 [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG17 [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG18 [8] if((byte*) main::sc#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto main::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda sc+1
    cmp #>SCREEN+$3e8
    bcc b1
    bne !+
    lda sc
    cmp #<SCREEN+$3e8
    bcc b1
  !:
  //SEG19 [9] phi from main::@1 to main::@13 [phi:main::@1->main::@13]
  //SEG20 main::@13
  //SEG21 [10] call print_str_at 
  //SEG22 [127] phi from main::@13 to print_str_at [phi:main::@13->print_str_at]
  //SEG23 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@13->print_str_at#0] -- pbuz1=pbuc1 
    lda #<SCREEN+1
    sta print_str_at.at
    lda #>SCREEN+1
    sta print_str_at.at+1
  //SEG24 [127] phi (byte*) print_str_at::str#7 = (const string) main::str [phi:main::@13->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
  //SEG25 [11] phi from main::@13 to main::@25 [phi:main::@13->main::@25]
  //SEG26 main::@25
  //SEG27 [12] call print_str_at 
  //SEG28 [127] phi from main::@25 to print_str_at [phi:main::@25->print_str_at]
  //SEG29 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 10 [phi:main::@25->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
  //SEG30 [127] phi (byte*) print_str_at::str#7 = (const string) main::str1 [phi:main::@25->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
  //SEG31 [13] phi from main::@25 to main::@26 [phi:main::@25->main::@26]
  //SEG32 main::@26
  //SEG33 [14] call print_str_at 
  //SEG34 [127] phi from main::@26 to print_str_at [phi:main::@26->print_str_at]
  //SEG35 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 20 [phi:main::@26->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
  //SEG36 [127] phi (byte*) print_str_at::str#7 = (const string) main::str2 [phi:main::@26->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
  //SEG37 [15] phi from main::@26 to main::@27 [phi:main::@26->main::@27]
  //SEG38 main::@27
  //SEG39 [16] call print_str_at 
  //SEG40 [127] phi from main::@27 to print_str_at [phi:main::@27->print_str_at]
  //SEG41 [127] phi (byte*) print_str_at::at#7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 30 [phi:main::@27->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
  //SEG42 [127] phi (byte*) print_str_at::str#7 = (const string) main::str3 [phi:main::@27->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
  //SEG43 [17] phi from main::@27 to main::@2 [phi:main::@27->main::@2]
  //SEG44 [17] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@27->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta i
  //SEG45 [17] phi from main::@29 to main::@2 [phi:main::@29->main::@2]
  //SEG46 [17] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@29->main::@2#0] -- register_copy 
  //SEG47 main::@2
  b2:
  //SEG48 [18] (byte) plot_chargen::pos#0 ← (byte) main::i#2 -- vbuyy=vbuz1 
    ldy i
  //SEG49 [19] call plot_chargen 
  //SEG50 [71] phi from main::@2 to plot_chargen [phi:main::@2->plot_chargen]
  //SEG51 [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#0 [phi:main::@2->plot_chargen#0] -- register_copy 
  //SEG52 [71] phi (byte) plot_chargen::shift#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->plot_chargen#1] -- vbuxx=vbuc1 
    ldx #0
  //SEG53 [71] phi (byte) plot_chargen::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 32 [phi:main::@2->plot_chargen#2] -- vbuaa=vbuc1 
    lda #$20
    jsr plot_chargen
  //SEG54 main::@29
  //SEG55 [20] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG56 [21] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #4
    bne b2
  //SEG57 [22] phi from main::@29 to main::@3 [phi:main::@29->main::@3]
  //SEG58 [22] phi (byte) main::cur_pos#24 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@29->main::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
  //SEG59 main::@3
  b3:
  //SEG60 [23] call keyboard_key_pressed 
  //SEG61 [113] phi from main::@3 to keyboard_key_pressed [phi:main::@3->keyboard_key_pressed]
  //SEG62 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F1#0 [phi:main::@3->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F1
    jsr keyboard_key_pressed
  //SEG63 [24] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
  //SEG64 main::@30
  //SEG65 [25] (byte~) main::$15 ← (byte) keyboard_key_pressed::return#2
  //SEG66 [26] if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@41 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
  //SEG67 [27] phi from main::@30 to main::@4 [phi:main::@30->main::@4]
  //SEG68 [27] phi (byte) main::cur_pos#22 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@30->main::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta cur_pos
  //SEG69 main::@4
  b4:
  //SEG70 [28] call keyboard_key_pressed 
  //SEG71 [113] phi from main::@4 to keyboard_key_pressed [phi:main::@4->keyboard_key_pressed]
  //SEG72 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F3#0 [phi:main::@4->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F3
    jsr keyboard_key_pressed
  //SEG73 [29] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0
  //SEG74 main::@31
  //SEG75 [30] (byte~) main::$18 ← (byte) keyboard_key_pressed::return#10
  //SEG76 [31] if((byte~) main::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@42 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b5
  //SEG77 [32] phi from main::@31 to main::@5 [phi:main::@31->main::@5]
  //SEG78 [32] phi (byte) main::cur_pos#20 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@31->main::@5#0] -- vbuz1=vbuc1 
    lda #1
    sta cur_pos
  //SEG79 main::@5
  b5:
  //SEG80 [33] call keyboard_key_pressed 
  //SEG81 [113] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed]
  //SEG82 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F5#0 [phi:main::@5->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F5
    jsr keyboard_key_pressed
  //SEG83 [34] (byte) keyboard_key_pressed::return#11 ← (byte) keyboard_key_pressed::return#0
  //SEG84 main::@32
  //SEG85 [35] (byte~) main::$21 ← (byte) keyboard_key_pressed::return#11
  //SEG86 [36] if((byte~) main::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@43 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b6
  //SEG87 [37] phi from main::@32 to main::@6 [phi:main::@32->main::@6]
  //SEG88 [37] phi (byte) main::cur_pos#18 = (byte/signed byte/word/signed word/dword/signed dword) 2 [phi:main::@32->main::@6#0] -- vbuz1=vbuc1 
    lda #2
    sta cur_pos
  //SEG89 main::@6
  b6:
  //SEG90 [38] call keyboard_key_pressed 
  //SEG91 [113] phi from main::@6 to keyboard_key_pressed [phi:main::@6->keyboard_key_pressed]
  //SEG92 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_F7#0 [phi:main::@6->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_F7
    jsr keyboard_key_pressed
  //SEG93 [39] (byte) keyboard_key_pressed::return#12 ← (byte) keyboard_key_pressed::return#0
  //SEG94 main::@33
  //SEG95 [40] (byte~) main::$24 ← (byte) keyboard_key_pressed::return#12
  //SEG96 [41] if((byte~) main::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@44 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b7
  //SEG97 [42] phi from main::@33 to main::@7 [phi:main::@33->main::@7]
  //SEG98 [42] phi (byte) main::cur_pos#12 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@33->main::@7#0] -- vbuz1=vbuc1 
    lda #3
    sta cur_pos
  //SEG99 main::@7
  b7:
  //SEG100 [43] call keyboard_key_pressed 
  //SEG101 [113] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed]
  //SEG102 [113] phi (byte) keyboard_key_pressed::key#6 = (const byte) KEY_LSHIFT#0 [phi:main::@7->keyboard_key_pressed#0] -- vbuxx=vbuc1 
    ldx #KEY_LSHIFT
    jsr keyboard_key_pressed
  //SEG103 [44] (byte) keyboard_key_pressed::return#13 ← (byte) keyboard_key_pressed::return#0
  //SEG104 main::@34
  //SEG105 [45] (byte~) main::$27 ← (byte) keyboard_key_pressed::return#13
  //SEG106 [46] if((byte~) main::$27!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne b8
  //SEG107 [47] phi from main::@34 to main::@19 [phi:main::@34->main::@19]
  //SEG108 main::@19
  //SEG109 [48] phi from main::@19 to main::@9 [phi:main::@19->main::@9]
  //SEG110 [48] phi (byte) main::shift#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@19->main::@9#0] -- vbuz1=vbuc1 
    lda #0
    sta shift
    jmp b9
  //SEG111 [48] phi from main::@34 to main::@9 [phi:main::@34->main::@9]
  b8:
  //SEG112 [48] phi (byte) main::shift#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@34->main::@9#0] -- vbuz1=vbuc1 
    lda #1
    sta shift
  //SEG113 main::@9
  b9:
  //SEG114 [49] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  //SEG115 [49] phi (byte) main::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@9->main::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta ch
  // Check for key presses - and plot char if found
  //SEG116 [49] phi from main::@12 to main::@10 [phi:main::@12->main::@10]
  //SEG117 [49] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@12->main::@10#0] -- register_copy 
  //SEG118 main::@10
  b10:
  //SEG119 [50] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 -- vbuxx=vbuz1 
    ldx ch
  //SEG120 [51] call keyboard_get_keycode 
    jsr keyboard_get_keycode
  //SEG121 [52] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0
  //SEG122 main::@35
  //SEG123 [53] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2
  //SEG124 [54] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 -- vbuaa_eq_vbuc1_then_la1 
    cmp #$3f
    beq b13
  //SEG125 main::@21
  //SEG126 [55] (byte) keyboard_key_pressed::key#5 ← (byte) main::key#0 -- vbuxx=vbuaa 
    tax
  //SEG127 [56] call keyboard_key_pressed 
  //SEG128 [113] phi from main::@21 to keyboard_key_pressed [phi:main::@21->keyboard_key_pressed]
  //SEG129 [113] phi (byte) keyboard_key_pressed::key#6 = (byte) keyboard_key_pressed::key#5 [phi:main::@21->keyboard_key_pressed#0] -- register_copy 
    jsr keyboard_key_pressed
  //SEG130 [57] (byte) keyboard_key_pressed::return#14 ← (byte) keyboard_key_pressed::return#0
  //SEG131 main::@36
  //SEG132 [58] (byte) main::pressed#1 ← (byte) keyboard_key_pressed::return#14
  //SEG133 [59] phi from main::@36 to main::@11 [phi:main::@36->main::@11]
  //SEG134 [59] phi (byte) main::pressed#2 = (byte) main::pressed#1 [phi:main::@36->main::@11#0] -- register_copy 
    jmp b11
  //SEG135 [59] phi from main::@35 to main::@11 [phi:main::@35->main::@11]
  b13:
  //SEG136 [59] phi (byte) main::pressed#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@35->main::@11#0] -- vbuaa=vbuc1 
    lda #0
  //SEG137 main::@11
  b11:
  //SEG138 [60] if((byte) main::pressed#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b12
  //SEG139 main::@22
  //SEG140 [61] (byte) plot_chargen::pos#1 ← (byte) main::cur_pos#12 -- vbuyy=vbuz1 
    ldy cur_pos
  //SEG141 [62] (byte) plot_chargen::ch#1 ← (byte) main::ch#2 -- vbuaa=vbuz1 
    lda ch
  //SEG142 [63] (byte) plot_chargen::shift#1 ← (byte) main::shift#10 -- vbuxx=vbuz1 
    ldx shift
  //SEG143 [64] call plot_chargen 
  //SEG144 [71] phi from main::@22 to plot_chargen [phi:main::@22->plot_chargen]
  //SEG145 [71] phi (byte) plot_chargen::pos#2 = (byte) plot_chargen::pos#1 [phi:main::@22->plot_chargen#0] -- register_copy 
  //SEG146 [71] phi (byte) plot_chargen::shift#2 = (byte) plot_chargen::shift#1 [phi:main::@22->plot_chargen#1] -- register_copy 
  //SEG147 [71] phi (byte) plot_chargen::ch#2 = (byte) plot_chargen::ch#1 [phi:main::@22->plot_chargen#2] -- register_copy 
    jsr plot_chargen
  //SEG148 main::@12
  b12:
  //SEG149 [65] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
  //SEG150 [66] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 -- vbuz1_neq_vbuc1_then_la1 
    lda ch
    cmp #$40
    bne b10
  //SEG151 [22] phi from main::@12 to main::@3 [phi:main::@12->main::@3]
  //SEG152 [22] phi (byte) main::cur_pos#24 = (byte) main::cur_pos#12 [phi:main::@12->main::@3#0] -- register_copy 
    jmp b3
  //SEG153 [67] phi from main::@33 to main::@44 [phi:main::@33->main::@44]
  //SEG154 main::@44
  //SEG155 [42] phi from main::@44 to main::@7 [phi:main::@44->main::@7]
  //SEG156 [42] phi (byte) main::cur_pos#12 = (byte) main::cur_pos#18 [phi:main::@44->main::@7#0] -- register_copy 
  //SEG157 [68] phi from main::@32 to main::@43 [phi:main::@32->main::@43]
  //SEG158 main::@43
  //SEG159 [37] phi from main::@43 to main::@6 [phi:main::@43->main::@6]
  //SEG160 [37] phi (byte) main::cur_pos#18 = (byte) main::cur_pos#20 [phi:main::@43->main::@6#0] -- register_copy 
  //SEG161 [69] phi from main::@31 to main::@42 [phi:main::@31->main::@42]
  //SEG162 main::@42
  //SEG163 [32] phi from main::@42 to main::@5 [phi:main::@42->main::@5]
  //SEG164 [32] phi (byte) main::cur_pos#20 = (byte) main::cur_pos#22 [phi:main::@42->main::@5#0] -- register_copy 
  //SEG165 [70] phi from main::@30 to main::@41 [phi:main::@30->main::@41]
  //SEG166 main::@41
  //SEG167 [27] phi from main::@41 to main::@4 [phi:main::@41->main::@4]
  //SEG168 [27] phi (byte) main::cur_pos#22 = (byte) main::cur_pos#24 [phi:main::@41->main::@4#0] -- register_copy 
    str: .text "f1@"
    str1: .text "f3@"
    str2: .text "f5@"
    str3: .text "f7@"
}
//SEG169 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 = 2
    .label _1 = 2
    .label _8 = 9
    .label chargen = 2
    .label sc = 9
    .label bits = 8
    .label y = 7
  //SEG170 asm { sei  }
    sei
  //SEG171 [73] (word~) plot_chargen::$0 ← ((word)) (byte) plot_chargen::ch#2 -- vwuz1=_word_vbuaa 
    sta _0
    lda #0
    sta _0+1
  //SEG172 [74] (word~) plot_chargen::$1 ← (word~) plot_chargen::$0 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 
    asl _1
    rol _1+1
    asl _1
    rol _1+1
    asl _1
    rol _1+1
  //SEG173 [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
  //SEG174 [76] if((byte) plot_chargen::shift#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@1 -- vbuxx_eq_0_then_la1 
    cpx #0
    beq b1
  //SEG175 plot_chargen::@5
  //SEG176 [77] (byte*) plot_chargen::chargen#1 ← (byte*) plot_chargen::chargen#0 + (word/signed word/dword/signed dword) 2048 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda chargen
    adc #<$800
    sta chargen
    lda chargen+1
    adc #>$800
    sta chargen+1
  //SEG177 [78] phi from plot_chargen plot_chargen::@5 to plot_chargen::@1 [phi:plot_chargen/plot_chargen::@5->plot_chargen::@1]
  //SEG178 [78] phi (byte*) plot_chargen::chargen#5 = (byte*) plot_chargen::chargen#0 [phi:plot_chargen/plot_chargen::@5->plot_chargen::@1#0] -- register_copy 
  //SEG179 plot_chargen::@1
  b1:
  //SEG180 [79] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG181 [80] (byte) mul8u::a#1 ← (byte) plot_chargen::pos#2 -- vbuxx=vbuyy 
    tya
    tax
  //SEG182 [81] call mul8u 
  //SEG183 [103] phi from plot_chargen::@1 to mul8u [phi:plot_chargen::@1->mul8u]
    jsr mul8u
  //SEG184 [82] (word) mul8u::return#2 ← (word) mul8u::res#2
  //SEG185 plot_chargen::@9
  //SEG186 [83] (word~) plot_chargen::$8 ← (word) mul8u::return#2
  //SEG187 [84] (byte*) plot_chargen::sc#0 ← (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 1 + (word~) plot_chargen::$8 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda sc
    adc #<SCREEN+$28+1
    sta sc
    lda sc+1
    adc #>SCREEN+$28+1
    sta sc+1
  //SEG188 [85] phi from plot_chargen::@9 to plot_chargen::@2 [phi:plot_chargen::@9->plot_chargen::@2]
  //SEG189 [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#0 [phi:plot_chargen::@9->plot_chargen::@2#0] -- register_copy 
  //SEG190 [85] phi (byte) plot_chargen::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plot_chargen::@9->plot_chargen::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta y
  //SEG191 [85] phi from plot_chargen::@7 to plot_chargen::@2 [phi:plot_chargen::@7->plot_chargen::@2]
  //SEG192 [85] phi (byte*) plot_chargen::sc#7 = (byte*) plot_chargen::sc#2 [phi:plot_chargen::@7->plot_chargen::@2#0] -- register_copy 
  //SEG193 [85] phi (byte) plot_chargen::y#2 = (byte) plot_chargen::y#1 [phi:plot_chargen::@7->plot_chargen::@2#1] -- register_copy 
  //SEG194 plot_chargen::@2
  b2:
  //SEG195 [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
  //SEG196 [87] phi from plot_chargen::@2 to plot_chargen::@3 [phi:plot_chargen::@2->plot_chargen::@3]
  //SEG197 [87] phi (byte) plot_chargen::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plot_chargen::@2->plot_chargen::@3#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG198 [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#7 [phi:plot_chargen::@2->plot_chargen::@3#1] -- register_copy 
  //SEG199 [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#0 [phi:plot_chargen::@2->plot_chargen::@3#2] -- register_copy 
  //SEG200 [87] phi from plot_chargen::@4 to plot_chargen::@3 [phi:plot_chargen::@4->plot_chargen::@3]
  //SEG201 [87] phi (byte) plot_chargen::x#2 = (byte) plot_chargen::x#1 [phi:plot_chargen::@4->plot_chargen::@3#0] -- register_copy 
  //SEG202 [87] phi (byte*) plot_chargen::sc#3 = (byte*) plot_chargen::sc#1 [phi:plot_chargen::@4->plot_chargen::@3#1] -- register_copy 
  //SEG203 [87] phi (byte) plot_chargen::bits#2 = (byte) plot_chargen::bits#1 [phi:plot_chargen::@4->plot_chargen::@3#2] -- register_copy 
  //SEG204 plot_chargen::@3
  b3:
  //SEG205 [88] (byte~) plot_chargen::$10 ← (byte) plot_chargen::bits#2 & (byte/word/signed word/dword/signed dword) 128 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and bits
  //SEG206 [89] if((byte~) plot_chargen::$10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b5
  //SEG207 [90] phi from plot_chargen::@3 to plot_chargen::@6 [phi:plot_chargen::@3->plot_chargen::@6]
  //SEG208 plot_chargen::@6
  //SEG209 [91] phi from plot_chargen::@6 to plot_chargen::@4 [phi:plot_chargen::@6->plot_chargen::@4]
  //SEG210 [91] phi (byte) plot_chargen::c#2 = (byte) '*' [phi:plot_chargen::@6->plot_chargen::@4#0] -- vbuaa=vbuc1 
    lda #'*'
    jmp b4
  //SEG211 [91] phi from plot_chargen::@3 to plot_chargen::@4 [phi:plot_chargen::@3->plot_chargen::@4]
  b5:
  //SEG212 [91] phi (byte) plot_chargen::c#2 = (byte) '.' [phi:plot_chargen::@3->plot_chargen::@4#0] -- vbuaa=vbuc1 
    lda #'.'
  //SEG213 plot_chargen::@4
  b4:
  //SEG214 [92] *((byte*) plot_chargen::sc#3) ← (byte) plot_chargen::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
  //SEG215 [93] (byte*) plot_chargen::sc#1 ← ++ (byte*) plot_chargen::sc#3 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG216 [94] (byte) plot_chargen::bits#1 ← (byte) plot_chargen::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1 
    asl bits
  //SEG217 [95] (byte) plot_chargen::x#1 ← ++ (byte) plot_chargen::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG218 [96] if((byte) plot_chargen::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b3
  //SEG219 plot_chargen::@7
  //SEG220 [97] (byte*) plot_chargen::sc#2 ← (byte*) plot_chargen::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$20
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG221 [98] (byte) plot_chargen::y#1 ← ++ (byte) plot_chargen::y#2 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG222 [99] if((byte) plot_chargen::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto plot_chargen::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #8
    bne b2
  //SEG223 plot_chargen::@8
  //SEG224 [100] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG225 asm { cli  }
    cli
  //SEG226 plot_chargen::@return
  //SEG227 [102] return 
    rts
}
//SEG228 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 = $b
    .label res = 9
    .label return = 9
  //SEG229 [104] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1]
  //SEG230 [104] phi (word) mul8u::mb#2 = ((word))(const byte) mul8u::b#0 [phi:mul8u->mul8u::@1#0] -- vwuz1=vbuc1 
    lda #<b
    sta mb
    lda #>b
    sta mb+1
  //SEG231 [104] phi (word) mul8u::res#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta res
    sta res+1
  //SEG232 [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#1 [phi:mul8u->mul8u::@1#2] -- register_copy 
  //SEG233 mul8u::@1
  b1:
  //SEG234 [105] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b2
  //SEG235 mul8u::@return
  //SEG236 [106] return 
    rts
  //SEG237 mul8u::@2
  b2:
  //SEG238 [107] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG239 [108] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
  //SEG240 mul8u::@7
  //SEG241 [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
  //SEG242 [110] phi from mul8u::@2 mul8u::@7 to mul8u::@4 [phi:mul8u::@2/mul8u::@7->mul8u::@4]
  //SEG243 [110] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@7->mul8u::@4#0] -- register_copy 
  //SEG244 mul8u::@4
  b4:
  //SEG245 [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_ror_1 
    txa
    lsr
    tax
  //SEG246 [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 
    asl mb
    rol mb+1
  //SEG247 [104] phi from mul8u::@4 to mul8u::@1 [phi:mul8u::@4->mul8u::@1]
  //SEG248 [104] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@4->mul8u::@1#0] -- register_copy 
  //SEG249 [104] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@4->mul8u::@1#1] -- register_copy 
  //SEG250 [104] phi (byte) mul8u::a#2 = (byte) mul8u::a#0 [phi:mul8u::@4->mul8u::@1#2] -- register_copy 
    jmp b1
}
//SEG251 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: {
  //SEG252 [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuyy=vbuxx_band_vbuc1 
    txa
    and #7
    tay
  //SEG253 [115] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#6 >> (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuxx_ror_3 
    txa
    lsr
    lsr
    lsr
  //SEG254 [116] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 -- vbuxx=vbuaa 
    tax
  //SEG255 [117] call keyboard_matrix_read 
    jsr keyboard_matrix_read
  //SEG256 [118] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0
  //SEG257 keyboard_key_pressed::@2
  //SEG258 [119] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2
  //SEG259 [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
  //SEG260 keyboard_key_pressed::@return
  //SEG261 [121] return 
    rts
}
//SEG262 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: {
  //SEG263 [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
  //SEG264 [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuaa=_bnot__deref_pbuc1 
    lda CIA1_PORT_B
    eor #$ff
  //SEG265 keyboard_matrix_read::@return
  //SEG266 [124] return 
    rts
}
//SEG267 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: {
  //SEG268 [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
  //SEG269 keyboard_get_keycode::@return
  //SEG270 [126] return 
    rts
}
//SEG271 print_str_at
// Print a string at a specific screen position
// print_str_at(byte* zeropage(2) str, byte* zeropage(9) at)
print_str_at: {
    .label at = 9
    .label str = 2
  //SEG272 [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]
  //SEG273 [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 
  //SEG274 [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 
  //SEG275 print_str_at::@1
  b1:
  //SEG276 [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
  //SEG277 print_str_at::@return
  //SEG278 [130] return 
    rts
  //SEG279 print_str_at::@2
  b2:
  //SEG280 [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
  //SEG281 [132] (byte*) print_str_at::at#4 ← ++ (byte*) print_str_at::at#5 -- pbuz1=_inc_pbuz1 
    inc at
    bne !+
    inc at+1
  !:
  //SEG282 [133] (byte*) print_str_at::str#4 ← ++ (byte*) print_str_at::str#5 -- pbuz1=_inc_pbuz1 
    inc str
    bne !+
    inc str+1
  !:
    jmp b1
}
  // 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

