
__interrupt(hardware_clobber) void irq()
irq: scope:[irq]  from
  [0] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_IRQ_STATUS) = IRQ_RASTER
  [1] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR) = ++ *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR)
  [2] call memoryRemapBlock
  to:irq::@4
irq::@4: scope:[irq]  from irq
  [3] phi()
  [4] callexecute *musicPlay 
  to:irq::@1
irq::@1: scope:[irq]  from irq::@4
  [5] phi()
  [6] call memoryRemap
  to:irq::@5
irq::@5: scope:[irq]  from irq::@1
  [7] irq::raster#0 = *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER)
  to:irq::@2
irq::@2: scope:[irq]  from irq::@2 irq::@5
  [8] if(*((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER)==irq::raster#0) goto irq::@2
  to:irq::@3
irq::@3: scope:[irq]  from irq::@2
  [9] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR) = -- *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR)
  to:irq::@return
irq::@return: scope:[irq]  from irq::@3
  [10] return 
  to:@return

void main()
main: scope:[main]  from
  asm { sei  }
  [12] call memoryRemap
  to:main::@5
main::@5: scope:[main]  from main
  [13] *((char *)VICIII+OFFSET_STRUCT_MOS4569_VICIII_KEY) = $47
  [14] *((char *)VICIII+OFFSET_STRUCT_MOS4569_VICIII_KEY) = $53
  [15] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLB) = *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLB) | $40
  [16] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLC) = *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLC) | $40
  [17] *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
  [18] *PROCPORT = PROCPORT_RAM_IO
  [19] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SIDBDRWD_LO) = 1
  [20] call memcpy_dma4
  to:main::@6
main::@6: scope:[main]  from main::@5
  [21] phi()
  [22] call memoryRemapBlock
  to:main::@7
main::@7: scope:[main]  from main::@6
  asm { lda#0  }
  [24] callexecute *musicInit 
  to:main::@1
main::@1: scope:[main]  from main::@7
  [25] phi()
  [26] call memoryRemap
  to:main::@8
main::@8: scope:[main]  from main::@1
  [27] *((char *)CIA1+OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) = CIA_INTERRUPT_CLEAR
  [28] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER) = $ff
  [29] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_CONTROL1) = *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_CONTROL1) & $7f
  [30] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_IRQ_ENABLE) = IRQ_RASTER
  [31] *HARDWARE_IRQ = &irq
  asm { cli  }
  to:main::@2
main::@2: scope:[main]  from main::@3 main::@8
  [33] main::mem_destroy_i#2 = phi( main::@3/main::mem_destroy_i#1, main::@8/0 )
  [34] MUSIC[main::mem_destroy_i#2] = ++ MUSIC[main::mem_destroy_i#2]
  [35] main::mem_destroy_i#1 = ++ main::mem_destroy_i#2
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@4
  [36] main::i#2 = phi( main::@2/0, main::@4/main::i#1 )
  [37] if(main::i#2<$f0) goto main::@4
  to:main::@2
main::@4: scope:[main]  from main::@3
  [38] DEFAULT_SCREEN[main::i#2] = MUSIC[main::i#2]
  [39] main::i#1 = ++ main::i#2
  to:main::@3

void memoryRemapBlock(char blockPage , unsigned int memoryPage)
memoryRemapBlock: scope:[memoryRemapBlock]  from irq main::@6
  [40] phi()
  [41] call memoryRemap
  to:memoryRemapBlock::@return
memoryRemapBlock::@return: scope:[memoryRemapBlock]  from memoryRemapBlock
  [42] return 
  to:@return

void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
memoryRemap: scope:[memoryRemap]  from irq::@1 main main::@1 memoryRemapBlock
  [43] memoryRemap::upperPageOffset#4 = phi( irq::@1/0, main/0, main::@1/0, memoryRemapBlock/memoryRemapBlock::pageOffset#0 )
  [43] memoryRemap::remapBlocks#4 = phi( irq::@1/0, main/0, main::@1/0, memoryRemapBlock/memoryRemapBlock::blockBits#0 )
  [43] memoryRemap::lowerPageOffset#4 = phi( irq::@1/0, main/0, main::@1/0, memoryRemapBlock/memoryRemapBlock::pageOffset#0 )
  [44] memoryRemap::aVal = byte0  memoryRemap::lowerPageOffset#4
  [45] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4
  [46] memoryRemap::$2 = byte1  memoryRemap::lowerPageOffset#4
  [47] memoryRemap::$3 = memoryRemap::$2 & $f
  [48] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
  [49] memoryRemap::yVal = byte0  memoryRemap::upperPageOffset#4
  [50] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
  [51] memoryRemap::$7 = byte1  memoryRemap::upperPageOffset#4
  [52] memoryRemap::$8 = memoryRemap::$7 & $f
  [53] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
  asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom  }
  to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap]  from memoryRemap
  [55] return 
  to:@return

void memcpy_dma4(char dest_bank , void *dest , char src_bank , void *src , unsigned int num)
memcpy_dma4: scope:[memcpy_dma4]  from main::@5
  [56] memcpy_dma4::dmaMode#0 = *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B)
  [57] *((unsigned int *)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0
  [58] *((char *)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0
  [59] *((char **)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (char *)memcpy_dma4::src#0
  [60] *((char *)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0
  [61] *((char **)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (char *)memcpy_dma4::dest#0
  [62] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
  [63] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
  [64] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
  [65] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4
  [66] *((char *)DMA) = byte0 &memcpy_dma_command4
  [67] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0
  to:memcpy_dma4::@return
memcpy_dma4::@return: scope:[memcpy_dma4]  from memcpy_dma4
  [68] return 
  to:@return
