Resolved forward reference sprites_irq to interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Inlined call (byte~) $5 ← call toSpritePtr (byte*) PLAYFIELD_SPRITES 
Inlined call (byte~) sprites_irq::$5 ← call toSpritePtr (byte*) PLAYFIELD_SPRITES 
Inlined call call vicSelectGfxBank (byte*) PLAYFIELD_SCREEN_1 
Inlined call (byte~) main::$1 ← call toD018 (byte*) PLAYFIELD_SCREEN_1 (byte*) PLAYFIELD_CHARSET 
Inlined call (byte~) main::$5 ← call toSpritePtr (byte*) SIN_SPRITE 

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:@4
@4: scope:[]  from @begin
  (byte*) PLAYFIELD_SCREEN_1#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) PLAYFIELD_SCREEN_2#0 ← ((byte*)) (word/signed word/dword/signed dword) 11264
  (byte*~) $0 ← (byte*) PLAYFIELD_SCREEN_1#0 + (word) SPRITE_PTRS#0
  (byte*) PLAYFIELD_SPRITE_PTRS_1#0 ← (byte*~) $0
  (byte*~) $1 ← (byte*) PLAYFIELD_SCREEN_2#0 + (word) SPRITE_PTRS#0
  (byte*) PLAYFIELD_SPRITE_PTRS_2#0 ← (byte*~) $1
  (byte*) PLAYFIELD_SCREEN_ORIGINAL#0 ← ((byte*)) (word/signed word/dword/signed dword) 6144
  (byte*) PLAYFIELD_COLORS_ORIGINAL#0 ← ((byte*)) (word/signed word/dword/signed dword) 7168
  (byte*) PLAYFIELD_SPRITES#0 ← ((byte*)) (word/signed word/dword/signed dword) 8192
  (byte*) PLAYFIELD_CHARSET#0 ← ((byte*)) (word/signed word/dword/signed dword) 10240
  (byte) PLAYFIELD_LINES#0 ← (byte/signed byte/word/signed word/dword/signed dword) 22
  (byte) PLAYFIELD_COLS#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte~) $2 ← (byte) PLAYFIELD_LINES#0 * (byte) PLAYFIELD_COLS#0
  (byte[$2]) playfield#0 ← { fill( $2, 0) }
  (byte) render_screen_render#0 ← (byte/signed byte/word/signed word/dword/signed dword) 64
  (byte) render_screen_show#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (dword) score_bcd#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (word) lines_bcd#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) level_bcd#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) level#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) game_over#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  kickasm(location (byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000))
	// Put the sprites into memory 
	.for(var sy=0;sy<10;sy++) {
	    .var sprite_gfx_y = sy*20
		.for(var sx=0;sx<3;sx++) {
	    	.for (var y=0;y<21; y++) {
	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21)
		    	.for (var c=0; c<3; c++) {
	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y)
	            }
	        }
	    	.byte 0
	  	}
	}
 }}
  to:@5
sprites_init: scope:[sprites_init]  from main::@4
  *((byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15
  *((byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  *((byte*) SPRITES_EXPAND_Y#0) ← *((byte*) SPRITES_MC#0)
  *((byte*) SPRITES_EXPAND_X#0) ← *((byte*) SPRITES_EXPAND_Y#0)
  (byte/signed byte/word/signed word/dword/signed dword~) sprites_init::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 15 * (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte/signed word/word/dword/signed dword/signed byte~) sprites_init::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte/signed byte/word/signed word/dword/signed dword~) sprites_init::$0
  (byte) sprites_init::xpos#0 ← (byte/signed word/word/dword/signed dword/signed byte~) sprites_init::$1
  (byte) sprites_init::s#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:sprites_init::@1
sprites_init::@1: scope:[sprites_init]  from sprites_init sprites_init::@1
  (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte) sprites_init::xpos#0 sprites_init::@1/(byte) sprites_init::xpos#1 )
  (byte) sprites_init::s#2 ← phi( sprites_init/(byte) sprites_init::s#0 sprites_init::@1/(byte) sprites_init::s#1 )
  (byte~) sprites_init::$2 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) sprites_init::s2#0 ← (byte~) sprites_init::$2
  *((byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2
  *((byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (byte) BLACK#0
  (byte/signed word/word/dword/signed dword~) sprites_init::$3 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte) sprites_init::xpos#1 ← (byte/signed word/word/dword/signed dword~) sprites_init::$3
  (byte) sprites_init::s#1 ← (byte) sprites_init::s#2 + rangenext(0,3)
  (bool~) sprites_init::$4 ← (byte) sprites_init::s#1 != rangelast(0,3)
  if((bool~) sprites_init::$4) goto sprites_init::@1
  to:sprites_init::@return
sprites_init::@return: scope:[sprites_init]  from sprites_init::@1
  return 
  to:@return
@5: scope:[]  from @4
  (byte) render_screen_showing#9 ← phi( @4/(byte) render_screen_showing#0 )
  (byte) SPRITES_FIRST_YPOS#0 ← (byte/signed byte/word/signed word/dword/signed dword) 49
  (byte/signed word/word/dword/signed dword~) $3 ← (byte) SPRITES_FIRST_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 19
  (byte) IRQ_RASTER_FIRST#0 ← (byte/signed word/word/dword/signed dword~) $3
  (byte) irq_raster_next#0 ← (byte) IRQ_RASTER_FIRST#0
  (byte/signed word/word/dword/signed dword~) $4 ← (byte) SPRITES_FIRST_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
  (byte) irq_sprite_ypos#0 ← (byte/signed word/word/dword/signed dword~) $4
  (byte*) toSpritePtr1_sprite#0 ← (byte*) PLAYFIELD_SPRITES#0
  to:toSpritePtr1
toSpritePtr1: scope:[]  from @5
  (byte) render_screen_showing#8 ← phi( @5/(byte) render_screen_showing#9 )
  (byte) irq_raster_next#23 ← phi( @5/(byte) irq_raster_next#0 )
  (byte) irq_sprite_ypos#22 ← phi( @5/(byte) irq_sprite_ypos#0 )
  (byte*) toSpritePtr1_sprite#1 ← phi( @5/(byte*) toSpritePtr1_sprite#0 )
  (word) toSpritePtr1_$0#0 ← ((word)) (byte*) toSpritePtr1_sprite#1
  (word) toSpritePtr1_$1#0 ← (word) toSpritePtr1_$0#0 >> (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte) toSpritePtr1_$2#0 ← ((byte)) (word) toSpritePtr1_$1#0
  (byte) toSpritePtr1_return#0 ← (byte) toSpritePtr1_$2#0
  to:toSpritePtr1_@return
toSpritePtr1_@return: scope:[]  from toSpritePtr1
  (byte) render_screen_showing#7 ← phi( toSpritePtr1/(byte) render_screen_showing#8 )
  (byte) irq_raster_next#21 ← phi( toSpritePtr1/(byte) irq_raster_next#23 )
  (byte) irq_sprite_ypos#19 ← phi( toSpritePtr1/(byte) irq_sprite_ypos#22 )
  (byte) toSpritePtr1_return#2 ← phi( toSpritePtr1/(byte) toSpritePtr1_return#0 )
  (byte) toSpritePtr1_return#1 ← (byte) toSpritePtr1_return#2
  to:@10
@10: scope:[]  from toSpritePtr1_@return
  (byte) render_screen_showing#6 ← phi( toSpritePtr1_@return/(byte) render_screen_showing#7 )
  (byte) irq_raster_next#20 ← phi( toSpritePtr1_@return/(byte) irq_raster_next#21 )
  (byte) irq_sprite_ypos#18 ← phi( toSpritePtr1_@return/(byte) irq_sprite_ypos#19 )
  (byte) toSpritePtr1_return#3 ← phi( toSpritePtr1_@return/(byte) toSpritePtr1_return#1 )
  (byte~) $5 ← (byte) toSpritePtr1_return#3
  (byte/signed word/word/dword/signed dword~) $6 ← (byte~) $5 + (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte) irq_sprite_ptr#0 ← (byte/signed word/word/dword/signed dword~) $6
  (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:@7
sprites_irq_init: scope:[sprites_irq_init]  from main::@2
  asm { sei  }
  *((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0
  asm { ldaCIA1_INTERRUPT  }
  *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0
  *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0
  *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0
  *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127
  *((byte*) RASTER#0) ← (byte) IRQ_RASTER_FIRST#0
  *((byte*) IRQ_ENABLE#0) ← (byte) IRQ_RASTER#0
  (void()*~) sprites_irq_init::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
  *((void()**) HARDWARE_IRQ#0) ← (void()*~) sprites_irq_init::$0
  asm { cli  }
  to:sprites_irq_init::@return
sprites_irq_init::@return: scope:[sprites_irq_init]  from sprites_irq_init
  return 
  to:@return
sprites_irq: scope:[sprites_irq]  from
  (byte) irq_cnt#15 ← phi( @9/(byte) irq_cnt#17 )
  (byte) render_screen_showing#3 ← phi( @9/(byte) render_screen_showing#4 )
  (byte) irq_sprite_ptr#12 ← phi( @9/(byte) irq_sprite_ptr#14 )
  (byte) irq_raster_next#5 ← phi( @9/(byte) irq_raster_next#10 )
  (byte) irq_sprite_ypos#5 ← phi( @9/(byte) irq_sprite_ypos#9 )
  asm { cld  }
  (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#5
  *((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) sprites_irq::ypos#0
  *((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ypos#0
  *((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) sprites_irq::ypos#0
  *((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) sprites_irq::ypos#0
  (byte/signed word/word/dword/signed dword~) sprites_irq::$0 ← (byte) irq_raster_next#5 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte/signed word/word/dword/signed dword~) sprites_irq::$0
  to:sprites_irq::@1
sprites_irq::@1: scope:[sprites_irq]  from sprites_irq sprites_irq::@1
  (byte) irq_sprite_ypos#23 ← phi( sprites_irq/(byte) irq_sprite_ypos#5 sprites_irq::@1/(byte) irq_sprite_ypos#23 )
  (byte) irq_raster_next#22 ← phi( sprites_irq/(byte) irq_raster_next#5 sprites_irq::@1/(byte) irq_raster_next#22 )
  (byte) irq_cnt#13 ← phi( sprites_irq/(byte) irq_cnt#15 sprites_irq::@1/(byte) irq_cnt#13 )
  (byte) render_screen_showing#2 ← phi( sprites_irq/(byte) render_screen_showing#3 sprites_irq::@1/(byte) render_screen_showing#2 )
  (byte) irq_sprite_ptr#9 ← phi( sprites_irq/(byte) irq_sprite_ptr#12 sprites_irq::@1/(byte) irq_sprite_ptr#9 )
  (byte) sprites_irq::raster_sprite_gfx_modify#1 ← phi( sprites_irq/(byte) sprites_irq::raster_sprite_gfx_modify#0 sprites_irq::@1/(byte) sprites_irq::raster_sprite_gfx_modify#1 )
  (bool~) sprites_irq::$1 ← *((byte*) RASTER#0) < (byte) sprites_irq::raster_sprite_gfx_modify#1
  if((bool~) sprites_irq::$1) goto sprites_irq::@1
  to:sprites_irq::@8
sprites_irq::@8: scope:[sprites_irq]  from sprites_irq::@1
  (byte) irq_sprite_ypos#20 ← phi( sprites_irq::@1/(byte) irq_sprite_ypos#23 )
  (byte) irq_raster_next#18 ← phi( sprites_irq::@1/(byte) irq_raster_next#22 )
  (byte) irq_cnt#10 ← phi( sprites_irq::@1/(byte) irq_cnt#13 )
  (byte) render_screen_showing#1 ← phi( sprites_irq::@1/(byte) render_screen_showing#2 )
  (byte) irq_sprite_ptr#5 ← phi( sprites_irq::@1/(byte) irq_sprite_ptr#9 )
  (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#5
  (bool~) sprites_irq::$2 ← (byte) render_screen_showing#1 == (byte/signed byte/word/signed word/dword/signed dword) 0
  if((bool~) sprites_irq::$2) goto sprites_irq::@2
  to:sprites_irq::@9
sprites_irq::@2: scope:[sprites_irq]  from sprites_irq::@8
  (byte) irq_sprite_ptr#15 ← phi( sprites_irq::@8/(byte) irq_sprite_ptr#5 )
  (byte) irq_sprite_ypos#15 ← phi( sprites_irq::@8/(byte) irq_sprite_ypos#20 )
  (byte) irq_raster_next#14 ← phi( sprites_irq::@8/(byte) irq_raster_next#18 )
  (byte) irq_cnt#7 ← phi( sprites_irq::@8/(byte) irq_cnt#10 )
  (byte) sprites_irq::ptr#5 ← phi( sprites_irq::@8/(byte) sprites_irq::ptr#0 )
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) sprites_irq::ptr#5
  (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#5
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#1
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#1
  (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#2
  to:sprites_irq::@3
sprites_irq::@9: scope:[sprites_irq]  from sprites_irq::@8
  (byte) irq_sprite_ptr#16 ← phi( sprites_irq::@8/(byte) irq_sprite_ptr#5 )
  (byte) irq_sprite_ypos#16 ← phi( sprites_irq::@8/(byte) irq_sprite_ypos#20 )
  (byte) irq_raster_next#15 ← phi( sprites_irq::@8/(byte) irq_raster_next#18 )
  (byte) irq_cnt#8 ← phi( sprites_irq::@8/(byte) irq_cnt#10 )
  (byte) sprites_irq::ptr#6 ← phi( sprites_irq::@8/(byte) sprites_irq::ptr#0 )
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) sprites_irq::ptr#6
  (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#6
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#3
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#3
  (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#4
  to:sprites_irq::@3
sprites_irq::@3: scope:[sprites_irq]  from sprites_irq::@2 sprites_irq::@9
  (byte) irq_sprite_ptr#13 ← phi( sprites_irq::@2/(byte) irq_sprite_ptr#15 sprites_irq::@9/(byte) irq_sprite_ptr#16 )
  (byte) irq_sprite_ypos#12 ← phi( sprites_irq::@2/(byte) irq_sprite_ypos#15 sprites_irq::@9/(byte) irq_sprite_ypos#16 )
  (byte) irq_raster_next#11 ← phi( sprites_irq::@2/(byte) irq_raster_next#14 sprites_irq::@9/(byte) irq_raster_next#15 )
  (byte) irq_cnt#4 ← phi( sprites_irq::@2/(byte) irq_cnt#7 sprites_irq::@9/(byte) irq_cnt#8 )
  (byte) irq_cnt#1 ← ++ (byte) irq_cnt#4
  (bool~) sprites_irq::$3 ← (byte) irq_cnt#1 == (byte/signed byte/word/signed word/dword/signed dword) 9
  if((bool~) sprites_irq::$3) goto sprites_irq::@4
  to:sprites_irq::@11
sprites_irq::@4: scope:[sprites_irq]  from sprites_irq::@3
  (byte) irq_cnt#18 ← phi( sprites_irq::@3/(byte) irq_cnt#1 )
  (byte) irq_raster_next#6 ← phi( sprites_irq::@3/(byte) irq_raster_next#11 )
  (byte) irq_raster_next#1 ← (byte) irq_raster_next#6 + (byte/signed byte/word/signed word/dword/signed dword) 21
  (byte) irq_sprite_ypos#1 ← (byte) SPRITES_FIRST_YPOS#0
  (byte*) sprites_irq::toSpritePtr2_sprite#0 ← (byte*) PLAYFIELD_SPRITES#0
  to:sprites_irq::toSpritePtr2
sprites_irq::toSpritePtr2: scope:[sprites_irq]  from sprites_irq::@4
  (byte) irq_sprite_ypos#21 ← phi( sprites_irq::@4/(byte) irq_sprite_ypos#1 )
  (byte) irq_cnt#16 ← phi( sprites_irq::@4/(byte) irq_cnt#18 )
  (byte) irq_raster_next#19 ← phi( sprites_irq::@4/(byte) irq_raster_next#1 )
  (byte*) sprites_irq::toSpritePtr2_sprite#1 ← phi( sprites_irq::@4/(byte*) sprites_irq::toSpritePtr2_sprite#0 )
  (word) sprites_irq::toSpritePtr2_$0#0 ← ((word)) (byte*) sprites_irq::toSpritePtr2_sprite#1
  (word) sprites_irq::toSpritePtr2_$1#0 ← (word) sprites_irq::toSpritePtr2_$0#0 >> (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte) sprites_irq::toSpritePtr2_$2#0 ← ((byte)) (word) sprites_irq::toSpritePtr2_$1#0
  (byte) sprites_irq::toSpritePtr2_return#0 ← (byte) sprites_irq::toSpritePtr2_$2#0
  to:sprites_irq::toSpritePtr2_@return
sprites_irq::toSpritePtr2_@return: scope:[sprites_irq]  from sprites_irq::toSpritePtr2
  (byte) irq_sprite_ypos#17 ← phi( sprites_irq::toSpritePtr2/(byte) irq_sprite_ypos#21 )
  (byte) irq_cnt#14 ← phi( sprites_irq::toSpritePtr2/(byte) irq_cnt#16 )
  (byte) irq_raster_next#16 ← phi( sprites_irq::toSpritePtr2/(byte) irq_raster_next#19 )
  (byte) sprites_irq::toSpritePtr2_return#2 ← phi( sprites_irq::toSpritePtr2/(byte) sprites_irq::toSpritePtr2_return#0 )
  (byte) sprites_irq::toSpritePtr2_return#1 ← (byte) sprites_irq::toSpritePtr2_return#2
  to:sprites_irq::@15
sprites_irq::@15: scope:[sprites_irq]  from sprites_irq::toSpritePtr2_@return
  (byte) irq_sprite_ypos#13 ← phi( sprites_irq::toSpritePtr2_@return/(byte) irq_sprite_ypos#17 )
  (byte) irq_cnt#12 ← phi( sprites_irq::toSpritePtr2_@return/(byte) irq_cnt#14 )
  (byte) irq_raster_next#13 ← phi( sprites_irq::toSpritePtr2_@return/(byte) irq_raster_next#16 )
  (byte) sprites_irq::toSpritePtr2_return#3 ← phi( sprites_irq::toSpritePtr2_@return/(byte) sprites_irq::toSpritePtr2_return#1 )
  (byte~) sprites_irq::$5 ← (byte) sprites_irq::toSpritePtr2_return#3
  (byte) irq_sprite_ptr#1 ← (byte~) sprites_irq::$5
  to:sprites_irq::@7
sprites_irq::@11: scope:[sprites_irq]  from sprites_irq::@3
  (byte) irq_raster_next#12 ← phi( sprites_irq::@3/(byte) irq_raster_next#11 )
  (byte) irq_sprite_ptr#10 ← phi( sprites_irq::@3/(byte) irq_sprite_ptr#13 )
  (byte) irq_sprite_ypos#10 ← phi( sprites_irq::@3/(byte) irq_sprite_ypos#12 )
  (byte) irq_cnt#5 ← phi( sprites_irq::@3/(byte) irq_cnt#1 )
  (bool~) sprites_irq::$4 ← (byte) irq_cnt#5 == (byte/signed byte/word/signed word/dword/signed dword) 10
  if((bool~) sprites_irq::$4) goto sprites_irq::@5
  to:sprites_irq::@12
sprites_irq::@5: scope:[sprites_irq]  from sprites_irq::@11
  (byte) irq_sprite_ptr#6 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#10 )
  (byte) irq_sprite_ypos#6 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#10 )
  (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) irq_raster_next#2 ← (byte) IRQ_RASTER_FIRST#0
  (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#6 + (byte/signed byte/word/signed word/dword/signed dword) 21
  (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#6 + (byte/signed byte/word/signed word/dword/signed dword) 3
  to:sprites_irq::@7
sprites_irq::@12: scope:[sprites_irq]  from sprites_irq::@11
  (byte) irq_cnt#11 ← phi( sprites_irq::@11/(byte) irq_cnt#5 )
  (byte) irq_sprite_ptr#7 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#10 )
  (byte) irq_sprite_ypos#7 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#10 )
  (byte) irq_raster_next#7 ← phi( sprites_irq::@11/(byte) irq_raster_next#12 )
  (byte) irq_raster_next#3 ← (byte) irq_raster_next#7 + (byte/signed byte/word/signed word/dword/signed dword) 20
  (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#7 + (byte/signed byte/word/signed word/dword/signed dword) 21
  (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#7 + (byte/signed byte/word/signed word/dword/signed dword) 3
  to:sprites_irq::@7
sprites_irq::@7: scope:[sprites_irq]  from sprites_irq::@12 sprites_irq::@15 sprites_irq::@5
  (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@12/(byte) irq_sprite_ptr#3 sprites_irq::@15/(byte) irq_sprite_ptr#1 sprites_irq::@5/(byte) irq_sprite_ptr#2 )
  (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@12/(byte) irq_sprite_ypos#3 sprites_irq::@15/(byte) irq_sprite_ypos#13 sprites_irq::@5/(byte) irq_sprite_ypos#2 )
  (byte) irq_cnt#9 ← phi( sprites_irq::@12/(byte) irq_cnt#11 sprites_irq::@15/(byte) irq_cnt#12 sprites_irq::@5/(byte) irq_cnt#2 )
  (byte) irq_raster_next#8 ← phi( sprites_irq::@12/(byte) irq_raster_next#3 sprites_irq::@15/(byte) irq_raster_next#13 sprites_irq::@5/(byte) irq_raster_next#2 )
  *((byte*) RASTER#0) ← (byte) irq_raster_next#8
  *((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0
  to:sprites_irq::@return
sprites_irq::@return: scope:[sprites_irq]  from sprites_irq::@7
  (byte) irq_sprite_ptr#8 ← phi( sprites_irq::@7/(byte) irq_sprite_ptr#11 )
  (byte) irq_sprite_ypos#8 ← phi( sprites_irq::@7/(byte) irq_sprite_ypos#11 )
  (byte) irq_raster_next#9 ← phi( sprites_irq::@7/(byte) irq_raster_next#8 )
  (byte) irq_cnt#6 ← phi( sprites_irq::@7/(byte) irq_cnt#9 )
  (byte) irq_cnt#3 ← (byte) irq_cnt#6
  (byte) irq_raster_next#4 ← (byte) irq_raster_next#9
  (byte) irq_sprite_ypos#4 ← (byte) irq_sprite_ypos#8
  (byte) irq_sprite_ptr#4 ← (byte) irq_sprite_ptr#8
  return 
  to:@return
@7: scope:[]  from @10
  (byte) irq_cnt#19 ← phi( @10/(byte) irq_cnt#0 )
  (byte) render_screen_showing#5 ← phi( @10/(byte) render_screen_showing#6 )
  (byte) irq_sprite_ptr#17 ← phi( @10/(byte) irq_sprite_ptr#0 )
  (byte) irq_raster_next#17 ← phi( @10/(byte) irq_raster_next#20 )
  (byte) irq_sprite_ypos#14 ← phi( @10/(byte) irq_sprite_ypos#18 )
  (byte*) SIN#0 ← ((byte*)) (word/signed word/dword/signed dword) 5120
  (byte*) SIN_SPRITE#0 ← ((byte*)) (word/signed word/dword/signed dword) 10240
  kickasm(location (byte*) SIN#0) {{ .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }
 }}
  kickasm(location (byte*) SIN_SPRITE#0) {{ .fill $40, $ff
 }}
  (byte) sin_idx#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:@9
main: scope:[main]  from @9
  (byte*) SIN#23 ← phi( @9/(byte*) SIN#24 )
  (byte) sin_idx#33 ← phi( @9/(byte) sin_idx#16 )
  (byte*) SIN_SPRITE#14 ← phi( @9/(byte*) SIN_SPRITE#15 )
  (byte*) main::vicSelectGfxBank1_gfx#0 ← (byte*) PLAYFIELD_SCREEN_1#0
  to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main]  from main
  (byte*) SIN#22 ← phi( main/(byte*) SIN#23 )
  (byte) sin_idx#32 ← phi( main/(byte) sin_idx#33 )
  (byte*) SIN_SPRITE#13 ← phi( main/(byte*) SIN_SPRITE#14 )
  (byte*) main::vicSelectGfxBank1_gfx#1 ← phi( main/(byte*) main::vicSelectGfxBank1_gfx#0 )
  *((byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte*) main::vicSelectGfxBank1_toDd001_gfx#0 ← (byte*) main::vicSelectGfxBank1_gfx#1
  to:main::vicSelectGfxBank1_toDd001
main::vicSelectGfxBank1_toDd001: scope:[main]  from main::vicSelectGfxBank1
  (byte*) SIN#21 ← phi( main::vicSelectGfxBank1/(byte*) SIN#22 )
  (byte) sin_idx#31 ← phi( main::vicSelectGfxBank1/(byte) sin_idx#32 )
  (byte*) SIN_SPRITE#12 ← phi( main::vicSelectGfxBank1/(byte*) SIN_SPRITE#13 )
  (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 ← phi( main::vicSelectGfxBank1/(byte*) main::vicSelectGfxBank1_toDd001_gfx#0 )
  (word) main::vicSelectGfxBank1_toDd001_$0#0 ← ((word)) (byte*) main::vicSelectGfxBank1_toDd001_gfx#1
  (byte) main::vicSelectGfxBank1_toDd001_$1#0 ← > (word) main::vicSelectGfxBank1_toDd001_$0#0
  (byte) main::vicSelectGfxBank1_toDd001_$2#0 ← (byte) main::vicSelectGfxBank1_toDd001_$1#0 >> (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte/word/dword) main::vicSelectGfxBank1_toDd001_$3#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte) main::vicSelectGfxBank1_toDd001_$2#0
  (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte/word/dword) main::vicSelectGfxBank1_toDd001_$3#0
  to:main::vicSelectGfxBank1_toDd001_@return
main::vicSelectGfxBank1_toDd001_@return: scope:[main]  from main::vicSelectGfxBank1_toDd001
  (byte*) SIN#20 ← phi( main::vicSelectGfxBank1_toDd001/(byte*) SIN#21 )
  (byte) sin_idx#30 ← phi( main::vicSelectGfxBank1_toDd001/(byte) sin_idx#31 )
  (byte*) SIN_SPRITE#11 ← phi( main::vicSelectGfxBank1_toDd001/(byte*) SIN_SPRITE#12 )
  (byte) main::vicSelectGfxBank1_toDd001_return#2 ← phi( main::vicSelectGfxBank1_toDd001/(byte) main::vicSelectGfxBank1_toDd001_return#0 )
  (byte) main::vicSelectGfxBank1_toDd001_return#1 ← (byte) main::vicSelectGfxBank1_toDd001_return#2
  to:main::vicSelectGfxBank1_@1
main::vicSelectGfxBank1_@1: scope:[main]  from main::vicSelectGfxBank1_toDd001_@return
  (byte*) SIN#19 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte*) SIN#20 )
  (byte) sin_idx#29 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte) sin_idx#30 )
  (byte*) SIN_SPRITE#10 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte*) SIN_SPRITE#11 )
  (byte) main::vicSelectGfxBank1_toDd001_return#3 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte) main::vicSelectGfxBank1_toDd001_return#1 )
  (byte) main::vicSelectGfxBank1_$0#0 ← (byte) main::vicSelectGfxBank1_toDd001_return#3
  *((byte*) CIA2_PORT_A#0) ← (byte) main::vicSelectGfxBank1_$0#0
  to:main::@3
main::@3: scope:[main]  from main::vicSelectGfxBank1_@1
  (byte*) SIN#18 ← phi( main::vicSelectGfxBank1_@1/(byte*) SIN#19 )
  (byte) sin_idx#28 ← phi( main::vicSelectGfxBank1_@1/(byte) sin_idx#29 )
  (byte*) SIN_SPRITE#9 ← phi( main::vicSelectGfxBank1_@1/(byte*) SIN_SPRITE#10 )
  (byte*) main::toD0181_screen#0 ← (byte*) PLAYFIELD_SCREEN_1#0
  (byte*) main::toD0181_gfx#0 ← (byte*) PLAYFIELD_CHARSET#0
  to:main::toD0181
main::toD0181: scope:[main]  from main::@3
  (byte*) SIN#17 ← phi( main::@3/(byte*) SIN#18 )
  (byte) sin_idx#27 ← phi( main::@3/(byte) sin_idx#28 )
  (byte*) SIN_SPRITE#8 ← phi( main::@3/(byte*) SIN_SPRITE#9 )
  (byte*) main::toD0181_gfx#1 ← phi( main::@3/(byte*) main::toD0181_gfx#0 )
  (byte*) main::toD0181_screen#1 ← phi( main::@3/(byte*) main::toD0181_screen#0 )
  (word) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1
  (word) main::toD0181_$1#0 ← (word) main::toD0181_$0#0 & (word/signed word/dword/signed dword) 16383
  (word) main::toD0181_$2#0 ← (word) main::toD0181_$1#0 << (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) main::toD0181_$3#0 ← > (word) main::toD0181_$2#0
  (word) main::toD0181_$4#0 ← ((word)) (byte*) main::toD0181_gfx#1
  (byte) main::toD0181_$5#0 ← > (word) main::toD0181_$4#0
  (byte) main::toD0181_$6#0 ← (byte) main::toD0181_$5#0 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) main::toD0181_$7#0 ← (byte) main::toD0181_$6#0 & (byte/signed byte/word/signed word/dword/signed dword) 15
  (byte) main::toD0181_$8#0 ← (byte) main::toD0181_$3#0 | (byte) main::toD0181_$7#0
  (byte) main::toD0181_return#0 ← (byte) main::toD0181_$8#0
  to:main::toD0181_@return
main::toD0181_@return: scope:[main]  from main::toD0181
  (byte*) SIN#16 ← phi( main::toD0181/(byte*) SIN#17 )
  (byte) sin_idx#26 ← phi( main::toD0181/(byte) sin_idx#27 )
  (byte*) SIN_SPRITE#6 ← phi( main::toD0181/(byte*) SIN_SPRITE#8 )
  (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 )
  (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2
  to:main::@4
main::@4: scope:[main]  from main::toD0181_@return
  (byte*) SIN#15 ← phi( main::toD0181_@return/(byte*) SIN#16 )
  (byte) sin_idx#25 ← phi( main::toD0181_@return/(byte) sin_idx#26 )
  (byte*) SIN_SPRITE#4 ← phi( main::toD0181_@return/(byte*) SIN_SPRITE#6 )
  (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 )
  (byte~) main::$1 ← (byte) main::toD0181_return#3
  *((byte*) D018#0) ← (byte~) main::$1
  call sprites_init 
  to:main::@6
main::@6: scope:[main]  from main::@4
  (byte*) SIN#14 ← phi( main::@4/(byte*) SIN#15 )
  (byte) sin_idx#24 ← phi( main::@4/(byte) sin_idx#25 )
  (byte*) SIN_SPRITE#3 ← phi( main::@4/(byte*) SIN_SPRITE#4 )
  *((byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) 255
  (byte) main::xpos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte) main::ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte) main::s#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  to:main::@1
main::@1: scope:[main]  from main::@5 main::@6
  (byte*) SIN#13 ← phi( main::@5/(byte*) SIN#10 main::@6/(byte*) SIN#14 )
  (byte) sin_idx#23 ← phi( main::@5/(byte) sin_idx#20 main::@6/(byte) sin_idx#24 )
  (byte*) SIN_SPRITE#1 ← phi( main::@5/(byte*) SIN_SPRITE#2 main::@6/(byte*) SIN_SPRITE#3 )
  (byte) main::ypos#2 ← phi( main::@5/(byte) main::ypos#1 main::@6/(byte) main::ypos#0 )
  (byte) main::xpos#2 ← phi( main::@5/(byte) main::xpos#1 main::@6/(byte) main::xpos#0 )
  (byte) main::s#2 ← phi( main::@5/(byte) main::s#1 main::@6/(byte) main::s#0 )
  (byte~) main::$3 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::s2#0 ← (byte~) main::$3
  *((byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2
  *((byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2
  (byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::s#2 - (byte/signed byte/word/signed word/dword/signed dword) 3
  *((byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte/signed word/word/dword/signed dword~) main::$4
  (byte*) main::toSpritePtr2_sprite#0 ← (byte*) SIN_SPRITE#1
  to:main::toSpritePtr2
main::toSpritePtr2: scope:[main]  from main::@1
  (byte*) SIN#12 ← phi( main::@1/(byte*) SIN#13 )
  (byte) sin_idx#22 ← phi( main::@1/(byte) sin_idx#23 )
  (byte*) SIN_SPRITE#7 ← phi( main::@1/(byte*) SIN_SPRITE#1 )
  (byte) main::ypos#5 ← phi( main::@1/(byte) main::ypos#2 )
  (byte) main::xpos#5 ← phi( main::@1/(byte) main::xpos#2 )
  (byte) main::s#5 ← phi( main::@1/(byte) main::s#2 )
  (byte*) main::toSpritePtr2_sprite#1 ← phi( main::@1/(byte*) main::toSpritePtr2_sprite#0 )
  (word) main::toSpritePtr2_$0#0 ← ((word)) (byte*) main::toSpritePtr2_sprite#1
  (word) main::toSpritePtr2_$1#0 ← (word) main::toSpritePtr2_$0#0 >> (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte) main::toSpritePtr2_$2#0 ← ((byte)) (word) main::toSpritePtr2_$1#0
  (byte) main::toSpritePtr2_return#0 ← (byte) main::toSpritePtr2_$2#0
  to:main::toSpritePtr2_@return
main::toSpritePtr2_@return: scope:[main]  from main::toSpritePtr2
  (byte*) SIN#11 ← phi( main::toSpritePtr2/(byte*) SIN#12 )
  (byte) sin_idx#21 ← phi( main::toSpritePtr2/(byte) sin_idx#22 )
  (byte*) SIN_SPRITE#5 ← phi( main::toSpritePtr2/(byte*) SIN_SPRITE#7 )
  (byte) main::ypos#4 ← phi( main::toSpritePtr2/(byte) main::ypos#5 )
  (byte) main::xpos#4 ← phi( main::toSpritePtr2/(byte) main::xpos#5 )
  (byte) main::s#4 ← phi( main::toSpritePtr2/(byte) main::s#5 )
  (byte) main::toSpritePtr2_return#2 ← phi( main::toSpritePtr2/(byte) main::toSpritePtr2_return#0 )
  (byte) main::toSpritePtr2_return#1 ← (byte) main::toSpritePtr2_return#2
  to:main::@5
main::@5: scope:[main]  from main::toSpritePtr2_@return
  (byte*) SIN#10 ← phi( main::toSpritePtr2_@return/(byte*) SIN#11 )
  (byte) sin_idx#20 ← phi( main::toSpritePtr2_@return/(byte) sin_idx#21 )
  (byte*) SIN_SPRITE#2 ← phi( main::toSpritePtr2_@return/(byte*) SIN_SPRITE#5 )
  (byte) main::ypos#3 ← phi( main::toSpritePtr2_@return/(byte) main::ypos#4 )
  (byte) main::xpos#3 ← phi( main::toSpritePtr2_@return/(byte) main::xpos#4 )
  (byte) main::s#3 ← phi( main::toSpritePtr2_@return/(byte) main::s#4 )
  (byte) main::toSpritePtr2_return#3 ← phi( main::toSpritePtr2_@return/(byte) main::toSpritePtr2_return#1 )
  (byte~) main::$5 ← (byte) main::toSpritePtr2_return#3
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#3) ← (byte~) main::$5
  (byte) main::xpos#1 ← (byte) main::xpos#3 + (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte) main::ypos#1 ← (byte) main::ypos#3 + (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte) main::s#1 ← (byte) main::s#3 + rangenext(4,7)
  (bool~) main::$6 ← (byte) main::s#1 != rangelast(4,7)
  if((bool~) main::$6) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@5
  (byte*) SIN#9 ← phi( main::@5/(byte*) SIN#10 )
  (byte) sin_idx#17 ← phi( main::@5/(byte) sin_idx#20 )
  call sprites_irq_init 
  to:main::@7
main::@7: scope:[main]  from main::@2
  (byte*) SIN#8 ← phi( main::@2/(byte*) SIN#9 )
  (byte) sin_idx#12 ← phi( main::@2/(byte) sin_idx#17 )
  call loop 
  to:main::@8
main::@8: scope:[main]  from main::@7
  (byte) sin_idx#6 ← phi( main::@7/(byte) sin_idx#4 )
  (byte) sin_idx#1 ← (byte) sin_idx#6
  to:main::@return
main::@return: scope:[main]  from main::@8
  (byte) sin_idx#7 ← phi( main::@8/(byte) sin_idx#1 )
  (byte) sin_idx#2 ← (byte) sin_idx#7
  return 
  to:@return
loop: scope:[loop]  from main::@7
  (byte*) SIN#6 ← phi( main::@7/(byte*) SIN#8 )
  (byte) sin_idx#18 ← phi( main::@7/(byte) sin_idx#12 )
  to:loop::@1
loop::@1: scope:[loop]  from loop loop::@9
  (byte*) SIN#5 ← phi( loop/(byte*) SIN#6 loop::@9/(byte*) SIN#7 )
  (byte) sin_idx#15 ← phi( loop/(byte) sin_idx#18 loop::@9/(byte) sin_idx#3 )
  if(true) goto loop::@2
  to:loop::@return
loop::@2: scope:[loop]  from loop::@1
  (byte*) SIN#4 ← phi( loop::@1/(byte*) SIN#5 )
  (byte) sin_idx#19 ← phi( loop::@1/(byte) sin_idx#15 )
  to:loop::@4
loop::@4: scope:[loop]  from loop::@2 loop::@4
  (byte*) SIN#3 ← phi( loop::@2/(byte*) SIN#4 loop::@4/(byte*) SIN#3 )
  (byte) sin_idx#13 ← phi( loop::@2/(byte) sin_idx#19 loop::@4/(byte) sin_idx#13 )
  (bool~) loop::$0 ← *((byte*) RASTER#0) != (byte/word/signed word/dword/signed dword) 255
  if((bool~) loop::$0) goto loop::@4
  to:loop::@8
loop::@8: scope:[loop]  from loop::@4
  (byte*) SIN#2 ← phi( loop::@4/(byte*) SIN#3 )
  (byte) sin_idx#8 ← phi( loop::@4/(byte) sin_idx#13 )
  (byte) loop::idx#0 ← (byte) sin_idx#8
  (byte) loop::s#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  to:loop::@5
loop::@5: scope:[loop]  from loop::@5 loop::@8
  (byte) sin_idx#14 ← phi( loop::@5/(byte) sin_idx#14 loop::@8/(byte) sin_idx#8 )
  (byte) loop::idx#2 ← phi( loop::@5/(byte) loop::idx#1 loop::@8/(byte) loop::idx#0 )
  (byte*) SIN#1 ← phi( loop::@5/(byte*) SIN#1 loop::@8/(byte*) SIN#2 )
  (byte) loop::s#2 ← phi( loop::@5/(byte) loop::s#1 loop::@8/(byte) loop::s#0 )
  (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((byte*) SIN#1 + (byte) loop::idx#2)
  (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte) loop::s#1 ← (byte) loop::s#2 + rangenext(4,7)
  (bool~) loop::$2 ← (byte) loop::s#1 != rangelast(4,7)
  if((bool~) loop::$2) goto loop::@5
  to:loop::@9
loop::@9: scope:[loop]  from loop::@5
  (byte*) SIN#7 ← phi( loop::@5/(byte*) SIN#1 )
  (byte) sin_idx#9 ← phi( loop::@5/(byte) sin_idx#14 )
  (byte) sin_idx#3 ← ++ (byte) sin_idx#9
  to:loop::@1
loop::@return: scope:[loop]  from loop::@1
  (byte) sin_idx#10 ← phi( loop::@1/(byte) sin_idx#15 )
  (byte) sin_idx#4 ← (byte) sin_idx#10
  return 
  to:@return
@9: scope:[]  from @7
  (byte*) SIN#24 ← phi( @7/(byte*) SIN#0 )
  (byte*) SIN_SPRITE#15 ← phi( @7/(byte*) SIN_SPRITE#0 )
  (byte) irq_cnt#17 ← phi( @7/(byte) irq_cnt#19 )
  (byte) render_screen_showing#4 ← phi( @7/(byte) render_screen_showing#5 )
  (byte) irq_sprite_ptr#14 ← phi( @7/(byte) irq_sprite_ptr#17 )
  (byte) sin_idx#16 ← phi( @7/(byte) sin_idx#0 )
  (byte) irq_raster_next#10 ← phi( @7/(byte) irq_raster_next#17 )
  (byte) irq_sprite_ypos#9 ← phi( @7/(byte) irq_sprite_ypos#14 )
  call main 
  to:@11
@11: scope:[]  from @9
  (byte) sin_idx#11 ← phi( @9/(byte) sin_idx#2 )
  (byte) sin_idx#5 ← (byte) sin_idx#11
  to:@end
@end: scope:[]  from @11

SYMBOL TABLE SSA
(byte*~) $0
(byte*~) $1
(byte~) $2
(byte/signed word/word/dword/signed dword~) $3
(byte/signed word/word/dword/signed dword~) $4
(byte~) $5
(byte/signed word/word/dword/signed dword~) $6
(label) @10
(label) @11
(label) @4
(label) @5
(label) @7
(label) @9
(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_RASTER_FIRST
(byte) IRQ_RASTER_FIRST#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*) PLAYFIELD_CHARSET
(byte*) PLAYFIELD_CHARSET#0
(byte*) PLAYFIELD_COLORS_ORIGINAL
(byte*) PLAYFIELD_COLORS_ORIGINAL#0
(byte) PLAYFIELD_COLS
(byte) PLAYFIELD_COLS#0
(byte) PLAYFIELD_LINES
(byte) PLAYFIELD_LINES#0
(byte*) PLAYFIELD_SCREEN_1
(byte*) PLAYFIELD_SCREEN_1#0
(byte*) PLAYFIELD_SCREEN_2
(byte*) PLAYFIELD_SCREEN_2#0
(byte*) PLAYFIELD_SCREEN_ORIGINAL
(byte*) PLAYFIELD_SCREEN_ORIGINAL#0
(byte*) PLAYFIELD_SPRITES
(byte*) PLAYFIELD_SPRITES#0
(byte*) PLAYFIELD_SPRITE_PTRS_1
(byte*) PLAYFIELD_SPRITE_PTRS_1#0
(byte*) PLAYFIELD_SPRITE_PTRS_2
(byte*) PLAYFIELD_SPRITE_PTRS_2#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*) SIN
(byte*) SIN#0
(byte*) SIN#1
(byte*) SIN#10
(byte*) SIN#11
(byte*) SIN#12
(byte*) SIN#13
(byte*) SIN#14
(byte*) SIN#15
(byte*) SIN#16
(byte*) SIN#17
(byte*) SIN#18
(byte*) SIN#19
(byte*) SIN#2
(byte*) SIN#20
(byte*) SIN#21
(byte*) SIN#22
(byte*) SIN#23
(byte*) SIN#24
(byte*) SIN#3
(byte*) SIN#4
(byte*) SIN#5
(byte*) SIN#6
(byte*) SIN#7
(byte*) SIN#8
(byte*) SIN#9
(byte*) SIN_SPRITE
(byte*) SIN_SPRITE#0
(byte*) SIN_SPRITE#1
(byte*) SIN_SPRITE#10
(byte*) SIN_SPRITE#11
(byte*) SIN_SPRITE#12
(byte*) SIN_SPRITE#13
(byte*) SIN_SPRITE#14
(byte*) SIN_SPRITE#15
(byte*) SIN_SPRITE#2
(byte*) SIN_SPRITE#3
(byte*) SIN_SPRITE#4
(byte*) SIN_SPRITE#5
(byte*) SIN_SPRITE#6
(byte*) SIN_SPRITE#7
(byte*) SIN_SPRITE#8
(byte*) SIN_SPRITE#9
(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_FIRST_YPOS
(byte) SPRITES_FIRST_YPOS#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
(byte) current_piece_char
(byte*) current_piece_gfx
(byte) current_xpos
(byte) current_ypos
(byte) game_over
(byte) game_over#0
(byte) irq_cnt
(byte) irq_cnt#0
(byte) irq_cnt#1
(byte) irq_cnt#10
(byte) irq_cnt#11
(byte) irq_cnt#12
(byte) irq_cnt#13
(byte) irq_cnt#14
(byte) irq_cnt#15
(byte) irq_cnt#16
(byte) irq_cnt#17
(byte) irq_cnt#18
(byte) irq_cnt#19
(byte) irq_cnt#2
(byte) irq_cnt#3
(byte) irq_cnt#4
(byte) irq_cnt#5
(byte) irq_cnt#6
(byte) irq_cnt#7
(byte) irq_cnt#8
(byte) irq_cnt#9
(byte) irq_raster_next
(byte) irq_raster_next#0
(byte) irq_raster_next#1
(byte) irq_raster_next#10
(byte) irq_raster_next#11
(byte) irq_raster_next#12
(byte) irq_raster_next#13
(byte) irq_raster_next#14
(byte) irq_raster_next#15
(byte) irq_raster_next#16
(byte) irq_raster_next#17
(byte) irq_raster_next#18
(byte) irq_raster_next#19
(byte) irq_raster_next#2
(byte) irq_raster_next#20
(byte) irq_raster_next#21
(byte) irq_raster_next#22
(byte) irq_raster_next#23
(byte) irq_raster_next#3
(byte) irq_raster_next#4
(byte) irq_raster_next#5
(byte) irq_raster_next#6
(byte) irq_raster_next#7
(byte) irq_raster_next#8
(byte) irq_raster_next#9
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0
(byte) irq_sprite_ptr#1
(byte) irq_sprite_ptr#10
(byte) irq_sprite_ptr#11
(byte) irq_sprite_ptr#12
(byte) irq_sprite_ptr#13
(byte) irq_sprite_ptr#14
(byte) irq_sprite_ptr#15
(byte) irq_sprite_ptr#16
(byte) irq_sprite_ptr#17
(byte) irq_sprite_ptr#2
(byte) irq_sprite_ptr#3
(byte) irq_sprite_ptr#4
(byte) irq_sprite_ptr#5
(byte) irq_sprite_ptr#6
(byte) irq_sprite_ptr#7
(byte) irq_sprite_ptr#8
(byte) irq_sprite_ptr#9
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0
(byte) irq_sprite_ypos#1
(byte) irq_sprite_ypos#10
(byte) irq_sprite_ypos#11
(byte) irq_sprite_ypos#12
(byte) irq_sprite_ypos#13
(byte) irq_sprite_ypos#14
(byte) irq_sprite_ypos#15
(byte) irq_sprite_ypos#16
(byte) irq_sprite_ypos#17
(byte) irq_sprite_ypos#18
(byte) irq_sprite_ypos#19
(byte) irq_sprite_ypos#2
(byte) irq_sprite_ypos#20
(byte) irq_sprite_ypos#21
(byte) irq_sprite_ypos#22
(byte) irq_sprite_ypos#23
(byte) irq_sprite_ypos#3
(byte) irq_sprite_ypos#4
(byte) irq_sprite_ypos#5
(byte) irq_sprite_ypos#6
(byte) irq_sprite_ypos#7
(byte) irq_sprite_ypos#8
(byte) irq_sprite_ypos#9
(byte) level
(byte) level#0
(byte) level_bcd
(byte) level_bcd#0
(word) lines_bcd
(word) lines_bcd#0
(void()) loop()
(bool~) loop::$0
(byte~) loop::$1
(bool~) loop::$2
(label) loop::@1
(label) loop::@2
(label) loop::@4
(label) loop::@5
(label) loop::@8
(label) loop::@9
(label) loop::@return
(byte) loop::idx
(byte) loop::idx#0
(byte) loop::idx#1
(byte) loop::idx#2
(byte) loop::s
(byte) loop::s#0
(byte) loop::s#1
(byte) loop::s#2
(void()) main()
(byte~) main::$1
(byte~) main::$3
(byte/signed word/word/dword/signed dword~) main::$4
(byte~) main::$5
(bool~) main::$6
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@return
(byte) main::s
(byte) main::s#0
(byte) main::s#1
(byte) main::s#2
(byte) main::s#3
(byte) main::s#4
(byte) main::s#5
(byte) main::s2
(byte) main::s2#0
(label) main::toD0181
(word~) main::toD0181_$0
(word) main::toD0181_$0#0
(word~) main::toD0181_$1
(word) main::toD0181_$1#0
(word~) main::toD0181_$2
(word) main::toD0181_$2#0
(byte~) main::toD0181_$3
(byte) main::toD0181_$3#0
(word~) main::toD0181_$4
(word) main::toD0181_$4#0
(byte~) main::toD0181_$5
(byte) main::toD0181_$5#0
(byte~) main::toD0181_$6
(byte) main::toD0181_$6#0
(byte~) main::toD0181_$7
(byte) main::toD0181_$7#0
(byte~) main::toD0181_$8
(byte) main::toD0181_$8#0
(label) main::toD0181_@return
(byte*) main::toD0181_gfx
(byte*) main::toD0181_gfx#0
(byte*) main::toD0181_gfx#1
(byte) main::toD0181_return
(byte) main::toD0181_return#0
(byte) main::toD0181_return#1
(byte) main::toD0181_return#2
(byte) main::toD0181_return#3
(byte*) main::toD0181_screen
(byte*) main::toD0181_screen#0
(byte*) main::toD0181_screen#1
(label) main::toSpritePtr2
(word~) main::toSpritePtr2_$0
(word) main::toSpritePtr2_$0#0
(word~) main::toSpritePtr2_$1
(word) main::toSpritePtr2_$1#0
(byte~) main::toSpritePtr2_$2
(byte) main::toSpritePtr2_$2#0
(label) main::toSpritePtr2_@return
(byte) main::toSpritePtr2_return
(byte) main::toSpritePtr2_return#0
(byte) main::toSpritePtr2_return#1
(byte) main::toSpritePtr2_return#2
(byte) main::toSpritePtr2_return#3
(byte*) main::toSpritePtr2_sprite
(byte*) main::toSpritePtr2_sprite#0
(byte*) main::toSpritePtr2_sprite#1
(label) main::vicSelectGfxBank1
(byte~) main::vicSelectGfxBank1_$0
(byte) main::vicSelectGfxBank1_$0#0
(label) main::vicSelectGfxBank1_@1
(byte*) main::vicSelectGfxBank1_gfx
(byte*) main::vicSelectGfxBank1_gfx#0
(byte*) main::vicSelectGfxBank1_gfx#1
(label) main::vicSelectGfxBank1_toDd001
(word~) main::vicSelectGfxBank1_toDd001_$0
(word) main::vicSelectGfxBank1_toDd001_$0#0
(byte~) main::vicSelectGfxBank1_toDd001_$1
(byte) main::vicSelectGfxBank1_toDd001_$1#0
(byte~) main::vicSelectGfxBank1_toDd001_$2
(byte) main::vicSelectGfxBank1_toDd001_$2#0
(byte/word/dword~) main::vicSelectGfxBank1_toDd001_$3
(byte/word/dword) main::vicSelectGfxBank1_toDd001_$3#0
(label) main::vicSelectGfxBank1_toDd001_@return
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte*) main::vicSelectGfxBank1_toDd001_gfx#0
(byte*) main::vicSelectGfxBank1_toDd001_gfx#1
(byte) main::vicSelectGfxBank1_toDd001_return
(byte) main::vicSelectGfxBank1_toDd001_return#0
(byte) main::vicSelectGfxBank1_toDd001_return#1
(byte) main::vicSelectGfxBank1_toDd001_return#2
(byte) main::vicSelectGfxBank1_toDd001_return#3
(byte) main::xpos
(byte) main::xpos#0
(byte) main::xpos#1
(byte) main::xpos#2
(byte) main::xpos#3
(byte) main::xpos#4
(byte) main::xpos#5
(byte) main::ypos
(byte) main::ypos#0
(byte) main::ypos#1
(byte) main::ypos#2
(byte) main::ypos#3
(byte) main::ypos#4
(byte) main::ypos#5
(byte[$2]) playfield
(byte[$2]) playfield#0
(byte) render_screen_render
(byte) render_screen_render#0
(byte) render_screen_show
(byte) render_screen_show#0
(byte) render_screen_showing
(byte) render_screen_showing#0
(byte) render_screen_showing#1
(byte) render_screen_showing#2
(byte) render_screen_showing#3
(byte) render_screen_showing#4
(byte) render_screen_showing#5
(byte) render_screen_showing#6
(byte) render_screen_showing#7
(byte) render_screen_showing#8
(byte) render_screen_showing#9
(dword) score_bcd
(dword) score_bcd#0
(byte) sin_idx
(byte) sin_idx#0
(byte) sin_idx#1
(byte) sin_idx#10
(byte) sin_idx#11
(byte) sin_idx#12
(byte) sin_idx#13
(byte) sin_idx#14
(byte) sin_idx#15
(byte) sin_idx#16
(byte) sin_idx#17
(byte) sin_idx#18
(byte) sin_idx#19
(byte) sin_idx#2
(byte) sin_idx#20
(byte) sin_idx#21
(byte) sin_idx#22
(byte) sin_idx#23
(byte) sin_idx#24
(byte) sin_idx#25
(byte) sin_idx#26
(byte) sin_idx#27
(byte) sin_idx#28
(byte) sin_idx#29
(byte) sin_idx#3
(byte) sin_idx#30
(byte) sin_idx#31
(byte) sin_idx#32
(byte) sin_idx#33
(byte) sin_idx#4
(byte) sin_idx#5
(byte) sin_idx#6
(byte) sin_idx#7
(byte) sin_idx#8
(byte) sin_idx#9
(void()) sprites_init()
(byte/signed byte/word/signed word/dword/signed dword~) sprites_init::$0
(byte/signed word/word/dword/signed dword/signed byte~) sprites_init::$1
(byte~) sprites_init::$2
(byte/signed word/word/dword/signed dword~) sprites_init::$3
(bool~) sprites_init::$4
(label) sprites_init::@1
(label) sprites_init::@return
(byte) sprites_init::s
(byte) sprites_init::s#0
(byte) sprites_init::s#1
(byte) sprites_init::s#2
(byte) sprites_init::s2
(byte) sprites_init::s2#0
(byte) sprites_init::xpos
(byte) sprites_init::xpos#0
(byte) sprites_init::xpos#1
(byte) sprites_init::xpos#2
interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
(byte/signed word/word/dword/signed dword~) sprites_irq::$0
(bool~) sprites_irq::$1
(bool~) sprites_irq::$2
(bool~) sprites_irq::$3
(bool~) sprites_irq::$4
(byte~) sprites_irq::$5
(label) sprites_irq::@1
(label) sprites_irq::@11
(label) sprites_irq::@12
(label) sprites_irq::@15
(label) sprites_irq::@2
(label) sprites_irq::@3
(label) sprites_irq::@4
(label) sprites_irq::@5
(label) sprites_irq::@7
(label) sprites_irq::@8
(label) sprites_irq::@9
(label) sprites_irq::@return
(byte) sprites_irq::ptr
(byte) sprites_irq::ptr#0
(byte) sprites_irq::ptr#1
(byte) sprites_irq::ptr#2
(byte) sprites_irq::ptr#3
(byte) sprites_irq::ptr#4
(byte) sprites_irq::ptr#5
(byte) sprites_irq::ptr#6
(byte) sprites_irq::raster_sprite_gfx_modify
(byte) sprites_irq::raster_sprite_gfx_modify#0
(byte) sprites_irq::raster_sprite_gfx_modify#1
(label) sprites_irq::toSpritePtr2
(word~) sprites_irq::toSpritePtr2_$0
(word) sprites_irq::toSpritePtr2_$0#0
(word~) sprites_irq::toSpritePtr2_$1
(word) sprites_irq::toSpritePtr2_$1#0
(byte~) sprites_irq::toSpritePtr2_$2
(byte) sprites_irq::toSpritePtr2_$2#0
(label) sprites_irq::toSpritePtr2_@return
(byte) sprites_irq::toSpritePtr2_return
(byte) sprites_irq::toSpritePtr2_return#0
(byte) sprites_irq::toSpritePtr2_return#1
(byte) sprites_irq::toSpritePtr2_return#2
(byte) sprites_irq::toSpritePtr2_return#3
(byte*) sprites_irq::toSpritePtr2_sprite
(byte*) sprites_irq::toSpritePtr2_sprite#0
(byte*) sprites_irq::toSpritePtr2_sprite#1
(byte) sprites_irq::ypos
(byte) sprites_irq::ypos#0
(void()) sprites_irq_init()
(void()*~) sprites_irq_init::$0
(label) sprites_irq_init::@return
(label) toSpritePtr1
(word~) toSpritePtr1_$0
(word) toSpritePtr1_$0#0
(word~) toSpritePtr1_$1
(word) toSpritePtr1_$1#0
(byte~) toSpritePtr1_$2
(byte) toSpritePtr1_$2#0
(label) toSpritePtr1_@return
(byte) toSpritePtr1_return
(byte) toSpritePtr1_return#0
(byte) toSpritePtr1_return#1
(byte) toSpritePtr1_return#2
(byte) toSpritePtr1_return#3
(byte*) toSpritePtr1_sprite
(byte*) toSpritePtr1_sprite#0
(byte*) toSpritePtr1_sprite#1

Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte/signed word/word/dword/signed dword~) $3 (byte) irq_raster_next#0 (byte) irq_raster_next#23 (byte) irq_raster_next#21 (byte) irq_raster_next#20 (byte) irq_raster_next#17 (byte) irq_raster_next#10 
Alias candidate removed (volatile)(byte) irq_sprite_ypos#0 = (byte/signed word/word/dword/signed dword~) $4 (byte) irq_sprite_ypos#22 (byte) irq_sprite_ypos#19 (byte) irq_sprite_ypos#18 (byte) irq_sprite_ypos#14 (byte) irq_sprite_ypos#9 
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte/signed word/word/dword/signed dword~) $6 (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#14 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte/signed word/word/dword/signed dword~) sprites_irq::$0 
Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#2 (byte) sprites_irq::toSpritePtr2_return#1 (byte) sprites_irq::toSpritePtr2_return#3 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 
Alias (byte*) PLAYFIELD_SPRITE_PTRS_1#0 = (byte*~) $0 
Alias (byte*) PLAYFIELD_SPRITE_PTRS_2#0 = (byte*~) $1 
Alias (byte) sprites_init::xpos#0 = (byte/signed word/word/dword/signed dword/signed byte~) sprites_init::$1 
Alias (byte) sprites_init::s2#0 = (byte~) sprites_init::$2 
Alias (byte) sprites_init::xpos#1 = (byte/signed word/word/dword/signed dword~) sprites_init::$3 
Alias (byte) render_screen_showing#0 = (byte) render_screen_showing#9 (byte) render_screen_showing#8 (byte) render_screen_showing#7 (byte) render_screen_showing#6 (byte) render_screen_showing#5 (byte) render_screen_showing#4 
Alias (byte*) PLAYFIELD_SPRITES#0 = (byte*) toSpritePtr1_sprite#0 (byte*) toSpritePtr1_sprite#1 
Alias (byte) toSpritePtr1_return#0 = (byte) toSpritePtr1_$2#0 (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#1 (byte) toSpritePtr1_return#3 (byte~) $5 
Alias (byte) irq_sprite_ptr#15 = (byte) irq_sprite_ptr#5 (byte) irq_sprite_ptr#9 (byte) irq_sprite_ptr#16 
Alias (byte) render_screen_showing#1 = (byte) render_screen_showing#2 
Alias (byte) irq_cnt#10 = (byte) irq_cnt#13 (byte) irq_cnt#7 (byte) irq_cnt#8 
Alias (byte) irq_raster_next#14 = (byte) irq_raster_next#18 (byte) irq_raster_next#22 (byte) irq_raster_next#15 
Alias (byte) irq_sprite_ypos#15 = (byte) irq_sprite_ypos#20 (byte) irq_sprite_ypos#23 (byte) irq_sprite_ypos#16 
Alias (byte) sprites_irq::ptr#0 = (byte) sprites_irq::ptr#5 (byte) sprites_irq::ptr#6 
Alias (byte) irq_raster_next#11 = (byte) irq_raster_next#6 (byte) irq_raster_next#12 (byte) irq_raster_next#7 
Alias (byte) irq_cnt#1 = (byte) irq_cnt#18 (byte) irq_cnt#16 (byte) irq_cnt#14 (byte) irq_cnt#12 (byte) irq_cnt#5 (byte) irq_cnt#11 
Alias (byte*) sprites_irq::toSpritePtr2_sprite#0 = (byte*) sprites_irq::toSpritePtr2_sprite#1 
Alias (byte) irq_raster_next#1 = (byte) irq_raster_next#19 (byte) irq_raster_next#16 (byte) irq_raster_next#13 
Alias (byte) irq_sprite_ypos#1 = (byte) irq_sprite_ypos#21 (byte) irq_sprite_ypos#17 (byte) irq_sprite_ypos#13 
Alias (byte) irq_sprite_ypos#10 = (byte) irq_sprite_ypos#12 (byte) irq_sprite_ypos#6 (byte) irq_sprite_ypos#7 
Alias (byte) irq_sprite_ptr#10 = (byte) irq_sprite_ptr#13 (byte) irq_sprite_ptr#6 (byte) irq_sprite_ptr#7 
Alias (byte) irq_cnt#3 = (byte) irq_cnt#6 (byte) irq_cnt#9 
Alias (byte) irq_raster_next#4 = (byte) irq_raster_next#9 (byte) irq_raster_next#8 
Alias (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#8 (byte) irq_sprite_ypos#4 
Alias (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#8 (byte) irq_sprite_ptr#4 
Alias (byte) irq_cnt#0 = (byte) irq_cnt#19 (byte) irq_cnt#17 
Alias (byte*) main::vicSelectGfxBank1_gfx#0 = (byte*) main::vicSelectGfxBank1_gfx#1 (byte*) main::vicSelectGfxBank1_toDd001_gfx#0 (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 
Alias (byte*) SIN_SPRITE#10 = (byte*) SIN_SPRITE#13 (byte*) SIN_SPRITE#14 (byte*) SIN_SPRITE#12 (byte*) SIN_SPRITE#11 (byte*) SIN_SPRITE#9 (byte*) SIN_SPRITE#8 (byte*) SIN_SPRITE#6 (byte*) SIN_SPRITE#4 (byte*) SIN_SPRITE#3 
Alias (byte) sin_idx#24 = (byte) sin_idx#32 (byte) sin_idx#33 (byte) sin_idx#31 (byte) sin_idx#30 (byte) sin_idx#29 (byte) sin_idx#28 (byte) sin_idx#27 (byte) sin_idx#26 (byte) sin_idx#25 
Alias (byte*) SIN#14 = (byte*) SIN#22 (byte*) SIN#23 (byte*) SIN#21 (byte*) SIN#20 (byte*) SIN#19 (byte*) SIN#18 (byte*) SIN#17 (byte*) SIN#16 (byte*) SIN#15 
Alias (byte) main::vicSelectGfxBank1_toDd001_return#0 = (byte/word/dword) main::vicSelectGfxBank1_toDd001_$3#0 (byte) main::vicSelectGfxBank1_toDd001_return#2 (byte) main::vicSelectGfxBank1_toDd001_return#1 (byte) main::vicSelectGfxBank1_toDd001_return#3 (byte) main::vicSelectGfxBank1_$0#0 
Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 
Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 
Alias (byte) main::toD0181_return#0 = (byte) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 
Alias (byte) main::s2#0 = (byte~) main::$3 
Alias (byte*) main::toSpritePtr2_sprite#0 = (byte*) main::toSpritePtr2_sprite#1 
Alias (byte) main::s#2 = (byte) main::s#5 (byte) main::s#4 (byte) main::s#3 
Alias (byte) main::xpos#2 = (byte) main::xpos#5 (byte) main::xpos#4 (byte) main::xpos#3 
Alias (byte) main::ypos#2 = (byte) main::ypos#5 (byte) main::ypos#4 (byte) main::ypos#3 
Alias (byte*) SIN_SPRITE#1 = (byte*) SIN_SPRITE#7 (byte*) SIN_SPRITE#5 (byte*) SIN_SPRITE#2 
Alias (byte) sin_idx#12 = (byte) sin_idx#22 (byte) sin_idx#23 (byte) sin_idx#21 (byte) sin_idx#20 (byte) sin_idx#17 
Alias (byte*) SIN#10 = (byte*) SIN#12 (byte*) SIN#13 (byte*) SIN#11 (byte*) SIN#9 (byte*) SIN#8 
Alias (byte) main::toSpritePtr2_return#0 = (byte) main::toSpritePtr2_$2#0 (byte) main::toSpritePtr2_return#2 (byte) main::toSpritePtr2_return#1 (byte) main::toSpritePtr2_return#3 (byte~) main::$5 
Alias (byte) sin_idx#1 = (byte) sin_idx#6 (byte) sin_idx#7 (byte) sin_idx#2 
Alias (byte) sin_idx#10 = (byte) sin_idx#19 (byte) sin_idx#15 (byte) sin_idx#4 
Alias (byte*) SIN#4 = (byte*) SIN#5 
Alias (byte) sin_idx#13 = (byte) sin_idx#8 
Alias (byte*) SIN#2 = (byte*) SIN#3 
Alias (byte) sin_idx#14 = (byte) sin_idx#9 
Alias (byte*) SIN#1 = (byte*) SIN#7 
Alias (byte) sin_idx#0 = (byte) sin_idx#16 
Alias (byte*) SIN_SPRITE#0 = (byte*) SIN_SPRITE#15 
Alias (byte*) SIN#0 = (byte*) SIN#24 
Alias (byte) sin_idx#11 = (byte) sin_idx#5 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte/signed word/word/dword/signed dword~) $3 (byte) irq_raster_next#0 (byte) irq_raster_next#23 (byte) irq_raster_next#21 (byte) irq_raster_next#20 (byte) irq_raster_next#17 (byte) irq_raster_next#10 
Alias candidate removed (volatile)(byte) irq_sprite_ypos#0 = (byte/signed word/word/dword/signed dword~) $4 (byte) irq_sprite_ypos#22 (byte) irq_sprite_ypos#19 (byte) irq_sprite_ypos#18 (byte) irq_sprite_ypos#14 (byte) irq_sprite_ypos#9 
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte/signed word/word/dword/signed dword~) $6 (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#14 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte/signed word/word/dword/signed dword~) sprites_irq::$0 
Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#2 (byte) sprites_irq::toSpritePtr2_return#1 (byte) sprites_irq::toSpritePtr2_return#3 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 
Alias (byte) irq_cnt#10 = (byte) irq_cnt#4 
Alias (byte) irq_raster_next#11 = (byte) irq_raster_next#14 
Alias (byte) irq_sprite_ypos#10 = (byte) irq_sprite_ypos#15 
Alias (byte) irq_sprite_ptr#10 = (byte) irq_sprite_ptr#15 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte/signed word/word/dword/signed dword~) $3 (byte) irq_raster_next#0 (byte) irq_raster_next#23 (byte) irq_raster_next#21 (byte) irq_raster_next#20 (byte) irq_raster_next#17 (byte) irq_raster_next#10 
Alias candidate removed (volatile)(byte) irq_sprite_ypos#0 = (byte/signed word/word/dword/signed dword~) $4 (byte) irq_sprite_ypos#22 (byte) irq_sprite_ypos#19 (byte) irq_sprite_ypos#18 (byte) irq_sprite_ypos#14 (byte) irq_sprite_ypos#9 
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte/signed word/word/dword/signed dword~) $6 (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#14 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte/signed word/word/dword/signed dword~) sprites_irq::$0 
Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#2 (byte) sprites_irq::toSpritePtr2_return#1 (byte) sprites_irq::toSpritePtr2_return#3 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 
Self Phi Eliminated (byte) sprites_irq::raster_sprite_gfx_modify#1
Self Phi Eliminated (byte) irq_sprite_ptr#10
Self Phi Eliminated (byte) render_screen_showing#1
Self Phi Eliminated (byte) irq_cnt#10
Self Phi Eliminated (byte) irq_raster_next#11
Self Phi Eliminated (byte) irq_sprite_ypos#10
Self Phi Eliminated (byte*) SIN_SPRITE#1
Self Phi Eliminated (byte) sin_idx#12
Self Phi Eliminated (byte*) SIN#10
Self Phi Eliminated (byte) sin_idx#13
Self Phi Eliminated (byte*) SIN#2
Self Phi Eliminated (byte*) SIN#1
Self Phi Eliminated (byte) sin_idx#14
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte) irq_sprite_ypos#22 (byte) irq_sprite_ypos#0
Redundant Phi (byte) irq_raster_next#23 (byte) irq_raster_next#0
Redundant Phi (byte) irq_sprite_ypos#19 (byte) irq_sprite_ypos#22
Redundant Phi (byte) irq_raster_next#21 (byte) irq_raster_next#23
Redundant Phi (byte) irq_sprite_ypos#18 (byte) irq_sprite_ypos#19
Redundant Phi (byte) irq_raster_next#20 (byte) irq_raster_next#21
Redundant Phi (byte) irq_sprite_ypos#5 (byte) irq_sprite_ypos#9
Redundant Phi (byte) irq_raster_next#5 (byte) irq_raster_next#10
Redundant Phi (byte) irq_sprite_ptr#12 (byte) irq_sprite_ptr#14
Redundant Phi (byte) render_screen_showing#3 (byte) render_screen_showing#0
Redundant Phi (byte) irq_cnt#15 (byte) irq_cnt#0
Redundant Phi (byte) sprites_irq::raster_sprite_gfx_modify#1 (byte) sprites_irq::raster_sprite_gfx_modify#0
Redundant Phi (byte) irq_sprite_ptr#10 (byte) irq_sprite_ptr#12
Redundant Phi (byte) render_screen_showing#1 (byte) render_screen_showing#3
Redundant Phi (byte) irq_cnt#10 (byte) irq_cnt#15
Redundant Phi (byte) irq_raster_next#11 (byte) irq_raster_next#5
Redundant Phi (byte) irq_sprite_ypos#10 (byte) irq_sprite_ypos#5
Redundant Phi (byte) sprites_irq::toSpritePtr2_return#2 (byte) sprites_irq::toSpritePtr2_return#0
Redundant Phi (byte) sprites_irq::toSpritePtr2_return#3 (byte) sprites_irq::toSpritePtr2_return#1
Redundant Phi (byte) irq_sprite_ypos#14 (byte) irq_sprite_ypos#18
Redundant Phi (byte) irq_raster_next#17 (byte) irq_raster_next#20
Redundant Phi (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#0
Redundant Phi (byte*) SIN_SPRITE#10 (byte*) SIN_SPRITE#0
Redundant Phi (byte) sin_idx#24 (byte) sin_idx#0
Redundant Phi (byte*) SIN#14 (byte*) SIN#0
Redundant Phi (byte*) SIN_SPRITE#1 (byte*) SIN_SPRITE#10
Redundant Phi (byte) sin_idx#12 (byte) sin_idx#24
Redundant Phi (byte*) SIN#10 (byte*) SIN#14
Redundant Phi (byte) sin_idx#1 (byte) sin_idx#10
Redundant Phi (byte) sin_idx#18 (byte) sin_idx#12
Redundant Phi (byte*) SIN#6 (byte*) SIN#10
Redundant Phi (byte) sin_idx#13 (byte) sin_idx#10
Redundant Phi (byte*) SIN#2 (byte*) SIN#4
Redundant Phi (byte*) SIN#1 (byte*) SIN#2
Redundant Phi (byte) sin_idx#14 (byte) sin_idx#13
Redundant Phi (byte) irq_sprite_ypos#9 (byte) irq_sprite_ypos#14
Redundant Phi (byte) irq_raster_next#10 (byte) irq_raster_next#17
Redundant Phi (byte) irq_sprite_ptr#14 (byte) irq_sprite_ptr#17
Redundant Phi (byte) sin_idx#11 (byte) sin_idx#1
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) sprites_init::$4 [119] if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1
Simple Condition (bool~) sprites_irq::$1 [165] if(*((byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1
Simple Condition (bool~) sprites_irq::$2 [169] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2
Simple Condition (bool~) sprites_irq::$3 [187] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4
Simple Condition (bool~) sprites_irq::$4 [204] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5
Simple Condition (bool~) main::$6 [292] if((byte) main::s#1!=rangelast(4,7)) goto main::@1
Simple Condition (bool~) loop::$0 [308] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4
Simple Condition (bool~) loop::$2 [318] if((byte) loop::s#1!=rangelast(4,7)) goto loop::@5
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*) PLAYFIELD_SCREEN_1#0 = ((byte*))1024
Constant (const byte*) PLAYFIELD_SCREEN_2#0 = ((byte*))11264
Constant (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0 = ((byte*))6144
Constant (const byte*) PLAYFIELD_COLORS_ORIGINAL#0 = ((byte*))7168
Constant (const byte*) PLAYFIELD_SPRITES#0 = ((byte*))8192
Constant (const byte*) PLAYFIELD_CHARSET#0 = ((byte*))10240
Constant (const byte) PLAYFIELD_LINES#0 = 22
Constant (const byte) PLAYFIELD_COLS#0 = 10
Constant (const byte) render_screen_render#0 = 64
Constant (const byte) render_screen_show#0 = 0
Constant (const dword) score_bcd#0 = 0
Constant (const word) lines_bcd#0 = 0
Constant (const byte) level_bcd#0 = 0
Constant (const byte) level#0 = 0
Constant (const byte) game_over#0 = 0
Constant (const byte/signed byte/word/signed word/dword/signed dword) sprites_init::$0 = 15*8
Constant (const byte) sprites_init::s#0 = 0
Constant (const byte) SPRITES_FIRST_YPOS#0 = 49
Constant (const void()*) sprites_irq_init::$0 = &sprites_irq
Constant (const byte*) SIN#0 = ((byte*))5120
Constant (const byte*) SIN_SPRITE#0 = ((byte*))10240
Constant (const byte) sin_idx#0 = 0
Constant (const byte) main::xpos#0 = 24
Constant (const byte) main::ypos#0 = 50
Constant (const byte) main::s#0 = 4
Constant (const byte) loop::s#0 = 4
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) PLAYFIELD_SPRITE_PTRS_1#0 = PLAYFIELD_SCREEN_1#0+SPRITE_PTRS#0
Constant (const byte*) PLAYFIELD_SPRITE_PTRS_2#0 = PLAYFIELD_SCREEN_2#0+SPRITE_PTRS#0
Constant (const byte) $2 = PLAYFIELD_LINES#0*PLAYFIELD_COLS#0
Constant (const byte) sprites_init::xpos#0 = 24+sprites_init::$0
Constant (const byte/signed word/word/dword/signed dword) $3 = SPRITES_FIRST_YPOS#0+19
Constant (const byte/signed word/word/dword/signed dword) $4 = SPRITES_FIRST_YPOS#0+21
Constant (const word) toSpritePtr1_$0#0 = ((word))PLAYFIELD_SPRITES#0
Constant (const byte*) sprites_irq::toSpritePtr2_sprite#0 = PLAYFIELD_SPRITES#0
Constant (const byte*) main::vicSelectGfxBank1_gfx#0 = PLAYFIELD_SCREEN_1#0
Constant (const byte*) main::toD0181_screen#0 = PLAYFIELD_SCREEN_1#0
Constant (const byte*) main::toD0181_gfx#0 = PLAYFIELD_CHARSET#0
Constant (const byte*) main::toSpritePtr2_sprite#0 = SIN_SPRITE#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte[$2]) playfield#0 = { fill( $2, 0) }
Constant (const byte) IRQ_RASTER_FIRST#0 = $3
Constant (const word) toSpritePtr1_$1#0 = toSpritePtr1_$0#0>>6
Constant (const word) sprites_irq::toSpritePtr2_$0#0 = ((word))sprites_irq::toSpritePtr2_sprite#0
Constant (const word) main::vicSelectGfxBank1_toDd001_$0#0 = ((word))main::vicSelectGfxBank1_gfx#0
Constant (const word) main::toD0181_$0#0 = ((word))main::toD0181_screen#0
Constant (const word) main::toD0181_$4#0 = ((word))main::toD0181_gfx#0
Constant (const word) main::toSpritePtr2_$0#0 = ((word))main::toSpritePtr2_sprite#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) toSpritePtr1_return#0 = ((byte))toSpritePtr1_$1#0
Constant (const word) sprites_irq::toSpritePtr2_$1#0 = sprites_irq::toSpritePtr2_$0#0>>6
Constant (const byte) main::vicSelectGfxBank1_toDd001_$1#0 = >main::vicSelectGfxBank1_toDd001_$0#0
Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&16383
Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0
Constant (const word) main::toSpritePtr2_$1#0 = main::toSpritePtr2_$0#0>>6
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte/signed word/word/dword/signed dword) $6 = toSpritePtr1_return#0+3
Constant (const byte) sprites_irq::toSpritePtr2_$2#0 = ((byte))sprites_irq::toSpritePtr2_$1#0
Constant (const byte) main::vicSelectGfxBank1_toDd001_$2#0 = main::vicSelectGfxBank1_toDd001_$1#0>>6
Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0<<2
Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0>>2
Constant (const byte) main::toSpritePtr2_return#0 = ((byte))main::toSpritePtr2_$1#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) sprites_irq::toSpritePtr2_return#0 = sprites_irq::toSpritePtr2_$2#0
Constant (const byte) main::vicSelectGfxBank1_toDd001_return#0 = 3^main::vicSelectGfxBank1_toDd001_$2#0
Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0
Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&15
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) sprites_irq::toSpritePtr2_return#1 = sprites_irq::toSpritePtr2_return#0
Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) sprites_irq::$5 = sprites_irq::toSpritePtr2_return#1
Successful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in *(SPRITES_YPOS#0+0)
Consolidated array index constant in *(SPRITES_YPOS#0+2)
Consolidated array index constant in *(SPRITES_YPOS#0+4)
Consolidated array index constant in *(SPRITES_YPOS#0+6)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_1#0+0)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_1#0+1)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_1#0+2)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_1#0+3)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+0)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+1)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+2)
Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+3)
Successful SSA optimization Pass2ConstantAdditionElimination
if() condition always true - replacing block destination [92] if(true) goto loop::@2
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block loop::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Resolved ranged next value sprites_init::s#1 ← ++ sprites_init::s#2 to ++
Resolved ranged comparison value if(sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 to (byte/signed byte/word/signed word/dword/signed dword) 4
Resolved ranged next value main::s#1 ← ++ main::s#2 to ++
Resolved ranged comparison value if(main::s#1!=rangelast(4,7)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 8
Resolved ranged next value loop::s#1 ← ++ loop::s#2 to ++
Resolved ranged comparison value if(loop::s#1!=rangelast(4,7)) goto loop::@5 to (byte/signed byte/word/signed word/dword/signed dword) 8
Culled Empty Block (label) toSpritePtr1_@return
Culled Empty Block (label) sprites_irq::toSpritePtr2_@return
Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@return
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::toSpritePtr2_@return
Culled Empty Block (label) main::@8
Culled Empty Block (label) loop::@2
Culled Empty Block (label) @11
Successful SSA optimization Pass2CullEmptyBlocks
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte/signed word/word/dword/signed dword~) sprites_irq::$0 
Self Phi Eliminated (byte*) SIN#4
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) SIN#4 (const byte*) SIN#0
Successful SSA optimization Pass2RedundantPhiElimination
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte/signed word/word/dword/signed dword~) sprites_irq::$0 
Inlining constant with var siblings (const byte) sprites_init::s#0
Inlining constant with var siblings (const byte) sprites_init::xpos#0
Inlining constant with different constant siblings (const byte) sprites_irq::toSpritePtr2_return#1
Inlining constant with var siblings (const byte) main::xpos#0
Inlining constant with var siblings (const byte) main::ypos#0
Inlining constant with var siblings (const byte) main::s#0
Inlining constant with var siblings (const byte) loop::s#0
Inlining constant with var siblings (const byte) sin_idx#0
Constant inlined main::toSpritePtr2_$0#0 = ((word))(const byte*) SIN_SPRITE#0
Constant inlined main::toD0181_screen#0 = (const byte*) PLAYFIELD_SCREEN_1#0
Constant inlined main::toD0181_gfx#0 = (const byte*) PLAYFIELD_CHARSET#0
Constant inlined main::toSpritePtr2_$1#0 = ((word))(const byte*) SIN_SPRITE#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined sprites_irq::toSpritePtr2_return#1 = (const byte) sprites_irq::toSpritePtr2_return#0
Constant inlined sprites_irq::$5 = (const byte) sprites_irq::toSpritePtr2_return#0
Constant inlined sprites_init::xpos#0 = (byte/signed byte/word/signed word/dword/signed dword) 24+(byte/signed byte/word/signed word/dword/signed dword) 15*(byte/signed byte/word/signed word/dword/signed dword) 8
Constant inlined main::toSpritePtr2_sprite#0 = (const byte*) SIN_SPRITE#0
Constant inlined $2 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0
Constant inlined $3 = (const byte) IRQ_RASTER_FIRST#0
Constant inlined $4 = (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 21
Constant inlined $6 = (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3
Constant inlined sin_idx#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined sprites_init::s#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::vicSelectGfxBank1_toDd001_$2#0 = >((word))(const byte*) PLAYFIELD_SCREEN_1#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined main::xpos#0 = (byte/signed byte/word/signed word/dword/signed dword) 24
Constant inlined main::s#0 = (byte/signed byte/word/signed word/dword/signed dword) 4
Constant inlined main::vicSelectGfxBank1_toDd001_$1#0 = >((word))(const byte*) PLAYFIELD_SCREEN_1#0
Constant inlined sprites_irq_init::$0 = &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
Constant inlined main::vicSelectGfxBank1_toDd001_$0#0 = ((word))(const byte*) PLAYFIELD_SCREEN_1#0
Constant inlined main::toD0181_$0#0 = ((word))(const byte*) PLAYFIELD_SCREEN_1#0
Constant inlined main::toD0181_$1#0 = ((word))(const byte*) PLAYFIELD_SCREEN_1#0&(word/signed word/dword/signed dword) 16383
Constant inlined sprites_irq::toSpritePtr2_sprite#0 = (const byte*) PLAYFIELD_SPRITES#0
Constant inlined sprites_irq::toSpritePtr2_$1#0 = ((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined main::toD0181_$6#0 = >((word))(const byte*) PLAYFIELD_CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined sprites_irq::toSpritePtr2_$2#0 = (const byte) sprites_irq::toSpritePtr2_return#0
Constant inlined main::toD0181_$7#0 = >((word))(const byte*) PLAYFIELD_CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) 15
Constant inlined sprites_irq::toSpritePtr2_$0#0 = ((word))(const byte*) PLAYFIELD_SPRITES#0
Constant inlined main::toD0181_$2#0 = ((word))(const byte*) PLAYFIELD_SCREEN_1#0&(word/signed word/dword/signed dword) 16383<<(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined main::toD0181_$3#0 = >((word))(const byte*) PLAYFIELD_SCREEN_1#0&(word/signed word/dword/signed dword) 16383<<(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined main::toD0181_$4#0 = ((word))(const byte*) PLAYFIELD_CHARSET#0
Constant inlined main::toD0181_$5#0 = >((word))(const byte*) PLAYFIELD_CHARSET#0
Constant inlined toSpritePtr1_$1#0 = ((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined main::vicSelectGfxBank1_gfx#0 = (const byte*) PLAYFIELD_SCREEN_1#0
Constant inlined main::ypos#0 = (byte/signed byte/word/signed word/dword/signed dword) 50
Constant inlined sprites_init::$0 = (byte/signed byte/word/signed word/dword/signed dword) 15*(byte/signed byte/word/signed word/dword/signed dword) 8
Constant inlined toSpritePtr1_$0#0 = ((word))(const byte*) PLAYFIELD_SPRITES#0
Constant inlined loop::s#0 = (byte/signed byte/word/signed word/dword/signed dword) 4
Successful SSA optimization Pass2ConstantInlining
Simplifying constant plus zero SPRITES_YPOS#0+0
Simplifying constant plus zero PLAYFIELD_SPRITE_PTRS_1#0+0
Simplifying constant plus zero PLAYFIELD_SPRITE_PTRS_2#0+0
Added new block during phi lifting main::@9(between main::@5 and main::@1)
Added new block during phi lifting loop::@11(between loop::@5 and loop::@5)
Added new block during phi lifting sprites_init::@3(between sprites_init::@1 and sprites_init::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of toSpritePtr1
Adding NOP phi() at start of @9
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::toSpritePtr2
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of loop
Adding NOP phi() at start of sprites_irq::toSpritePtr2
CALL GRAPH
Calls in [] to main:11 
Calls in [main] to sprites_init:19 sprites_irq_init:34 loop:36 

Created 9 initial phi equivalence classes
Coalesced [38] main::s#6 ← main::s#1
Coalesced [39] main::xpos#6 ← main::xpos#1
Coalesced [40] main::ypos#6 ← main::ypos#1
Coalesced [45] loop::idx#4 ← loop::idx#0
Coalesced [53] sin_idx#34 ← sin_idx#3
Coalesced [54] loop::s#3 ← loop::s#1
Coalesced [55] loop::idx#3 ← loop::idx#1
Coalesced [80] sprites_init::s#3 ← sprites_init::s#1
Coalesced [81] sprites_init::xpos#3 ← sprites_init::xpos#1
Coalesced [105] irq_raster_next#24 ← irq_raster_next#3
Coalesced [114] irq_raster_next#26 ← irq_raster_next#2
Coalesced [119] irq_raster_next#25 ← irq_raster_next#1
Coalesced down to 9 phi equivalence classes
Culled Empty Block (label) main::@9
Culled Empty Block (label) loop::@11
Culled Empty Block (label) sprites_init::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of toSpritePtr1
Adding NOP phi() at start of @9
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::toSpritePtr2
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of loop
Adding NOP phi() at start of sprites_irq::toSpritePtr2

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@4
@4: scope:[]  from @begin
  [1] (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000))
	// Put the sprites into memory 
	.for(var sy=0;sy<10;sy++) {
	    .var sprite_gfx_y = sy*20
		.for(var sx=0;sx<3;sx++) {
	    	.for (var y=0;y<21; y++) {
	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21)
		    	.for (var c=0; c<3; c++) {
	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y)
	            }
	        }
	    	.byte 0
	  	}
	}
 }}
  to:@5
@5: scope:[]  from @4
  [3] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0
  [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 21
  to:toSpritePtr1
toSpritePtr1: scope:[]  from @5
  [5] phi()
  to:@10
@10: scope:[]  from toSpritePtr1
  [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3
  [7] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:@7
@7: scope:[]  from @10
  kickasm(location (const byte*) SIN#0) {{ .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }
 }}
  kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff
 }}
  to:@9
@9: scope:[]  from @7
  [10] phi()
  [11] call main 
  to:@end
@end: scope:[]  from @9
  [12] phi()
main: scope:[main]  from @9
  [13] phi()
  to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main]  from main
  [14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
  to:main::vicSelectGfxBank1_toDd001
main::vicSelectGfxBank1_toDd001: scope:[main]  from main::vicSelectGfxBank1
  [15] phi()
  to:main::vicSelectGfxBank1_@1
main::vicSelectGfxBank1_@1: scope:[main]  from main::vicSelectGfxBank1_toDd001
  [16] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
  to:main::toD0181
main::toD0181: scope:[main]  from main::vicSelectGfxBank1_@1
  [17] phi()
  to:main::@4
main::@4: scope:[main]  from main::toD0181
  [18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
  [19] call sprites_init 
  to:main::@6
main::@6: scope:[main]  from main::@4
  [20] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) 255
  to:main::@1
main::@1: scope:[main]  from main::@5 main::@6
  [21] (byte) main::ypos#2 ← phi( main::@5/(byte) main::ypos#1 main::@6/(byte/signed byte/word/signed word/dword/signed dword) 50 )
  [21] (byte) main::xpos#2 ← phi( main::@5/(byte) main::xpos#1 main::@6/(byte/signed byte/word/signed word/dword/signed dword) 24 )
  [21] (byte) main::s#2 ← phi( main::@5/(byte) main::s#1 main::@6/(byte/signed byte/word/signed word/dword/signed dword) 4 )
  [22] (byte) main::s2#0 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2
  [24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2
  [25] (byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::s#2 - (byte/signed byte/word/signed word/dword/signed dword) 3
  [26] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte/signed word/word/dword/signed dword~) main::$4
  to:main::toSpritePtr2
main::toSpritePtr2: scope:[main]  from main::@1
  [27] phi()
  to:main::@5
main::@5: scope:[main]  from main::toSpritePtr2
  [28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0
  [29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24
  [30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24
  [31] (byte) main::s#1 ← ++ (byte) main::s#2
  [32] if((byte) main::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@5
  [33] phi()
  [34] call sprites_irq_init 
  to:main::@7
main::@7: scope:[main]  from main::@2
  [35] phi()
  [36] call loop 
  to:main::@return
main::@return: scope:[main]  from main::@7
  [37] return 
  to:@return
loop: scope:[loop]  from main::@7
  [38] phi()
  to:loop::@1
loop::@1: scope:[loop]  from loop loop::@9
  [39] (byte) sin_idx#10 ← phi( loop/(byte/signed byte/word/signed word/dword/signed dword) 0 loop::@9/(byte) sin_idx#3 )
  to:loop::@4
loop::@4: scope:[loop]  from loop::@1 loop::@4
  [40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4
  to:loop::@8
loop::@8: scope:[loop]  from loop::@4
  [41] (byte) loop::idx#0 ← (byte) sin_idx#10
  to:loop::@5
loop::@5: scope:[loop]  from loop::@5 loop::@8
  [42] (byte) loop::idx#2 ← phi( loop::@5/(byte) loop::idx#1 loop::@8/(byte) loop::idx#0 )
  [42] (byte) loop::s#2 ← phi( loop::@5/(byte) loop::s#1 loop::@8/(byte/signed byte/word/signed word/dword/signed dword) 4 )
  [43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2)
  [45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) 10
  [46] (byte) loop::s#1 ← ++ (byte) loop::s#2
  [47] if((byte) loop::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto loop::@5
  to:loop::@9
loop::@9: scope:[loop]  from loop::@5
  [48] (byte) sin_idx#3 ← ++ (byte) sin_idx#10
  to:loop::@1
sprites_irq_init: scope:[sprites_irq_init]  from main::@2
  asm { sei  }
  [50] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
  asm { ldaCIA1_INTERRUPT  }
  [52] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
  [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
  [54] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
  [55] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127
  [56] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0
  [57] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
  [58] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
  asm { cli  }
  to:sprites_irq_init::@return
sprites_irq_init::@return: scope:[sprites_irq_init]  from sprites_irq_init
  [60] return 
  to:@return
sprites_init: scope:[sprites_init]  from main::@4
  [61] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15
  [62] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  [63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0)
  [64] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0)
  to:sprites_init::@1
sprites_init::@1: scope:[sprites_init]  from sprites_init sprites_init::@1
  [65] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte/signed byte/word/signed word/dword/signed dword) 24+(byte/signed byte/word/signed word/dword/signed dword) 15*(byte/signed byte/word/signed word/dword/signed dword) 8 sprites_init::@1/(byte) sprites_init::xpos#1 )
  [65] (byte) sprites_init::s#2 ← phi( sprites_init/(byte/signed byte/word/signed word/dword/signed dword) 0 sprites_init::@1/(byte) sprites_init::s#1 )
  [66] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [67] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2
  [68] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0
  [69] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24
  [70] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2
  [71] if((byte) sprites_init::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto sprites_init::@1
  to:sprites_init::@return
sprites_init::@return: scope:[sprites_init]  from sprites_init::@1
  [72] return 
  to:@return
sprites_irq: scope:[sprites_irq]  from
  asm { cld  }
  [74] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0
  [75] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0
  [76] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ypos#0
  [77] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) sprites_irq::ypos#0
  [78] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) sprites_irq::ypos#0
  [79] (byte/signed word/word/dword/signed dword~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 1
  [80] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte/signed word/word/dword/signed dword~) sprites_irq::$0
  to:sprites_irq::@1
sprites_irq::@1: scope:[sprites_irq]  from sprites_irq sprites_irq::@1
  [81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1
  to:sprites_irq::@8
sprites_irq::@8: scope:[sprites_irq]  from sprites_irq::@1
  [82] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0
  [83] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2
  to:sprites_irq::@9
sprites_irq::@9: scope:[sprites_irq]  from sprites_irq::@8
  [84] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0
  [85] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0
  [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#3
  [87] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#3
  [88] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3
  [89] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#4
  to:sprites_irq::@3
sprites_irq::@3: scope:[sprites_irq]  from sprites_irq::@2 sprites_irq::@9
  [90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
  [91] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4
  to:sprites_irq::@11
sprites_irq::@11: scope:[sprites_irq]  from sprites_irq::@3
  [92] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5
  to:sprites_irq::@12
sprites_irq::@12: scope:[sprites_irq]  from sprites_irq::@11
  [93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 20
  [94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
  [95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
  to:sprites_irq::@7
sprites_irq::@7: scope:[sprites_irq]  from sprites_irq::@12 sprites_irq::@15 sprites_irq::@5
  [96] (byte) irq_raster_next#4 ← phi( sprites_irq::@12/(byte) irq_raster_next#3 sprites_irq::@15/(byte) irq_raster_next#1 sprites_irq::@5/(byte) irq_raster_next#2 )
  [97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4
  [98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
  to:sprites_irq::@return
sprites_irq::@return: scope:[sprites_irq]  from sprites_irq::@7
  [99] return 
  to:@return
sprites_irq::@5: scope:[sprites_irq]  from sprites_irq::@11
  [100] (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  [101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0
  [102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
  [103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
  to:sprites_irq::@7
sprites_irq::@4: scope:[sprites_irq]  from sprites_irq::@3
  [104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
  [105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0
  to:sprites_irq::toSpritePtr2
sprites_irq::toSpritePtr2: scope:[sprites_irq]  from sprites_irq::@4
  [106] phi()
  to:sprites_irq::@15
sprites_irq::@15: scope:[sprites_irq]  from sprites_irq::toSpritePtr2
  [107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0
  to:sprites_irq::@7
sprites_irq::@2: scope:[sprites_irq]  from sprites_irq::@8
  [108] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0
  [109] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0
  [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#1
  [111] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#1
  [112] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1
  [113] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#2
  to:sprites_irq::@3


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_RASTER_FIRST
(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*) PLAYFIELD_CHARSET
(byte*) PLAYFIELD_COLORS_ORIGINAL
(byte) PLAYFIELD_COLS
(byte) PLAYFIELD_LINES
(byte*) PLAYFIELD_SCREEN_1
(byte*) PLAYFIELD_SCREEN_2
(byte*) PLAYFIELD_SCREEN_ORIGINAL
(byte*) PLAYFIELD_SPRITES
(byte*) PLAYFIELD_SPRITE_PTRS_1
(byte*) PLAYFIELD_SPRITE_PTRS_2
(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*) SIN
(byte*) SIN_SPRITE
(byte*) SPRITES_COLS
(byte*) SPRITES_ENABLE
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_Y
(byte) SPRITES_FIRST_YPOS
(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
(byte) current_piece_char
(byte*) current_piece_gfx
(byte) current_xpos
(byte) current_ypos
(byte) game_over
(byte) irq_cnt
(byte) irq_cnt#0 0.17391304347826086
(byte) irq_cnt#1 3.0
(byte) irq_cnt#2 20.0
(byte) irq_raster_next
(byte) irq_raster_next#0 0.3076923076923077
(byte) irq_raster_next#1 1.0
(byte) irq_raster_next#2 1.3333333333333333
(byte) irq_raster_next#3 1.3333333333333333
(byte) irq_raster_next#4 8.0
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0 0.25806451612903225
(byte) irq_sprite_ptr#1 20.0
(byte) irq_sprite_ptr#2 20.0
(byte) irq_sprite_ptr#3 20.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 0.27586206896551724
(byte) irq_sprite_ypos#1 20.0
(byte) irq_sprite_ypos#2 20.0
(byte) irq_sprite_ypos#3 20.0
(byte) level
(byte) level_bcd
(word) lines_bcd
(void()) loop()
(byte~) loop::$1 202.0
(byte) loop::idx
(byte) loop::idx#0 22.0
(byte) loop::idx#1 67.33333333333333
(byte) loop::idx#2 104.66666666666666
(byte) loop::s
(byte) loop::s#1 151.5
(byte) loop::s#2 75.75
(void()) main()
(byte/signed word/word/dword/signed dword~) main::$4 22.0
(byte) main::s
(byte) main::s#1 16.5
(byte) main::s#2 6.6
(byte) main::s2
(byte) main::s2#0 16.5
(word~) main::toD0181_$0
(word~) main::toD0181_$1
(word~) main::toD0181_$2
(byte~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(byte~) main::toD0181_$6
(byte~) main::toD0181_$7
(byte~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(byte*) main::toD0181_screen
(word~) main::toSpritePtr2_$0
(word~) main::toSpritePtr2_$1
(byte~) main::toSpritePtr2_$2
(byte) main::toSpritePtr2_return
(byte*) main::toSpritePtr2_sprite
(byte~) main::vicSelectGfxBank1_$0
(byte*) main::vicSelectGfxBank1_gfx
(word~) main::vicSelectGfxBank1_toDd001_$0
(byte~) main::vicSelectGfxBank1_toDd001_$1
(byte~) main::vicSelectGfxBank1_toDd001_$2
(byte/word/dword~) main::vicSelectGfxBank1_toDd001_$3
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte) main::vicSelectGfxBank1_toDd001_return
(byte) main::xpos
(byte) main::xpos#1 5.5
(byte) main::xpos#2 4.125
(byte) main::ypos
(byte) main::ypos#1 7.333333333333333
(byte) main::ypos#2 3.666666666666667
(byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield
(byte) render_screen_render
(byte) render_screen_show
(byte) render_screen_showing
(byte) render_screen_showing#0 0.4
(dword) score_bcd
(byte) sin_idx
(byte) sin_idx#10 3.666666666666667
(byte) sin_idx#3 22.0
(void()) sprites_init()
(byte) sprites_init::s
(byte) sprites_init::s#1 16.5
(byte) sprites_init::s#2 8.8
(byte) sprites_init::s2
(byte) sprites_init::s2#0 22.0
(byte) sprites_init::xpos
(byte) sprites_init::xpos#1 7.333333333333333
(byte) sprites_init::xpos#2 8.25
interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
(byte/signed word/word/dword/signed dword~) sprites_irq::$0 4.0
(byte) sprites_irq::ptr
(byte) sprites_irq::ptr#0 2.5
(byte) sprites_irq::ptr#1 2.6666666666666665
(byte) sprites_irq::ptr#2 4.0
(byte) sprites_irq::ptr#3 2.6666666666666665
(byte) sprites_irq::ptr#4 4.0
(byte) sprites_irq::raster_sprite_gfx_modify
(byte) sprites_irq::raster_sprite_gfx_modify#0 6.5
(word~) sprites_irq::toSpritePtr2_$0
(word~) sprites_irq::toSpritePtr2_$1
(byte~) sprites_irq::toSpritePtr2_$2
(byte) sprites_irq::toSpritePtr2_return
(byte*) sprites_irq::toSpritePtr2_sprite
(byte) sprites_irq::ypos
(byte) sprites_irq::ypos#0 2.5
(void()) sprites_irq_init()
(word~) toSpritePtr1_$0
(word~) toSpritePtr1_$1
(byte~) toSpritePtr1_$2
(byte) toSpritePtr1_return
(byte*) toSpritePtr1_sprite

Initial phi equivalence classes
[ main::s#2 main::s#1 ]
[ main::xpos#2 main::xpos#1 ]
[ main::ypos#2 main::ypos#1 ]
[ sin_idx#10 sin_idx#3 ]
[ loop::s#2 loop::s#1 ]
[ loop::idx#2 loop::idx#1 loop::idx#0 ]
[ sprites_init::s#2 sprites_init::s#1 ]
[ sprites_init::xpos#2 sprites_init::xpos#1 ]
[ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ]
Added variable render_screen_showing#0 to zero page equivalence class [ render_screen_showing#0 ]
Added variable irq_raster_next#0 to zero page equivalence class [ irq_raster_next#0 ]
Added variable irq_sprite_ypos#0 to zero page equivalence class [ irq_sprite_ypos#0 ]
Added variable irq_sprite_ptr#0 to zero page equivalence class [ irq_sprite_ptr#0 ]
Added variable irq_cnt#0 to zero page equivalence class [ irq_cnt#0 ]
Added variable main::s2#0 to zero page equivalence class [ main::s2#0 ]
Added variable main::$4 to zero page equivalence class [ main::$4 ]
Added variable loop::$1 to zero page equivalence class [ loop::$1 ]
Added variable sprites_init::s2#0 to zero page equivalence class [ sprites_init::s2#0 ]
Added variable sprites_irq::ypos#0 to zero page equivalence class [ sprites_irq::ypos#0 ]
Added variable sprites_irq::$0 to zero page equivalence class [ sprites_irq::$0 ]
Added variable sprites_irq::raster_sprite_gfx_modify#0 to zero page equivalence class [ sprites_irq::raster_sprite_gfx_modify#0 ]
Added variable sprites_irq::ptr#0 to zero page equivalence class [ sprites_irq::ptr#0 ]
Added variable sprites_irq::ptr#3 to zero page equivalence class [ sprites_irq::ptr#3 ]
Added variable sprites_irq::ptr#4 to zero page equivalence class [ sprites_irq::ptr#4 ]
Added variable irq_cnt#1 to zero page equivalence class [ irq_cnt#1 ]
Added variable irq_sprite_ypos#3 to zero page equivalence class [ irq_sprite_ypos#3 ]
Added variable irq_sprite_ptr#3 to zero page equivalence class [ irq_sprite_ptr#3 ]
Added variable irq_cnt#2 to zero page equivalence class [ irq_cnt#2 ]
Added variable irq_sprite_ypos#2 to zero page equivalence class [ irq_sprite_ypos#2 ]
Added variable irq_sprite_ptr#2 to zero page equivalence class [ irq_sprite_ptr#2 ]
Added variable irq_sprite_ypos#1 to zero page equivalence class [ irq_sprite_ypos#1 ]
Added variable irq_sprite_ptr#1 to zero page equivalence class [ irq_sprite_ptr#1 ]
Added variable sprites_irq::ptr#1 to zero page equivalence class [ sprites_irq::ptr#1 ]
Added variable sprites_irq::ptr#2 to zero page equivalence class [ sprites_irq::ptr#2 ]
Complete equivalence classes
[ main::s#2 main::s#1 ]
[ main::xpos#2 main::xpos#1 ]
[ main::ypos#2 main::ypos#1 ]
[ sin_idx#10 sin_idx#3 ]
[ loop::s#2 loop::s#1 ]
[ loop::idx#2 loop::idx#1 loop::idx#0 ]
[ sprites_init::s#2 sprites_init::s#1 ]
[ sprites_init::xpos#2 sprites_init::xpos#1 ]
[ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ]
[ render_screen_showing#0 ]
[ irq_raster_next#0 ]
[ irq_sprite_ypos#0 ]
[ irq_sprite_ptr#0 ]
[ irq_cnt#0 ]
[ main::s2#0 ]
[ main::$4 ]
[ loop::$1 ]
[ sprites_init::s2#0 ]
[ sprites_irq::ypos#0 ]
[ sprites_irq::$0 ]
[ sprites_irq::raster_sprite_gfx_modify#0 ]
[ sprites_irq::ptr#0 ]
[ sprites_irq::ptr#3 ]
[ sprites_irq::ptr#4 ]
[ irq_cnt#1 ]
[ irq_sprite_ypos#3 ]
[ irq_sprite_ptr#3 ]
[ irq_cnt#2 ]
[ irq_sprite_ypos#2 ]
[ irq_sprite_ptr#2 ]
[ irq_sprite_ypos#1 ]
[ irq_sprite_ptr#1 ]
[ sprites_irq::ptr#1 ]
[ sprites_irq::ptr#2 ]
Allocated zp ZP_BYTE:2 [ main::s#2 main::s#1 ]
Allocated zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ]
Allocated zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ]
Allocated zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ]
Allocated zp ZP_BYTE:6 [ loop::s#2 loop::s#1 ]
Allocated zp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ]
Allocated zp ZP_BYTE:8 [ sprites_init::s#2 sprites_init::s#1 ]
Allocated zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Allocated zp ZP_BYTE:10 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ]
Allocated zp ZP_BYTE:11 [ render_screen_showing#0 ]
Allocated zp ZP_BYTE:12 [ irq_raster_next#0 ]
Allocated zp ZP_BYTE:13 [ irq_sprite_ypos#0 ]
Allocated zp ZP_BYTE:14 [ irq_sprite_ptr#0 ]
Allocated zp ZP_BYTE:15 [ irq_cnt#0 ]
Allocated zp ZP_BYTE:16 [ main::s2#0 ]
Allocated zp ZP_BYTE:17 [ main::$4 ]
Allocated zp ZP_BYTE:18 [ loop::$1 ]
Allocated zp ZP_BYTE:19 [ sprites_init::s2#0 ]
Allocated zp ZP_BYTE:20 [ sprites_irq::ypos#0 ]
Allocated zp ZP_BYTE:21 [ sprites_irq::$0 ]
Allocated zp ZP_BYTE:22 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Allocated zp ZP_BYTE:23 [ sprites_irq::ptr#0 ]
Allocated zp ZP_BYTE:24 [ sprites_irq::ptr#3 ]
Allocated zp ZP_BYTE:25 [ sprites_irq::ptr#4 ]
Allocated zp ZP_BYTE:26 [ irq_cnt#1 ]
Allocated zp ZP_BYTE:27 [ irq_sprite_ypos#3 ]
Allocated zp ZP_BYTE:28 [ irq_sprite_ptr#3 ]
Allocated zp ZP_BYTE:29 [ irq_cnt#2 ]
Allocated zp ZP_BYTE:30 [ irq_sprite_ypos#2 ]
Allocated zp ZP_BYTE:31 [ irq_sprite_ptr#2 ]
Allocated zp ZP_BYTE:32 [ irq_sprite_ypos#1 ]
Allocated zp ZP_BYTE:33 [ irq_sprite_ptr#1 ]
Allocated zp ZP_BYTE:34 [ sprites_irq::ptr#1 ]
Allocated zp ZP_BYTE:35 [ sprites_irq::ptr#2 ]

INITIAL ASM
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = $35
  // The offset of the sprite pointers from the screen start address
  .const SPRITE_PTRS = $3f8
  .label SPRITES_XPOS = $d000
  .label SPRITES_YPOS = $d001
  .label RASTER = $d012
  .label SPRITES_ENABLE = $d015
  .label SPRITES_EXPAND_Y = $d017
  .label SPRITES_MC = $d01c
  .label SPRITES_EXPAND_X = $d01d
  .label SPRITES_COLS = $d027
  .label VIC_CONTROL = $d011
  .label D018 = $d018
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // CIA#2 Port A: Serial bus, RS-232, VIC memory bank
  .label CIA2_PORT_A = $dd00
  // CIA #2 Port A data direction register.
  .label CIA2_PORT_A_DDR = $dd02
  // The vector used when the HARDWARE serves IRQ interrupts
  .label HARDWARE_IRQ = $fffe
  // The colors of the C64
  .const BLACK = 0
  // Address of the first screen
  .label PLAYFIELD_SCREEN_1 = $400
  // Address of the second screen
  .label PLAYFIELD_SCREEN_2 = $2c00
  // Address of the sprites covering the playfield
  .label PLAYFIELD_SPRITES = $2000
  // Address of the charset
  .label PLAYFIELD_CHARSET = $2800
  // The size of the playfield
  .const PLAYFIELD_LINES = $16
  .const PLAYFIELD_COLS = $a
  // The Y-position of the first sprite row
  .const SPRITES_FIRST_YPOS = $31
  .label SIN = $1400
  .label SIN_SPRITE = $2800
  // Screen Sprite pointers on screen 1
  .label PLAYFIELD_SPRITE_PTRS_1 = PLAYFIELD_SCREEN_1+SPRITE_PTRS
  // Screen Sprite pointers on screen 2
  .label PLAYFIELD_SPRITE_PTRS_2 = PLAYFIELD_SCREEN_2+SPRITE_PTRS
  // The line of the first IRQ
  .const IRQ_RASTER_FIRST = SPRITES_FIRST_YPOS+$13
  .const toSpritePtr1_return = PLAYFIELD_SPRITES>>6
  .label render_screen_showing = $b
  .label irq_raster_next = $c
  .label irq_sprite_ypos = $d
  .label irq_sprite_ptr = $e
  .label irq_cnt = $f
  .label irq_cnt_1 = $1a
  .label irq_raster_next_1 = $a
  .label irq_sprite_ypos_1 = $20
  .label irq_sprite_ptr_1 = $21
  .label irq_cnt_2 = $1d
  .label irq_raster_next_2 = $a
  .label irq_sprite_ypos_2 = $1e
  .label irq_sprite_ptr_2 = $1f
  .label irq_raster_next_3 = $a
  .label irq_sprite_ypos_3 = $1b
  .label irq_sprite_ptr_3 = $1c
  .label irq_raster_next_4 = $a
  .label sin_idx = 5
//SEG3 @begin
bbegin:
  jmp b4
//SEG4 @4
b4:
//SEG5 [1] (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
  // The screen currently being showed to the user. $00 for screen 1 / $40 for screen 2.
  lda #0
  sta render_screen_showing
//SEG6 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) 	// Put the sprites into memory  	.for(var sy=0;sy<10;sy++) { 	    .var sprite_gfx_y = sy*20 		.for(var sx=0;sx<3;sx++) { 	    	.for (var y=0;y<21; y++) { 	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21) 		    	.for (var c=0; c<3; c++) { 	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y) 	            } 	        } 	    	.byte 0 	  	} 	}  }}
  jmp b5
//SEG7 @5
b5:
//SEG8 [3] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
  // The raster line of the next IRQ
  lda #IRQ_RASTER_FIRST
  sta irq_raster_next
//SEG9 [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuc1 
  // Y-pos of the sprites on the next IRQ
  lda #SPRITES_FIRST_YPOS+$15
  sta irq_sprite_ypos
//SEG10 [5] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
toSpritePtr1_from_b5:
  jmp toSpritePtr1
//SEG11 toSpritePtr1
toSpritePtr1:
  jmp b10
//SEG12 @10
b10:
//SEG13 [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuc1 
  // Index of the sprites to show on the next IRQ
  lda #toSpritePtr1_return+3
  sta irq_sprite_ptr
//SEG14 [7] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
  // Counting the 10 IRQs
  lda #0
  sta irq_cnt
  jmp b7
//SEG15 @7
b7:
//SEG16 kickasm(location (const byte*) SIN#0) {{ .var AMPL = 200-21     .for(var i=0; i<256; i++) {   	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2     }  }}
//SEG17 kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff  }}
//SEG18 [10] phi from @7 to @9 [phi:@7->@9]
b9_from_b7:
  jmp b9
//SEG19 @9
b9:
//SEG20 [11] call main 
//SEG21 [13] phi from @9 to main [phi:@9->main]
main_from_b9:
  jsr main
//SEG22 [12] phi from @9 to @end [phi:@9->@end]
bend_from_b9:
  jmp bend
//SEG23 @end
bend:
//SEG24 main
main: {
    .const toSpritePtr2_return = SIN_SPRITE>>6
    .const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN_1)>>6
    .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f
    .label _4 = $11
    .label s2 = $10
    .label xpos = 3
    .label ypos = 4
    .label s = 2
    jmp vicSelectGfxBank1
  //SEG25 main::vicSelectGfxBank1
  vicSelectGfxBank1:
  //SEG26 [14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
  //SEG27 [15] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001]
  vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1:
    jmp vicSelectGfxBank1_toDd001
  //SEG28 main::vicSelectGfxBank1_toDd001
  vicSelectGfxBank1_toDd001:
    jmp vicSelectGfxBank1_b1
  //SEG29 main::vicSelectGfxBank1_@1
  vicSelectGfxBank1_b1:
  //SEG30 [16] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
  //SEG31 [17] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181]
  toD0181_from_vicSelectGfxBank1_b1:
    jmp toD0181
  //SEG32 main::toD0181
  toD0181:
    jmp b4
  //SEG33 main::@4
  b4:
  //SEG34 [18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
  //SEG35 [19] call sprites_init 
    jsr sprites_init
    jmp b6
  //SEG36 main::@6
  b6:
  //SEG37 [20] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) 255 -- _deref_pbuc1=vbuc2 
    lda #$ff
    sta SPRITES_ENABLE
  //SEG38 [21] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
  //SEG39 [21] phi (byte) main::ypos#2 = (byte/signed byte/word/signed word/dword/signed dword) 50 [phi:main::@6->main::@1#0] -- vbuz1=vbuc1 
    lda #$32
    sta ypos
  //SEG40 [21] phi (byte) main::xpos#2 = (byte/signed byte/word/signed word/dword/signed dword) 24 [phi:main::@6->main::@1#1] -- vbuz1=vbuc1 
    lda #$18
    sta xpos
  //SEG41 [21] phi (byte) main::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 4 [phi:main::@6->main::@1#2] -- vbuz1=vbuc1 
    lda #4
    sta s
    jmp b1
  //SEG42 [21] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
  //SEG43 [21] phi (byte) main::ypos#2 = (byte) main::ypos#1 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG44 [21] phi (byte) main::xpos#2 = (byte) main::xpos#1 [phi:main::@5->main::@1#1] -- register_copy 
  //SEG45 [21] phi (byte) main::s#2 = (byte) main::s#1 [phi:main::@5->main::@1#2] -- register_copy 
    jmp b1
  //SEG46 main::@1
  b1:
  //SEG47 [22] (byte) main::s2#0 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 
    lda s
    asl
    sta s2
  //SEG48 [23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda xpos
    ldy s2
    sta SPRITES_XPOS,y
  //SEG49 [24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda ypos
    ldy s2
    sta SPRITES_YPOS,y
  //SEG50 [25] (byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::s#2 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz2_minus_vbuc1 
    lda s
    sec
    sbc #3
    sta _4
  //SEG51 [26] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte/signed word/word/dword/signed dword~) main::$4 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda _4
    ldy s
    sta SPRITES_COLS,y
  //SEG52 [27] phi from main::@1 to main::toSpritePtr2 [phi:main::@1->main::toSpritePtr2]
  toSpritePtr2_from_b1:
    jmp toSpritePtr2
  //SEG53 main::toSpritePtr2
  toSpritePtr2:
    jmp b5
  //SEG54 main::@5
  b5:
  //SEG55 [28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0 -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy s
    lda #toSpritePtr2_return
    sta PLAYFIELD_SPRITE_PTRS_1,y
  //SEG56 [29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc xpos
    sta xpos
  //SEG57 [30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc ypos
    sta ypos
  //SEG58 [31] (byte) main::s#1 ← ++ (byte) main::s#2 -- vbuz1=_inc_vbuz1 
    inc s
  //SEG59 [32] if((byte) main::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda s
    cmp #8
    bne b1_from_b5
  //SEG60 [33] phi from main::@5 to main::@2 [phi:main::@5->main::@2]
  b2_from_b5:
    jmp b2
  //SEG61 main::@2
  b2:
  //SEG62 [34] call sprites_irq_init 
    jsr sprites_irq_init
  //SEG63 [35] phi from main::@2 to main::@7 [phi:main::@2->main::@7]
  b7_from_b2:
    jmp b7
  //SEG64 main::@7
  b7:
  //SEG65 [36] call loop 
  //SEG66 [38] phi from main::@7 to loop [phi:main::@7->loop]
  loop_from_b7:
    jsr loop
    jmp breturn
  //SEG67 main::@return
  breturn:
  //SEG68 [37] return 
    rts
}
//SEG69 loop
loop: {
    .label _1 = $12
    .label idx = 7
    .label s = 6
  //SEG70 [39] phi from loop to loop::@1 [phi:loop->loop::@1]
  b1_from_loop:
  //SEG71 [39] phi (byte) sin_idx#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta sin_idx
    jmp b1
  //SEG72 loop::@1
  b1:
    jmp b4
  //SEG73 loop::@4
  b4:
  //SEG74 [40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b4
    jmp b8
  //SEG75 loop::@8
  b8:
  //SEG76 [41] (byte) loop::idx#0 ← (byte) sin_idx#10 -- vbuz1=vbuz2 
    lda sin_idx
    sta idx
  //SEG77 [42] phi from loop::@8 to loop::@5 [phi:loop::@8->loop::@5]
  b5_from_b8:
  //SEG78 [42] phi (byte) loop::idx#2 = (byte) loop::idx#0 [phi:loop::@8->loop::@5#0] -- register_copy 
  //SEG79 [42] phi (byte) loop::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 4 [phi:loop::@8->loop::@5#1] -- vbuz1=vbuc1 
    lda #4
    sta s
    jmp b5
  //SEG80 [42] phi from loop::@5 to loop::@5 [phi:loop::@5->loop::@5]
  b5_from_b5:
  //SEG81 [42] phi (byte) loop::idx#2 = (byte) loop::idx#1 [phi:loop::@5->loop::@5#0] -- register_copy 
  //SEG82 [42] phi (byte) loop::s#2 = (byte) loop::s#1 [phi:loop::@5->loop::@5#1] -- register_copy 
    jmp b5
  //SEG83 loop::@5
  b5:
  //SEG84 [43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 
    lda s
    asl
    sta _1
  //SEG85 [44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 
    ldy idx
    lda SIN,y
    ldy _1
    sta SPRITES_YPOS,y
  //SEG86 [45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) 10 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$a
    clc
    adc idx
    sta idx
  //SEG87 [46] (byte) loop::s#1 ← ++ (byte) loop::s#2 -- vbuz1=_inc_vbuz1 
    inc s
  //SEG88 [47] if((byte) loop::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto loop::@5 -- vbuz1_neq_vbuc1_then_la1 
    lda s
    cmp #8
    bne b5_from_b5
    jmp b9
  //SEG89 loop::@9
  b9:
  //SEG90 [48] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 -- vbuz1=_inc_vbuz1 
    inc sin_idx
  //SEG91 [39] phi from loop::@9 to loop::@1 [phi:loop::@9->loop::@1]
  b1_from_b9:
  //SEG92 [39] phi (byte) sin_idx#10 = (byte) sin_idx#3 [phi:loop::@9->loop::@1#0] -- register_copy 
    jmp b1
}
//SEG93 sprites_irq_init
// Setup the IRQ
sprites_irq_init: {
  //SEG94 asm { sei  }
    sei
  //SEG95 [50] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge any IRQ and setup the next one
    lda #IRQ_RASTER
    sta IRQ_STATUS
  //SEG96 asm { ldaCIA1_INTERRUPT  }
    lda CIA1_INTERRUPT
  //SEG97 [52] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
  //SEG98 [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
  //SEG99 [54] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
  //SEG100 [55] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line
    lda VIC_CONTROL
    and #$7f
    sta VIC_CONTROL
  //SEG101 [56] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 
    lda #IRQ_RASTER_FIRST
    sta RASTER
  //SEG102 [57] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
  //SEG103 [58] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<sprites_irq
    sta HARDWARE_IRQ
    lda #>sprites_irq
    sta HARDWARE_IRQ+1
  //SEG104 asm { cli  }
    cli
    jmp breturn
  //SEG105 sprites_irq_init::@return
  breturn:
  //SEG106 [60] return 
    rts
}
//SEG107 sprites_init
// Setup the sprites
sprites_init: {
    .label s2 = $13
    .label xpos = 9
    .label s = 8
  //SEG108 [61] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15 -- _deref_pbuc1=vbuc2 
    lda #$f
    sta SPRITES_ENABLE
  //SEG109 [62] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta SPRITES_MC
  //SEG110 [63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_MC
    sta SPRITES_EXPAND_Y
  //SEG111 [64] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_EXPAND_Y
    sta SPRITES_EXPAND_X
  //SEG112 [65] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1]
  b1_from_sprites_init:
  //SEG113 [65] phi (byte) sprites_init::xpos#2 = (byte/signed byte/word/signed word/dword/signed dword) 24+(byte/signed byte/word/signed word/dword/signed dword) 15*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 
    lda #$18+$f*8
    sta xpos
  //SEG114 [65] phi (byte) sprites_init::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta s
    jmp b1
  //SEG115 [65] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1]
  b1_from_b1:
  //SEG116 [65] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy 
  //SEG117 [65] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy 
    jmp b1
  //SEG118 sprites_init::@1
  b1:
  //SEG119 [66] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 
    lda s
    asl
    sta s2
  //SEG120 [67] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda xpos
    ldy s2
    sta SPRITES_XPOS,y
  //SEG121 [68] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy s
    lda #BLACK
    sta SPRITES_COLS,y
  //SEG122 [69] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc xpos
    sta xpos
  //SEG123 [70] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuz1=_inc_vbuz1 
    inc s
  //SEG124 [71] if((byte) sprites_init::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto sprites_init::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda s
    cmp #4
    bne b1_from_b1
    jmp breturn
  //SEG125 sprites_init::@return
  breturn:
  //SEG126 [72] return 
    rts
}
//SEG127 sprites_irq
// Raster Interrupt Routine - sets up the sprites covering the playfield
// Repeats 10 timers every 2 lines from line IRQ_RASTER_FIRST
// Utilizes duplicated gfx in the sprites to allow for some leeway in updating the sprite pointers
sprites_irq: {
    .const toSpritePtr2_return = PLAYFIELD_SPRITES>>6
    .label _0 = $15
    .label ypos = $14
    .label raster_sprite_gfx_modify = $16
    .label ptr = $17
    .label ptr_1 = $22
    .label ptr_2 = $23
    .label ptr_3 = $18
    .label ptr_4 = $19
  //SEG128 entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    stx regx+1
    sty regy+1
  //SEG129 asm { cld  }
    //(*BGCOL)++;
    // Clear decimal flag (because it is used by the score algorithm)
    cld
  //SEG130 [74] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuz1=vbuz2 
    // Place the sprites
    lda irq_sprite_ypos
    sta ypos
  //SEG131 [75] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda ypos
    sta SPRITES_YPOS
  //SEG132 [76] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda ypos
    sta SPRITES_YPOS+2
  //SEG133 [77] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda ypos
    sta SPRITES_YPOS+4
  //SEG134 [78] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda ypos
    sta SPRITES_YPOS+6
  //SEG135 [79] (byte/signed word/word/dword/signed dword~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_plus_1 
    ldy irq_raster_next
    iny
    sty _0
  //SEG136 [80] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte/signed word/word/dword/signed dword~) sprites_irq::$0 -- vbuz1=vbuz2 
    // Wait for the y-position before changing sprite pointers
    lda _0
    sta raster_sprite_gfx_modify
    jmp b1
  //SEG137 sprites_irq::@1
  b1:
  //SEG138 [81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 -- _deref_pbuc1_lt_vbuz1_then_la1 
    lda RASTER
    cmp raster_sprite_gfx_modify
    bcc b1
    jmp b8
  //SEG139 sprites_irq::@8
  b8:
  //SEG140 [82] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuz1=vbuz2 
    lda irq_sprite_ptr
    sta ptr
  //SEG141 [83] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 -- vbuz1_eq_0_then_la1 
    lda render_screen_showing
    cmp #0
    beq b2
    jmp b9
  //SEG142 sprites_irq::@9
  b9:
  //SEG143 [84] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 
    lda ptr
    sta PLAYFIELD_SPRITE_PTRS_2
  //SEG144 [85] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 
    ldy ptr
    iny
    sty ptr_3
  //SEG145 [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 
    lda ptr_3
    sta PLAYFIELD_SPRITE_PTRS_2+1
  //SEG146 [87] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 
    lda ptr_3
    sta PLAYFIELD_SPRITE_PTRS_2+2
  //SEG147 [88] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuz1=_inc_vbuz2 
    ldy ptr_3
    iny
    sty ptr_4
  //SEG148 [89] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuz1 
    lda ptr_4
    sta PLAYFIELD_SPRITE_PTRS_2+3
    jmp b3
  //SEG149 sprites_irq::@3
  b3:
  //SEG150 [90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz2 
    ldy irq_cnt
    iny
    sty irq_cnt_1
  //SEG151 [91] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 
    lda irq_cnt_1
    cmp #9
    beq b4
    jmp b11
  //SEG152 sprites_irq::@11
  b11:
  //SEG153 [92] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 -- vbuz1_eq_vbuc1_then_la1 
    lda irq_cnt_1
    cmp #$a
    beq b5
    jmp b12
  //SEG154 sprites_irq::@12
  b12:
  //SEG155 [93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 20 -- vbuz1=vbuz2_plus_vbuc1 
    lda #$14
    clc
    adc irq_raster_next
    sta irq_raster_next_3
  //SEG156 [94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz2_plus_vbuc1 
    lda #$15
    clc
    adc irq_sprite_ypos
    sta irq_sprite_ypos_3
  //SEG157 [95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz2_plus_vbuc1 
    lda #3
    clc
    adc irq_sprite_ptr
    sta irq_sprite_ptr_3
  //SEG158 [96] phi from sprites_irq::@12 sprites_irq::@15 sprites_irq::@5 to sprites_irq::@7 [phi:sprites_irq::@12/sprites_irq::@15/sprites_irq::@5->sprites_irq::@7]
  b7_from_b12:
  b7_from_b15:
  b7_from_b5:
  //SEG159 [96] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#3 [phi:sprites_irq::@12/sprites_irq::@15/sprites_irq::@5->sprites_irq::@7#0] -- register_copy 
    jmp b7
  //SEG160 sprites_irq::@7
  b7:
  //SEG161 [97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 
    // Setup next interrupt
    lda irq_raster_next_4
    sta RASTER
  //SEG162 [98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ and setup the next one
    lda #IRQ_RASTER
    sta IRQ_STATUS
    jmp breturn
  //SEG163 sprites_irq::@return
  breturn:
  //SEG164 [99] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
  regx:
    ldx #00
  regy:
    ldy #00
    rti
  //SEG165 sprites_irq::@5
  b5:
  //SEG166 [100] (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
    lda #0
    sta irq_cnt_2
  //SEG167 [101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
    lda #IRQ_RASTER_FIRST
    sta irq_raster_next_2
  //SEG168 [102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz2_plus_vbuc1 
    lda #$15
    clc
    adc irq_sprite_ypos
    sta irq_sprite_ypos_2
  //SEG169 [103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz2_plus_vbuc1 
    lda #3
    clc
    adc irq_sprite_ptr
    sta irq_sprite_ptr_2
    jmp b7_from_b5
  //SEG170 sprites_irq::@4
  b4:
  //SEG171 [104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz2_plus_vbuc1 
    lda #$15
    clc
    adc irq_raster_next
    sta irq_raster_next_1
  //SEG172 [105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 
    lda #SPRITES_FIRST_YPOS
    sta irq_sprite_ypos_1
  //SEG173 [106] phi from sprites_irq::@4 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@4->sprites_irq::toSpritePtr2]
  toSpritePtr2_from_b4:
    jmp toSpritePtr2
  //SEG174 sprites_irq::toSpritePtr2
  toSpritePtr2:
    jmp b15
  //SEG175 sprites_irq::@15
  b15:
  //SEG176 [107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 
    lda #toSpritePtr2_return
    sta irq_sprite_ptr_1
    jmp b7_from_b15
  //SEG177 sprites_irq::@2
  b2:
  //SEG178 [108] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 
    lda ptr
    sta PLAYFIELD_SPRITE_PTRS_1
  //SEG179 [109] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 
    ldy ptr
    iny
    sty ptr_1
  //SEG180 [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 
    lda ptr_1
    sta PLAYFIELD_SPRITE_PTRS_1+1
  //SEG181 [111] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 
    lda ptr_1
    sta PLAYFIELD_SPRITE_PTRS_1+2
  //SEG182 [112] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuz1=_inc_vbuz2 
    ldy ptr_1
    iny
    sty ptr_2
  //SEG183 [113] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuz1 
    lda ptr_2
    sta PLAYFIELD_SPRITE_PTRS_1+3
    jmp b3
}
.pc = PLAYFIELD_SPRITES "PLAYFIELD_SPRITES"
  .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000))
	// Put the sprites into memory 
	.for(var sy=0;sy<10;sy++) {
	    .var sprite_gfx_y = sy*20
		.for(var sx=0;sx<3;sx++) {
	    	.for (var y=0;y<21; y++) {
	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21)
		    	.for (var c=0; c<3; c++) {
	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y)
	            }
	        }
	    	.byte 0
	  	}
	}

.pc = SIN "SIN"
  .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }

.pc = SIN_SPRITE "SIN_SPRITE"
  .fill $40, $ff


REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a 
Statement [3] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( ) always clobbers reg byte a 
Statement [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 21 [ ] ( ) always clobbers reg byte a 
Statement [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( ) always clobbers reg byte a 
Statement [7] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a 
Statement [14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [16] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [20] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) 255 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [22] (byte) main::s2#0 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::s#2 main::s#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ]
Statement [23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:16 [ main::s2#0 ]
Statement [24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 [ main::s#2 main::xpos#2 main::ypos#2 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [25] (byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::s#2 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ main::s#2 main::xpos#2 main::ypos#2 main::$4 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 main::$4 ] ) always clobbers reg byte a 
Statement [28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0 [ main::s#2 main::xpos#2 main::ypos#2 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::s#2 main::ypos#2 main::xpos#1 ] ( main:11 [ main::s#2 main::ypos#2 main::xpos#1 ] ) always clobbers reg byte a 
Statement [30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::s#2 main::xpos#1 main::ypos#1 ] ( main:11 [ main::s#2 main::xpos#1 main::ypos#1 ] ) always clobbers reg byte a 
Statement [40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4 [ sin_idx#10 ] ( main:11::loop:36 [ sin_idx#10 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ]
Statement [43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ sin_idx#10 loop::s#2 loop::idx#2 loop::$1 ] ( main:11::loop:36 [ sin_idx#10 loop::s#2 loop::idx#2 loop::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ loop::s#2 loop::s#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ]
Statement [44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2) [ sin_idx#10 loop::s#2 loop::idx#2 ] ( main:11::loop:36 [ sin_idx#10 loop::s#2 loop::idx#2 ] ) always clobbers reg byte a 
Statement [45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) 10 [ sin_idx#10 loop::s#2 loop::idx#1 ] ( main:11::loop:36 [ sin_idx#10 loop::s#2 loop::idx#1 ] ) always clobbers reg byte a 
Statement [50] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement asm { ldaCIA1_INTERRUPT  } always clobbers reg byte a 
Statement [52] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [54] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [55] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [56] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [57] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [58] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [61] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15 [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [62] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [64] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [66] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ sprites_init::s#2 sprites_init::s#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Statement [67] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [68] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [69] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a 
Statement [81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] (  [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a 
Statement [83] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ sprites_irq::ptr#0 ]
Statement [90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte y 
Statement [91] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a 
Statement [92] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a 
Statement [93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 20 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#3 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#3 ] ) always clobbers reg byte a 
Statement [94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#3 ] (  [ irq_sprite_ptr#0 irq_raster_next#3 ] ) always clobbers reg byte a 
Statement [95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#3 ] (  [ irq_raster_next#3 ] ) always clobbers reg byte a 
Statement [97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] (  [ ] ) always clobbers reg byte a 
Statement [98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [99] return  [ ] (  [ ] ) always clobbers reg byte a reg byte x reg byte y 
Statement [100] (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a 
Statement [101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a 
Statement [102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#2 ] (  [ irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a 
Statement [103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#2 ] (  [ irq_raster_next#2 ] ) always clobbers reg byte a 
Statement [104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_raster_next#1 ] (  [ irq_raster_next#1 ] ) always clobbers reg byte a 
Statement [105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_raster_next#1 ] (  [ irq_raster_next#1 ] ) always clobbers reg byte a 
Statement [107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next#1 ] (  [ irq_raster_next#1 ] ) always clobbers reg byte a 
Statement [1] (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a 
Statement [3] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( ) always clobbers reg byte a 
Statement [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 21 [ ] ( ) always clobbers reg byte a 
Statement [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( ) always clobbers reg byte a 
Statement [7] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a 
Statement [14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [16] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [20] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) 255 [ ] ( main:11 [ ] ) always clobbers reg byte a 
Statement [22] (byte) main::s2#0 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ) always clobbers reg byte a 
Statement [23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ) always clobbers reg byte a 
Statement [24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 [ main::s#2 main::xpos#2 main::ypos#2 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [25] (byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::s#2 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ main::s#2 main::xpos#2 main::ypos#2 main::$4 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 main::$4 ] ) always clobbers reg byte a 
Statement [28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0 [ main::s#2 main::xpos#2 main::ypos#2 ] ( main:11 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::s#2 main::ypos#2 main::xpos#1 ] ( main:11 [ main::s#2 main::ypos#2 main::xpos#1 ] ) always clobbers reg byte a 
Statement [30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::s#2 main::xpos#1 main::ypos#1 ] ( main:11 [ main::s#2 main::xpos#1 main::ypos#1 ] ) always clobbers reg byte a 
Statement [40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4 [ sin_idx#10 ] ( main:11::loop:36 [ sin_idx#10 ] ) always clobbers reg byte a 
Statement [43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ sin_idx#10 loop::s#2 loop::idx#2 loop::$1 ] ( main:11::loop:36 [ sin_idx#10 loop::s#2 loop::idx#2 loop::$1 ] ) always clobbers reg byte a 
Statement [44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2) [ sin_idx#10 loop::s#2 loop::idx#2 ] ( main:11::loop:36 [ sin_idx#10 loop::s#2 loop::idx#2 ] ) always clobbers reg byte a 
Statement [45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) 10 [ sin_idx#10 loop::s#2 loop::idx#1 ] ( main:11::loop:36 [ sin_idx#10 loop::s#2 loop::idx#1 ] ) always clobbers reg byte a 
Statement [50] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement asm { ldaCIA1_INTERRUPT  } always clobbers reg byte a 
Statement [52] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [54] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [55] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [56] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [57] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [58] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:11::sprites_irq_init:34 [ ] ) always clobbers reg byte a 
Statement [61] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15 [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [62] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [64] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:11::sprites_init:19 [ ] ) always clobbers reg byte a 
Statement [66] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a 
Statement [67] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [68] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [69] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:19 [ sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a 
Statement [81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] (  [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a 
Statement [83] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a 
Statement [90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte y 
Statement [91] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a 
Statement [92] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] (  [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a 
Statement [93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 20 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#3 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#3 ] ) always clobbers reg byte a 
Statement [94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#3 ] (  [ irq_sprite_ptr#0 irq_raster_next#3 ] ) always clobbers reg byte a 
Statement [95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#3 ] (  [ irq_raster_next#3 ] ) always clobbers reg byte a 
Statement [97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] (  [ ] ) always clobbers reg byte a 
Statement [98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [99] return  [ ] (  [ ] ) always clobbers reg byte a reg byte x reg byte y 
Statement [100] (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a 
Statement [101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a 
Statement [102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#2 ] (  [ irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a 
Statement [103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#2 ] (  [ irq_raster_next#2 ] ) always clobbers reg byte a 
Statement [104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_raster_next#1 ] (  [ irq_raster_next#1 ] ) always clobbers reg byte a 
Statement [105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_raster_next#1 ] (  [ irq_raster_next#1 ] ) always clobbers reg byte a 
Statement [107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next#1 ] (  [ irq_raster_next#1 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::s#2 main::s#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:6 [ loop::s#2 loop::s#1 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ] : zp ZP_BYTE:7 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:8 [ sprites_init::s#2 sprites_init::s#1 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ] : zp ZP_BYTE:10 , 
Potential registers zp ZP_BYTE:11 [ render_screen_showing#0 ] : zp ZP_BYTE:11 , 
Potential registers zp ZP_BYTE:12 [ irq_raster_next#0 ] : zp ZP_BYTE:12 , 
Potential registers zp ZP_BYTE:13 [ irq_sprite_ypos#0 ] : zp ZP_BYTE:13 , 
Potential registers zp ZP_BYTE:14 [ irq_sprite_ptr#0 ] : zp ZP_BYTE:14 , 
Potential registers zp ZP_BYTE:15 [ irq_cnt#0 ] : zp ZP_BYTE:15 , 
Potential registers zp ZP_BYTE:16 [ main::s2#0 ] : zp ZP_BYTE:16 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:17 [ main::$4 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:18 [ loop::$1 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:19 [ sprites_init::s2#0 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ sprites_irq::ypos#0 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:21 [ sprites_irq::$0 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:22 [ sprites_irq::raster_sprite_gfx_modify#0 ] : zp ZP_BYTE:22 , 
Potential registers zp ZP_BYTE:23 [ sprites_irq::ptr#0 ] : zp ZP_BYTE:23 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:24 [ sprites_irq::ptr#3 ] : zp ZP_BYTE:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:25 [ sprites_irq::ptr#4 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:26 [ irq_cnt#1 ] : zp ZP_BYTE:26 , 
Potential registers zp ZP_BYTE:27 [ irq_sprite_ypos#3 ] : zp ZP_BYTE:27 , 
Potential registers zp ZP_BYTE:28 [ irq_sprite_ptr#3 ] : zp ZP_BYTE:28 , 
Potential registers zp ZP_BYTE:29 [ irq_cnt#2 ] : zp ZP_BYTE:29 , 
Potential registers zp ZP_BYTE:30 [ irq_sprite_ypos#2 ] : zp ZP_BYTE:30 , 
Potential registers zp ZP_BYTE:31 [ irq_sprite_ptr#2 ] : zp ZP_BYTE:31 , 
Potential registers zp ZP_BYTE:32 [ irq_sprite_ypos#1 ] : zp ZP_BYTE:32 , 
Potential registers zp ZP_BYTE:33 [ irq_sprite_ptr#1 ] : zp ZP_BYTE:33 , 
Potential registers zp ZP_BYTE:34 [ sprites_irq::ptr#1 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:35 [ sprites_irq::ptr#2 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [loop] 227.25: zp ZP_BYTE:6 [ loop::s#2 loop::s#1 ] 202: zp ZP_BYTE:18 [ loop::$1 ] 194: zp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ] 
Uplift Scope [] 25.67: zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] 20: zp ZP_BYTE:27 [ irq_sprite_ypos#3 ] 20: zp ZP_BYTE:28 [ irq_sprite_ptr#3 ] 20: zp ZP_BYTE:29 [ irq_cnt#2 ] 20: zp ZP_BYTE:30 [ irq_sprite_ypos#2 ] 20: zp ZP_BYTE:31 [ irq_sprite_ptr#2 ] 20: zp ZP_BYTE:32 [ irq_sprite_ypos#1 ] 20: zp ZP_BYTE:33 [ irq_sprite_ptr#1 ] 11.67: zp ZP_BYTE:10 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ] 3: zp ZP_BYTE:26 [ irq_cnt#1 ] 0.4: zp ZP_BYTE:11 [ render_screen_showing#0 ] 0.31: zp ZP_BYTE:12 [ irq_raster_next#0 ] 0.28: zp ZP_BYTE:13 [ irq_sprite_ypos#0 ] 0.26: zp ZP_BYTE:14 [ irq_sprite_ptr#0 ] 0.17: zp ZP_BYTE:15 [ irq_cnt#0 ] 
Uplift Scope [main] 23.1: zp ZP_BYTE:2 [ main::s#2 main::s#1 ] 22: zp ZP_BYTE:17 [ main::$4 ] 16.5: zp ZP_BYTE:16 [ main::s2#0 ] 11: zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ] 9.62: zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ] 
Uplift Scope [sprites_init] 25.3: zp ZP_BYTE:8 [ sprites_init::s#2 sprites_init::s#1 ] 22: zp ZP_BYTE:19 [ sprites_init::s2#0 ] 15.58: zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] 
Uplift Scope [sprites_irq] 6.5: zp ZP_BYTE:22 [ sprites_irq::raster_sprite_gfx_modify#0 ] 4: zp ZP_BYTE:21 [ sprites_irq::$0 ] 4: zp ZP_BYTE:25 [ sprites_irq::ptr#4 ] 4: zp ZP_BYTE:35 [ sprites_irq::ptr#2 ] 2.67: zp ZP_BYTE:24 [ sprites_irq::ptr#3 ] 2.67: zp ZP_BYTE:34 [ sprites_irq::ptr#1 ] 2.5: zp ZP_BYTE:20 [ sprites_irq::ypos#0 ] 2.5: zp ZP_BYTE:23 [ sprites_irq::ptr#0 ] 
Uplift Scope [sprites_irq_init] 

Uplifting [loop] best 10035 combination reg byte x [ loop::s#2 loop::s#1 ] zp ZP_BYTE:18 [ loop::$1 ] zp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ] 
Uplifting [] best 10035 combination zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] zp ZP_BYTE:27 [ irq_sprite_ypos#3 ] zp ZP_BYTE:28 [ irq_sprite_ptr#3 ] zp ZP_BYTE:29 [ irq_cnt#2 ] zp ZP_BYTE:30 [ irq_sprite_ypos#2 ] zp ZP_BYTE:31 [ irq_sprite_ptr#2 ] zp ZP_BYTE:32 [ irq_sprite_ypos#1 ] zp ZP_BYTE:33 [ irq_sprite_ptr#1 ] zp ZP_BYTE:10 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ] zp ZP_BYTE:26 [ irq_cnt#1 ] zp ZP_BYTE:11 [ render_screen_showing#0 ] zp ZP_BYTE:12 [ irq_raster_next#0 ] zp ZP_BYTE:13 [ irq_sprite_ypos#0 ] zp ZP_BYTE:14 [ irq_sprite_ptr#0 ] zp ZP_BYTE:15 [ irq_cnt#0 ] 
Uplifting [main] best 9735 combination reg byte y [ main::s#2 main::s#1 ] reg byte a [ main::$4 ] reg byte x [ main::s2#0 ] zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ] zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ] 
Limited combination testing to 100 combinations of 324 possible.
Uplifting [sprites_init] best 9565 combination reg byte x [ sprites_init::s#2 sprites_init::s#1 ] reg byte a [ sprites_init::s2#0 ] zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] 
Uplifting [sprites_irq] best 9541 combination zp ZP_BYTE:22 [ sprites_irq::raster_sprite_gfx_modify#0 ] reg byte x [ sprites_irq::$0 ] reg byte a [ sprites_irq::ptr#4 ] reg byte a [ sprites_irq::ptr#2 ] reg byte a [ sprites_irq::ptr#3 ] zp ZP_BYTE:34 [ sprites_irq::ptr#1 ] zp ZP_BYTE:20 [ sprites_irq::ypos#0 ] zp ZP_BYTE:23 [ sprites_irq::ptr#0 ] 
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [sprites_irq_init] best 9541 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ loop::$1 ]
Uplifting [loop] best 9541 combination zp ZP_BYTE:18 [ loop::$1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ]
Uplifting [loop] best 9541 combination zp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ]
Uplifting [] best 9541 combination zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ irq_sprite_ypos#3 ]
Uplifting [] best 9541 combination zp ZP_BYTE:27 [ irq_sprite_ypos#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:28 [ irq_sprite_ptr#3 ]
Uplifting [] best 9541 combination zp ZP_BYTE:28 [ irq_sprite_ptr#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:29 [ irq_cnt#2 ]
Uplifting [] best 9541 combination zp ZP_BYTE:29 [ irq_cnt#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:30 [ irq_sprite_ypos#2 ]
Uplifting [] best 9541 combination zp ZP_BYTE:30 [ irq_sprite_ypos#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ irq_sprite_ptr#2 ]
Uplifting [] best 9541 combination zp ZP_BYTE:31 [ irq_sprite_ptr#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:32 [ irq_sprite_ypos#1 ]
Uplifting [] best 9541 combination zp ZP_BYTE:32 [ irq_sprite_ypos#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:33 [ irq_sprite_ptr#1 ]
Uplifting [] best 9541 combination zp ZP_BYTE:33 [ irq_sprite_ptr#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Uplifting [sprites_init] best 9541 combination zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:10 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ]
Uplifting [] best 9541 combination zp ZP_BYTE:10 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ]
Uplifting [main] best 9541 combination zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ]
Uplifting [main] best 9541 combination zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:22 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Uplifting [sprites_irq] best 9541 combination zp ZP_BYTE:22 [ sprites_irq::raster_sprite_gfx_modify#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ irq_cnt#1 ]
Uplifting [] best 9541 combination zp ZP_BYTE:26 [ irq_cnt#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:34 [ sprites_irq::ptr#1 ]
Uplifting [sprites_irq] best 9531 combination reg byte a [ sprites_irq::ptr#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ sprites_irq::ypos#0 ]
Uplifting [sprites_irq] best 9516 combination reg byte a [ sprites_irq::ypos#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:23 [ sprites_irq::ptr#0 ]
Uplifting [sprites_irq] best 9505 combination reg byte x [ sprites_irq::ptr#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:11 [ render_screen_showing#0 ]
Uplifting [] best 9505 combination zp ZP_BYTE:11 [ render_screen_showing#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:12 [ irq_raster_next#0 ]
Uplifting [] best 9505 combination zp ZP_BYTE:12 [ irq_raster_next#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ irq_sprite_ypos#0 ]
Uplifting [] best 9505 combination zp ZP_BYTE:13 [ irq_sprite_ypos#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ irq_sprite_ptr#0 ]
Uplifting [] best 9505 combination zp ZP_BYTE:14 [ irq_sprite_ptr#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:15 [ irq_cnt#0 ]
Uplifting [] best 9505 combination zp ZP_BYTE:15 [ irq_cnt#0 ] 
Coalescing zero page register with common assignment [ zp ZP_BYTE:10 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 ] ] with [ zp ZP_BYTE:12 [ irq_raster_next#0 ] ] - score: 2
Coalescing zero page register with common assignment [ zp ZP_BYTE:13 [ irq_sprite_ypos#0 ] ] with [ zp ZP_BYTE:27 [ irq_sprite_ypos#3 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#3 ] ] with [ zp ZP_BYTE:30 [ irq_sprite_ypos#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:14 [ irq_sprite_ptr#0 ] ] with [ zp ZP_BYTE:28 [ irq_sprite_ptr#3 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#3 ] ] with [ zp ZP_BYTE:31 [ irq_sprite_ptr#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:15 [ irq_cnt#0 ] ] with [ zp ZP_BYTE:26 [ irq_cnt#1 ] ] - score: 1
Coalescing zero page register [ zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ] ] with [ zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] ]
Coalescing zero page register [ zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 sin_idx#10 sin_idx#3 ] ] with [ zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ] ] with [ zp ZP_BYTE:7 [ loop::idx#2 loop::idx#1 loop::idx#0 ] ]
Coalescing zero page register [ zp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#3 irq_sprite_ypos#2 ] ] with [ zp ZP_BYTE:32 [ irq_sprite_ypos#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#3 irq_sprite_ptr#2 ] ] with [ zp ZP_BYTE:33 [ irq_sprite_ptr#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:15 [ irq_cnt#0 irq_cnt#1 ] ] with [ zp ZP_BYTE:29 [ irq_cnt#2 ] ]
Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ main::xpos#2 main::xpos#1 sin_idx#10 sin_idx#3 sprites_init::xpos#2 sprites_init::xpos#1 ]
Allocated (was zp ZP_BYTE:4) zp ZP_BYTE:3 [ main::ypos#2 main::ypos#1 loop::idx#2 loop::idx#1 loop::idx#0 ]
Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:4 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 irq_raster_next#0 ]
Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:5 [ render_screen_showing#0 ]
Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:6 [ irq_sprite_ypos#0 irq_sprite_ypos#3 irq_sprite_ypos#2 irq_sprite_ypos#1 ]
Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:7 [ irq_sprite_ptr#0 irq_sprite_ptr#3 irq_sprite_ptr#2 irq_sprite_ptr#1 ]
Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:8 [ irq_cnt#0 irq_cnt#1 irq_cnt#2 ]
Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:9 [ loop::$1 ]
Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:10 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Interrupt procedure sprites_irq clobbers AXCNZV
Removing interrupt register storage sty regy+1 in SEG128 entry interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage regy: in SEG164 [99] return  - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage ldy #00 in SEG164 [99] return  - exit interrupt(HARDWARE_CLOBBER)

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = $35
  // The offset of the sprite pointers from the screen start address
  .const SPRITE_PTRS = $3f8
  .label SPRITES_XPOS = $d000
  .label SPRITES_YPOS = $d001
  .label RASTER = $d012
  .label SPRITES_ENABLE = $d015
  .label SPRITES_EXPAND_Y = $d017
  .label SPRITES_MC = $d01c
  .label SPRITES_EXPAND_X = $d01d
  .label SPRITES_COLS = $d027
  .label VIC_CONTROL = $d011
  .label D018 = $d018
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // CIA#2 Port A: Serial bus, RS-232, VIC memory bank
  .label CIA2_PORT_A = $dd00
  // CIA #2 Port A data direction register.
  .label CIA2_PORT_A_DDR = $dd02
  // The vector used when the HARDWARE serves IRQ interrupts
  .label HARDWARE_IRQ = $fffe
  // The colors of the C64
  .const BLACK = 0
  // Address of the first screen
  .label PLAYFIELD_SCREEN_1 = $400
  // Address of the second screen
  .label PLAYFIELD_SCREEN_2 = $2c00
  // Address of the sprites covering the playfield
  .label PLAYFIELD_SPRITES = $2000
  // Address of the charset
  .label PLAYFIELD_CHARSET = $2800
  // The size of the playfield
  .const PLAYFIELD_LINES = $16
  .const PLAYFIELD_COLS = $a
  // The Y-position of the first sprite row
  .const SPRITES_FIRST_YPOS = $31
  .label SIN = $1400
  .label SIN_SPRITE = $2800
  // Screen Sprite pointers on screen 1
  .label PLAYFIELD_SPRITE_PTRS_1 = PLAYFIELD_SCREEN_1+SPRITE_PTRS
  // Screen Sprite pointers on screen 2
  .label PLAYFIELD_SPRITE_PTRS_2 = PLAYFIELD_SCREEN_2+SPRITE_PTRS
  // The line of the first IRQ
  .const IRQ_RASTER_FIRST = SPRITES_FIRST_YPOS+$13
  .const toSpritePtr1_return = PLAYFIELD_SPRITES>>6
  .label render_screen_showing = 5
  .label irq_raster_next = 4
  .label irq_sprite_ypos = 6
  .label irq_sprite_ptr = 7
  .label irq_cnt = 8
  .label sin_idx = 2
//SEG3 @begin
bbegin:
  jmp b4
//SEG4 @4
b4:
//SEG5 [1] (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
  // The screen currently being showed to the user. $00 for screen 1 / $40 for screen 2.
  lda #0
  sta render_screen_showing
//SEG6 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) 	// Put the sprites into memory  	.for(var sy=0;sy<10;sy++) { 	    .var sprite_gfx_y = sy*20 		.for(var sx=0;sx<3;sx++) { 	    	.for (var y=0;y<21; y++) { 	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21) 		    	.for (var c=0; c<3; c++) { 	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y) 	            } 	        } 	    	.byte 0 	  	} 	}  }}
  jmp b5
//SEG7 @5
b5:
//SEG8 [3] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
  // The raster line of the next IRQ
  lda #IRQ_RASTER_FIRST
  sta irq_raster_next
//SEG9 [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuc1 
  // Y-pos of the sprites on the next IRQ
  lda #SPRITES_FIRST_YPOS+$15
  sta irq_sprite_ypos
//SEG10 [5] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
toSpritePtr1_from_b5:
  jmp toSpritePtr1
//SEG11 toSpritePtr1
toSpritePtr1:
  jmp b10
//SEG12 @10
b10:
//SEG13 [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuc1 
  // Index of the sprites to show on the next IRQ
  lda #toSpritePtr1_return+3
  sta irq_sprite_ptr
//SEG14 [7] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
  // Counting the 10 IRQs
  lda #0
  sta irq_cnt
  jmp b7
//SEG15 @7
b7:
//SEG16 kickasm(location (const byte*) SIN#0) {{ .var AMPL = 200-21     .for(var i=0; i<256; i++) {   	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2     }  }}
//SEG17 kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff  }}
//SEG18 [10] phi from @7 to @9 [phi:@7->@9]
b9_from_b7:
  jmp b9
//SEG19 @9
b9:
//SEG20 [11] call main 
//SEG21 [13] phi from @9 to main [phi:@9->main]
main_from_b9:
  jsr main
//SEG22 [12] phi from @9 to @end [phi:@9->@end]
bend_from_b9:
  jmp bend
//SEG23 @end
bend:
//SEG24 main
main: {
    .const toSpritePtr2_return = SIN_SPRITE>>6
    .const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN_1)>>6
    .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f
    .label xpos = 2
    .label ypos = 3
    jmp vicSelectGfxBank1
  //SEG25 main::vicSelectGfxBank1
  vicSelectGfxBank1:
  //SEG26 [14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
  //SEG27 [15] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001]
  vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1:
    jmp vicSelectGfxBank1_toDd001
  //SEG28 main::vicSelectGfxBank1_toDd001
  vicSelectGfxBank1_toDd001:
    jmp vicSelectGfxBank1_b1
  //SEG29 main::vicSelectGfxBank1_@1
  vicSelectGfxBank1_b1:
  //SEG30 [16] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
  //SEG31 [17] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181]
  toD0181_from_vicSelectGfxBank1_b1:
    jmp toD0181
  //SEG32 main::toD0181
  toD0181:
    jmp b4
  //SEG33 main::@4
  b4:
  //SEG34 [18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
  //SEG35 [19] call sprites_init 
    jsr sprites_init
    jmp b6
  //SEG36 main::@6
  b6:
  //SEG37 [20] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) 255 -- _deref_pbuc1=vbuc2 
    lda #$ff
    sta SPRITES_ENABLE
  //SEG38 [21] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
  //SEG39 [21] phi (byte) main::ypos#2 = (byte/signed byte/word/signed word/dword/signed dword) 50 [phi:main::@6->main::@1#0] -- vbuz1=vbuc1 
    lda #$32
    sta ypos
  //SEG40 [21] phi (byte) main::xpos#2 = (byte/signed byte/word/signed word/dword/signed dword) 24 [phi:main::@6->main::@1#1] -- vbuz1=vbuc1 
    lda #$18
    sta xpos
  //SEG41 [21] phi (byte) main::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 4 [phi:main::@6->main::@1#2] -- vbuyy=vbuc1 
    ldy #4
    jmp b1
  //SEG42 [21] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
  //SEG43 [21] phi (byte) main::ypos#2 = (byte) main::ypos#1 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG44 [21] phi (byte) main::xpos#2 = (byte) main::xpos#1 [phi:main::@5->main::@1#1] -- register_copy 
  //SEG45 [21] phi (byte) main::s#2 = (byte) main::s#1 [phi:main::@5->main::@1#2] -- register_copy 
    jmp b1
  //SEG46 main::@1
  b1:
  //SEG47 [22] (byte) main::s2#0 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuyy_rol_1 
    tya
    asl
    tax
  //SEG48 [23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda xpos
    sta SPRITES_XPOS,x
  //SEG49 [24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda ypos
    sta SPRITES_YPOS,x
  //SEG50 [25] (byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::s#2 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuyy_minus_vbuc1 
    tya
    sec
    sbc #3
  //SEG51 [26] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte/signed word/word/dword/signed dword~) main::$4 -- pbuc1_derefidx_vbuyy=vbuaa 
    sta SPRITES_COLS,y
  //SEG52 [27] phi from main::@1 to main::toSpritePtr2 [phi:main::@1->main::toSpritePtr2]
  toSpritePtr2_from_b1:
    jmp toSpritePtr2
  //SEG53 main::toSpritePtr2
  toSpritePtr2:
    jmp b5
  //SEG54 main::@5
  b5:
  //SEG55 [28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0 -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #toSpritePtr2_return
    sta PLAYFIELD_SPRITE_PTRS_1,y
  //SEG56 [29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc xpos
    sta xpos
  //SEG57 [30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc ypos
    sta ypos
  //SEG58 [31] (byte) main::s#1 ← ++ (byte) main::s#2 -- vbuyy=_inc_vbuyy 
    iny
  //SEG59 [32] if((byte) main::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #8
    bne b1_from_b5
  //SEG60 [33] phi from main::@5 to main::@2 [phi:main::@5->main::@2]
  b2_from_b5:
    jmp b2
  //SEG61 main::@2
  b2:
  //SEG62 [34] call sprites_irq_init 
    jsr sprites_irq_init
  //SEG63 [35] phi from main::@2 to main::@7 [phi:main::@2->main::@7]
  b7_from_b2:
    jmp b7
  //SEG64 main::@7
  b7:
  //SEG65 [36] call loop 
  //SEG66 [38] phi from main::@7 to loop [phi:main::@7->loop]
  loop_from_b7:
    jsr loop
    jmp breturn
  //SEG67 main::@return
  breturn:
  //SEG68 [37] return 
    rts
}
//SEG69 loop
loop: {
    .label _1 = 9
    .label idx = 3
  //SEG70 [39] phi from loop to loop::@1 [phi:loop->loop::@1]
  b1_from_loop:
  //SEG71 [39] phi (byte) sin_idx#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta sin_idx
    jmp b1
  //SEG72 loop::@1
  b1:
    jmp b4
  //SEG73 loop::@4
  b4:
  //SEG74 [40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b4
    jmp b8
  //SEG75 loop::@8
  b8:
  //SEG76 [41] (byte) loop::idx#0 ← (byte) sin_idx#10 -- vbuz1=vbuz2 
    lda sin_idx
    sta idx
  //SEG77 [42] phi from loop::@8 to loop::@5 [phi:loop::@8->loop::@5]
  b5_from_b8:
  //SEG78 [42] phi (byte) loop::idx#2 = (byte) loop::idx#0 [phi:loop::@8->loop::@5#0] -- register_copy 
  //SEG79 [42] phi (byte) loop::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 4 [phi:loop::@8->loop::@5#1] -- vbuxx=vbuc1 
    ldx #4
    jmp b5
  //SEG80 [42] phi from loop::@5 to loop::@5 [phi:loop::@5->loop::@5]
  b5_from_b5:
  //SEG81 [42] phi (byte) loop::idx#2 = (byte) loop::idx#1 [phi:loop::@5->loop::@5#0] -- register_copy 
  //SEG82 [42] phi (byte) loop::s#2 = (byte) loop::s#1 [phi:loop::@5->loop::@5#1] -- register_copy 
    jmp b5
  //SEG83 loop::@5
  b5:
  //SEG84 [43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuxx_rol_1 
    txa
    asl
    sta _1
  //SEG85 [44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 
    ldy idx
    lda SIN,y
    ldy _1
    sta SPRITES_YPOS,y
  //SEG86 [45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) 10 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$a
    clc
    adc idx
    sta idx
  //SEG87 [46] (byte) loop::s#1 ← ++ (byte) loop::s#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG88 [47] if((byte) loop::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto loop::@5 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b5_from_b5
    jmp b9
  //SEG89 loop::@9
  b9:
  //SEG90 [48] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 -- vbuz1=_inc_vbuz1 
    inc sin_idx
  //SEG91 [39] phi from loop::@9 to loop::@1 [phi:loop::@9->loop::@1]
  b1_from_b9:
  //SEG92 [39] phi (byte) sin_idx#10 = (byte) sin_idx#3 [phi:loop::@9->loop::@1#0] -- register_copy 
    jmp b1
}
//SEG93 sprites_irq_init
// Setup the IRQ
sprites_irq_init: {
  //SEG94 asm { sei  }
    sei
  //SEG95 [50] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge any IRQ and setup the next one
    lda #IRQ_RASTER
    sta IRQ_STATUS
  //SEG96 asm { ldaCIA1_INTERRUPT  }
    lda CIA1_INTERRUPT
  //SEG97 [52] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
  //SEG98 [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
  //SEG99 [54] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
  //SEG100 [55] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line
    lda VIC_CONTROL
    and #$7f
    sta VIC_CONTROL
  //SEG101 [56] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 
    lda #IRQ_RASTER_FIRST
    sta RASTER
  //SEG102 [57] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
  //SEG103 [58] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<sprites_irq
    sta HARDWARE_IRQ
    lda #>sprites_irq
    sta HARDWARE_IRQ+1
  //SEG104 asm { cli  }
    cli
    jmp breturn
  //SEG105 sprites_irq_init::@return
  breturn:
  //SEG106 [60] return 
    rts
}
//SEG107 sprites_init
// Setup the sprites
sprites_init: {
    .label xpos = 2
  //SEG108 [61] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15 -- _deref_pbuc1=vbuc2 
    lda #$f
    sta SPRITES_ENABLE
  //SEG109 [62] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta SPRITES_MC
  //SEG110 [63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_MC
    sta SPRITES_EXPAND_Y
  //SEG111 [64] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_EXPAND_Y
    sta SPRITES_EXPAND_X
  //SEG112 [65] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1]
  b1_from_sprites_init:
  //SEG113 [65] phi (byte) sprites_init::xpos#2 = (byte/signed byte/word/signed word/dword/signed dword) 24+(byte/signed byte/word/signed word/dword/signed dword) 15*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 
    lda #$18+$f*8
    sta xpos
  //SEG114 [65] phi (byte) sprites_init::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG115 [65] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1]
  b1_from_b1:
  //SEG116 [65] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy 
  //SEG117 [65] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy 
    jmp b1
  //SEG118 sprites_init::@1
  b1:
  //SEG119 [66] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
  //SEG120 [67] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda xpos
    sta SPRITES_XPOS,y
  //SEG121 [68] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #BLACK
    sta SPRITES_COLS,x
  //SEG122 [69] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc xpos
    sta xpos
  //SEG123 [70] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG124 [71] if((byte) sprites_init::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto sprites_init::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #4
    bne b1_from_b1
    jmp breturn
  //SEG125 sprites_init::@return
  breturn:
  //SEG126 [72] return 
    rts
}
//SEG127 sprites_irq
// Raster Interrupt Routine - sets up the sprites covering the playfield
// Repeats 10 timers every 2 lines from line IRQ_RASTER_FIRST
// Utilizes duplicated gfx in the sprites to allow for some leeway in updating the sprite pointers
sprites_irq: {
    .const toSpritePtr2_return = PLAYFIELD_SPRITES>>6
    .label raster_sprite_gfx_modify = $a
  //SEG128 entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    stx regx+1
  //SEG129 asm { cld  }
    //(*BGCOL)++;
    // Clear decimal flag (because it is used by the score algorithm)
    cld
  //SEG130 [74] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 
    // Place the sprites
    lda irq_sprite_ypos
  //SEG131 [75] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS
  //SEG132 [76] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+2
  //SEG133 [77] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+4
  //SEG134 [78] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+6
  //SEG135 [79] (byte/signed word/word/dword/signed dword~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuz1_plus_1 
    ldx irq_raster_next
    inx
  //SEG136 [80] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte/signed word/word/dword/signed dword~) sprites_irq::$0 -- vbuz1=vbuxx 
    // Wait for the y-position before changing sprite pointers
    stx raster_sprite_gfx_modify
    jmp b1
  //SEG137 sprites_irq::@1
  b1:
  //SEG138 [81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 -- _deref_pbuc1_lt_vbuz1_then_la1 
    lda RASTER
    cmp raster_sprite_gfx_modify
    bcc b1
    jmp b8
  //SEG139 sprites_irq::@8
  b8:
  //SEG140 [82] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 
    ldx irq_sprite_ptr
  //SEG141 [83] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 -- vbuz1_eq_0_then_la1 
    lda render_screen_showing
    cmp #0
    beq b2
    jmp b9
  //SEG142 sprites_irq::@9
  b9:
  //SEG143 [84] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_2
  //SEG144 [85] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx 
    txa
    clc
    adc #1
  //SEG145 [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+1
  //SEG146 [87] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+2
  //SEG147 [88] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
  //SEG148 [89] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+3
    jmp b3
  //SEG149 sprites_irq::@3
  b3:
  //SEG150 [90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 
    inc irq_cnt
  //SEG151 [91] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 
    lda irq_cnt
    cmp #9
    beq b4
    jmp b11
  //SEG152 sprites_irq::@11
  b11:
  //SEG153 [92] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 -- vbuz1_eq_vbuc1_then_la1 
    lda irq_cnt
    cmp #$a
    beq b5
    jmp b12
  //SEG154 sprites_irq::@12
  b12:
  //SEG155 [93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 20 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$14
    clc
    adc irq_raster_next
    sta irq_raster_next
  //SEG156 [94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$15
    clc
    adc irq_sprite_ypos
    sta irq_sprite_ypos
  //SEG157 [95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lda #3
    clc
    adc irq_sprite_ptr
    sta irq_sprite_ptr
  //SEG158 [96] phi from sprites_irq::@12 sprites_irq::@15 sprites_irq::@5 to sprites_irq::@7 [phi:sprites_irq::@12/sprites_irq::@15/sprites_irq::@5->sprites_irq::@7]
  b7_from_b12:
  b7_from_b15:
  b7_from_b5:
  //SEG159 [96] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#3 [phi:sprites_irq::@12/sprites_irq::@15/sprites_irq::@5->sprites_irq::@7#0] -- register_copy 
    jmp b7
  //SEG160 sprites_irq::@7
  b7:
  //SEG161 [97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 
    // Setup next interrupt
    lda irq_raster_next
    sta RASTER
  //SEG162 [98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ and setup the next one
    lda #IRQ_RASTER
    sta IRQ_STATUS
    jmp breturn
  //SEG163 sprites_irq::@return
  breturn:
  //SEG164 [99] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
  regx:
    ldx #00
    rti
  //SEG165 sprites_irq::@5
  b5:
  //SEG166 [100] (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
    lda #0
    sta irq_cnt
  //SEG167 [101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
    lda #IRQ_RASTER_FIRST
    sta irq_raster_next
  //SEG168 [102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$15
    clc
    adc irq_sprite_ypos
    sta irq_sprite_ypos
  //SEG169 [103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lda #3
    clc
    adc irq_sprite_ptr
    sta irq_sprite_ptr
    jmp b7_from_b5
  //SEG170 sprites_irq::@4
  b4:
  //SEG171 [104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$15
    clc
    adc irq_raster_next
    sta irq_raster_next
  //SEG172 [105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 
    lda #SPRITES_FIRST_YPOS
    sta irq_sprite_ypos
  //SEG173 [106] phi from sprites_irq::@4 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@4->sprites_irq::toSpritePtr2]
  toSpritePtr2_from_b4:
    jmp toSpritePtr2
  //SEG174 sprites_irq::toSpritePtr2
  toSpritePtr2:
    jmp b15
  //SEG175 sprites_irq::@15
  b15:
  //SEG176 [107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 
    lda #toSpritePtr2_return
    sta irq_sprite_ptr
    jmp b7_from_b15
  //SEG177 sprites_irq::@2
  b2:
  //SEG178 [108] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1
  //SEG179 [109] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx 
    txa
    clc
    adc #1
  //SEG180 [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+1
  //SEG181 [111] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+2
  //SEG182 [112] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
  //SEG183 [113] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+3
    jmp b3
}
.pc = PLAYFIELD_SPRITES "PLAYFIELD_SPRITES"
  .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000))
	// Put the sprites into memory 
	.for(var sy=0;sy<10;sy++) {
	    .var sprite_gfx_y = sy*20
		.for(var sx=0;sx<3;sx++) {
	    	.for (var y=0;y<21; y++) {
	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21)
		    	.for (var c=0; c<3; c++) {
	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y)
	            }
	        }
	    	.byte 0
	  	}
	}

.pc = SIN "SIN"
  .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }

.pc = SIN_SPRITE "SIN_SPRITE"
  .fill $40, $ff


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp toSpritePtr1
Removing instruction jmp b10
Removing instruction jmp b7
Removing instruction jmp b9
Removing instruction jmp bend
Removing instruction jmp vicSelectGfxBank1
Removing instruction jmp vicSelectGfxBank1_toDd001
Removing instruction jmp vicSelectGfxBank1_b1
Removing instruction jmp toD0181
Removing instruction jmp b4
Removing instruction jmp b6
Removing instruction jmp b1
Removing instruction jmp toSpritePtr2
Removing instruction jmp b5
Removing instruction jmp b2
Removing instruction jmp b7
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp b8
Removing instruction jmp b5
Removing instruction jmp b9
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b8
Removing instruction jmp b9
Removing instruction jmp b3
Removing instruction jmp b11
Removing instruction jmp b12
Removing instruction jmp b7
Removing instruction jmp breturn
Removing instruction jmp toSpritePtr2
Removing instruction jmp b15
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda SPRITES_MC
Removing instruction lda SPRITES_EXPAND_Y
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b5 with b1
Replacing label b5_from_b5 with b5
Replacing label b1 with b4
Replacing label b1_from_b1 with b1
Replacing label b7_from_b5 with b7
Replacing label b7_from_b15 with b7
Removing instruction b4:
Removing instruction toSpritePtr1_from_b5:
Removing instruction toSpritePtr1:
Removing instruction b7:
Removing instruction b9_from_b7:
Removing instruction main_from_b9:
Removing instruction bend_from_b9:
Removing instruction vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1:
Removing instruction vicSelectGfxBank1_toDd001:
Removing instruction toD0181_from_vicSelectGfxBank1_b1:
Removing instruction toD0181:
Removing instruction b1_from_b5:
Removing instruction toSpritePtr2_from_b1:
Removing instruction toSpritePtr2:
Removing instruction b2_from_b5:
Removing instruction b7_from_b2:
Removing instruction loop_from_b7:
Removing instruction b1:
Removing instruction b5_from_b5:
Removing instruction b1_from_b1:
Removing instruction b7_from_b12:
Removing instruction b7_from_b15:
Removing instruction b7_from_b5:
Removing instruction breturn:
Removing instruction toSpritePtr2_from_b4:
Removing instruction toSpritePtr2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b5:
Removing instruction b10:
Removing instruction b9:
Removing instruction bend:
Removing instruction vicSelectGfxBank1:
Removing instruction vicSelectGfxBank1_b1:
Removing instruction b4:
Removing instruction b6:
Removing instruction b1_from_b6:
Removing instruction b5:
Removing instruction b2:
Removing instruction b7:
Removing instruction breturn:
Removing instruction b1_from_loop:
Removing instruction b8:
Removing instruction b5_from_b8:
Removing instruction b9:
Removing instruction b1_from_b9:
Removing instruction breturn:
Removing instruction b1_from_sprites_init:
Removing instruction breturn:
Removing instruction b8:
Removing instruction b9:
Removing instruction b11:
Removing instruction b12:
Removing instruction b15:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp b1
Removing instruction jmp b5
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda irq_cnt
Succesful ASM optimization Pass5UnnecesaryLoadElimination

FINAL SYMBOL TABLE
(label) @10
(label) @4
(label) @5
(label) @7
(label) @9
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
(byte*) BGCOL3
(byte*) BGCOL4
(byte) BLACK
(const byte) BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) BLUE
(byte*) BORDERCOL
(byte) BROWN
(byte*) CHARGEN
(byte*) CIA1_INTERRUPT
(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = ((byte*))(word/dword/signed dword) 56333
(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
(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = ((byte*))(word/dword/signed dword) 56576
(byte*) CIA2_PORT_A_DDR
(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = ((byte*))(word/dword/signed dword) 56578
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B_DDR
(byte) CIA_INTERRUPT_CLEAR
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte/signed byte/word/signed word/dword/signed dword) 127
(byte*) COLS
(byte) CYAN
(byte*) D011
(byte*) D016
(byte*) D018
(const byte*) D018#0 D018 = ((byte*))(word/dword/signed dword) 53272
(byte) DARK_GREY
(byte) GREEN
(byte) GREY
(void()**) HARDWARE_IRQ
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = ((void()**))(word/dword/signed dword) 65534
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_SPRITE
(byte*) IRQ_ENABLE
(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = ((byte*))(word/dword/signed dword) 53274
(byte) IRQ_LIGHTPEN
(byte) IRQ_RASTER
(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) IRQ_RASTER_FIRST
(const byte) IRQ_RASTER_FIRST#0 IRQ_RASTER_FIRST = (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 19
(byte*) IRQ_STATUS
(const byte*) IRQ_STATUS#0 IRQ_STATUS = ((byte*))(word/dword/signed dword) 53273
(void()**) KERNEL_IRQ
(byte*) LIGHTPEN_X
(byte*) LIGHTPEN_Y
(byte) LIGHT_BLUE
(byte) LIGHT_GREEN
(byte) LIGHT_GREY
(byte) ORANGE
(byte) PINK
(byte*) PLAYFIELD_CHARSET
(const byte*) PLAYFIELD_CHARSET#0 PLAYFIELD_CHARSET = ((byte*))(word/signed word/dword/signed dword) 10240
(byte*) PLAYFIELD_COLORS_ORIGINAL
(byte) PLAYFIELD_COLS
(const byte) PLAYFIELD_COLS#0 PLAYFIELD_COLS = (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) PLAYFIELD_LINES
(const byte) PLAYFIELD_LINES#0 PLAYFIELD_LINES = (byte/signed byte/word/signed word/dword/signed dword) 22
(byte*) PLAYFIELD_SCREEN_1
(const byte*) PLAYFIELD_SCREEN_1#0 PLAYFIELD_SCREEN_1 = ((byte*))(word/signed word/dword/signed dword) 1024
(byte*) PLAYFIELD_SCREEN_2
(const byte*) PLAYFIELD_SCREEN_2#0 PLAYFIELD_SCREEN_2 = ((byte*))(word/signed word/dword/signed dword) 11264
(byte*) PLAYFIELD_SCREEN_ORIGINAL
(byte*) PLAYFIELD_SPRITES
(const byte*) PLAYFIELD_SPRITES#0 PLAYFIELD_SPRITES = ((byte*))(word/signed word/dword/signed dword) 8192
(byte*) PLAYFIELD_SPRITE_PTRS_1
(const byte*) PLAYFIELD_SPRITE_PTRS_1#0 PLAYFIELD_SPRITE_PTRS_1 = (const byte*) PLAYFIELD_SCREEN_1#0+(const word) SPRITE_PTRS#0
(byte*) PLAYFIELD_SPRITE_PTRS_2
(const byte*) PLAYFIELD_SPRITE_PTRS_2#0 PLAYFIELD_SPRITE_PTRS_2 = (const byte*) PLAYFIELD_SCREEN_2#0+(const word) SPRITE_PTRS#0
(byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 1
(byte) PROCPORT_BASIC_KERNEL_IO
(byte*) PROCPORT_DDR
(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0
(byte) PROCPORT_DDR_MEMORY_MASK
(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_IO
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte/signed byte/word/signed word/dword/signed dword) 53
(byte) PURPLE
(byte*) RASTER
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
(byte) RED
(byte*) SIN
(const byte*) SIN#0 SIN = ((byte*))(word/signed word/dword/signed dword) 5120
(byte*) SIN_SPRITE
(const byte*) SIN_SPRITE#0 SIN_SPRITE = ((byte*))(word/signed word/dword/signed dword) 10240
(byte*) SPRITES_COLS
(const byte*) SPRITES_COLS#0 SPRITES_COLS = ((byte*))(word/dword/signed dword) 53287
(byte*) SPRITES_ENABLE
(const byte*) SPRITES_ENABLE#0 SPRITES_ENABLE = ((byte*))(word/dword/signed dword) 53269
(byte*) SPRITES_EXPAND_X
(const byte*) SPRITES_EXPAND_X#0 SPRITES_EXPAND_X = ((byte*))(word/dword/signed dword) 53277
(byte*) SPRITES_EXPAND_Y
(const byte*) SPRITES_EXPAND_Y#0 SPRITES_EXPAND_Y = ((byte*))(word/dword/signed dword) 53271
(byte) SPRITES_FIRST_YPOS
(const byte) SPRITES_FIRST_YPOS#0 SPRITES_FIRST_YPOS = (byte/signed byte/word/signed word/dword/signed dword) 49
(byte*) SPRITES_MC
(const byte*) SPRITES_MC#0 SPRITES_MC = ((byte*))(word/dword/signed dword) 53276
(byte*) SPRITES_MC1
(byte*) SPRITES_MC2
(byte*) SPRITES_PRIORITY
(byte*) SPRITES_XMSB
(byte*) SPRITES_XPOS
(const byte*) SPRITES_XPOS#0 SPRITES_XPOS = ((byte*))(word/dword/signed dword) 53248
(byte*) SPRITES_YPOS
(const byte*) SPRITES_YPOS#0 SPRITES_YPOS = ((byte*))(word/dword/signed dword) 53249
(word) SPRITE_PTRS
(const word) SPRITE_PTRS#0 SPRITE_PTRS = (word/signed word/dword/signed dword) 1016
(byte) VIC_BMM
(byte*) VIC_CONTROL
(const byte*) VIC_CONTROL#0 VIC_CONTROL = ((byte*))(word/dword/signed dword) 53265
(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
(byte) current_piece_char
(byte*) current_piece_gfx
(byte) current_xpos
(byte) current_ypos
(byte) game_over
(byte) irq_cnt
(byte) irq_cnt#0 irq_cnt zp ZP_BYTE:8 0.17391304347826086
(byte) irq_cnt#1 irq_cnt zp ZP_BYTE:8 3.0
(byte) irq_cnt#2 irq_cnt zp ZP_BYTE:8 20.0
(byte) irq_raster_next
(byte) irq_raster_next#0 irq_raster_next zp ZP_BYTE:4 0.3076923076923077
(byte) irq_raster_next#1 irq_raster_next zp ZP_BYTE:4 1.0
(byte) irq_raster_next#2 irq_raster_next zp ZP_BYTE:4 1.3333333333333333
(byte) irq_raster_next#3 irq_raster_next zp ZP_BYTE:4 1.3333333333333333
(byte) irq_raster_next#4 irq_raster_next zp ZP_BYTE:4 8.0
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0 irq_sprite_ptr zp ZP_BYTE:7 0.25806451612903225
(byte) irq_sprite_ptr#1 irq_sprite_ptr zp ZP_BYTE:7 20.0
(byte) irq_sprite_ptr#2 irq_sprite_ptr zp ZP_BYTE:7 20.0
(byte) irq_sprite_ptr#3 irq_sprite_ptr zp ZP_BYTE:7 20.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 irq_sprite_ypos zp ZP_BYTE:6 0.27586206896551724
(byte) irq_sprite_ypos#1 irq_sprite_ypos zp ZP_BYTE:6 20.0
(byte) irq_sprite_ypos#2 irq_sprite_ypos zp ZP_BYTE:6 20.0
(byte) irq_sprite_ypos#3 irq_sprite_ypos zp ZP_BYTE:6 20.0
(byte) level
(byte) level_bcd
(word) lines_bcd
(void()) loop()
(byte~) loop::$1 $1 zp ZP_BYTE:9 202.0
(label) loop::@1
(label) loop::@4
(label) loop::@5
(label) loop::@8
(label) loop::@9
(byte) loop::idx
(byte) loop::idx#0 idx zp ZP_BYTE:3 22.0
(byte) loop::idx#1 idx zp ZP_BYTE:3 67.33333333333333
(byte) loop::idx#2 idx zp ZP_BYTE:3 104.66666666666666
(byte) loop::s
(byte) loop::s#1 reg byte x 151.5
(byte) loop::s#2 reg byte x 75.75
(void()) main()
(byte/signed word/word/dword/signed dword~) main::$4 reg byte a 22.0
(label) main::@1
(label) main::@2
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@return
(byte) main::s
(byte) main::s#1 reg byte y 16.5
(byte) main::s#2 reg byte y 6.6
(byte) main::s2
(byte) main::s2#0 reg byte x 16.5
(label) main::toD0181
(word~) main::toD0181_$0
(word~) main::toD0181_$1
(word~) main::toD0181_$2
(byte~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(byte~) main::toD0181_$6
(byte~) main::toD0181_$7
(byte~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >((word))(const byte*) PLAYFIELD_SCREEN_1#0&(word/signed word/dword/signed dword) 16383<<(byte/signed byte/word/signed word/dword/signed dword) 2|>((word))(const byte*) PLAYFIELD_CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) 15
(byte*) main::toD0181_screen
(label) main::toSpritePtr2
(word~) main::toSpritePtr2_$0
(word~) main::toSpritePtr2_$1
(byte~) main::toSpritePtr2_$2
(byte) main::toSpritePtr2_return
(const byte) main::toSpritePtr2_return#0 toSpritePtr2_return = ((byte))((word))(const byte*) SIN_SPRITE#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) main::toSpritePtr2_sprite
(label) main::vicSelectGfxBank1
(byte~) main::vicSelectGfxBank1_$0
(label) main::vicSelectGfxBank1_@1
(byte*) main::vicSelectGfxBank1_gfx
(label) main::vicSelectGfxBank1_toDd001
(word~) main::vicSelectGfxBank1_toDd001_$0
(byte~) main::vicSelectGfxBank1_toDd001_$1
(byte~) main::vicSelectGfxBank1_toDd001_$2
(byte/word/dword~) main::vicSelectGfxBank1_toDd001_$3
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte) main::vicSelectGfxBank1_toDd001_return
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte/signed byte/word/signed word/dword/signed dword) 3^>((word))(const byte*) PLAYFIELD_SCREEN_1#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte) main::xpos
(byte) main::xpos#1 xpos zp ZP_BYTE:2 5.5
(byte) main::xpos#2 xpos zp ZP_BYTE:2 4.125
(byte) main::ypos
(byte) main::ypos#1 ypos zp ZP_BYTE:3 7.333333333333333
(byte) main::ypos#2 ypos zp ZP_BYTE:3 3.666666666666667
(byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield
(byte) render_screen_render
(byte) render_screen_show
(byte) render_screen_showing
(byte) render_screen_showing#0 render_screen_showing zp ZP_BYTE:5 0.4
(dword) score_bcd
(byte) sin_idx
(byte) sin_idx#10 sin_idx zp ZP_BYTE:2 3.666666666666667
(byte) sin_idx#3 sin_idx zp ZP_BYTE:2 22.0
(void()) sprites_init()
(label) sprites_init::@1
(label) sprites_init::@return
(byte) sprites_init::s
(byte) sprites_init::s#1 reg byte x 16.5
(byte) sprites_init::s#2 reg byte x 8.8
(byte) sprites_init::s2
(byte) sprites_init::s2#0 reg byte a 22.0
(byte) sprites_init::xpos
(byte) sprites_init::xpos#1 xpos zp ZP_BYTE:2 7.333333333333333
(byte) sprites_init::xpos#2 xpos zp ZP_BYTE:2 8.25
interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
(byte/signed word/word/dword/signed dword~) sprites_irq::$0 reg byte x 4.0
(label) sprites_irq::@1
(label) sprites_irq::@11
(label) sprites_irq::@12
(label) sprites_irq::@15
(label) sprites_irq::@2
(label) sprites_irq::@3
(label) sprites_irq::@4
(label) sprites_irq::@5
(label) sprites_irq::@7
(label) sprites_irq::@8
(label) sprites_irq::@9
(label) sprites_irq::@return
(byte) sprites_irq::ptr
(byte) sprites_irq::ptr#0 reg byte x 2.5
(byte) sprites_irq::ptr#1 reg byte a 2.6666666666666665
(byte) sprites_irq::ptr#2 reg byte a 4.0
(byte) sprites_irq::ptr#3 reg byte a 2.6666666666666665
(byte) sprites_irq::ptr#4 reg byte a 4.0
(byte) sprites_irq::raster_sprite_gfx_modify
(byte) sprites_irq::raster_sprite_gfx_modify#0 raster_sprite_gfx_modify zp ZP_BYTE:10 6.5
(label) sprites_irq::toSpritePtr2
(word~) sprites_irq::toSpritePtr2_$0
(word~) sprites_irq::toSpritePtr2_$1
(byte~) sprites_irq::toSpritePtr2_$2
(byte) sprites_irq::toSpritePtr2_return
(const byte) sprites_irq::toSpritePtr2_return#0 toSpritePtr2_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) sprites_irq::toSpritePtr2_sprite
(byte) sprites_irq::ypos
(byte) sprites_irq::ypos#0 reg byte a 2.5
(void()) sprites_irq_init()
(label) sprites_irq_init::@return
(label) toSpritePtr1
(word~) toSpritePtr1_$0
(word~) toSpritePtr1_$1
(byte~) toSpritePtr1_$2
(byte) toSpritePtr1_return
(const byte) toSpritePtr1_return#0 toSpritePtr1_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) toSpritePtr1_sprite

reg byte y [ main::s#2 main::s#1 ]
zp ZP_BYTE:2 [ main::xpos#2 main::xpos#1 sin_idx#10 sin_idx#3 sprites_init::xpos#2 sprites_init::xpos#1 ]
zp ZP_BYTE:3 [ main::ypos#2 main::ypos#1 loop::idx#2 loop::idx#1 loop::idx#0 ]
reg byte x [ loop::s#2 loop::s#1 ]
reg byte x [ sprites_init::s#2 sprites_init::s#1 ]
zp ZP_BYTE:4 [ irq_raster_next#4 irq_raster_next#3 irq_raster_next#1 irq_raster_next#2 irq_raster_next#0 ]
zp ZP_BYTE:5 [ render_screen_showing#0 ]
zp ZP_BYTE:6 [ irq_sprite_ypos#0 irq_sprite_ypos#3 irq_sprite_ypos#2 irq_sprite_ypos#1 ]
zp ZP_BYTE:7 [ irq_sprite_ptr#0 irq_sprite_ptr#3 irq_sprite_ptr#2 irq_sprite_ptr#1 ]
zp ZP_BYTE:8 [ irq_cnt#0 irq_cnt#1 irq_cnt#2 ]
reg byte x [ main::s2#0 ]
reg byte a [ main::$4 ]
zp ZP_BYTE:9 [ loop::$1 ]
reg byte a [ sprites_init::s2#0 ]
reg byte a [ sprites_irq::ypos#0 ]
reg byte x [ sprites_irq::$0 ]
zp ZP_BYTE:10 [ sprites_irq::raster_sprite_gfx_modify#0 ]
reg byte x [ sprites_irq::ptr#0 ]
reg byte a [ sprites_irq::ptr#3 ]
reg byte a [ sprites_irq::ptr#4 ]
reg byte a [ sprites_irq::ptr#1 ]
reg byte a [ sprites_irq::ptr#2 ]


FINAL ASSEMBLER
Score: 7709

//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = $35
  // The offset of the sprite pointers from the screen start address
  .const SPRITE_PTRS = $3f8
  .label SPRITES_XPOS = $d000
  .label SPRITES_YPOS = $d001
  .label RASTER = $d012
  .label SPRITES_ENABLE = $d015
  .label SPRITES_EXPAND_Y = $d017
  .label SPRITES_MC = $d01c
  .label SPRITES_EXPAND_X = $d01d
  .label SPRITES_COLS = $d027
  .label VIC_CONTROL = $d011
  .label D018 = $d018
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // CIA#2 Port A: Serial bus, RS-232, VIC memory bank
  .label CIA2_PORT_A = $dd00
  // CIA #2 Port A data direction register.
  .label CIA2_PORT_A_DDR = $dd02
  // The vector used when the HARDWARE serves IRQ interrupts
  .label HARDWARE_IRQ = $fffe
  // The colors of the C64
  .const BLACK = 0
  // Address of the first screen
  .label PLAYFIELD_SCREEN_1 = $400
  // Address of the second screen
  .label PLAYFIELD_SCREEN_2 = $2c00
  // Address of the sprites covering the playfield
  .label PLAYFIELD_SPRITES = $2000
  // Address of the charset
  .label PLAYFIELD_CHARSET = $2800
  // The size of the playfield
  .const PLAYFIELD_LINES = $16
  .const PLAYFIELD_COLS = $a
  // The Y-position of the first sprite row
  .const SPRITES_FIRST_YPOS = $31
  .label SIN = $1400
  .label SIN_SPRITE = $2800
  // Screen Sprite pointers on screen 1
  .label PLAYFIELD_SPRITE_PTRS_1 = PLAYFIELD_SCREEN_1+SPRITE_PTRS
  // Screen Sprite pointers on screen 2
  .label PLAYFIELD_SPRITE_PTRS_2 = PLAYFIELD_SCREEN_2+SPRITE_PTRS
  // The line of the first IRQ
  .const IRQ_RASTER_FIRST = SPRITES_FIRST_YPOS+$13
  .const toSpritePtr1_return = PLAYFIELD_SPRITES>>6
  .label render_screen_showing = 5
  .label irq_raster_next = 4
  .label irq_sprite_ypos = 6
  .label irq_sprite_ptr = 7
  .label irq_cnt = 8
  .label sin_idx = 2
//SEG3 @begin
bbegin:
//SEG4 @4
//SEG5 [1] (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
  // The screen currently being showed to the user. $00 for screen 1 / $40 for screen 2.
  lda #0
  sta render_screen_showing
//SEG6 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) 	// Put the sprites into memory  	.for(var sy=0;sy<10;sy++) { 	    .var sprite_gfx_y = sy*20 		.for(var sx=0;sx<3;sx++) { 	    	.for (var y=0;y<21; y++) { 	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21) 		    	.for (var c=0; c<3; c++) { 	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y) 	            } 	        } 	    	.byte 0 	  	} 	}  }}
//SEG7 @5
//SEG8 [3] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
  // The raster line of the next IRQ
  lda #IRQ_RASTER_FIRST
  sta irq_raster_next
//SEG9 [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuc1 
  // Y-pos of the sprites on the next IRQ
  lda #SPRITES_FIRST_YPOS+$15
  sta irq_sprite_ypos
//SEG10 [5] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
//SEG11 toSpritePtr1
//SEG12 @10
//SEG13 [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuc1 
  // Index of the sprites to show on the next IRQ
  lda #toSpritePtr1_return+3
  sta irq_sprite_ptr
//SEG14 [7] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
  // Counting the 10 IRQs
  lda #0
  sta irq_cnt
//SEG15 @7
//SEG16 kickasm(location (const byte*) SIN#0) {{ .var AMPL = 200-21     .for(var i=0; i<256; i++) {   	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2     }  }}
//SEG17 kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff  }}
//SEG18 [10] phi from @7 to @9 [phi:@7->@9]
//SEG19 @9
//SEG20 [11] call main 
//SEG21 [13] phi from @9 to main [phi:@9->main]
  jsr main
//SEG22 [12] phi from @9 to @end [phi:@9->@end]
//SEG23 @end
//SEG24 main
main: {
    .const toSpritePtr2_return = SIN_SPRITE>>6
    .const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN_1)>>6
    .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f
    .label xpos = 2
    .label ypos = 3
  //SEG25 main::vicSelectGfxBank1
  //SEG26 [14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
  //SEG27 [15] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001]
  //SEG28 main::vicSelectGfxBank1_toDd001
  //SEG29 main::vicSelectGfxBank1_@1
  //SEG30 [16] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
  //SEG31 [17] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181]
  //SEG32 main::toD0181
  //SEG33 main::@4
  //SEG34 [18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
  //SEG35 [19] call sprites_init 
    jsr sprites_init
  //SEG36 main::@6
  //SEG37 [20] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) 255 -- _deref_pbuc1=vbuc2 
    lda #$ff
    sta SPRITES_ENABLE
  //SEG38 [21] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  //SEG39 [21] phi (byte) main::ypos#2 = (byte/signed byte/word/signed word/dword/signed dword) 50 [phi:main::@6->main::@1#0] -- vbuz1=vbuc1 
    lda #$32
    sta ypos
  //SEG40 [21] phi (byte) main::xpos#2 = (byte/signed byte/word/signed word/dword/signed dword) 24 [phi:main::@6->main::@1#1] -- vbuz1=vbuc1 
    lda #$18
    sta xpos
  //SEG41 [21] phi (byte) main::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 4 [phi:main::@6->main::@1#2] -- vbuyy=vbuc1 
    ldy #4
  //SEG42 [21] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  //SEG43 [21] phi (byte) main::ypos#2 = (byte) main::ypos#1 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG44 [21] phi (byte) main::xpos#2 = (byte) main::xpos#1 [phi:main::@5->main::@1#1] -- register_copy 
  //SEG45 [21] phi (byte) main::s#2 = (byte) main::s#1 [phi:main::@5->main::@1#2] -- register_copy 
  //SEG46 main::@1
  b1:
  //SEG47 [22] (byte) main::s2#0 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuyy_rol_1 
    tya
    asl
    tax
  //SEG48 [23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda xpos
    sta SPRITES_XPOS,x
  //SEG49 [24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda ypos
    sta SPRITES_YPOS,x
  //SEG50 [25] (byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::s#2 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuyy_minus_vbuc1 
    tya
    sec
    sbc #3
  //SEG51 [26] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte/signed word/word/dword/signed dword~) main::$4 -- pbuc1_derefidx_vbuyy=vbuaa 
    sta SPRITES_COLS,y
  //SEG52 [27] phi from main::@1 to main::toSpritePtr2 [phi:main::@1->main::toSpritePtr2]
  //SEG53 main::toSpritePtr2
  //SEG54 main::@5
  //SEG55 [28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0 -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #toSpritePtr2_return
    sta PLAYFIELD_SPRITE_PTRS_1,y
  //SEG56 [29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc xpos
    sta xpos
  //SEG57 [30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc ypos
    sta ypos
  //SEG58 [31] (byte) main::s#1 ← ++ (byte) main::s#2 -- vbuyy=_inc_vbuyy 
    iny
  //SEG59 [32] if((byte) main::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #8
    bne b1
  //SEG60 [33] phi from main::@5 to main::@2 [phi:main::@5->main::@2]
  //SEG61 main::@2
  //SEG62 [34] call sprites_irq_init 
    jsr sprites_irq_init
  //SEG63 [35] phi from main::@2 to main::@7 [phi:main::@2->main::@7]
  //SEG64 main::@7
  //SEG65 [36] call loop 
  //SEG66 [38] phi from main::@7 to loop [phi:main::@7->loop]
    jsr loop
  //SEG67 main::@return
  //SEG68 [37] return 
    rts
}
//SEG69 loop
loop: {
    .label _1 = 9
    .label idx = 3
  //SEG70 [39] phi from loop to loop::@1 [phi:loop->loop::@1]
  //SEG71 [39] phi (byte) sin_idx#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta sin_idx
  //SEG72 loop::@1
  //SEG73 loop::@4
  b4:
  //SEG74 [40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b4
  //SEG75 loop::@8
  //SEG76 [41] (byte) loop::idx#0 ← (byte) sin_idx#10 -- vbuz1=vbuz2 
    lda sin_idx
    sta idx
  //SEG77 [42] phi from loop::@8 to loop::@5 [phi:loop::@8->loop::@5]
  //SEG78 [42] phi (byte) loop::idx#2 = (byte) loop::idx#0 [phi:loop::@8->loop::@5#0] -- register_copy 
  //SEG79 [42] phi (byte) loop::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 4 [phi:loop::@8->loop::@5#1] -- vbuxx=vbuc1 
    ldx #4
  //SEG80 [42] phi from loop::@5 to loop::@5 [phi:loop::@5->loop::@5]
  //SEG81 [42] phi (byte) loop::idx#2 = (byte) loop::idx#1 [phi:loop::@5->loop::@5#0] -- register_copy 
  //SEG82 [42] phi (byte) loop::s#2 = (byte) loop::s#1 [phi:loop::@5->loop::@5#1] -- register_copy 
  //SEG83 loop::@5
  b5:
  //SEG84 [43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuxx_rol_1 
    txa
    asl
    sta _1
  //SEG85 [44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 
    ldy idx
    lda SIN,y
    ldy _1
    sta SPRITES_YPOS,y
  //SEG86 [45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) 10 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$a
    clc
    adc idx
    sta idx
  //SEG87 [46] (byte) loop::s#1 ← ++ (byte) loop::s#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG88 [47] if((byte) loop::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto loop::@5 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b5
  //SEG89 loop::@9
  //SEG90 [48] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 -- vbuz1=_inc_vbuz1 
    inc sin_idx
  //SEG91 [39] phi from loop::@9 to loop::@1 [phi:loop::@9->loop::@1]
  //SEG92 [39] phi (byte) sin_idx#10 = (byte) sin_idx#3 [phi:loop::@9->loop::@1#0] -- register_copy 
    jmp b4
}
//SEG93 sprites_irq_init
// Setup the IRQ
sprites_irq_init: {
  //SEG94 asm { sei  }
    sei
  //SEG95 [50] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge any IRQ and setup the next one
    lda #IRQ_RASTER
    sta IRQ_STATUS
  //SEG96 asm { ldaCIA1_INTERRUPT  }
    lda CIA1_INTERRUPT
  //SEG97 [52] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
  //SEG98 [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
  //SEG99 [54] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
  //SEG100 [55] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line
    lda VIC_CONTROL
    and #$7f
    sta VIC_CONTROL
  //SEG101 [56] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 
    lda #IRQ_RASTER_FIRST
    sta RASTER
  //SEG102 [57] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
  //SEG103 [58] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<sprites_irq
    sta HARDWARE_IRQ
    lda #>sprites_irq
    sta HARDWARE_IRQ+1
  //SEG104 asm { cli  }
    cli
  //SEG105 sprites_irq_init::@return
  //SEG106 [60] return 
    rts
}
//SEG107 sprites_init
// Setup the sprites
sprites_init: {
    .label xpos = 2
  //SEG108 [61] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15 -- _deref_pbuc1=vbuc2 
    lda #$f
    sta SPRITES_ENABLE
  //SEG109 [62] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta SPRITES_MC
  //SEG110 [63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 
    sta SPRITES_EXPAND_Y
  //SEG111 [64] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 
    sta SPRITES_EXPAND_X
  //SEG112 [65] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1]
  //SEG113 [65] phi (byte) sprites_init::xpos#2 = (byte/signed byte/word/signed word/dword/signed dword) 24+(byte/signed byte/word/signed word/dword/signed dword) 15*(byte/signed byte/word/signed word/dword/signed dword) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 
    lda #$18+$f*8
    sta xpos
  //SEG114 [65] phi (byte) sprites_init::s#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuxx=vbuc1 
    ldx #0
  //SEG115 [65] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1]
  //SEG116 [65] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy 
  //SEG117 [65] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy 
  //SEG118 sprites_init::@1
  b1:
  //SEG119 [66] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
  //SEG120 [67] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda xpos
    sta SPRITES_XPOS,y
  //SEG121 [68] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #BLACK
    sta SPRITES_COLS,x
  //SEG122 [69] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$18
    clc
    adc xpos
    sta xpos
  //SEG123 [70] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG124 [71] if((byte) sprites_init::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto sprites_init::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #4
    bne b1
  //SEG125 sprites_init::@return
  //SEG126 [72] return 
    rts
}
//SEG127 sprites_irq
// Raster Interrupt Routine - sets up the sprites covering the playfield
// Repeats 10 timers every 2 lines from line IRQ_RASTER_FIRST
// Utilizes duplicated gfx in the sprites to allow for some leeway in updating the sprite pointers
sprites_irq: {
    .const toSpritePtr2_return = PLAYFIELD_SPRITES>>6
    .label raster_sprite_gfx_modify = $a
  //SEG128 entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    stx regx+1
  //SEG129 asm { cld  }
    //(*BGCOL)++;
    // Clear decimal flag (because it is used by the score algorithm)
    cld
  //SEG130 [74] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 
    // Place the sprites
    lda irq_sprite_ypos
  //SEG131 [75] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS
  //SEG132 [76] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+2
  //SEG133 [77] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+4
  //SEG134 [78] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+6
  //SEG135 [79] (byte/signed word/word/dword/signed dword~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuz1_plus_1 
    ldx irq_raster_next
    inx
  //SEG136 [80] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte/signed word/word/dword/signed dword~) sprites_irq::$0 -- vbuz1=vbuxx 
    // Wait for the y-position before changing sprite pointers
    stx raster_sprite_gfx_modify
  //SEG137 sprites_irq::@1
  b1:
  //SEG138 [81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 -- _deref_pbuc1_lt_vbuz1_then_la1 
    lda RASTER
    cmp raster_sprite_gfx_modify
    bcc b1
  //SEG139 sprites_irq::@8
  //SEG140 [82] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 
    ldx irq_sprite_ptr
  //SEG141 [83] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 -- vbuz1_eq_0_then_la1 
    lda render_screen_showing
    cmp #0
    beq b2
  //SEG142 sprites_irq::@9
  //SEG143 [84] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_2
  //SEG144 [85] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx 
    txa
    clc
    adc #1
  //SEG145 [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+1
  //SEG146 [87] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+2
  //SEG147 [88] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
  //SEG148 [89] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+3
  //SEG149 sprites_irq::@3
  b3:
  //SEG150 [90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 
    inc irq_cnt
  //SEG151 [91] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 
    lda irq_cnt
    cmp #9
    beq b4
  //SEG152 sprites_irq::@11
  //SEG153 [92] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 -- vbuz1_eq_vbuc1_then_la1 
    cmp #$a
    beq b5
  //SEG154 sprites_irq::@12
  //SEG155 [93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 20 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$14
    clc
    adc irq_raster_next
    sta irq_raster_next
  //SEG156 [94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$15
    clc
    adc irq_sprite_ypos
    sta irq_sprite_ypos
  //SEG157 [95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lda #3
    clc
    adc irq_sprite_ptr
    sta irq_sprite_ptr
  //SEG158 [96] phi from sprites_irq::@12 sprites_irq::@15 sprites_irq::@5 to sprites_irq::@7 [phi:sprites_irq::@12/sprites_irq::@15/sprites_irq::@5->sprites_irq::@7]
  //SEG159 [96] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#3 [phi:sprites_irq::@12/sprites_irq::@15/sprites_irq::@5->sprites_irq::@7#0] -- register_copy 
  //SEG160 sprites_irq::@7
  b7:
  //SEG161 [97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 
    // Setup next interrupt
    lda irq_raster_next
    sta RASTER
  //SEG162 [98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ and setup the next one
    lda #IRQ_RASTER
    sta IRQ_STATUS
  //SEG163 sprites_irq::@return
  //SEG164 [99] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
  regx:
    ldx #00
    rti
  //SEG165 sprites_irq::@5
  b5:
  //SEG166 [100] (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1 
    lda #0
    sta irq_cnt
  //SEG167 [101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
    lda #IRQ_RASTER_FIRST
    sta irq_raster_next
  //SEG168 [102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$15
    clc
    adc irq_sprite_ypos
    sta irq_sprite_ypos
  //SEG169 [103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lda #3
    clc
    adc irq_sprite_ptr
    sta irq_sprite_ptr
    jmp b7
  //SEG170 sprites_irq::@4
  b4:
  //SEG171 [104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1 
    lda #$15
    clc
    adc irq_raster_next
    sta irq_raster_next
  //SEG172 [105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 
    lda #SPRITES_FIRST_YPOS
    sta irq_sprite_ypos
  //SEG173 [106] phi from sprites_irq::@4 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@4->sprites_irq::toSpritePtr2]
  //SEG174 sprites_irq::toSpritePtr2
  //SEG175 sprites_irq::@15
  //SEG176 [107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 
    lda #toSpritePtr2_return
    sta irq_sprite_ptr
    jmp b7
  //SEG177 sprites_irq::@2
  b2:
  //SEG178 [108] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1
  //SEG179 [109] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx 
    txa
    clc
    adc #1
  //SEG180 [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+1
  //SEG181 [111] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+2
  //SEG182 [112] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
  //SEG183 [113] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+3
    jmp b3
}
.pc = PLAYFIELD_SPRITES "PLAYFIELD_SPRITES"
  .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000))
	// Put the sprites into memory 
	.for(var sy=0;sy<10;sy++) {
	    .var sprite_gfx_y = sy*20
		.for(var sx=0;sx<3;sx++) {
	    	.for (var y=0;y<21; y++) {
	    	    .var gfx_y =  sprite_gfx_y + mod(2100+y-sprite_gfx_y,21)
		    	.for (var c=0; c<3; c++) {
	            	.byte sprites.getSinglecolorByte(sx*3+c,gfx_y)
	            }
	        }
	    	.byte 0
	  	}
	}

.pc = SIN "SIN"
  .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }

.pc = SIN_SPRITE "SIN_SPRITE"
  .fill $40, $ff


