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:@5
main: scope:[main]  from @6
  asm { sei  }
  to:main::@2
main::@1: scope:[main]  from main::@7
  to:main::@2
main::@2: scope:[main]  from main main::@1 main::@2
  (bool~) main::$0 ← *((byte*) RASTER#0) != (byte/signed byte/word/signed word/dword/signed dword) 10
  if((bool~) main::$0) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  (bool~) main::$1 ← *((byte*) RASTER#0) != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((bool~) main::$1) goto main::@3
  to:main::@5
main::@5: scope:[main]  from main::@3
  call raster 
  to:main::@7
main::@7: scope:[main]  from main::@5
  if(true) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@7
  return 
  to:@return
@5: scope:[]  from @begin
  (byte[]) rastercols#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/word/signed word/dword/signed dword) 255 }
  to:@6
raster: scope:[raster]  from main::@5
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  (byte) raster::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) raster::col#0 ← *((byte[]) rastercols#0 + (byte) raster::i#0)
  to:raster::@1
raster::@1: scope:[raster]  from raster raster::@1
  (byte) raster::i#2 ← phi( raster/(byte) raster::i#0 raster::@1/(byte) raster::i#1 )
  (byte) raster::col#2 ← phi( raster/(byte) raster::col#0 raster::@1/(byte) raster::col#1 )
  *((byte*) BGCOL#0) ← (byte) raster::col#2
  *((byte*) BORDERCOL#0) ← (byte) raster::col#2
  (byte) raster::i#1 ← ++ (byte) raster::i#2
  (byte) raster::col#1 ← *((byte[]) rastercols#0 + (byte) raster::i#1)
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  (bool~) raster::$0 ← (byte) raster::col#1 != (byte/word/signed word/dword/signed dword) 255
  if((bool~) raster::$0) goto raster::@1
  to:raster::@return
raster::@return: scope:[raster]  from raster::@1
  return 
  to:@return
@6: scope:[]  from @5
  call main 
  to:@7
@7: scope:[]  from @6
  to:@end
@end: scope:[]  from @7

SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @7
(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*) 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*) 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
(void()) main()
(bool~) main::$0
(bool~) main::$1
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@7
(label) main::@return
(void()) raster()
(bool~) raster::$0
(label) raster::@1
(label) raster::@return
(byte) raster::col
(byte) raster::col#0
(byte) raster::col#1
(byte) raster::col#2
(byte) raster::i
(byte) raster::i#0
(byte) raster::i#1
(byte) raster::i#2
(byte[]) rastercols
(byte[]) rastercols#0

Culled Empty Block (label) main::@1
Culled Empty Block (label) @7
Successful SSA optimization Pass2CullEmptyBlocks
Simple Condition (bool~) main::$0 [81] if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2
Simple Condition (bool~) main::$1 [83] if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3
Simple Condition (bool~) raster::$0 [98] if((byte) raster::col#1!=(byte/word/signed word/dword/signed dword) 255) goto raster::@1
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 byte[]) rastercols#0 = { 11, 0, 11, 11, 12, 11, 12, 12, 15, 12, 15, 15, 1, 15, 1, 1, 15, 1, 15, 15, 12, 15, 12, 12, 11, 12, 11, 11, 0, 11, 0, 255 }
Constant (const byte) raster::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in *(rastercols#0+raster::i#0)
Successful SSA optimization Pass2ConstantAdditionElimination
if() condition always true - replacing block destination [4] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Culled Empty Block (label) main::@7
Culled Empty Block (label) @5
Successful SSA optimization Pass2CullEmptyBlocks
Inlining constant with var siblings (const byte) raster::i#0
Constant inlined raster::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Successful SSA optimization Pass2ConstantInlining
Simplifying constant plus zero rastercols#0+0
Added new block during phi lifting raster::@3(between raster::@1 and raster::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@5
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to raster:8 

Created 2 initial phi equivalence classes
Coalesced [11] raster::col#3 ← raster::col#0
Coalesced [20] raster::col#4 ← raster::col#1
Coalesced [21] raster::i#3 ← raster::i#1
Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) raster::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@5

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@6
@6: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @6
  [3] phi()
main: scope:[main]  from @6
  asm { sei  }
  to:main::@2
main::@2: scope:[main]  from main main::@2 main::@5
  [5] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  [6] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3
  to:main::@5
main::@5: scope:[main]  from main::@3
  [7] phi()
  [8] call raster 
  to:main::@2
raster: scope:[raster]  from main::@5
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  [10] (byte) raster::col#0 ← *((const byte[]) rastercols#0)
  to:raster::@1
raster::@1: scope:[raster]  from raster raster::@1
  [11] (byte) raster::i#2 ← phi( raster/(byte/signed byte/word/signed word/dword/signed dword) 0 raster::@1/(byte) raster::i#1 )
  [11] (byte) raster::col#2 ← phi( raster/(byte) raster::col#0 raster::@1/(byte) raster::col#1 )
  [12] *((const byte*) BGCOL#0) ← (byte) raster::col#2
  [13] *((const byte*) BORDERCOL#0) ← (byte) raster::col#2
  [14] (byte) raster::i#1 ← ++ (byte) raster::i#2
  [15] (byte) raster::col#1 ← *((const byte[]) rastercols#0 + (byte) raster::i#1)
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  [17] if((byte) raster::col#1!=(byte/word/signed word/dword/signed dword) 255) goto raster::@1
  to:raster::@return
raster::@return: scope:[raster]  from raster::@1
  [18] return 
  to:@return


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*) 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*) 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
(void()) main()
(void()) raster()
(byte) raster::col
(byte) raster::col#0 4.0
(byte) raster::col#1 101.0
(byte) raster::col#2 152.5
(byte) raster::i
(byte) raster::i#1 75.75
(byte) raster::i#2 67.33333333333333
(byte[]) rastercols

Initial phi equivalence classes
[ raster::col#2 raster::col#0 raster::col#1 ]
[ raster::i#2 raster::i#1 ]
Complete equivalence classes
[ raster::col#2 raster::col#0 raster::col#1 ]
[ raster::i#2 raster::i#1 ]
Allocated zp ZP_BYTE:2 [ raster::col#2 raster::col#0 raster::col#1 ]
Allocated zp ZP_BYTE:3 [ raster::i#2 raster::i#1 ]

INITIAL ASM
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label BGCOL = $d021
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
b6_from_bbegin:
  jmp b6
//SEG5 @6
b6:
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
bend_from_b6:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 asm { sei  }
    sei
    jmp b2
  //SEG11 main::@2
  b2:
  //SEG12 [5] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$a
    bne b2
    jmp b3
  //SEG13 main::@3
  b3:
  //SEG14 [6] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$b
    bne b3
  //SEG15 [7] phi from main::@3 to main::@5 [phi:main::@3->main::@5]
  b5_from_b3:
    jmp b5
  //SEG16 main::@5
  b5:
  //SEG17 [8] call raster 
    jsr raster
    jmp b2
}
//SEG18 raster
raster: {
    .label col = 2
    .label i = 3
  //SEG19 asm { 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
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
  //SEG20 [10] (byte) raster::col#0 ← *((const byte[]) rastercols#0) -- vbuz1=_deref_pbuc1 
    lda rastercols
    sta col
  //SEG21 [11] phi from raster to raster::@1 [phi:raster->raster::@1]
  b1_from_raster:
  //SEG22 [11] phi (byte) raster::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:raster->raster::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
  //SEG23 [11] phi (byte) raster::col#2 = (byte) raster::col#0 [phi:raster->raster::@1#1] -- register_copy 
    jmp b1
  //SEG24 [11] phi from raster::@1 to raster::@1 [phi:raster::@1->raster::@1]
  b1_from_b1:
  //SEG25 [11] phi (byte) raster::i#2 = (byte) raster::i#1 [phi:raster::@1->raster::@1#0] -- register_copy 
  //SEG26 [11] phi (byte) raster::col#2 = (byte) raster::col#1 [phi:raster::@1->raster::@1#1] -- register_copy 
    jmp b1
  //SEG27 raster::@1
  b1:
  //SEG28 [12] *((const byte*) BGCOL#0) ← (byte) raster::col#2 -- _deref_pbuc1=vbuz1 
    lda col
    sta BGCOL
  //SEG29 [13] *((const byte*) BORDERCOL#0) ← (byte) raster::col#2 -- _deref_pbuc1=vbuz1 
    lda col
    sta BORDERCOL
  //SEG30 [14] (byte) raster::i#1 ← ++ (byte) raster::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG31 [15] (byte) raster::col#1 ← *((const byte[]) rastercols#0 + (byte) raster::i#1) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda rastercols,y
    sta col
  //SEG32 asm { 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
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
  //SEG33 [17] if((byte) raster::col#1!=(byte/word/signed word/dword/signed dword) 255) goto raster::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda col
    cmp #$ff
    bne b1_from_b1
    jmp breturn
  //SEG34 raster::@return
  breturn:
  //SEG35 [18] return 
    rts
}
  rastercols: .byte $b, 0, $b, $b, $c, $b, $c, $c, $f, $c, $f, $f, 1, $f, 1, 1, $f, 1, $f, $f, $c, $f, $c, $c, $b, $c, $b, $b, 0, $b, 0, $ff

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [5] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ raster::col#2 raster::col#0 raster::col#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ raster::i#2 raster::i#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [raster] 257.5: zp ZP_BYTE:2 [ raster::col#2 raster::col#0 raster::col#1 ] 143.08: zp ZP_BYTE:3 [ raster::i#2 raster::i#1 ] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [raster] best 9585 combination reg byte a [ raster::col#2 raster::col#0 raster::col#1 ] reg byte x [ raster::i#2 raster::i#1 ] 
Uplifting [main] best 9585 combination 
Uplifting [] best 9585 combination 

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label BGCOL = $d021
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
b6_from_bbegin:
  jmp b6
//SEG5 @6
b6:
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
bend_from_b6:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 asm { sei  }
    sei
    jmp b2
  //SEG11 main::@2
  b2:
  //SEG12 [5] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$a
    bne b2
    jmp b3
  //SEG13 main::@3
  b3:
  //SEG14 [6] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$b
    bne b3
  //SEG15 [7] phi from main::@3 to main::@5 [phi:main::@3->main::@5]
  b5_from_b3:
    jmp b5
  //SEG16 main::@5
  b5:
  //SEG17 [8] call raster 
    jsr raster
    jmp b2
}
//SEG18 raster
raster: {
  //SEG19 asm { 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
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
  //SEG20 [10] (byte) raster::col#0 ← *((const byte[]) rastercols#0) -- vbuaa=_deref_pbuc1 
    lda rastercols
  //SEG21 [11] phi from raster to raster::@1 [phi:raster->raster::@1]
  b1_from_raster:
  //SEG22 [11] phi (byte) raster::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:raster->raster::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG23 [11] phi (byte) raster::col#2 = (byte) raster::col#0 [phi:raster->raster::@1#1] -- register_copy 
    jmp b1
  //SEG24 [11] phi from raster::@1 to raster::@1 [phi:raster::@1->raster::@1]
  b1_from_b1:
  //SEG25 [11] phi (byte) raster::i#2 = (byte) raster::i#1 [phi:raster::@1->raster::@1#0] -- register_copy 
  //SEG26 [11] phi (byte) raster::col#2 = (byte) raster::col#1 [phi:raster::@1->raster::@1#1] -- register_copy 
    jmp b1
  //SEG27 raster::@1
  b1:
  //SEG28 [12] *((const byte*) BGCOL#0) ← (byte) raster::col#2 -- _deref_pbuc1=vbuaa 
    sta BGCOL
  //SEG29 [13] *((const byte*) BORDERCOL#0) ← (byte) raster::col#2 -- _deref_pbuc1=vbuaa 
    sta BORDERCOL
  //SEG30 [14] (byte) raster::i#1 ← ++ (byte) raster::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG31 [15] (byte) raster::col#1 ← *((const byte[]) rastercols#0 + (byte) raster::i#1) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda rastercols,x
  //SEG32 asm { 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
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
  //SEG33 [17] if((byte) raster::col#1!=(byte/word/signed word/dword/signed dword) 255) goto raster::@1 -- vbuaa_neq_vbuc1_then_la1 
    cmp #$ff
    bne b1_from_b1
    jmp breturn
  //SEG34 raster::@return
  breturn:
  //SEG35 [18] return 
    rts
}
  rastercols: .byte $b, 0, $b, $b, $c, $b, $c, $c, $f, $c, $f, $f, 1, $f, 1, 1, $f, 1, $f, $f, $c, $f, $c, $c, $b, $c, $b, $b, 0, $b, 0, $ff

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b6
Removing instruction jmp bend
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction b6_from_bbegin:
Removing instruction b6:
Removing instruction bend_from_b6:
Removing instruction b5_from_b3:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b5:
Removing instruction b1_from_raster:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @6
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) 53281
(byte*) BGCOL1
(byte*) BGCOL2
(byte*) BGCOL3
(byte*) BGCOL4
(byte) BLACK
(byte) BLUE
(byte*) BORDERCOL
(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280
(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*) 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
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
(byte) RED
(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
(void()) main()
(label) main::@2
(label) main::@3
(label) main::@5
(void()) raster()
(label) raster::@1
(label) raster::@return
(byte) raster::col
(byte) raster::col#0 reg byte a 4.0
(byte) raster::col#1 reg byte a 101.0
(byte) raster::col#2 reg byte a 152.5
(byte) raster::i
(byte) raster::i#1 reg byte x 75.75
(byte) raster::i#2 reg byte x 67.33333333333333
(byte[]) rastercols
(const byte[]) rastercols#0 rastercols = { (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 12, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/word/signed word/dword/signed dword) 255 }

reg byte a [ raster::col#2 raster::col#0 raster::col#1 ]
reg byte x [ raster::i#2 raster::i#1 ]


FINAL ASSEMBLER
Score: 8340

//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label BGCOL = $d021
//SEG3 @begin
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
//SEG5 @6
//SEG6 [2] call main 
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
//SEG8 @end
//SEG9 main
main: {
  //SEG10 asm { sei  }
    sei
  //SEG11 main::@2
  b2:
  //SEG12 [5] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$a
    bne b2
  //SEG13 main::@3
  b3:
  //SEG14 [6] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$b
    bne b3
  //SEG15 [7] phi from main::@3 to main::@5 [phi:main::@3->main::@5]
  //SEG16 main::@5
  //SEG17 [8] call raster 
    jsr raster
    jmp b2
}
//SEG18 raster
raster: {
  //SEG19 asm { 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
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
  //SEG20 [10] (byte) raster::col#0 ← *((const byte[]) rastercols#0) -- vbuaa=_deref_pbuc1 
    lda rastercols
  //SEG21 [11] phi from raster to raster::@1 [phi:raster->raster::@1]
  //SEG22 [11] phi (byte) raster::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:raster->raster::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG23 [11] phi (byte) raster::col#2 = (byte) raster::col#0 [phi:raster->raster::@1#1] -- register_copy 
  //SEG24 [11] phi from raster::@1 to raster::@1 [phi:raster::@1->raster::@1]
  //SEG25 [11] phi (byte) raster::i#2 = (byte) raster::i#1 [phi:raster::@1->raster::@1#0] -- register_copy 
  //SEG26 [11] phi (byte) raster::col#2 = (byte) raster::col#1 [phi:raster::@1->raster::@1#1] -- register_copy 
  //SEG27 raster::@1
  b1:
  //SEG28 [12] *((const byte*) BGCOL#0) ← (byte) raster::col#2 -- _deref_pbuc1=vbuaa 
    sta BGCOL
  //SEG29 [13] *((const byte*) BORDERCOL#0) ← (byte) raster::col#2 -- _deref_pbuc1=vbuaa 
    sta BORDERCOL
  //SEG30 [14] (byte) raster::i#1 ← ++ (byte) raster::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG31 [15] (byte) raster::col#1 ← *((const byte[]) rastercols#0 + (byte) raster::i#1) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda rastercols,x
  //SEG32 asm { 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
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
  //SEG33 [17] if((byte) raster::col#1!=(byte/word/signed word/dword/signed dword) 255) goto raster::@1 -- vbuaa_neq_vbuc1_then_la1 
    cmp #$ff
    bne b1
  //SEG34 raster::@return
  //SEG35 [18] return 
    rts
}
  rastercols: .byte $b, 0, $b, $b, $c, $b, $c, $c, $f, $c, $f, $f, 1, $f, 1, 1, $f, 1, $f, $f, $c, $f, $c, $c, $b, $c, $b, $b, 0, $b, 0, $ff

