
void main()
main: scope:[main]  from
  asm { sei  }
  [1] *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
  [2] *PROCPORT = PROCPORT_RAM_IO
  [3] call gfx_init
  to:main::@6
main::@6: scope:[main]  from main
  [4] *DTV_FEATURE = DTV_FEATURE_ENABLE
  [5] *DTV_CONTROL = DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
  [6] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
  [7] *VICII_CONTROL2 = VICII_MCM|VICII_CSEL
  [8] *DTV_PLANEA_START_LO = 0
  [9] *DTV_PLANEA_START_MI = byte1 SCREEN
  [10] *DTV_PLANEA_START_HI = 0
  [11] *DTV_PLANEA_STEP = 1
  [12] *DTV_PLANEA_MODULO_LO = 0
  [13] *DTV_PLANEA_MODULO_HI = 0
  [14] *DTV_PLANEB_START_LO = 0
  [15] *DTV_PLANEB_START_MI = byte1 CHARSET8
  [16] *DTV_PLANEB_START_HI = 0
  [17] *DTV_PLANEB_STEP = 0
  [18] *DTV_PLANEB_MODULO_LO = 0
  [19] *DTV_PLANEB_MODULO_HI = 0
  [20] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3
  [21] *((char *)CIA2) = 3^(char)(unsigned int)SCREEN/$4000
  [22] *VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4
  to:main::@1
main::@1: scope:[main]  from main::@1 main::@6
  [23] main::j#2 = phi( main::@1/main::j#1, main::@6/0 )
  [24] DTV_PALETTE[main::j#2] = main::j#2
  [25] main::j#1 = ++ main::j#2
  [26] if(main::j#1!=$10) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@5
  asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  }
  [28] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
  [29] *BORDER_COLOR = 0
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  [30] if(*RASTER!=$42) goto main::@3
  to:main::@4
main::@4: scope:[main]  from main::@3
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  to:main::@5
main::@5: scope:[main]  from main::@4 main::@5
  [32] main::rst#1 = *RASTER
  [33] main::$3 = main::rst#1 & 7
  [34] main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3
  [35] *VICII_CONTROL1 = main::$4
  [36] main::$5 = main::rst#1 << 4
  [37] *BORDER_COLOR = main::$5
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  [39] if(main::rst#1!=$f2) goto main::@5
  to:main::@2

void gfx_init()
gfx_init: scope:[gfx_init]  from main
  [40] phi()
  [41] call gfx_init_screen0
  to:gfx_init::@1
gfx_init::@1: scope:[gfx_init]  from gfx_init
  [42] phi()
  [43] call gfx_init_plane_charset8
  to:gfx_init::@return
gfx_init::@return: scope:[gfx_init]  from gfx_init::@1
  [44] return 
  to:@return

void gfx_init_screen0()
gfx_init_screen0: scope:[gfx_init_screen0]  from gfx_init
  [45] phi()
  to:gfx_init_screen0::@1
gfx_init_screen0::@1: scope:[gfx_init_screen0]  from gfx_init_screen0 gfx_init_screen0::@3
  [46] gfx_init_screen0::ch#3 = phi( gfx_init_screen0/SCREEN, gfx_init_screen0::@3/gfx_init_screen0::ch#1 )
  [46] gfx_init_screen0::cy#4 = phi( gfx_init_screen0/0, gfx_init_screen0::@3/gfx_init_screen0::cy#1 )
  to:gfx_init_screen0::@2
gfx_init_screen0::@2: scope:[gfx_init_screen0]  from gfx_init_screen0::@1 gfx_init_screen0::@2
  [47] gfx_init_screen0::ch#2 = phi( gfx_init_screen0::@1/gfx_init_screen0::ch#3, gfx_init_screen0::@2/gfx_init_screen0::ch#1 )
  [47] gfx_init_screen0::cx#2 = phi( gfx_init_screen0::@1/0, gfx_init_screen0::@2/gfx_init_screen0::cx#1 )
  [48] gfx_init_screen0::$0 = gfx_init_screen0::cy#4 & $f
  [49] gfx_init_screen0::$1 = gfx_init_screen0::$0 << 4
  [50] gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f
  [51] gfx_init_screen0::$3 = gfx_init_screen0::$1 | gfx_init_screen0::$2
  [52] *gfx_init_screen0::ch#2 = gfx_init_screen0::$3
  [53] gfx_init_screen0::ch#1 = ++ gfx_init_screen0::ch#2
  [54] gfx_init_screen0::cx#1 = ++ gfx_init_screen0::cx#2
  [55] if(gfx_init_screen0::cx#1!=$28) goto gfx_init_screen0::@2
  to:gfx_init_screen0::@3
gfx_init_screen0::@3: scope:[gfx_init_screen0]  from gfx_init_screen0::@2
  [56] gfx_init_screen0::cy#1 = ++ gfx_init_screen0::cy#4
  [57] if(gfx_init_screen0::cy#1!=$19) goto gfx_init_screen0::@1
  to:gfx_init_screen0::@return
gfx_init_screen0::@return: scope:[gfx_init_screen0]  from gfx_init_screen0::@3
  [58] return 
  to:@return

void gfx_init_plane_charset8()
gfx_init_plane_charset8: scope:[gfx_init_plane_charset8]  from gfx_init::@1
  [59] phi()
  [60] call dtvSetCpuBankSegment1
  to:gfx_init_plane_charset8::@9
gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8
  [61] *PROCPORT = PROCPORT_RAM_CHARROM
  to:gfx_init_plane_charset8::@1
gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9
  [62] gfx_init_plane_charset8::ch#8 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::ch#1, gfx_init_plane_charset8::@9/0 )
  [62] gfx_init_plane_charset8::col#6 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::col#1, gfx_init_plane_charset8::@9/0 )
  [62] gfx_init_plane_charset8::gfxa#6 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::gfxa#1, gfx_init_plane_charset8::@9/(char *) 16384 )
  [62] gfx_init_plane_charset8::chargen#3 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::chargen#1, gfx_init_plane_charset8::@9/CHARGEN+1 )
  to:gfx_init_plane_charset8::@2
gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6
  [63] gfx_init_plane_charset8::cr#6 = phi( gfx_init_plane_charset8::@1/0, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::cr#1 )
  [63] gfx_init_plane_charset8::col#5 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::col#6, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::col#1 )
  [63] gfx_init_plane_charset8::gfxa#5 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::gfxa#6, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::gfxa#1 )
  [63] gfx_init_plane_charset8::chargen#2 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::chargen#3, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::chargen#1 )
  [64] gfx_init_plane_charset8::bits#0 = *gfx_init_plane_charset8::chargen#2
  [65] gfx_init_plane_charset8::chargen#1 = ++ gfx_init_plane_charset8::chargen#2
  to:gfx_init_plane_charset8::@3
gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4
  [66] gfx_init_plane_charset8::cp#2 = phi( gfx_init_plane_charset8::@2/0, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::cp#1 )
  [66] gfx_init_plane_charset8::col#2 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::col#5, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::col#1 )
  [66] gfx_init_plane_charset8::gfxa#2 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::gfxa#5, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::gfxa#1 )
  [66] gfx_init_plane_charset8::bits#2 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::bits#0, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::bits#1 )
  [67] gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & $80
  [68] if(gfx_init_plane_charset8::$2==0) goto gfx_init_plane_charset8::@4
  to:gfx_init_plane_charset8::@5
gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@3
  [69] gfx_init_plane_charset8::c#3 = gfx_init_plane_charset8::col#2
  to:gfx_init_plane_charset8::@4
gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5
  [70] gfx_init_plane_charset8::c#2 = phi( gfx_init_plane_charset8::@3/0, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::c#3 )
  [71] *gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::c#2
  [72] gfx_init_plane_charset8::gfxa#1 = ++ gfx_init_plane_charset8::gfxa#2
  [73] gfx_init_plane_charset8::bits#1 = gfx_init_plane_charset8::bits#2 << 1
  [74] gfx_init_plane_charset8::col#1 = ++ gfx_init_plane_charset8::col#2
  [75] gfx_init_plane_charset8::cp#1 = ++ gfx_init_plane_charset8::cp#2
  [76] if(gfx_init_plane_charset8::cp#1!=8) goto gfx_init_plane_charset8::@3
  to:gfx_init_plane_charset8::@6
gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@4
  [77] gfx_init_plane_charset8::cr#1 = ++ gfx_init_plane_charset8::cr#6
  [78] if(gfx_init_plane_charset8::cr#1!=8) goto gfx_init_plane_charset8::@2
  to:gfx_init_plane_charset8::@7
gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@6
  [79] gfx_init_plane_charset8::ch#1 = ++ gfx_init_plane_charset8::ch#8
  [80] if(gfx_init_plane_charset8::ch#1!=0) goto gfx_init_plane_charset8::@1
  to:gfx_init_plane_charset8::@8
gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@7
  [81] *PROCPORT = PROCPORT_RAM_IO
  [82] call dtvSetCpuBankSegment1
  to:gfx_init_plane_charset8::@return
gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@8
  [83] return 
  to:@return

void dtvSetCpuBankSegment1(char cpuBankIdx)
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1]  from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
  [84] dtvSetCpuBankSegment1::cpuBankIdx#2 = phi( gfx_init_plane_charset8/gfx_init_plane_charset8::gfxbCpuBank#0, gfx_init_plane_charset8::@8/(char)$4000/$4000 )
  [85] *dtvSetCpuBankSegment1::cpuBank = dtvSetCpuBankSegment1::cpuBankIdx#2
  asm { .byte$32,$dd lda$ff .byte$32,$00  }
  to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1]  from dtvSetCpuBankSegment1
  [87] return 
  to:@return
