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

void print_str_at(char *str , char *at)
print_str_at: scope:[print_str_at]  from main::@17 main::@18 main::@19 main::@3
  [67] print_str_at::at#7 = phi( main::@17/SCREEN+1+$a, main::@18/SCREEN+1+$14, main::@19/SCREEN+1+$1e, main::@3/SCREEN+1 )
  [67] print_str_at::str#7 = phi( main::@17/main::str1, main::@18/main::str2, main::@19/main::str3, main::@3/main::str )
  to:print_str_at::@1
print_str_at::@1: scope:[print_str_at]  from print_str_at print_str_at::@2
  [68] print_str_at::at#5 = phi( print_str_at/print_str_at::at#7, print_str_at::@2/print_str_at::at#4 )
  [68] print_str_at::str#5 = phi( print_str_at/print_str_at::str#7, print_str_at::@2/print_str_at::str#4 )
  [69] if(0!=*print_str_at::str#5) goto print_str_at::@2
  to:print_str_at::@return
print_str_at::@return: scope:[print_str_at]  from print_str_at::@1
  [70] return 
  to:@return
print_str_at::@2: scope:[print_str_at]  from print_str_at::@1
  [71] *print_str_at::at#5 = *print_str_at::str#5
  [72] print_str_at::at#4 = ++ print_str_at::at#5
  [73] print_str_at::str#4 = ++ print_str_at::str#5
  to:print_str_at::@1

void plot_chargen(char pos , char ch , char shift)
plot_chargen: scope:[plot_chargen]  from main::@16 main::@4
  [74] plot_chargen::pos#2 = phi( main::@16/plot_chargen::pos#1, main::@4/plot_chargen::pos#0 )
  [74] plot_chargen::shift#2 = phi( main::@16/plot_chargen::shift#1, main::@4/0 )
  [74] plot_chargen::ch#2 = phi( main::@16/plot_chargen::ch#1, main::@4/$20 )
  asm { sei  }
  [76] plot_chargen::$15 = (unsigned int)plot_chargen::ch#2
  [77] plot_chargen::$0 = plot_chargen::$15 << 3
  [78] plot_chargen::chargen#0 = CHARGEN + plot_chargen::$0
  [79] if(plot_chargen::shift#2==0) goto plot_chargen::@1
  to:plot_chargen::@2
plot_chargen::@2: scope:[plot_chargen]  from plot_chargen
  [80] plot_chargen::chargen#1 = plot_chargen::chargen#0 + $800
  to:plot_chargen::@1
plot_chargen::@1: scope:[plot_chargen]  from plot_chargen plot_chargen::@2
  [81] plot_chargen::chargen#4 = phi( plot_chargen/plot_chargen::chargen#0, plot_chargen::@2/plot_chargen::chargen#1 )
  [82] *PROCPORT = $32
  [83] plot_chargen::$16 = plot_chargen::pos#2 << 2
  [84] plot_chargen::$17 = plot_chargen::$16 + plot_chargen::pos#2
  [85] plot_chargen::$5 = plot_chargen::$17 << 1
  [86] plot_chargen::sc#0 = SCREEN+$29 + plot_chargen::$5
  to:plot_chargen::@3
plot_chargen::@3: scope:[plot_chargen]  from plot_chargen::@1 plot_chargen::@7
  [87] plot_chargen::sc#7 = phi( plot_chargen::@1/plot_chargen::sc#0, plot_chargen::@7/plot_chargen::sc#2 )
  [87] plot_chargen::y#2 = phi( plot_chargen::@1/0, plot_chargen::@7/plot_chargen::y#1 )
  [88] plot_chargen::bits#0 = plot_chargen::chargen#4[plot_chargen::y#2]
  to:plot_chargen::@4
plot_chargen::@4: scope:[plot_chargen]  from plot_chargen::@3 plot_chargen::@5
  [89] plot_chargen::x#2 = phi( plot_chargen::@3/0, plot_chargen::@5/plot_chargen::x#1 )
  [89] plot_chargen::sc#3 = phi( plot_chargen::@3/plot_chargen::sc#7, plot_chargen::@5/plot_chargen::sc#1 )
  [89] plot_chargen::bits#2 = phi( plot_chargen::@3/plot_chargen::bits#0, plot_chargen::@5/plot_chargen::bits#1 )
  [90] plot_chargen::$8 = plot_chargen::bits#2 & $80
  [91] if(plot_chargen::$8==0) goto plot_chargen::@5
  to:plot_chargen::@6
plot_chargen::@6: scope:[plot_chargen]  from plot_chargen::@4
  [92] phi()
  to:plot_chargen::@5
plot_chargen::@5: scope:[plot_chargen]  from plot_chargen::@4 plot_chargen::@6
  [93] plot_chargen::c#2 = phi( plot_chargen::@4/'.', plot_chargen::@6/'*' )
  [94] *plot_chargen::sc#3 = plot_chargen::c#2
  [95] plot_chargen::sc#1 = ++ plot_chargen::sc#3
  [96] plot_chargen::bits#1 = plot_chargen::bits#2 << 1
  [97] plot_chargen::x#1 = ++ plot_chargen::x#2
  [98] if(plot_chargen::x#1!=8) goto plot_chargen::@4
  to:plot_chargen::@7
plot_chargen::@7: scope:[plot_chargen]  from plot_chargen::@5
  [99] plot_chargen::sc#2 = plot_chargen::sc#1 + $20
  [100] plot_chargen::y#1 = ++ plot_chargen::y#2
  [101] if(plot_chargen::y#1!=8) goto plot_chargen::@3
  to:plot_chargen::@8
plot_chargen::@8: scope:[plot_chargen]  from plot_chargen::@7
  [102] *PROCPORT = $37
  asm { cli  }
  to:plot_chargen::@return
plot_chargen::@return: scope:[plot_chargen]  from plot_chargen::@8
  [104] return 
  to:@return

char keyboard_key_pressed(char key)
keyboard_key_pressed: scope:[keyboard_key_pressed]  from main::@15 main::@5 main::@6 main::@7 main::@8 main::@9
  [105] keyboard_key_pressed::key#6 = phi( main::@9/KEY_LSHIFT, main::@15/keyboard_key_pressed::key#5, main::@5/KEY_F1, main::@6/KEY_F3, main::@7/KEY_F5, main::@8/KEY_F7 )
  [106] keyboard_key_pressed::colidx#0 = keyboard_key_pressed::key#6 & 7
  [107] keyboard_key_pressed::rowidx#0 = keyboard_key_pressed::key#6 >> 3
  [108] keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0
  [109] call keyboard_matrix_read
  [110] keyboard_matrix_read::return#2 = keyboard_matrix_read::return#0
  to:keyboard_key_pressed::@1
keyboard_key_pressed::@1: scope:[keyboard_key_pressed]  from keyboard_key_pressed
  [111] keyboard_key_pressed::$2 = keyboard_matrix_read::return#2
  [112] keyboard_key_pressed::return#0 = keyboard_key_pressed::$2 & keyboard_matrix_col_bitmask[keyboard_key_pressed::colidx#0]
  to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed]  from keyboard_key_pressed::@1
  [113] return 
  to:@return

char keyboard_get_keycode(char ch)
keyboard_get_keycode: scope:[keyboard_get_keycode]  from main::@12
  [114] keyboard_get_keycode::return#0 = keyboard_char_keycodes[keyboard_get_keycode::ch#0]
  to:keyboard_get_keycode::@return
keyboard_get_keycode::@return: scope:[keyboard_get_keycode]  from keyboard_get_keycode
  [115] return 
  to:@return

char keyboard_matrix_read(char rowid)
keyboard_matrix_read: scope:[keyboard_matrix_read]  from keyboard_key_pressed
  [116] *((char *)CIA1) = keyboard_matrix_row_bitmask[keyboard_matrix_read::rowid#0]
  [117] keyboard_matrix_read::return#0 = ~ *((char *)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B)
  to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read]  from keyboard_matrix_read
  [118] return 
  to:@return
