
void main()
main: scope:[main]  from
  [0] phi()
  [1] call memoryRemapBlock
  to:main::@7
main::@7: scope:[main]  from main
  [2] *main::BLOCK_4000 = '-'
  [3] *(main::BLOCK_4000+1) = '*'
  [4] call memoryRemapBlock
  to:main::@8
main::@8: scope:[main]  from main::@7
  [5] *(main::BLOCK_8000+2) = '-'
  [6] *(main::BLOCK_8000+3) = '*'
  [7] call memoryRemap
  to:main::@9
main::@9: scope:[main]  from main::@8
  [8] *(main::BLOCK_8000+4) = *(main::BLOCK_4000+2)
  [9] *(main::BLOCK_4000+5) = *(main::BLOCK_8000+1)
  to:main::@1
main::@1: scope:[main]  from main::@2 main::@9
  [10] main::i#2 = phi( main::@2/main::i#1, main::@9/0 )
  [11] if(main::i#2<6) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@1
  [12] phi()
  [13] call memoryRemap256M
  to:main::@4
main::@4: scope:[main]  from main::@3 main::@5
  [14] main::i1#2 = phi( main::@3/0, main::@5/main::i1#1 )
  [15] if(main::i1#2<$10) goto main::@5
  to:main::@6
main::@6: scope:[main]  from main::@4
  [16] phi()
  [17] call memoryRemap256M
  to:main::@return
main::@return: scope:[main]  from main::@6
  [18] return 
  to:@return
main::@5: scope:[main]  from main::@4
  [19] main::$7 = $40 + main::i1#2
  [20] main::BLOCK_4000[main::i1#2] = main::$7
  [21] main::i1#1 = ++ main::i1#2
  to:main::@4
main::@2: scope:[main]  from main::@1
  [22] (DEFAULT_SCREEN+$50-6)[main::i#2] = main::BLOCK_4000[main::i#2]
  [23] main::i#1 = ++ main::i#2
  to:main::@1

void memoryRemapBlock(char blockPage , unsigned int memoryPage)
memoryRemapBlock: scope:[memoryRemapBlock]  from main main::@7
  [24] memoryRemapBlock::blockPage#2 = phi( main/$40, main::@7/$80 )
  [25] memoryRemapBlock::pageOffset#0 = $100 - memoryRemapBlock::blockPage#2
  [26] memoryRemapBlock::block#0 = memoryRemapBlock::blockPage#2 >> 5
  [27] memoryRemapBlock::blockBits#0 = 1 << memoryRemapBlock::block#0
  [28] memoryRemap::remapBlocks#0 = memoryRemapBlock::blockBits#0
  [29] memoryRemap::lowerPageOffset#0 = memoryRemapBlock::pageOffset#0
  [30] memoryRemap::upperPageOffset#0 = memoryRemapBlock::pageOffset#0
  [31] call memoryRemap
  to:memoryRemapBlock::@return
memoryRemapBlock::@return: scope:[memoryRemapBlock]  from memoryRemapBlock
  [32] return 
  to:@return

void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
memoryRemap: scope:[memoryRemap]  from main::@8 memoryRemapBlock
  [33] memoryRemap::upperPageOffset#2 = phi( main::@8/$80, memoryRemapBlock/memoryRemap::upperPageOffset#0 )
  [33] memoryRemap::remapBlocks#2 = phi( main::@8/MEMORYBLOCK_4000|MEMORYBLOCK_8000, memoryRemapBlock/memoryRemap::remapBlocks#0 )
  [33] memoryRemap::lowerPageOffset#2 = phi( main::@8/$c0, memoryRemapBlock/memoryRemap::lowerPageOffset#0 )
  [34] memoryRemap::aVal = byte0  memoryRemap::lowerPageOffset#2
  [35] memoryRemap::$1 = memoryRemap::remapBlocks#2 << 4
  [36] memoryRemap::$2 = byte1  memoryRemap::lowerPageOffset#2
  [37] memoryRemap::$3 = memoryRemap::$2 & $f
  [38] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
  [39] memoryRemap::yVal = byte0  memoryRemap::upperPageOffset#2
  [40] memoryRemap::$6 = memoryRemap::remapBlocks#2 & $f0
  [41] memoryRemap::$7 = byte1  memoryRemap::upperPageOffset#2
  [42] memoryRemap::$8 = memoryRemap::$7 & $f
  [43] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
  asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
  to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap]  from memoryRemap
  [45] return 
  to:@return

void memoryRemap256M(char remapBlocks , unsigned long lowerPageOffset , unsigned long upperPageOffset)
memoryRemap256M: scope:[memoryRemap256M]  from main::@3 main::@6
  [46] memoryRemap256M::remapBlocks#2 = phi( main::@3/MEMORYBLOCK_4000, main::@6/0 )
  [46] memoryRemap256M::lowerPageOffset#2 = phi( main::@3/$ff800-$40, main::@6/0 )
  [47] memoryRemap256M::$0 = memoryRemap256M::lowerPageOffset#2 >> 4
  [48] memoryRemap256M::lMb = byte1  (unsigned int)memoryRemap256M::$0
  [49] memoryRemap256M::uMb = 0
  [50] memoryRemap256M::aVal = byte0  memoryRemap256M::lowerPageOffset#2
  [51] memoryRemap256M::$5 = memoryRemap256M::remapBlocks#2 << 4
  [52] memoryRemap256M::$6 = byte1  memoryRemap256M::lowerPageOffset#2
  [53] memoryRemap256M::$7 = memoryRemap256M::$6 & $f
  [54] memoryRemap256M::xVal = memoryRemap256M::$5 | memoryRemap256M::$7
  [55] memoryRemap256M::yVal = 0
  [56] memoryRemap256M::$10 = memoryRemap256M::remapBlocks#2 & $f0
  [57] memoryRemap256M::zVal = memoryRemap256M::$10
  asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
  to:memoryRemap256M::@return
memoryRemap256M::@return: scope:[memoryRemap256M]  from memoryRemap256M
  [59] return 
  to:@return
