Resolved forward reference sprites_irq to interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
Identified constant variable (byte*) current_piece_gfx
Identified constant variable (byte) current_piece_char
Identified constant variable (byte) current_xpos
Identified constant variable (byte) current_ypos
Identified constant variable (byte) render_screen_render
Identified constant variable (byte) render_screen_show
Identified constant variable (dword) score_bcd
Identified constant variable (word) lines_bcd
Identified constant variable (byte) level_bcd
Identified constant variable (byte) level
Identified constant variable (byte) game_over
Identified constant variable (byte*) SIN_SPRITE
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::$7 ← call toSpritePtr (byte*) SIN_SPRITE 
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) sprites_init::@2
Culled Empty Block (label) toSpritePtr1_@1
Culled Empty Block (label) @6
Culled Empty Block (label) sprites_irq::@14
Culled Empty Block (label) sprites_irq::toSpritePtr2_@1
Culled Empty Block (label) sprites_irq::@5
Culled Empty Block (label) sprites_irq::@9
Culled Empty Block (label) sprites_irq::@10
Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@1
Culled Empty Block (label) main::vicSelectGfxBank1_@return
Culled Empty Block (label) main::toD0181_@1
Culled Empty Block (label) main::toSpritePtr2_@1
Culled Empty Block (label) @8
Culled Empty Block (label) loop::@2
Culled Empty Block (label) loop::@9
Culled Empty Block (label) loop::@3
Culled Empty Block (label) loop::@10
Culled Empty Block (label) loop::@8

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) PROCPORT_DDR#0 ← ((byte*)) (number) 0
  (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
  (byte*) PROCPORT#0 ← ((byte*)) (number) 1
  (byte) PROCPORT_RAM_IO#0 ← (number) 5
  (word) SPRITE_PTRS#0 ← (number) $3f8
  (byte*) SPRITES_XPOS#0 ← ((byte*)) (number) $d000
  (byte*) SPRITES_YPOS#0 ← ((byte*)) (number) $d001
  (byte*) RASTER#0 ← ((byte*)) (number) $d012
  (byte*) SPRITES_ENABLE#0 ← ((byte*)) (number) $d015
  (byte*) SPRITES_EXPAND_Y#0 ← ((byte*)) (number) $d017
  (byte*) SPRITES_MC#0 ← ((byte*)) (number) $d01c
  (byte*) SPRITES_EXPAND_X#0 ← ((byte*)) (number) $d01d
  (byte*) SPRITES_COLS#0 ← ((byte*)) (number) $d027
  (byte*) VIC_CONTROL#0 ← ((byte*)) (number) $d011
  (byte*) D018#0 ← ((byte*)) (number) $d018
  (byte*) IRQ_STATUS#0 ← ((byte*)) (number) $d019
  (byte*) IRQ_ENABLE#0 ← ((byte*)) (number) $d01a
  (byte) IRQ_RASTER#0 ← (number) 1
  (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d
  (byte*) CIA2_PORT_A#0 ← ((byte*)) (number) $dd00
  (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (number) $dd02
  (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
  (void()**) HARDWARE_IRQ#0 ← ((void()**)) (number) $fffe
  (byte) BLACK#0 ← (number) 0
  to:@4
@4: scope:[]  from @begin
  (byte*) PLAYFIELD_SCREEN_1#0 ← ((byte*)) (number) $400
  (byte*) PLAYFIELD_SCREEN_2#0 ← ((byte*)) (number) $2c00
  (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_SPRITES#0 ← ((byte*)) (number) $2000
  (byte*) PLAYFIELD_CHARSET#0 ← ((byte*)) (number) $2800
  (byte) render_screen_showing#0 ← (number) 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) ← (number) $f
  *((byte*) SPRITES_MC#0) ← (number) 0
  *((byte*) SPRITES_EXPAND_Y#0) ← *((byte*) SPRITES_MC#0)
  *((byte*) SPRITES_EXPAND_X#0) ← *((byte*) SPRITES_EXPAND_Y#0)
  (byte) sprites_init::xpos#0 ← (number) $18+(number) $f*(number) 8
  (byte) sprites_init::s#0 ← (byte) 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 )
  (number~) sprites_init::$0 ← (byte) sprites_init::s#2 * (number) 2
  (byte) sprites_init::s2#0 ← (number~) sprites_init::$0
  *((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
  (number~) sprites_init::$1 ← (byte) sprites_init::xpos#2 + (number) $18
  (byte) sprites_init::xpos#1 ← (number~) sprites_init::$1
  (byte) sprites_init::s#1 ← (byte) sprites_init::s#2 + rangenext(0,3)
  (bool~) sprites_init::$2 ← (byte) sprites_init::s#1 != rangelast(0,3)
  if((bool~) sprites_init::$2) 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 ← (number) $31
  (number~) $3 ← (byte) SPRITES_FIRST_YPOS#0 + (number) $13
  (byte) IRQ_RASTER_FIRST#0 ← (number~) $3
  (byte) irq_raster_next#0 ← (byte) IRQ_RASTER_FIRST#0
  (number~) $4 ← (byte) SPRITES_FIRST_YPOS#0 + (number) $15
  (byte) irq_sprite_ypos#0 ← (number~) $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
  (number~) toSpritePtr1_$1#0 ← (word~) toSpritePtr1_$0#0 / (number) $40
  (byte~) toSpritePtr1_$2#0 ← ((byte)) (number~) 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
  (number~) $6 ← (byte~) $5 + (number) 3
  (byte) irq_sprite_ptr#0 ← (number~) $6
  (byte) irq_cnt#0 ← (number) 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) & (number) $7f
  *((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 + (number) 0) ← (byte) sprites_irq::ypos#0
  *((byte*) SPRITES_YPOS#0 + (number) 2) ← (byte) sprites_irq::ypos#0
  *((byte*) SPRITES_YPOS#0 + (number) 4) ← (byte) sprites_irq::ypos#0
  *((byte*) SPRITES_YPOS#0 + (number) 6) ← (byte) sprites_irq::ypos#0
  (number~) sprites_irq::$0 ← (byte) irq_raster_next#5 + (number) 1
  (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (number~) sprites_irq::$0
  to:sprites_irq::@11
sprites_irq::@11: scope:[sprites_irq]  from sprites_irq sprites_irq::@11
  (byte) irq_sprite_ypos#23 ← phi( sprites_irq/(byte) irq_sprite_ypos#5 sprites_irq::@11/(byte) irq_sprite_ypos#23 )
  (byte) irq_raster_next#22 ← phi( sprites_irq/(byte) irq_raster_next#5 sprites_irq::@11/(byte) irq_raster_next#22 )
  (byte) irq_cnt#13 ← phi( sprites_irq/(byte) irq_cnt#15 sprites_irq::@11/(byte) irq_cnt#13 )
  (byte) render_screen_showing#2 ← phi( sprites_irq/(byte) render_screen_showing#3 sprites_irq::@11/(byte) render_screen_showing#2 )
  (byte) irq_sprite_ptr#9 ← phi( sprites_irq/(byte) irq_sprite_ptr#12 sprites_irq::@11/(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::@11/(byte) sprites_irq::raster_sprite_gfx_modify#1 )
  (bool~) sprites_irq::$4 ← *((byte*) RASTER#0) < (byte) sprites_irq::raster_sprite_gfx_modify#1
  if((bool~) sprites_irq::$4) goto sprites_irq::@11
  to:sprites_irq::@12
sprites_irq::@12: scope:[sprites_irq]  from sprites_irq::@11
  (byte) irq_sprite_ypos#20 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#23 )
  (byte) irq_raster_next#18 ← phi( sprites_irq::@11/(byte) irq_raster_next#22 )
  (byte) irq_cnt#10 ← phi( sprites_irq::@11/(byte) irq_cnt#13 )
  (byte) render_screen_showing#1 ← phi( sprites_irq::@11/(byte) render_screen_showing#2 )
  (byte) irq_sprite_ptr#5 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#9 )
  (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#5
  (bool~) sprites_irq::$1 ← (byte) render_screen_showing#1 == (number) 0
  if((bool~) sprites_irq::$1) goto sprites_irq::@1
  to:sprites_irq::@13
sprites_irq::@1: scope:[sprites_irq]  from sprites_irq::@12
  (byte) irq_sprite_ptr#15 ← phi( sprites_irq::@12/(byte) irq_sprite_ptr#5 )
  (byte) irq_sprite_ypos#15 ← phi( sprites_irq::@12/(byte) irq_sprite_ypos#20 )
  (byte) irq_raster_next#14 ← phi( sprites_irq::@12/(byte) irq_raster_next#18 )
  (byte) irq_cnt#7 ← phi( sprites_irq::@12/(byte) irq_cnt#10 )
  (byte) sprites_irq::ptr#5 ← phi( sprites_irq::@12/(byte) sprites_irq::ptr#0 )
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 0) ← (byte) sprites_irq::ptr#5
  (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#5
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 1) ← (byte) sprites_irq::ptr#1
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 2) ← (byte) sprites_irq::ptr#1
  (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 3) ← (byte) sprites_irq::ptr#2
  to:sprites_irq::@2
sprites_irq::@13: scope:[sprites_irq]  from sprites_irq::@12
  (byte) irq_sprite_ptr#16 ← phi( sprites_irq::@12/(byte) irq_sprite_ptr#5 )
  (byte) irq_sprite_ypos#16 ← phi( sprites_irq::@12/(byte) irq_sprite_ypos#20 )
  (byte) irq_raster_next#15 ← phi( sprites_irq::@12/(byte) irq_raster_next#18 )
  (byte) irq_cnt#8 ← phi( sprites_irq::@12/(byte) irq_cnt#10 )
  (byte) sprites_irq::ptr#6 ← phi( sprites_irq::@12/(byte) sprites_irq::ptr#0 )
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 0) ← (byte) sprites_irq::ptr#6
  (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#6
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 1) ← (byte) sprites_irq::ptr#3
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 2) ← (byte) sprites_irq::ptr#3
  (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3
  *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 3) ← (byte) sprites_irq::ptr#4
  to:sprites_irq::@2
sprites_irq::@2: scope:[sprites_irq]  from sprites_irq::@1 sprites_irq::@13
  (byte) irq_sprite_ptr#13 ← phi( sprites_irq::@1/(byte) irq_sprite_ptr#15 sprites_irq::@13/(byte) irq_sprite_ptr#16 )
  (byte) irq_sprite_ypos#12 ← phi( sprites_irq::@1/(byte) irq_sprite_ypos#15 sprites_irq::@13/(byte) irq_sprite_ypos#16 )
  (byte) irq_raster_next#11 ← phi( sprites_irq::@1/(byte) irq_raster_next#14 sprites_irq::@13/(byte) irq_raster_next#15 )
  (byte) irq_cnt#4 ← phi( sprites_irq::@1/(byte) irq_cnt#7 sprites_irq::@13/(byte) irq_cnt#8 )
  (byte) irq_cnt#1 ← ++ (byte) irq_cnt#4
  (bool~) sprites_irq::$2 ← (byte) irq_cnt#1 == (number) 9
  if((bool~) sprites_irq::$2) goto sprites_irq::@3
  to:sprites_irq::@7
sprites_irq::@3: scope:[sprites_irq]  from sprites_irq::@2
  (byte) irq_cnt#18 ← phi( sprites_irq::@2/(byte) irq_cnt#1 )
  (byte) irq_raster_next#6 ← phi( sprites_irq::@2/(byte) irq_raster_next#11 )
  (byte) irq_raster_next#1 ← (byte) irq_raster_next#6 + (number) $15
  (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::@3
  (byte) irq_sprite_ypos#21 ← phi( sprites_irq::@3/(byte) irq_sprite_ypos#1 )
  (byte) irq_cnt#16 ← phi( sprites_irq::@3/(byte) irq_cnt#18 )
  (byte) irq_raster_next#19 ← phi( sprites_irq::@3/(byte) irq_raster_next#1 )
  (byte*) sprites_irq::toSpritePtr2_sprite#1 ← phi( sprites_irq::@3/(byte*) sprites_irq::toSpritePtr2_sprite#0 )
  (word~) sprites_irq::toSpritePtr2_$0#0 ← ((word)) (byte*) sprites_irq::toSpritePtr2_sprite#1
  (number~) sprites_irq::toSpritePtr2_$1#0 ← (word~) sprites_irq::toSpritePtr2_$0#0 / (number) $40
  (byte~) sprites_irq::toSpritePtr2_$2#0 ← ((byte)) (number~) 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#11 ← 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::@6
sprites_irq::@7: scope:[sprites_irq]  from sprites_irq::@2
  (byte) irq_raster_next#12 ← phi( sprites_irq::@2/(byte) irq_raster_next#11 )
  (byte) irq_sprite_ptr#10 ← phi( sprites_irq::@2/(byte) irq_sprite_ptr#13 )
  (byte) irq_sprite_ypos#10 ← phi( sprites_irq::@2/(byte) irq_sprite_ypos#12 )
  (byte) irq_cnt#5 ← phi( sprites_irq::@2/(byte) irq_cnt#1 )
  (bool~) sprites_irq::$3 ← (byte) irq_cnt#5 == (number) $a
  if((bool~) sprites_irq::$3) goto sprites_irq::@4
  to:sprites_irq::@8
sprites_irq::@4: scope:[sprites_irq]  from sprites_irq::@7
  (byte) irq_sprite_ptr#6 ← phi( sprites_irq::@7/(byte) irq_sprite_ptr#10 )
  (byte) irq_sprite_ypos#6 ← phi( sprites_irq::@7/(byte) irq_sprite_ypos#10 )
  (byte) irq_cnt#2 ← (number) 0
  (byte) irq_raster_next#2 ← (byte) IRQ_RASTER_FIRST#0
  (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#6 + (number) $15
  (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#6 + (number) 3
  to:sprites_irq::@6
sprites_irq::@8: scope:[sprites_irq]  from sprites_irq::@7
  (byte) irq_cnt#12 ← phi( sprites_irq::@7/(byte) irq_cnt#5 )
  (byte) irq_sprite_ptr#7 ← phi( sprites_irq::@7/(byte) irq_sprite_ptr#10 )
  (byte) irq_sprite_ypos#7 ← phi( sprites_irq::@7/(byte) irq_sprite_ypos#10 )
  (byte) irq_raster_next#7 ← phi( sprites_irq::@7/(byte) irq_raster_next#12 )
  (byte) irq_raster_next#3 ← (byte) irq_raster_next#7 + (number) $14
  (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#7 + (number) $15
  (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#7 + (number) 3
  to:sprites_irq::@6
sprites_irq::@6: scope:[sprites_irq]  from sprites_irq::@15 sprites_irq::@4 sprites_irq::@8
  (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@15/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@8/(byte) irq_sprite_ptr#3 )
  (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@15/(byte) irq_sprite_ypos#13 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@8/(byte) irq_sprite_ypos#3 )
  (byte) irq_cnt#9 ← phi( sprites_irq::@15/(byte) irq_cnt#11 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@8/(byte) irq_cnt#12 )
  (byte) irq_raster_next#8 ← phi( sprites_irq::@15/(byte) irq_raster_next#13 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@8/(byte) irq_raster_next#3 )
  *((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::@6
  (byte) irq_sprite_ptr#8 ← phi( sprites_irq::@6/(byte) irq_sprite_ptr#11 )
  (byte) irq_sprite_ypos#8 ← phi( sprites_irq::@6/(byte) irq_sprite_ypos#11 )
  (byte) irq_raster_next#9 ← phi( sprites_irq::@6/(byte) irq_raster_next#8 )
  (byte) irq_cnt#6 ← phi( sprites_irq::@6/(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[$100]) SIN#0 ← kickasm {{ .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }
 }}
  (byte*) SIN_SPRITE#0 ← ((byte*)) (number) $2800
  kickasm(location (byte*) SIN_SPRITE#0) {{ .fill $40, $ff
 }}
  (byte) sin_idx#0 ← (number) 0
  to:@9
main: scope:[main]  from @9
  (byte) sin_idx#32 ← phi( @9/(byte) sin_idx#16 )
  (byte*) main::vicSelectGfxBank1_gfx#0 ← (byte*) PLAYFIELD_SCREEN_1#0
  to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main]  from main
  (byte) sin_idx#31 ← phi( main/(byte) sin_idx#32 )
  (byte*) main::vicSelectGfxBank1_gfx#1 ← phi( main/(byte*) main::vicSelectGfxBank1_gfx#0 )
  *((byte*) CIA2_PORT_A_DDR#0) ← (number) 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_idx#30 ← phi( main::vicSelectGfxBank1/(byte) sin_idx#31 )
  (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
  (number~) main::vicSelectGfxBank1_toDd001_$2#0 ← (byte~) main::vicSelectGfxBank1_toDd001_$1#0 / (number) $40
  (number~) main::vicSelectGfxBank1_toDd001_$3#0 ← (number) 3 ^ (number~) main::vicSelectGfxBank1_toDd001_$2#0
  (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (number~) main::vicSelectGfxBank1_toDd001_$3#0
  to:main::vicSelectGfxBank1_toDd001_@return
main::vicSelectGfxBank1_toDd001_@return: scope:[main]  from main::vicSelectGfxBank1_toDd001
  (byte) sin_idx#29 ← phi( main::vicSelectGfxBank1_toDd001/(byte) sin_idx#30 )
  (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_idx#28 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte) sin_idx#29 )
  (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_idx#27 ← phi( main::vicSelectGfxBank1_@1/(byte) sin_idx#28 )
  (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_idx#26 ← phi( main::@3/(byte) sin_idx#27 )
  (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
  (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff
  (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4
  (number~) main::toD0181_$3#0 ← > (number~) 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
  (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4
  (number~) main::toD0181_$7#0 ← (number~) main::toD0181_$6#0 & (number) $f
  (number~) main::toD0181_$8#0 ← (number~) main::toD0181_$3#0 | (number~) main::toD0181_$7#0
  (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0
  to:main::toD0181_@return
main::toD0181_@return: scope:[main]  from main::toD0181
  (byte) sin_idx#25 ← phi( main::toD0181/(byte) sin_idx#26 )
  (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_idx#24 ← phi( main::toD0181_@return/(byte) sin_idx#25 )
  (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_idx#23 ← phi( main::@4/(byte) sin_idx#24 )
  *((byte*) SPRITES_ENABLE#0) ← (number) $ff
  (byte) main::xpos#0 ← (number) $18
  (byte) main::ypos#0 ← (number) $32
  (byte) main::s#0 ← (byte) 4
  to:main::@1
main::@1: scope:[main]  from main::@5 main::@6
  (byte) sin_idx#22 ← phi( main::@5/(byte) sin_idx#19 main::@6/(byte) sin_idx#23 )
  (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 )
  (number~) main::$5 ← (byte) main::s#2 * (number) 2
  (byte) main::s2#0 ← (number~) main::$5
  *((byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2
  *((byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2
  (number~) main::$6 ← (byte) main::s#2 - (number) 3
  *((byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (number~) main::$6
  (byte*) main::toSpritePtr2_sprite#0 ← (byte*) SIN_SPRITE#0
  to:main::toSpritePtr2
main::toSpritePtr2: scope:[main]  from main::@1
  (byte) sin_idx#21 ← phi( main::@1/(byte) sin_idx#22 )
  (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
  (number~) main::toSpritePtr2_$1#0 ← (word~) main::toSpritePtr2_$0#0 / (number) $40
  (byte~) main::toSpritePtr2_$2#0 ← ((byte)) (number~) 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_idx#20 ← phi( main::toSpritePtr2/(byte) sin_idx#21 )
  (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_idx#19 ← phi( main::toSpritePtr2_@return/(byte) sin_idx#20 )
  (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::$7 ← (byte) main::toSpritePtr2_return#3
  *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#3) ← (byte~) main::$7
  (byte) main::xpos#1 ← (byte) main::xpos#3 + (number) $18
  (byte) main::ypos#1 ← (byte) main::ypos#3 + (number) $18
  (byte) main::s#1 ← (byte) main::s#3 + rangenext(4,7)
  (bool~) main::$8 ← (byte) main::s#1 != rangelast(4,7)
  if((bool~) main::$8) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@5
  (byte) sin_idx#17 ← phi( main::@5/(byte) sin_idx#19 )
  call sprites_irq_init 
  to:main::@7
main::@7: scope:[main]  from main::@2
  (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_idx#18 ← phi( main::@7/(byte) sin_idx#12 )
  to:loop::@1
loop::@1: scope:[loop]  from loop loop::@7
  (byte) sin_idx#15 ← phi( loop/(byte) sin_idx#18 loop::@7/(byte) sin_idx#3 )
  if(true) goto loop::@4
  to:loop::@return
loop::@4: scope:[loop]  from loop::@1 loop::@4
  (byte) sin_idx#13 ← phi( loop::@1/(byte) sin_idx#15 loop::@4/(byte) sin_idx#13 )
  (bool~) loop::$0 ← *((byte*) RASTER#0) != (number) $ff
  if((bool~) loop::$0) goto loop::@4
  to:loop::@5
loop::@5: scope:[loop]  from loop::@4
  (byte) sin_idx#8 ← phi( loop::@4/(byte) sin_idx#13 )
  (byte) loop::idx#0 ← (byte) sin_idx#8
  (byte) loop::s#0 ← (byte) 4
  to:loop::@6
loop::@6: scope:[loop]  from loop::@5 loop::@6
  (byte) sin_idx#14 ← phi( loop::@5/(byte) sin_idx#8 loop::@6/(byte) sin_idx#14 )
  (byte) loop::idx#2 ← phi( loop::@5/(byte) loop::idx#0 loop::@6/(byte) loop::idx#1 )
  (byte) loop::s#2 ← phi( loop::@5/(byte) loop::s#0 loop::@6/(byte) loop::s#1 )
  (number~) loop::$1 ← (byte) loop::s#2 * (number) 2
  *((byte*) SPRITES_YPOS#0 + (number~) loop::$1) ← *((byte[$100]) SIN#0 + (byte) loop::idx#2)
  (byte) loop::idx#1 ← (byte) loop::idx#2 + (number) $a
  (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::@6
  to:loop::@7
loop::@7: scope:[loop]  from loop::@6
  (byte) sin_idx#9 ← phi( loop::@6/(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) 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
(number~) $3
(number~) $4
(byte~) $5
(number~) $6
(label) @10
(label) @11
(label) @4
(label) @5
(label) @7
(label) @9
(label) @begin
(label) @end
(byte) BLACK
(byte) BLACK#0
(byte*) CIA1_INTERRUPT
(byte*) CIA1_INTERRUPT#0
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A#0
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_A_DDR#0
(byte) CIA_INTERRUPT_CLEAR
(byte) CIA_INTERRUPT_CLEAR#0
(byte*) D018
(byte*) D018#0
(void()**) HARDWARE_IRQ
(void()**) HARDWARE_IRQ#0
(byte*) IRQ_ENABLE
(byte*) IRQ_ENABLE#0
(byte) IRQ_RASTER
(byte) IRQ_RASTER#0
(byte) IRQ_RASTER_FIRST
(byte) IRQ_RASTER_FIRST#0
(byte*) IRQ_STATUS
(byte*) IRQ_STATUS#0
(byte*) PLAYFIELD_CHARSET
(byte*) PLAYFIELD_CHARSET#0
(byte*) PLAYFIELD_SCREEN_1
(byte*) PLAYFIELD_SCREEN_1#0
(byte*) PLAYFIELD_SCREEN_2
(byte*) PLAYFIELD_SCREEN_2#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_DDR
(byte*) PROCPORT_DDR#0
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_DDR_MEMORY_MASK#0
(byte) PROCPORT_RAM_IO
(byte) PROCPORT_RAM_IO#0
(byte*) RASTER
(byte*) RASTER#0
(byte[$100]) SIN
(byte[$100]) SIN#0
(byte*) SIN_SPRITE
(byte*) SIN_SPRITE#0
(byte*) SPRITES_COLS
(byte*) SPRITES_COLS#0
(byte*) SPRITES_ENABLE
(byte*) SPRITES_ENABLE#0
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_X#0
(byte*) SPRITES_EXPAND_Y
(byte*) SPRITES_EXPAND_Y#0
(byte) SPRITES_FIRST_YPOS
(byte) SPRITES_FIRST_YPOS#0
(byte*) SPRITES_MC
(byte*) SPRITES_MC#0
(byte*) SPRITES_XPOS
(byte*) SPRITES_XPOS#0
(byte*) SPRITES_YPOS
(byte*) SPRITES_YPOS#0
(word) SPRITE_PTRS
(word) SPRITE_PTRS#0
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL#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
(void()) loop()
(bool~) loop::$0
(number~) loop::$1
(bool~) loop::$2
(label) loop::@1
(label) loop::@4
(label) loop::@5
(label) loop::@6
(label) loop::@7
(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
(number~) main::$5
(number~) main::$6
(byte~) main::$7
(bool~) main::$8
(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
(number~) main::toD0181_$1
(number~) main::toD0181_$1#0
(number~) main::toD0181_$2
(number~) main::toD0181_$2#0
(number~) main::toD0181_$3
(number~) main::toD0181_$3#0
(word~) main::toD0181_$4
(word~) main::toD0181_$4#0
(byte~) main::toD0181_$5
(byte~) main::toD0181_$5#0
(number~) main::toD0181_$6
(number~) main::toD0181_$6#0
(number~) main::toD0181_$7
(number~) main::toD0181_$7#0
(number~) main::toD0181_$8
(number~) 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
(number~) main::toSpritePtr2_$1
(number~) 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
(number~) main::vicSelectGfxBank1_toDd001_$2
(number~) main::vicSelectGfxBank1_toDd001_$2#0
(number~) main::vicSelectGfxBank1_toDd001_$3
(number~) 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) 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
(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#4
(byte) sin_idx#5
(byte) sin_idx#6
(byte) sin_idx#7
(byte) sin_idx#8
(byte) sin_idx#9
(void()) sprites_init()
(number~) sprites_init::$0
(number~) sprites_init::$1
(bool~) sprites_init::$2
(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()
(number~) 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::@13
(label) sprites_irq::@15
(label) sprites_irq::@2
(label) sprites_irq::@3
(label) sprites_irq::@4
(label) sprites_irq::@6
(label) sprites_irq::@7
(label) sprites_irq::@8
(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
(number~) sprites_irq::toSpritePtr2_$1
(number~) 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
(number~) toSpritePtr1_$1
(number~) 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

Adding number conversion cast (unumber) 7 in (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
Adding number conversion cast (unumber) 5 in (byte) PROCPORT_RAM_IO#0 ← (number) 5
Adding number conversion cast (unumber) $3f8 in (word) SPRITE_PTRS#0 ← (number) $3f8
Adding number conversion cast (unumber) 1 in (byte) IRQ_RASTER#0 ← (number) 1
Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) render_screen_showing#0 ← (number) 0
Adding number conversion cast (unumber) $f in *((byte*) SPRITES_ENABLE#0) ← (number) $f
Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_MC#0) ← (number) 0
Adding number conversion cast (unumber) $18+$f*8 in (byte) sprites_init::xpos#0 ← (number) $18+(number) $f*(number) 8
Adding number conversion cast (unumber) 2 in (number~) sprites_init::$0 ← (byte) sprites_init::s#2 * (number) 2
Adding number conversion cast (unumber) sprites_init::$0 in (number~) sprites_init::$0 ← (byte) sprites_init::s#2 * (unumber)(number) 2
Adding number conversion cast (unumber) $18 in (number~) sprites_init::$1 ← (byte) sprites_init::xpos#2 + (number) $18
Adding number conversion cast (unumber) sprites_init::$1 in (number~) sprites_init::$1 ← (byte) sprites_init::xpos#2 + (unumber)(number) $18
Adding number conversion cast (unumber) $31 in (byte) SPRITES_FIRST_YPOS#0 ← (number) $31
Adding number conversion cast (unumber) $13 in (number~) $3 ← (byte) SPRITES_FIRST_YPOS#0 + (number) $13
Adding number conversion cast (unumber) $3 in (number~) $3 ← (byte) SPRITES_FIRST_YPOS#0 + (unumber)(number) $13
Adding number conversion cast (unumber) $15 in (number~) $4 ← (byte) SPRITES_FIRST_YPOS#0 + (number) $15
Adding number conversion cast (unumber) $4 in (number~) $4 ← (byte) SPRITES_FIRST_YPOS#0 + (unumber)(number) $15
Adding number conversion cast (unumber) $40 in (number~) toSpritePtr1_$1#0 ← (word~) toSpritePtr1_$0#0 / (number) $40
Adding number conversion cast (unumber) toSpritePtr1_$1#0 in (number~) toSpritePtr1_$1#0 ← (word~) toSpritePtr1_$0#0 / (unumber)(number) $40
Adding number conversion cast (unumber) 3 in (number~) $6 ← (byte~) $5 + (number) 3
Adding number conversion cast (unumber) $6 in (number~) $6 ← (byte~) $5 + (unumber)(number) 3
Adding number conversion cast (unumber) 0 in (byte) irq_cnt#0 ← (number) 0
Adding number conversion cast (unumber) $7f in *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) & (number) $7f
Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_YPOS#0 + (number) 0) ← (byte) sprites_irq::ypos#0
Adding number conversion cast (unumber) 2 in *((byte*) SPRITES_YPOS#0 + (number) 2) ← (byte) sprites_irq::ypos#0
Adding number conversion cast (unumber) 4 in *((byte*) SPRITES_YPOS#0 + (number) 4) ← (byte) sprites_irq::ypos#0
Adding number conversion cast (unumber) 6 in *((byte*) SPRITES_YPOS#0 + (number) 6) ← (byte) sprites_irq::ypos#0
Adding number conversion cast (unumber) 1 in (number~) sprites_irq::$0 ← (byte) irq_raster_next#5 + (number) 1
Adding number conversion cast (unumber) sprites_irq::$0 in (number~) sprites_irq::$0 ← (byte) irq_raster_next#5 + (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) sprites_irq::$1 ← (byte) render_screen_showing#1 == (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 0) ← (byte) sprites_irq::ptr#5
Adding number conversion cast (unumber) 1 in *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 1) ← (byte) sprites_irq::ptr#1
Adding number conversion cast (unumber) 2 in *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 2) ← (byte) sprites_irq::ptr#1
Adding number conversion cast (unumber) 3 in *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (number) 3) ← (byte) sprites_irq::ptr#2
Adding number conversion cast (unumber) 0 in *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 0) ← (byte) sprites_irq::ptr#6
Adding number conversion cast (unumber) 1 in *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 1) ← (byte) sprites_irq::ptr#3
Adding number conversion cast (unumber) 2 in *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 2) ← (byte) sprites_irq::ptr#3
Adding number conversion cast (unumber) 3 in *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (number) 3) ← (byte) sprites_irq::ptr#4
Adding number conversion cast (unumber) 9 in (bool~) sprites_irq::$2 ← (byte) irq_cnt#1 == (number) 9
Adding number conversion cast (unumber) $15 in (byte) irq_raster_next#1 ← (byte) irq_raster_next#6 + (number) $15
Adding number conversion cast (unumber) $40 in (number~) sprites_irq::toSpritePtr2_$1#0 ← (word~) sprites_irq::toSpritePtr2_$0#0 / (number) $40
Adding number conversion cast (unumber) sprites_irq::toSpritePtr2_$1#0 in (number~) sprites_irq::toSpritePtr2_$1#0 ← (word~) sprites_irq::toSpritePtr2_$0#0 / (unumber)(number) $40
Adding number conversion cast (unumber) $a in (bool~) sprites_irq::$3 ← (byte) irq_cnt#5 == (number) $a
Adding number conversion cast (unumber) 0 in (byte) irq_cnt#2 ← (number) 0
Adding number conversion cast (unumber) $15 in (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#6 + (number) $15
Adding number conversion cast (unumber) 3 in (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#6 + (number) 3
Adding number conversion cast (unumber) $14 in (byte) irq_raster_next#3 ← (byte) irq_raster_next#7 + (number) $14
Adding number conversion cast (unumber) $15 in (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#7 + (number) $15
Adding number conversion cast (unumber) 3 in (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#7 + (number) 3
Adding number conversion cast (unumber) 0 in (byte) sin_idx#0 ← (number) 0
Adding number conversion cast (unumber) 3 in *((byte*) CIA2_PORT_A_DDR#0) ← (number) 3
Adding number conversion cast (unumber) $40 in (number~) main::vicSelectGfxBank1_toDd001_$2#0 ← (byte~) main::vicSelectGfxBank1_toDd001_$1#0 / (number) $40
Adding number conversion cast (unumber) main::vicSelectGfxBank1_toDd001_$2#0 in (number~) main::vicSelectGfxBank1_toDd001_$2#0 ← (byte~) main::vicSelectGfxBank1_toDd001_$1#0 / (unumber)(number) $40
Adding number conversion cast (unumber) 3 in (number~) main::vicSelectGfxBank1_toDd001_$3#0 ← (number) 3 ^ (unumber~) main::vicSelectGfxBank1_toDd001_$2#0
Adding number conversion cast (unumber) main::vicSelectGfxBank1_toDd001_$3#0 in (number~) main::vicSelectGfxBank1_toDd001_$3#0 ← (unumber)(number) 3 ^ (unumber~) main::vicSelectGfxBank1_toDd001_$2#0
Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff
Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4
Adding number conversion cast (unumber) main::toD0181_$2#0 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (unumber)(number) 4
Adding number conversion cast (unumber) main::toD0181_$3#0 in (number~) main::toD0181_$3#0 ← > (unumber~) main::toD0181_$2#0
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4
Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (unumber)(number) 4
Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f
Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f
Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0
Adding number conversion cast (unumber) $ff in *((byte*) SPRITES_ENABLE#0) ← (number) $ff
Adding number conversion cast (unumber) $18 in (byte) main::xpos#0 ← (number) $18
Adding number conversion cast (unumber) $32 in (byte) main::ypos#0 ← (number) $32
Adding number conversion cast (unumber) 2 in (number~) main::$5 ← (byte) main::s#2 * (number) 2
Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte) main::s#2 * (unumber)(number) 2
Adding number conversion cast (unumber) 3 in (number~) main::$6 ← (byte) main::s#2 - (number) 3
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (byte) main::s#2 - (unumber)(number) 3
Adding number conversion cast (unumber) $40 in (number~) main::toSpritePtr2_$1#0 ← (word~) main::toSpritePtr2_$0#0 / (number) $40
Adding number conversion cast (unumber) main::toSpritePtr2_$1#0 in (number~) main::toSpritePtr2_$1#0 ← (word~) main::toSpritePtr2_$0#0 / (unumber)(number) $40
Adding number conversion cast (unumber) $18 in (byte) main::xpos#1 ← (byte) main::xpos#3 + (number) $18
Adding number conversion cast (unumber) $18 in (byte) main::ypos#1 ← (byte) main::ypos#3 + (number) $18
Adding number conversion cast (unumber) $ff in (bool~) loop::$0 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 2 in (number~) loop::$1 ← (byte) loop::s#2 * (number) 2
Adding number conversion cast (unumber) loop::$1 in (number~) loop::$1 ← (byte) loop::s#2 * (unumber)(number) 2
Adding number conversion cast (unumber) $a in (byte) loop::idx#1 ← (byte) loop::idx#2 + (number) $a
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) PROCPORT_DDR#0 ← (byte*)(number) 0
Inlining cast (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (unumber)(number) 7
Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1
Inlining cast (byte) PROCPORT_RAM_IO#0 ← (unumber)(number) 5
Inlining cast (word) SPRITE_PTRS#0 ← (unumber)(number) $3f8
Inlining cast (byte*) SPRITES_XPOS#0 ← (byte*)(number) $d000
Inlining cast (byte*) SPRITES_YPOS#0 ← (byte*)(number) $d001
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
Inlining cast (byte*) SPRITES_ENABLE#0 ← (byte*)(number) $d015
Inlining cast (byte*) SPRITES_EXPAND_Y#0 ← (byte*)(number) $d017
Inlining cast (byte*) SPRITES_MC#0 ← (byte*)(number) $d01c
Inlining cast (byte*) SPRITES_EXPAND_X#0 ← (byte*)(number) $d01d
Inlining cast (byte*) SPRITES_COLS#0 ← (byte*)(number) $d027
Inlining cast (byte*) VIC_CONTROL#0 ← (byte*)(number) $d011
Inlining cast (byte*) D018#0 ← (byte*)(number) $d018
Inlining cast (byte*) IRQ_STATUS#0 ← (byte*)(number) $d019
Inlining cast (byte*) IRQ_ENABLE#0 ← (byte*)(number) $d01a
Inlining cast (byte) IRQ_RASTER#0 ← (unumber)(number) 1
Inlining cast (byte*) CIA1_INTERRUPT#0 ← (byte*)(number) $dc0d
Inlining cast (byte*) CIA2_PORT_A#0 ← (byte*)(number) $dd00
Inlining cast (byte*) CIA2_PORT_A_DDR#0 ← (byte*)(number) $dd02
Inlining cast (byte) CIA_INTERRUPT_CLEAR#0 ← (unumber)(number) $7f
Inlining cast (void()**) HARDWARE_IRQ#0 ← (void()**)(number) $fffe
Inlining cast (byte) BLACK#0 ← (unumber)(number) 0
Inlining cast (byte*) PLAYFIELD_SCREEN_1#0 ← (byte*)(number) $400
Inlining cast (byte*) PLAYFIELD_SCREEN_2#0 ← (byte*)(number) $2c00
Inlining cast (byte*) PLAYFIELD_SPRITES#0 ← (byte*)(number) $2000
Inlining cast (byte*) PLAYFIELD_CHARSET#0 ← (byte*)(number) $2800
Inlining cast (byte) render_screen_showing#0 ← (unumber)(number) 0
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $f
Inlining cast *((byte*) SPRITES_MC#0) ← (unumber)(number) 0
Inlining cast (byte) sprites_init::xpos#0 ← (unumber)(number) $18+(number) $f*(number) 8
Inlining cast (byte) SPRITES_FIRST_YPOS#0 ← (unumber)(number) $31
Inlining cast (word~) toSpritePtr1_$0#0 ← (word)(byte*) toSpritePtr1_sprite#1
Inlining cast (byte~) toSpritePtr1_$2#0 ← (byte)(unumber~) toSpritePtr1_$1#0
Inlining cast (byte) irq_cnt#0 ← (unumber)(number) 0
Inlining cast (word~) sprites_irq::toSpritePtr2_$0#0 ← (word)(byte*) sprites_irq::toSpritePtr2_sprite#1
Inlining cast (byte~) sprites_irq::toSpritePtr2_$2#0 ← (byte)(unumber~) sprites_irq::toSpritePtr2_$1#0
Inlining cast (byte) irq_cnt#2 ← (unumber)(number) 0
Inlining cast (byte*) SIN_SPRITE#0 ← (byte*)(number) $2800
Inlining cast (byte) sin_idx#0 ← (unumber)(number) 0
Inlining cast *((byte*) CIA2_PORT_A_DDR#0) ← (unumber)(number) 3
Inlining cast (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← (word)(byte*) main::vicSelectGfxBank1_toDd001_gfx#1
Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast *((byte*) SPRITES_ENABLE#0) ← (unumber)(number) $ff
Inlining cast (byte) main::xpos#0 ← (unumber)(number) $18
Inlining cast (byte) main::ypos#0 ← (unumber)(number) $32
Inlining cast (word~) main::toSpritePtr2_$0#0 ← (word)(byte*) main::toSpritePtr2_sprite#1
Inlining cast (byte~) main::toSpritePtr2_$2#0 ← (byte)(unumber~) main::toSpritePtr2_$1#0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 7
Simplifying constant pointer cast (byte*) 1
Simplifying constant integer cast 5
Simplifying constant integer cast $3f8
Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 53249
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53269
Simplifying constant pointer cast (byte*) 53271
Simplifying constant pointer cast (byte*) 53276
Simplifying constant pointer cast (byte*) 53277
Simplifying constant pointer cast (byte*) 53287
Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 53273
Simplifying constant pointer cast (byte*) 53274
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 56333
Simplifying constant pointer cast (byte*) 56576
Simplifying constant pointer cast (byte*) 56578
Simplifying constant integer cast $7f
Simplifying constant pointer cast (void()**) 65534
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 11264
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 10240
Simplifying constant integer cast 0
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast $18
Simplifying constant integer cast $31
Simplifying constant integer cast $13
Simplifying constant integer cast $15
Simplifying constant integer cast $40
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast $7f
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 9
Simplifying constant integer cast $15
Simplifying constant integer cast $40
Simplifying constant integer cast $a
Simplifying constant integer cast 0
Simplifying constant integer cast $15
Simplifying constant integer cast 3
Simplifying constant integer cast $14
Simplifying constant integer cast $15
Simplifying constant integer cast 3
Simplifying constant pointer cast (byte*) 10240
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast $40
Simplifying constant integer cast 3
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $ff
Simplifying constant integer cast $18
Simplifying constant integer cast $32
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast $40
Simplifying constant integer cast $18
Simplifying constant integer cast $18
Simplifying constant integer cast $ff
Simplifying constant integer cast 2
Simplifying constant integer cast $a
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 5
Finalized unsigned number type (word) $3f8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $7f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $31
Finalized unsigned number type (byte) $13
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $7f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 9
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $14
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 3
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $32
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $18
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $a
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) sprites_init::$0 ← (byte) sprites_init::s#2 * (byte) 2
Inferred type updated to byte in (unumber~) sprites_init::$1 ← (byte) sprites_init::xpos#2 + (byte) $18
Inferred type updated to byte in (unumber~) $3 ← (byte) SPRITES_FIRST_YPOS#0 + (byte) $13
Inferred type updated to byte in (unumber~) $4 ← (byte) SPRITES_FIRST_YPOS#0 + (byte) $15
Inferred type updated to word in (unumber~) toSpritePtr1_$1#0 ← (word~) toSpritePtr1_$0#0 / (byte) $40
Inferred type updated to byte in (unumber~) $6 ← (byte~) $5 + (byte) 3
Inferred type updated to byte in (unumber~) sprites_irq::$0 ← (byte) irq_raster_next#5 + (byte) 1
Inferred type updated to word in (unumber~) sprites_irq::toSpritePtr2_$1#0 ← (word~) sprites_irq::toSpritePtr2_$0#0 / (byte) $40
Inferred type updated to byte in (unumber~) main::vicSelectGfxBank1_toDd001_$2#0 ← (byte~) main::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40
Inferred type updated to byte in (unumber~) main::vicSelectGfxBank1_toDd001_$3#0 ← (byte) 3 ^ (byte~) main::vicSelectGfxBank1_toDd001_$2#0
Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff
Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0
Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f
Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0
Inferred type updated to byte in (unumber~) main::$5 ← (byte) main::s#2 * (byte) 2
Inferred type updated to byte in (unumber~) main::$6 ← (byte) main::s#2 - (byte) 3
Inferred type updated to word in (unumber~) main::toSpritePtr2_$1#0 ← (word~) main::toSpritePtr2_$0#0 / (byte) $40
Inferred type updated to byte in (unumber~) loop::$1 ← (byte) loop::s#2 * (byte) 2
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte~) $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~) $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~) $6 (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#14 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) 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::s2#0 = (byte~) sprites_init::$0 
Alias (byte) sprites_init::xpos#1 = (byte~) sprites_init::$1 
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#11 (byte) irq_cnt#5 (byte) irq_cnt#12 
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_idx#23 = (byte) sin_idx#31 (byte) sin_idx#32 (byte) sin_idx#30 (byte) sin_idx#29 (byte) sin_idx#28 (byte) sin_idx#27 (byte) sin_idx#26 (byte) sin_idx#25 (byte) sin_idx#24 
Alias (byte) main::vicSelectGfxBank1_toDd001_return#0 = (byte~) 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::$5 
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_idx#12 = (byte) sin_idx#21 (byte) sin_idx#22 (byte) sin_idx#20 (byte) sin_idx#19 (byte) sin_idx#17 
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::$7 
Alias (byte) sin_idx#1 = (byte) sin_idx#6 (byte) sin_idx#7 (byte) sin_idx#2 
Alias (byte) sin_idx#13 = (byte) sin_idx#8 
Alias (byte) sin_idx#14 = (byte) sin_idx#9 
Alias (byte) sin_idx#10 = (byte) sin_idx#15 (byte) sin_idx#4 
Alias (byte) sin_idx#0 = (byte) sin_idx#16 
Alias (byte) sin_idx#11 = (byte) sin_idx#5 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte~) $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~) $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~) $6 (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#14 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) 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~) $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~) $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~) $6 (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#14 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) 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 
Identical Phi Values (byte) irq_sprite_ypos#22 (byte) irq_sprite_ypos#0
Identical Phi Values (byte) irq_raster_next#23 (byte) irq_raster_next#0
Identical Phi Values (byte) irq_sprite_ypos#19 (byte) irq_sprite_ypos#22
Identical Phi Values (byte) irq_raster_next#21 (byte) irq_raster_next#23
Identical Phi Values (byte) irq_sprite_ypos#18 (byte) irq_sprite_ypos#19
Identical Phi Values (byte) irq_raster_next#20 (byte) irq_raster_next#21
Identical Phi Values (byte) irq_sprite_ypos#5 (byte) irq_sprite_ypos#9
Identical Phi Values (byte) irq_raster_next#5 (byte) irq_raster_next#10
Identical Phi Values (byte) irq_sprite_ptr#12 (byte) irq_sprite_ptr#14
Identical Phi Values (byte) render_screen_showing#3 (byte) render_screen_showing#0
Identical Phi Values (byte) irq_cnt#15 (byte) irq_cnt#0
Identical Phi Values (byte) sprites_irq::raster_sprite_gfx_modify#1 (byte) sprites_irq::raster_sprite_gfx_modify#0
Identical Phi Values (byte) irq_sprite_ptr#10 (byte) irq_sprite_ptr#12
Identical Phi Values (byte) render_screen_showing#1 (byte) render_screen_showing#3
Identical Phi Values (byte) irq_cnt#10 (byte) irq_cnt#15
Identical Phi Values (byte) irq_raster_next#11 (byte) irq_raster_next#5
Identical Phi Values (byte) irq_sprite_ypos#10 (byte) irq_sprite_ypos#5
Identical Phi Values (byte) sprites_irq::toSpritePtr2_return#2 (byte) sprites_irq::toSpritePtr2_return#0
Identical Phi Values (byte) sprites_irq::toSpritePtr2_return#3 (byte) sprites_irq::toSpritePtr2_return#1
Identical Phi Values (byte) irq_sprite_ypos#14 (byte) irq_sprite_ypos#18
Identical Phi Values (byte) irq_raster_next#17 (byte) irq_raster_next#20
Identical Phi Values (byte) irq_sprite_ptr#17 (byte) irq_sprite_ptr#0
Identical Phi Values (byte) sin_idx#23 (byte) sin_idx#0
Identical Phi Values (byte) sin_idx#12 (byte) sin_idx#23
Identical Phi Values (byte) sin_idx#1 (byte) sin_idx#10
Identical Phi Values (byte) sin_idx#18 (byte) sin_idx#12
Identical Phi Values (byte) sin_idx#13 (byte) sin_idx#10
Identical Phi Values (byte) sin_idx#14 (byte) sin_idx#13
Identical Phi Values (byte) irq_sprite_ypos#9 (byte) irq_sprite_ypos#14
Identical Phi Values (byte) irq_raster_next#10 (byte) irq_raster_next#17
Identical Phi Values (byte) irq_sprite_ptr#14 (byte) irq_sprite_ptr#17
Identical Phi Values (byte) sin_idx#11 (byte) sin_idx#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) sprites_init::$2 [49] if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1
Simple Condition (bool~) sprites_irq::$4 [95] if(*((byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@11
Simple Condition (bool~) sprites_irq::$1 [99] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1
Simple Condition (bool~) sprites_irq::$2 [117] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3
Simple Condition (bool~) sprites_irq::$3 [134] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4
Simple Condition (bool~) main::$8 [221] if((byte) main::s#1!=rangelast(4,7)) goto main::@1
Simple Condition (bool~) loop::$0 [236] if(*((byte*) RASTER#0)!=(byte) $ff) goto loop::@4
Simple Condition (bool~) loop::$2 [246] if((byte) loop::s#1!=rangelast(4,7)) goto loop::@6
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [38] (byte) sprites_init::xpos#0 ← (unumber)(number) $18+(number) $f*(number) 8
Constant right-side identified [80] (void()*~) sprites_irq_init::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
Successful SSA optimization Pass2ConstantRValueConsolidation
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_IO#0 = 5
Constant (const word) SPRITE_PTRS#0 = $3f8
Constant (const byte*) SPRITES_XPOS#0 = (byte*) 53248
Constant (const byte*) SPRITES_YPOS#0 = (byte*) 53249
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_MC#0 = (byte*) 53276
Constant (const byte*) SPRITES_EXPAND_X#0 = (byte*) 53277
Constant (const byte*) SPRITES_COLS#0 = (byte*) 53287
Constant (const byte*) VIC_CONTROL#0 = (byte*) 53265
Constant (const byte*) D018#0 = (byte*) 53272
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*) CIA1_INTERRUPT#0 = (byte*) 56333
Constant (const byte*) CIA2_PORT_A#0 = (byte*) 56576
Constant (const byte*) CIA2_PORT_A_DDR#0 = (byte*) 56578
Constant (const byte) CIA_INTERRUPT_CLEAR#0 = $7f
Constant (const void()**) HARDWARE_IRQ#0 = (void()**) 65534
Constant (const byte) BLACK#0 = 0
Constant (const byte*) PLAYFIELD_SCREEN_1#0 = (byte*) 1024
Constant (const byte*) PLAYFIELD_SCREEN_2#0 = (byte*) 11264
Constant (const byte*) PLAYFIELD_SPRITES#0 = (byte*) 8192
Constant (const byte*) PLAYFIELD_CHARSET#0 = (byte*) 10240
Constant (const byte) sprites_init::xpos#0 = (unumber)$18+$f*8
Constant (const byte) sprites_init::s#0 = 0
Constant (const byte) SPRITES_FIRST_YPOS#0 = $31
Constant (const void()*) sprites_irq_init::$0 = &sprites_irq
Constant (const byte[$100]) SIN#0 = kickasm {{ .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }
 }}
Constant (const byte*) SIN_SPRITE#0 = (byte*) 10240
Constant (const byte) sin_idx#0 = 0
Constant (const byte) main::xpos#0 = $18
Constant (const byte) main::ypos#0 = $32
Constant (const byte) main::s#0 = 4
Constant (const byte) loop::s#0 = 4
Successful SSA optimization Pass2ConstantIdentification
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 value identified (word)PLAYFIELD_SPRITES#0 in [60] (word~) toSpritePtr1_$0#0 ← (word)(const byte*) PLAYFIELD_SPRITES#0
Constant value identified (word)sprites_irq::toSpritePtr2_sprite#0 in [123] (word~) sprites_irq::toSpritePtr2_$0#0 ← (word)(const byte*) sprites_irq::toSpritePtr2_sprite#0
Constant value identified (word)main::vicSelectGfxBank1_gfx#0 in [164] (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← (word)(const byte*) main::vicSelectGfxBank1_gfx#0
Constant value identified (word)main::toD0181_screen#0 in [178] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0
Constant value identified (word)main::toD0181_gfx#0 in [182] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0
Constant value identified (word)main::toSpritePtr2_sprite#0 in [208] (word~) main::toSpritePtr2_$0#0 ← (word)(const byte*) main::toSpritePtr2_sprite#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [233] if(true) goto loop::@4
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [47] sprites_init::s#1 ← ++ sprites_init::s#2 to ++
Resolved ranged comparison value [49] if(sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 to (number) 4
Resolved ranged next value [219] main::s#1 ← ++ main::s#2 to ++
Resolved ranged comparison value [221] if(main::s#1!=rangelast(4,7)) goto main::@1 to (number) 8
Resolved ranged next value [244] loop::s#1 ← ++ loop::s#2 to ++
Resolved ranged comparison value [246] if(loop::s#1!=rangelast(4,7)) goto loop::@6 to (number) 8
Simplifying expression containing zero SPRITES_YPOS#0 in [87] *((const byte*) SPRITES_YPOS#0 + (byte) 0) ← (byte) sprites_irq::ypos#0
Simplifying expression containing zero PLAYFIELD_SPRITE_PTRS_1#0 in [101] *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) 0) ← (byte) sprites_irq::ptr#0
Simplifying expression containing zero PLAYFIELD_SPRITE_PTRS_2#0 in [108] *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte) 0) ← (byte) sprites_irq::ptr#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused block loop::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 4 in if((byte) sprites_init::s#1!=(number) 4) goto sprites_init::@1
Adding number conversion cast (unumber) 8 in if((byte) main::s#1!=(number) 8) goto main::@1
Adding number conversion cast (unumber) 8 in if((byte) loop::s#1!=(number) 8) goto loop::@6
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 4
Simplifying constant integer cast 8
Simplifying constant integer cast 8
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte~) $3 (byte) irq_raster_next#0 
Alias candidate removed (volatile)(byte) irq_sprite_ypos#0 = (byte~) $4 
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte~) $6 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte~) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#1 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 
Constant right-side identified [0] (byte*) PLAYFIELD_SPRITE_PTRS_1#0 ← (const byte*) PLAYFIELD_SCREEN_1#0 + (const word) SPRITE_PTRS#0
Constant right-side identified [1] (byte*) PLAYFIELD_SPRITE_PTRS_2#0 ← (const byte*) PLAYFIELD_SCREEN_2#0 + (const word) SPRITE_PTRS#0
Constant right-side identified [16] (byte~) $3 ← (const byte) SPRITES_FIRST_YPOS#0 + (byte) $13
Constant right-side identified [19] (byte~) $4 ← (const byte) SPRITES_FIRST_YPOS#0 + (byte) $15
Successful SSA optimization Pass2ConstantRValueConsolidation
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) $3 = SPRITES_FIRST_YPOS#0+$13
Constant (const byte) $4 = SPRITES_FIRST_YPOS#0+$15
Constant (const word) toSpritePtr1_$0#0 = (word)PLAYFIELD_SPRITES#0
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) IRQ_RASTER_FIRST#0 = $3
Successful SSA optimization Pass2ConstantIdentification
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte~) $6 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte~) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#1 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 
Constant right-side identified [16] (word~) toSpritePtr1_$1#0 ← (const word) toSpritePtr1_$0#0 / (byte) $40
Constant right-side identified [60] (word~) sprites_irq::toSpritePtr2_$1#0 ← (const word) sprites_irq::toSpritePtr2_$0#0 / (byte) $40
Constant right-side identified [80] (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) main::vicSelectGfxBank1_toDd001_$0#0
Constant right-side identified [84] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [87] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Constant right-side identified [100] (word~) main::toSpritePtr2_$1#0 ← (const word) main::toSpritePtr2_$0#0 / (byte) $40
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) toSpritePtr1_$1#0 = toSpritePtr1_$0#0/$40
Constant (const word) sprites_irq::toSpritePtr2_$1#0 = sprites_irq::toSpritePtr2_$0#0/$40
Constant (const byte) main::vicSelectGfxBank1_toDd001_$1#0 = >main::vicSelectGfxBank1_toDd001_$0#0
Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff
Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0
Constant (const word) main::toSpritePtr2_$1#0 = main::toSpritePtr2_$0#0/$40
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)toSpritePtr1_$1#0 in [17] (byte) toSpritePtr1_return#0 ← (byte)(const word) toSpritePtr1_$1#0
Constant value identified (byte)sprites_irq::toSpritePtr2_$1#0 in [61] (byte~) sprites_irq::toSpritePtr2_$2#0 ← (byte)(const word) sprites_irq::toSpritePtr2_$1#0
Constant value identified (byte)main::toSpritePtr2_$1#0 in [101] (byte) main::toSpritePtr2_return#0 ← (byte)(const word) main::toSpritePtr2_$1#0
Successful SSA optimization Pass2ConstantValues
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte~) $6 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte~) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#1 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 
Constant right-side identified [78] (byte~) main::vicSelectGfxBank1_toDd001_$2#0 ← (const byte) main::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40
Constant right-side identified [81] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4
Constant right-side identified [83] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) toSpritePtr1_return#0 = (byte)toSpritePtr1_$1#0
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/$40
Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4
Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4
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
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) sprites_irq::toSpritePtr2_return#1 = sprites_irq::toSpritePtr2_return#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) sprites_irq::$5 = sprites_irq::toSpritePtr2_return#1
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero (const byte) main::vicSelectGfxBank1_toDd001_$1#0/(byte) $40 in 
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero 3 in [79] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) main::vicSelectGfxBank1_toDd001_$1#0
Eliminating unused constant (const byte) main::vicSelectGfxBank1_toDd001_$2#0
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const word) main::vicSelectGfxBank1_toDd001_$0#0
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const byte*) main::vicSelectGfxBank1_gfx#0
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte~) $6 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Constant right-side identified [16] (byte~) $6 ← (const byte) toSpritePtr1_return#0 + (byte) 3
Constant right-side identified [75] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0
Constant right-side identified [76] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) $6 = toSpritePtr1_return#0+3
Constant (const byte) main::vicSelectGfxBank1_toDd001_return#0 = 3
Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0
Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f
Successful SSA optimization Pass2ConstantIdentification
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Constant right-side identified [73] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0
Successful SSA optimization Pass2ConstantIdentification
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Rewriting multiplication to use shift [7] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 * (byte) 2
Rewriting multiplication to use shift [77] (byte) main::s2#0 ← (byte) main::s#2 * (byte) 2
Rewriting multiplication to use shift [94] (byte~) loop::$1 ← (byte) loop::s#2 * (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte) sprites_init::xpos#0
Inlining constant with var siblings (const byte) sprites_init::s#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 sprites_irq::toSpritePtr2_return#1 = (const byte) sprites_irq::toSpritePtr2_return#0
Constant inlined main::toSpritePtr2_$1#0 = (word)(const byte*) SIN_SPRITE#0/(byte) $40
Constant inlined sprites_irq::$5 = (const byte) sprites_irq::toSpritePtr2_return#0
Constant inlined sprites_init::xpos#0 = (byte)(number) $18+(number) $f*(number) 8
Constant inlined main::toSpritePtr2_sprite#0 = (const byte*) SIN_SPRITE#0
Constant inlined $3 = (const byte) SPRITES_FIRST_YPOS#0+(byte) $13
Constant inlined $4 = (const byte) SPRITES_FIRST_YPOS#0+(byte) $15
Constant inlined $6 = (const byte) toSpritePtr1_return#0+(byte) 3
Constant inlined sin_idx#0 = (byte) 0
Constant inlined sprites_init::s#0 = (byte) 0
Constant inlined main::xpos#0 = (byte) $18
Constant inlined main::s#0 = (byte) 4
Constant inlined sprites_irq_init::$0 = &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
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) $3fff
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) $40
Constant inlined main::toD0181_$6#0 = >(word)(const byte*) PLAYFIELD_CHARSET#0/(byte) 4
Constant inlined sprites_irq::toSpritePtr2_$2#0 = (byte)(word)(const byte*) PLAYFIELD_SPRITES#0/(byte) $40
Constant inlined main::toD0181_$7#0 = >(word)(const byte*) PLAYFIELD_CHARSET#0/(byte) 4&(byte) $f
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) $3fff*(byte) 4
Constant inlined main::toD0181_$3#0 = >(word)(const byte*) PLAYFIELD_SCREEN_1#0&(word) $3fff*(byte) 4
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) $40
Constant inlined main::ypos#0 = (byte) $32
Constant inlined toSpritePtr1_$0#0 = (word)(const byte*) PLAYFIELD_SPRITES#0
Constant inlined loop::s#0 = (byte) 4
Successful SSA optimization Pass2ConstantInlining
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+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+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
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 
Added new block during phi lifting sprites_init::@3(between sprites_init::@1 and sprites_init::@1)
Added new block during phi lifting main::@9(between main::@5 and main::@1)
Added new block during phi lifting loop::@11(between loop::@6 and loop::@6)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of toSpritePtr1
Adding NOP phi() at start of toSpritePtr1_@return
Adding NOP phi() at start of @9
Adding NOP phi() at start of @11
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::vicSelectGfxBank1_toDd001_@return
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::toSpritePtr2
Adding NOP phi() at start of main::toSpritePtr2_@return
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of loop
Adding NOP phi() at start of sprites_irq::toSpritePtr2
Adding NOP phi() at start of sprites_irq::toSpritePtr2_@return
CALL GRAPH
Calls in [] to main:11 
Calls in [main] to sprites_init:23 sprites_irq_init:39 loop:41 

Created 12 initial phi equivalence classes
Coalesced [44] main::s#6 ← main::s#1
Coalesced [45] main::xpos#6 ← main::xpos#1
Coalesced [46] main::ypos#6 ← main::ypos#1
Coalesced [51] loop::idx#3 ← loop::idx#0
Coalesced [59] sin_idx#33 ← sin_idx#3
Coalesced [60] loop::s#3 ← loop::s#1
Coalesced [61] loop::idx#4 ← loop::idx#1
Coalesced [86] sprites_init::s#3 ← sprites_init::s#1
Coalesced [87] sprites_init::xpos#3 ← sprites_init::xpos#1
Coalesced [111] irq_raster_next#26 ← irq_raster_next#3
Coalesced [112] irq_cnt#22 ← irq_cnt#1
Coalesced [113] irq_sprite_ypos#26 ← irq_sprite_ypos#3
Coalesced [114] irq_sprite_ptr#20 ← irq_sprite_ptr#3
Coalesced [123] irq_raster_next#25 ← irq_raster_next#2
Coalesced [124] irq_cnt#21 ← irq_cnt#2
Coalesced [125] irq_sprite_ypos#25 ← irq_sprite_ypos#2
Coalesced [126] irq_sprite_ptr#19 ← irq_sprite_ptr#2
Coalesced [132] irq_raster_next#24 ← irq_raster_next#1
Coalesced (already) [133] irq_cnt#20 ← irq_cnt#1
Coalesced [134] irq_sprite_ypos#24 ← irq_sprite_ypos#1
Coalesced [135] irq_sprite_ptr#18 ← irq_sprite_ptr#1
Coalesced down to 12 phi equivalence classes
Culled Empty Block (label) toSpritePtr1_@return
Culled Empty Block (label) @11
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) main::@9
Culled Empty Block (label) loop::@11
Culled Empty Block (label) sprites_init::@3
Culled Empty Block (label) sprites_irq::toSpritePtr2_@return
Renumbering block @4 to @1
Renumbering block @5 to @2
Renumbering block @7 to @3
Renumbering block @9 to @4
Renumbering block @10 to @5
Renumbering block sprites_irq::@6 to sprites_irq::@5
Renumbering block sprites_irq::@7 to sprites_irq::@6
Renumbering block sprites_irq::@8 to sprites_irq::@7
Renumbering block sprites_irq::@11 to sprites_irq::@8
Renumbering block sprites_irq::@12 to sprites_irq::@9
Renumbering block sprites_irq::@13 to sprites_irq::@10
Renumbering block sprites_irq::@15 to sprites_irq::@11
Renumbering block main::@4 to main::@3
Renumbering block main::@5 to main::@4
Renumbering block main::@6 to main::@5
Renumbering block main::@7 to main::@6
Renumbering block loop::@4 to loop::@2
Renumbering block loop::@5 to loop::@3
Renumbering block loop::@6 to loop::@4
Renumbering block loop::@7 to loop::@5
Adding NOP phi() at start of @begin
Adding NOP phi() at start of toSpritePtr1
Adding NOP phi() at start of @4
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::@6
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:@1
@1: scope:[]  from @begin
  [1] (byte) render_screen_showing#0 ← (byte) 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:@2
@2: scope:[]  from @1
  [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) $15
  to:toSpritePtr1
toSpritePtr1: scope:[]  from @2
  [5] phi()
  to:@5
@5: scope:[]  from toSpritePtr1
  [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3
  [7] (byte) irq_cnt#0 ← (byte) 0
  to:@3
@3: scope:[]  from @5
  kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff
 }}
  to:@4
@4: scope:[]  from @3
  [9] phi()
  [10] call main 
  to:@end
@end: scope:[]  from @4
  [11] phi()
main: scope:[main]  from @4
  [12] phi()
  to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main]  from main
  [13] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
  to:main::vicSelectGfxBank1_toDd001
main::vicSelectGfxBank1_toDd001: scope:[main]  from main::vicSelectGfxBank1
  [14] phi()
  to:main::vicSelectGfxBank1_@1
main::vicSelectGfxBank1_@1: scope:[main]  from main::vicSelectGfxBank1_toDd001
  [15] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
  to:main::toD0181
main::toD0181: scope:[main]  from main::vicSelectGfxBank1_@1
  [16] phi()
  to:main::@3
main::@3: scope:[main]  from main::toD0181
  [17] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
  [18] call sprites_init 
  to:main::@5
main::@5: scope:[main]  from main::@3
  [19] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff
  to:main::@1
main::@1: scope:[main]  from main::@4 main::@5
  [20] (byte) main::ypos#2 ← phi( main::@4/(byte) main::ypos#1 main::@5/(byte) $32 )
  [20] (byte) main::xpos#2 ← phi( main::@4/(byte) main::xpos#1 main::@5/(byte) $18 )
  [20] (byte) main::s#2 ← phi( main::@4/(byte) main::s#1 main::@5/(byte) 4 )
  [21] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1
  [22] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2
  [23] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2
  [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3
  [25] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte~) main::$6
  to:main::toSpritePtr2
main::toSpritePtr2: scope:[main]  from main::@1
  [26] phi()
  to:main::@4
main::@4: scope:[main]  from main::toSpritePtr2
  [27] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0
  [28] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18
  [29] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18
  [30] (byte) main::s#1 ← ++ (byte) main::s#2
  [31] if((byte) main::s#1!=(byte) 8) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@4
  [32] phi()
  [33] call sprites_irq_init 
  to:main::@6
main::@6: scope:[main]  from main::@2
  [34] phi()
  [35] call loop 
  to:main::@return
main::@return: scope:[main]  from main::@6
  [36] return 
  to:@return
loop: scope:[loop]  from main::@6
  [37] phi()
  to:loop::@1
loop::@1: scope:[loop]  from loop loop::@5
  [38] (byte) sin_idx#10 ← phi( loop/(byte) 0 loop::@5/(byte) sin_idx#3 )
  to:loop::@2
loop::@2: scope:[loop]  from loop::@1 loop::@2
  [39] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2
  to:loop::@3
loop::@3: scope:[loop]  from loop::@2
  [40] (byte) loop::idx#0 ← (byte) sin_idx#10
  to:loop::@4
loop::@4: scope:[loop]  from loop::@3 loop::@4
  [41] (byte) loop::idx#2 ← phi( loop::@3/(byte) loop::idx#0 loop::@4/(byte) loop::idx#1 )
  [41] (byte) loop::s#2 ← phi( loop::@3/(byte) 4 loop::@4/(byte) loop::s#1 )
  [42] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1
  [43] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte[$100]) SIN#0 + (byte) loop::idx#2)
  [44] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a
  [45] (byte) loop::s#1 ← ++ (byte) loop::s#2
  [46] if((byte) loop::s#1!=(byte) 8) goto loop::@4
  to:loop::@5
loop::@5: scope:[loop]  from loop::@4
  [47] (byte) sin_idx#3 ← ++ (byte) sin_idx#10
  to:loop::@1
sprites_irq_init: scope:[sprites_irq_init]  from main::@2
  asm { sei  }
  [49] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
  asm { ldaCIA1_INTERRUPT  }
  [51] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
  [52] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
  [53] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
  [54] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
  [55] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0
  [56] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
  [57] *((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
  [59] return 
  to:@return
sprites_init: scope:[sprites_init]  from main::@3
  [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f
  [61] *((const byte*) SPRITES_MC#0) ← (byte) 0
  [62] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0)
  [63] *((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
  [64] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 )
  [64] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 )
  [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1
  [66] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2
  [67] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0
  [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18
  [69] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2
  [70] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1
  to:sprites_init::@return
sprites_init::@return: scope:[sprites_init]  from sprites_init::@1
  [71] return 
  to:@return
sprites_irq: scope:[sprites_irq]  from
  asm { cld  }
  [73] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0
  [74] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0
  [75] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0
  [76] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0
  [77] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0
  [78] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1
  [79] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0
  to:sprites_irq::@8
sprites_irq::@8: scope:[sprites_irq]  from sprites_irq sprites_irq::@8
  [80] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8
  to:sprites_irq::@9
sprites_irq::@9: scope:[sprites_irq]  from sprites_irq::@8
  [81] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0
  [82] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1
  to:sprites_irq::@10
sprites_irq::@10: scope:[sprites_irq]  from sprites_irq::@9
  [83] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0
  [84] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0
  [85] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3
  [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3
  [87] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3
  [88] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4
  to:sprites_irq::@2
sprites_irq::@2: scope:[sprites_irq]  from sprites_irq::@1 sprites_irq::@10
  [89] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
  [90] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3
  to:sprites_irq::@6
sprites_irq::@6: scope:[sprites_irq]  from sprites_irq::@2
  [91] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4
  to:sprites_irq::@7
sprites_irq::@7: scope:[sprites_irq]  from sprites_irq::@6
  [92] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14
  [93] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15
  [94] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3
  to:sprites_irq::@5
sprites_irq::@5: scope:[sprites_irq]  from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7
  [95] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@7/(byte) irq_sprite_ptr#3 )
  [95] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@7/(byte) irq_sprite_ypos#3 )
  [95] (byte) irq_cnt#3 ← phi( sprites_irq::@11/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@7/(byte) irq_cnt#1 )
  [95] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 )
  [96] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4
  [97] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
  to:sprites_irq::@return
sprites_irq::@return: scope:[sprites_irq]  from sprites_irq::@5
  [98] return 
  to:@return
sprites_irq::@4: scope:[sprites_irq]  from sprites_irq::@6
  [99] (byte) irq_cnt#2 ← (byte) 0
  [100] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0
  [101] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15
  [102] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3
  to:sprites_irq::@5
sprites_irq::@3: scope:[sprites_irq]  from sprites_irq::@2
  [103] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15
  [104] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0
  to:sprites_irq::toSpritePtr2
sprites_irq::toSpritePtr2: scope:[sprites_irq]  from sprites_irq::@3
  [105] phi()
  to:sprites_irq::@11
sprites_irq::@11: scope:[sprites_irq]  from sprites_irq::toSpritePtr2
  [106] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0
  to:sprites_irq::@5
sprites_irq::@1: scope:[sprites_irq]  from sprites_irq::@9
  [107] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0
  [108] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0
  [109] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1
  [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1
  [111] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1
  [112] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2
  to:sprites_irq::@2


VARIABLE REGISTER WEIGHTS
(byte) BLACK
(byte*) CIA1_INTERRUPT
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A_DDR
(byte) CIA_INTERRUPT_CLEAR
(byte*) D018
(void()**) HARDWARE_IRQ
(byte*) IRQ_ENABLE
(byte) IRQ_RASTER
(byte) IRQ_RASTER_FIRST
(byte*) IRQ_STATUS
(byte*) PLAYFIELD_CHARSET
(byte*) PLAYFIELD_SCREEN_1
(byte*) PLAYFIELD_SCREEN_2
(byte*) PLAYFIELD_SPRITES
(byte*) PLAYFIELD_SPRITE_PTRS_1
(byte*) PLAYFIELD_SPRITE_PTRS_2
(byte*) PROCPORT
(byte*) PROCPORT_DDR
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_RAM_IO
(byte*) RASTER
(byte[$100]) 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_XPOS
(byte*) SPRITES_YPOS
(word) SPRITE_PTRS
(byte*) VIC_CONTROL
(byte) irq_cnt
(byte) irq_cnt#0 0.17391304347826086
(byte) irq_cnt#1 1.0
(byte) irq_cnt#2 1.0
(byte) irq_cnt#3 60.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 4.0
(byte) irq_sprite_ptr#11 60.0
(byte) irq_sprite_ptr#2 4.0
(byte) irq_sprite_ptr#3 4.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 0.27586206896551724
(byte) irq_sprite_ypos#1 1.3333333333333333
(byte) irq_sprite_ypos#11 60.0
(byte) irq_sprite_ypos#2 2.0
(byte) irq_sprite_ypos#3 2.0
(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~) main::$6 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
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(byte*) main::toD0181_screen
(word~) main::toSpritePtr2_$0
(number~) 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
(number~) main::vicSelectGfxBank1_toDd001_$2
(number~) 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) render_screen_showing
(byte) render_screen_showing#0 0.4
(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~) 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
(number~) 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
(number~) 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#0 loop::idx#1 ]
[ sprites_init::s#2 sprites_init::s#1 ]
[ sprites_init::xpos#2 sprites_init::xpos#1 ]
[ irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
[ irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
[ irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
[ irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Coalescing volatile variable equivalence classes [ irq_raster_next#0 ] and [ irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
Coalescing volatile variable equivalence classes [ irq_sprite_ypos#0 ] and [ irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
Coalescing volatile variable equivalence classes [ irq_sprite_ptr#0 ] and [ irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Coalescing volatile variable equivalence classes [ irq_cnt#0 ] and [ irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
Added variable main::s2#0 to zero page equivalence class [ main::s2#0 ]
Added variable main::$6 to zero page equivalence class [ main::$6 ]
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::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 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#0 loop::idx#1 ]
[ sprites_init::s#2 sprites_init::s#1 ]
[ sprites_init::xpos#2 sprites_init::xpos#1 ]
[ sprites_irq::raster_sprite_gfx_modify#0 ]
[ render_screen_showing#0 ]
[ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
[ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
[ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
[ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
[ main::s2#0 ]
[ main::$6 ]
[ loop::$1 ]
[ sprites_init::s2#0 ]
[ sprites_irq::ypos#0 ]
[ sprites_irq::$0 ]
[ sprites_irq::ptr#0 ]
[ sprites_irq::ptr#3 ]
[ sprites_irq::ptr#4 ]
[ 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#0 loop::idx#1 ]
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 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Allocated zp ZP_BYTE:11 [ render_screen_showing#0 ]
Allocated zp ZP_BYTE:12 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
Allocated zp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
Allocated zp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Allocated zp ZP_BYTE:15 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
Allocated zp ZP_BYTE:16 [ main::s2#0 ]
Allocated zp ZP_BYTE:17 [ main::$6 ]
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::ptr#0 ]
Allocated zp ZP_BYTE:23 [ sprites_irq::ptr#3 ]
Allocated zp ZP_BYTE:24 [ sprites_irq::ptr#4 ]
Allocated zp ZP_BYTE:25 [ sprites_irq::ptr#1 ]
Allocated zp ZP_BYTE:26 [ sprites_irq::ptr#2 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // 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 = 5
  // 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
  // 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
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // 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 Y-position of the first sprite row
  .const SPRITES_FIRST_YPOS = $31
  .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/$40
  .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 sin_idx = 5
  // @begin
bbegin:
  jmp b1
  // @1
b1:
  // [1] (byte) render_screen_showing#0 ← (byte) 0 -- vbuz1=vbuc1 
  // The screen currently being showed to the user. $00 for screen 1 / $20 for screen 2.
  lda #0
  sta.z render_screen_showing
  // 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 b2
  // @2
b2:
  // [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.z irq_raster_next
  // [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte) $15 -- vbuz1=vbuc1 
  // Y-pos of the sprites on the next IRQ
  lda #SPRITES_FIRST_YPOS+$15
  sta.z irq_sprite_ypos
  // [5] phi from @2 to toSpritePtr1 [phi:@2->toSpritePtr1]
toSpritePtr1_from_b2:
  jmp toSpritePtr1
  // toSpritePtr1
toSpritePtr1:
  jmp b5
  // @5
b5:
  // [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 
  // Index of the sprites to show on the next IRQ
  lda #toSpritePtr1_return+3
  sta.z irq_sprite_ptr
  // [7] (byte) irq_cnt#0 ← (byte) 0 -- vbuz1=vbuc1 
  // Counting the 10 IRQs
  lda #0
  sta.z irq_cnt
  jmp b3
  // @3
b3:
  // kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff  }}
  // [9] phi from @3 to @4 [phi:@3->@4]
b4_from_b3:
  jmp b4
  // @4
b4:
  // [10] call main 
  // [12] phi from @4 to main [phi:@4->main]
main_from_b4:
  jsr main
  // [11] phi from @4 to @end [phi:@4->@end]
bend_from_b4:
  jmp bend
  // @end
bend:
  // main
main: {
    .const toSpritePtr2_return = SIN_SPRITE/$40
    .const vicSelectGfxBank1_toDd001_return = 3
    .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f
    .label _6 = $11
    .label s2 = $10
    .label xpos = 3
    .label ypos = 4
    .label s = 2
    jmp vicSelectGfxBank1
    // main::vicSelectGfxBank1
  vicSelectGfxBank1:
    // [13] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
    // [14] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001]
  vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1:
    jmp vicSelectGfxBank1_toDd001
    // main::vicSelectGfxBank1_toDd001
  vicSelectGfxBank1_toDd001:
    jmp vicSelectGfxBank1_b1
    // main::vicSelectGfxBank1_@1
  vicSelectGfxBank1_b1:
    // [15] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
    // [16] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181]
  toD0181_from_vicSelectGfxBank1_b1:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp b3
    // main::@3
  b3:
    // [17] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [18] call sprites_init 
    jsr sprites_init
    jmp b5
    // main::@5
  b5:
    // [19] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff -- _deref_pbuc1=vbuc2 
    lda #$ff
    sta SPRITES_ENABLE
    // [20] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
    // [20] phi (byte) main::ypos#2 = (byte) $32 [phi:main::@5->main::@1#0] -- vbuz1=vbuc1 
    lda #$32
    sta.z ypos
    // [20] phi (byte) main::xpos#2 = (byte) $18 [phi:main::@5->main::@1#1] -- vbuz1=vbuc1 
    lda #$18
    sta.z xpos
    // [20] phi (byte) main::s#2 = (byte) 4 [phi:main::@5->main::@1#2] -- vbuz1=vbuc1 
    lda #4
    sta.z s
    jmp b1
    // [20] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  b1_from_b4:
    // [20] phi (byte) main::ypos#2 = (byte) main::ypos#1 [phi:main::@4->main::@1#0] -- register_copy 
    // [20] phi (byte) main::xpos#2 = (byte) main::xpos#1 [phi:main::@4->main::@1#1] -- register_copy 
    // [20] phi (byte) main::s#2 = (byte) main::s#1 [phi:main::@4->main::@1#2] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [21] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda.z s
    asl
    sta.z s2
    // [22] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z xpos
    ldy.z s2
    sta SPRITES_XPOS,y
    // [23] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z ypos
    ldy.z s2
    sta SPRITES_YPOS,y
    // [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3 -- vbuz1=vbuz2_minus_vbuc1 
    lax.z s
    axs #3
    stx.z _6
    // [25] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z _6
    ldy.z s
    sta SPRITES_COLS,y
    // [26] phi from main::@1 to main::toSpritePtr2 [phi:main::@1->main::toSpritePtr2]
  toSpritePtr2_from_b1:
    jmp toSpritePtr2
    // main::toSpritePtr2
  toSpritePtr2:
    jmp b4
    // main::@4
  b4:
    // [27] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0 -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #toSpritePtr2_return
    ldy.z s
    sta PLAYFIELD_SPRITE_PTRS_1,y
    // [28] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z xpos
    axs #-[$18]
    stx.z xpos
    // [29] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z ypos
    axs #-[$18]
    stx.z ypos
    // [30] (byte) main::s#1 ← ++ (byte) main::s#2 -- vbuz1=_inc_vbuz1 
    inc.z s
    // [31] if((byte) main::s#1!=(byte) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z s
    bne b1_from_b4
    // [32] phi from main::@4 to main::@2 [phi:main::@4->main::@2]
  b2_from_b4:
    jmp b2
    // main::@2
  b2:
    // [33] call sprites_irq_init 
    jsr sprites_irq_init
    // [34] phi from main::@2 to main::@6 [phi:main::@2->main::@6]
  b6_from_b2:
    jmp b6
    // main::@6
  b6:
    // [35] call loop 
    // [37] phi from main::@6 to loop [phi:main::@6->loop]
  loop_from_b6:
    jsr loop
    jmp breturn
    // main::@return
  breturn:
    // [36] return 
    rts
}
  // loop
loop: {
    .label _1 = $12
    .label idx = 7
    .label s = 6
    // [38] phi from loop to loop::@1 [phi:loop->loop::@1]
  b1_from_loop:
    // [38] phi (byte) sin_idx#10 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z sin_idx
    jmp b1
    // loop::@1
  b1:
    jmp b2
    // loop::@2
  b2:
    // [39] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne b2
    jmp b3
    // loop::@3
  b3:
    // [40] (byte) loop::idx#0 ← (byte) sin_idx#10 -- vbuz1=vbuz2 
    lda.z sin_idx
    sta.z idx
    // [41] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4]
  b4_from_b3:
    // [41] phi (byte) loop::idx#2 = (byte) loop::idx#0 [phi:loop::@3->loop::@4#0] -- register_copy 
    // [41] phi (byte) loop::s#2 = (byte) 4 [phi:loop::@3->loop::@4#1] -- vbuz1=vbuc1 
    lda #4
    sta.z s
    jmp b4
    // [41] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4]
  b4_from_b4:
    // [41] phi (byte) loop::idx#2 = (byte) loop::idx#1 [phi:loop::@4->loop::@4#0] -- register_copy 
    // [41] phi (byte) loop::s#2 = (byte) loop::s#1 [phi:loop::@4->loop::@4#1] -- register_copy 
    jmp b4
    // loop::@4
  b4:
    // [42] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda.z s
    asl
    sta.z _1
    // [43] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte[$100]) SIN#0 + (byte) loop::idx#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 
    ldy.z idx
    lda SIN,y
    ldy.z _1
    sta SPRITES_YPOS,y
    // [44] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a -- vbuz1=vbuz1_plus_vbuc1 
    lax.z idx
    axs #-[$a]
    stx.z idx
    // [45] (byte) loop::s#1 ← ++ (byte) loop::s#2 -- vbuz1=_inc_vbuz1 
    inc.z s
    // [46] if((byte) loop::s#1!=(byte) 8) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z s
    bne b4_from_b4
    jmp b5
    // loop::@5
  b5:
    // [47] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 -- vbuz1=_inc_vbuz1 
    inc.z sin_idx
    // [38] phi from loop::@5 to loop::@1 [phi:loop::@5->loop::@1]
  b1_from_b5:
    // [38] phi (byte) sin_idx#10 = (byte) sin_idx#3 [phi:loop::@5->loop::@1#0] -- register_copy 
    jmp b1
}
  // sprites_irq_init
// Setup the IRQ
sprites_irq_init: {
    // asm { sei  }
    sei
    // [49] *((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
    // asm { ldaCIA1_INTERRUPT  }
    lda CIA1_INTERRUPT
    // [51] *((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
    // [52] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [53] *((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
    // [54] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line
    lda #$7f
    and VIC_CONTROL
    sta VIC_CONTROL
    // [55] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 
    lda #IRQ_RASTER_FIRST
    sta RASTER
    // [56] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // [57] *((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
    // asm { cli  }
    cli
    jmp breturn
    // sprites_irq_init::@return
  breturn:
    // [59] return 
    rts
}
  // sprites_init
// Setup the sprites
sprites_init: {
    .label s2 = $13
    .label xpos = 9
    .label s = 8
    // [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 
    lda #$f
    sta SPRITES_ENABLE
    // [61] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta SPRITES_MC
    // [62] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_MC
    sta SPRITES_EXPAND_Y
    // [63] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_EXPAND_Y
    sta SPRITES_EXPAND_X
    // [64] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1]
  b1_from_sprites_init:
    // [64] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 
    lda #$18+$f*8
    sta.z xpos
    // [64] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z s
    jmp b1
    // [64] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1]
  b1_from_b1:
    // [64] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy 
    // [64] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy 
    jmp b1
    // sprites_init::@1
  b1:
    // [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda.z s
    asl
    sta.z s2
    // [66] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z xpos
    ldy.z s2
    sta SPRITES_XPOS,y
    // [67] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #BLACK
    ldy.z s
    sta SPRITES_COLS,y
    // [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z xpos
    axs #-[$18]
    stx.z xpos
    // [69] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuz1=_inc_vbuz1 
    inc.z s
    // [70] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp.z s
    bne b1_from_b1
    jmp breturn
    // sprites_init::@return
  breturn:
    // [71] return 
    rts
}
  // 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/$40
    .label _0 = $15
    .label ypos = $14
    .label raster_sprite_gfx_modify = $a
    .label ptr = $16
    .label ptr_1 = $19
    .label ptr_2 = $1a
    .label ptr_3 = $17
    .label ptr_4 = $18
    // entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    stx regx+1
    sty regy+1
    // asm { cld  }
    //(*BGCOL)++;
    // Clear decimal flag (because it is used by the score algorithm)
    cld
    // [73] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuz1=vbuz2 
    // Place the sprites
    lda.z irq_sprite_ypos
    sta.z ypos
    // [74] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda.z ypos
    sta SPRITES_YPOS
    // [75] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda.z ypos
    sta SPRITES_YPOS+2
    // [76] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda.z ypos
    sta SPRITES_YPOS+4
    // [77] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 
    lda.z ypos
    sta SPRITES_YPOS+6
    // [78] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuz1=vbuz2_plus_1 
    ldy.z irq_raster_next
    iny
    sty.z _0
    // [79] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuz2 
    // Wait for the y-position before changing sprite pointers
    lda.z _0
    sta.z raster_sprite_gfx_modify
    jmp b8
    // sprites_irq::@8
  b8:
    // [80] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 
    lda RASTER
    cmp.z raster_sprite_gfx_modify
    bcc b8
    jmp b9
    // sprites_irq::@9
  b9:
    // [81] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuz1=vbuz2 
    lda.z irq_sprite_ptr
    sta.z ptr
    // [82] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 
    lda.z render_screen_showing
    cmp #0
    beq b1
    jmp b10
    // sprites_irq::@10
  b10:
    // [83] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 
    lda.z ptr
    sta PLAYFIELD_SPRITE_PTRS_2
    // [84] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 
    ldy.z ptr
    iny
    sty.z ptr_3
    // [85] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 
    lda.z ptr_3
    sta PLAYFIELD_SPRITE_PTRS_2+1
    // [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 
    lda.z ptr_3
    sta PLAYFIELD_SPRITE_PTRS_2+2
    // [87] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuz1=_inc_vbuz2 
    ldy.z ptr_3
    iny
    sty.z ptr_4
    // [88] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuz1 
    lda.z ptr_4
    sta PLAYFIELD_SPRITE_PTRS_2+3
    jmp b2
    // sprites_irq::@2
  b2:
    // [89] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 
    inc.z irq_cnt
    // [90] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 
    lda #9
    cmp.z irq_cnt
    beq b3
    jmp b6
    // sprites_irq::@6
  b6:
    // [91] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 
    lda #$a
    cmp.z irq_cnt
    beq b4
    jmp b7
    // sprites_irq::@7
  b7:
    // [92] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_raster_next
    axs #-[$14]
    stx.z irq_raster_next
    // [93] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ypos
    axs #-[$15]
    stx.z irq_sprite_ypos
    // [94] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ptr
    axs #-[3]
    stx.z irq_sprite_ptr
    // [95] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5]
  b5_from_b11:
  b5_from_b4:
  b5_from_b7:
    // [95] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy 
    // [95] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy 
    // [95] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy 
    // [95] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy 
    jmp b5
    // sprites_irq::@5
  b5:
    // [96] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 
    // Setup next interrupt
    lda.z irq_raster_next
    sta RASTER
    // [97] *((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
    // sprites_irq::@return
  breturn:
    // [98] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
  regx:
    ldx #00
  regy:
    ldy #00
    rti
    // sprites_irq::@4
  b4:
    // [99] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 
    lda #0
    sta.z irq_cnt
    // [100] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
    lda #IRQ_RASTER_FIRST
    sta.z irq_raster_next
    // [101] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ypos
    axs #-[$15]
    stx.z irq_sprite_ypos
    // [102] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ptr
    axs #-[3]
    stx.z irq_sprite_ptr
    jmp b5_from_b4
    // sprites_irq::@3
  b3:
    // [103] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_raster_next
    axs #-[$15]
    stx.z irq_raster_next
    // [104] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 
    lda #SPRITES_FIRST_YPOS
    sta.z irq_sprite_ypos
    // [105] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2]
  toSpritePtr2_from_b3:
    jmp toSpritePtr2
    // sprites_irq::toSpritePtr2
  toSpritePtr2:
    jmp b11
    // sprites_irq::@11
  b11:
    // [106] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 
    lda #toSpritePtr2_return
    sta.z irq_sprite_ptr
    jmp b5_from_b11
    // sprites_irq::@1
  b1:
    // [107] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 
    lda.z ptr
    sta PLAYFIELD_SPRITE_PTRS_1
    // [108] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 
    ldy.z ptr
    iny
    sty.z ptr_1
    // [109] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 
    lda.z ptr_1
    sta PLAYFIELD_SPRITE_PTRS_1+1
    // [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 
    lda.z ptr_1
    sta PLAYFIELD_SPRITE_PTRS_1+2
    // [111] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuz1=_inc_vbuz2 
    ldy.z ptr_1
    iny
    sty.z ptr_2
    // [112] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuz1 
    lda.z ptr_2
    sta PLAYFIELD_SPRITE_PTRS_1+3
    jmp b2
}
  // File Data
SIN:
.var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }

.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_SPRITE "SIN_SPRITE"
  .fill $40, $ff


REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] (byte) render_screen_showing#0 ← (byte) 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) $15 [ ] (  [ ] ) always clobbers reg byte a 
Statement [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 [ ] (  [ ] ) always clobbers reg byte a 
Statement [7] (byte) irq_cnt#0 ← (byte) 0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [19] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [21] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ( main:10 [ 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 [22] *((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:10 [ 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 [23] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 [ main::s#2 main::xpos#2 main::ypos#2 ] ( main:10 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3 [ main::s#2 main::xpos#2 main::ypos#2 main::$6 ] ( main:10 [ main::s#2 main::xpos#2 main::ypos#2 main::$6 ] ) always clobbers reg byte a 
Statement [27] *((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:10 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [28] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18 [ main::s#2 main::ypos#2 main::xpos#1 ] ( main:10 [ main::s#2 main::ypos#2 main::xpos#1 ] ) always clobbers reg byte a 
Statement [29] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18 [ main::s#2 main::xpos#1 main::ypos#1 ] ( main:10 [ main::s#2 main::xpos#1 main::ypos#1 ] ) always clobbers reg byte a 
Statement [39] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2 [ sin_idx#10 ] ( main:10::loop:35 [ 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 [42] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1 [ sin_idx#10 loop::s#2 loop::idx#2 loop::$1 ] ( main:10::loop:35 [ 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#0 loop::idx#1 ]
Statement [43] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte[$100]) SIN#0 + (byte) loop::idx#2) [ sin_idx#10 loop::s#2 loop::idx#2 ] ( main:10::loop:35 [ sin_idx#10 loop::s#2 loop::idx#2 ] ) always clobbers reg byte a 
Statement [44] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a [ sin_idx#10 loop::s#2 loop::idx#1 ] ( main:10::loop:35 [ sin_idx#10 loop::s#2 loop::idx#1 ] ) always clobbers reg byte a 
Statement [49] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement asm { ldaCIA1_INTERRUPT  } always clobbers reg byte a 
Statement [51] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [52] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [53] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [54] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [55] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [56] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [57] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [61] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [62] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [63] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:10::sprites_init:18 [ 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 [66] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [67] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a 
Statement [80] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ 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 [82] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ 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:22 [ sprites_irq::ptr#0 ]
Statement [90] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ 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 [91] if((byte) irq_cnt#1==(byte) $a) 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] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x 
Statement [93] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] (  [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x 
Statement [94] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] (  [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x 
Statement [96] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] (  [ ] ) always clobbers reg byte a 
Statement [97] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [98] return  [ ] (  [ ] ) always clobbers reg byte a reg byte x reg byte y 
Statement [99] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a 
Statement [100] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a 
Statement [101] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] (  [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x 
Statement [102] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] (  [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x 
Statement [103] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] (  [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x 
Statement [104] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] (  [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a 
Statement [106] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] (  [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ) always clobbers reg byte a 
Statement [1] (byte) render_screen_showing#0 ← (byte) 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) $15 [ ] (  [ ] ) always clobbers reg byte a 
Statement [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 [ ] (  [ ] ) always clobbers reg byte a 
Statement [7] (byte) irq_cnt#0 ← (byte) 0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [19] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff [ ] ( main:10 [ ] ) always clobbers reg byte a 
Statement [21] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ( main:10 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ) always clobbers reg byte a 
Statement [22] *((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:10 [ main::s#2 main::xpos#2 main::ypos#2 main::s2#0 ] ) always clobbers reg byte a 
Statement [23] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 [ main::s#2 main::xpos#2 main::ypos#2 ] ( main:10 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3 [ main::s#2 main::xpos#2 main::ypos#2 main::$6 ] ( main:10 [ main::s#2 main::xpos#2 main::ypos#2 main::$6 ] ) always clobbers reg byte a 
Statement [27] *((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:10 [ main::s#2 main::xpos#2 main::ypos#2 ] ) always clobbers reg byte a 
Statement [28] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18 [ main::s#2 main::ypos#2 main::xpos#1 ] ( main:10 [ main::s#2 main::ypos#2 main::xpos#1 ] ) always clobbers reg byte a 
Statement [29] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18 [ main::s#2 main::xpos#1 main::ypos#1 ] ( main:10 [ main::s#2 main::xpos#1 main::ypos#1 ] ) always clobbers reg byte a 
Statement [39] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2 [ sin_idx#10 ] ( main:10::loop:35 [ sin_idx#10 ] ) always clobbers reg byte a 
Statement [42] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1 [ sin_idx#10 loop::s#2 loop::idx#2 loop::$1 ] ( main:10::loop:35 [ sin_idx#10 loop::s#2 loop::idx#2 loop::$1 ] ) always clobbers reg byte a 
Statement [43] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte[$100]) SIN#0 + (byte) loop::idx#2) [ sin_idx#10 loop::s#2 loop::idx#2 ] ( main:10::loop:35 [ sin_idx#10 loop::s#2 loop::idx#2 ] ) always clobbers reg byte a 
Statement [44] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a [ sin_idx#10 loop::s#2 loop::idx#1 ] ( main:10::loop:35 [ sin_idx#10 loop::s#2 loop::idx#1 ] ) always clobbers reg byte a 
Statement [49] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement asm { ldaCIA1_INTERRUPT  } always clobbers reg byte a 
Statement [51] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [52] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [53] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [54] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [55] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [56] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [57] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:10::sprites_irq_init:33 [ ] ) always clobbers reg byte a 
Statement [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [61] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [62] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [63] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:10::sprites_init:18 [ ] ) always clobbers reg byte a 
Statement [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a 
Statement [66] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [67] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a 
Statement [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a 
Statement [80] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ 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 [82] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ 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] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ 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 [91] if((byte) irq_cnt#1==(byte) $a) 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] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x 
Statement [93] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] (  [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x 
Statement [94] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] (  [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x 
Statement [96] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] (  [ ] ) always clobbers reg byte a 
Statement [97] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [98] return  [ ] (  [ ] ) always clobbers reg byte a reg byte x reg byte y 
Statement [99] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a 
Statement [100] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] (  [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a 
Statement [101] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] (  [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x 
Statement [102] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] (  [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x 
Statement [103] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] (  [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x 
Statement [104] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] (  [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a 
Statement [106] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] (  [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#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#0 loop::idx#1 ] : 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 [ sprites_irq::raster_sprite_gfx_modify#0 ] : 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 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] : zp ZP_BYTE:12 , 
Potential registers zp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] : zp ZP_BYTE:13 , 
Potential registers zp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] : zp ZP_BYTE:14 , 
Potential registers zp ZP_BYTE:15 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] : 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::$6 ] : 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::ptr#0 ] : zp ZP_BYTE:22 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:23 [ sprites_irq::ptr#3 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:24 [ sprites_irq::ptr#4 ] : zp ZP_BYTE:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:25 [ sprites_irq::ptr#1 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:26 [ sprites_irq::ptr#2 ] : zp ZP_BYTE:26 , 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#0 loop::idx#1 ] 
Uplift Scope [] 72.26: zp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] 65.61: zp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] 62.17: zp ZP_BYTE:15 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] 25.67: zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] 11.97: zp ZP_BYTE:12 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] 0.4: zp ZP_BYTE:11 [ render_screen_showing#0 ] 
Uplift Scope [main] 23.1: zp ZP_BYTE:2 [ main::s#2 main::s#1 ] 22: zp ZP_BYTE:17 [ main::$6 ] 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:10 [ sprites_irq::raster_sprite_gfx_modify#0 ] 4: zp ZP_BYTE:21 [ sprites_irq::$0 ] 4: zp ZP_BYTE:24 [ sprites_irq::ptr#4 ] 4: zp ZP_BYTE:26 [ sprites_irq::ptr#2 ] 2.67: zp ZP_BYTE:23 [ sprites_irq::ptr#3 ] 2.67: zp ZP_BYTE:25 [ sprites_irq::ptr#1 ] 2.5: zp ZP_BYTE:20 [ sprites_irq::ypos#0 ] 2.5: zp ZP_BYTE:22 [ sprites_irq::ptr#0 ] 
Uplift Scope [sprites_irq_init] 

Uplifting [loop] best 13962 combination zp ZP_BYTE:6 [ loop::s#2 loop::s#1 ] reg byte a [ loop::$1 ] reg byte x [ loop::idx#2 loop::idx#0 loop::idx#1 ] 
Uplifting [] best 13962 combination zp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] zp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] zp ZP_BYTE:15 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] zp ZP_BYTE:12 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] zp ZP_BYTE:11 [ render_screen_showing#0 ] 
Uplifting [main] best 13682 combination reg byte y [ main::s#2 main::s#1 ] reg byte a [ main::$6 ] 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 13512 combination reg byte y [ sprites_init::s#2 sprites_init::s#1 ] reg byte x [ sprites_init::s2#0 ] zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] 
Uplifting [sprites_irq] best 13488 combination zp ZP_BYTE:10 [ 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:25 [ sprites_irq::ptr#1 ] zp ZP_BYTE:20 [ sprites_irq::ypos#0 ] zp ZP_BYTE:22 [ sprites_irq::ptr#0 ] 
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [sprites_irq_init] best 13488 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ loop::s#2 loop::s#1 ]
Uplifting [loop] best 13488 combination zp ZP_BYTE:6 [ loop::s#2 loop::s#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Uplifting [] best 13488 combination zp ZP_BYTE:14 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
Uplifting [] best 13488 combination zp ZP_BYTE:13 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:15 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
Uplifting [] best 13488 combination zp ZP_BYTE:15 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ]
Uplifting [] best 13488 combination zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Uplifting [sprites_init] best 13488 combination zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:12 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
Uplifting [] best 13488 combination zp ZP_BYTE:12 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ]
Uplifting [main] best 13488 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 13488 combination zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:10 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Uplifting [sprites_irq] best 13488 combination zp ZP_BYTE:10 [ sprites_irq::raster_sprite_gfx_modify#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ sprites_irq::ptr#1 ]
Uplifting [sprites_irq] best 13476 combination reg byte x [ sprites_irq::ptr#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ sprites_irq::ypos#0 ]
Uplifting [sprites_irq] best 13461 combination reg byte a [ sprites_irq::ypos#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:22 [ sprites_irq::ptr#0 ]
Uplifting [sprites_irq] best 13446 combination reg byte x [ sprites_irq::ptr#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:11 [ render_screen_showing#0 ]
Uplifting [] best 13446 combination zp ZP_BYTE:11 [ render_screen_showing#0 ] 
Coalescing zero page register [ zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 ] ] with [ zp ZP_BYTE:3 [ main::xpos#2 main::xpos#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:6 [ loop::s#2 loop::s#1 ] ] with [ zp ZP_BYTE:4 [ main::ypos#2 main::ypos#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] ] with [ zp ZP_BYTE:5 [ sin_idx#10 sin_idx#3 main::xpos#2 main::xpos#1 ] ]
Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:2 [ loop::s#2 loop::s#1 main::ypos#2 main::ypos#1 ]
Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:3 [ sprites_init::xpos#2 sprites_init::xpos#1 sin_idx#10 sin_idx#3 main::xpos#2 main::xpos#1 ]
Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:4 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:5 [ render_screen_showing#0 ]
Allocated (was zp ZP_BYTE:12) zp ZP_BYTE:6 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:7 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:8 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:9 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
Interrupt procedure sprites_irq clobbers AXCNZV
Removing interrupt register storage sty regy+1 in CHU127 entry interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage regy: in CHU166 [98] return  - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage ldy #00 in CHU166 [98] return  - exit interrupt(HARDWARE_CLOBBER)

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // 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 = 5
  // 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
  // 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
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // 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 Y-position of the first sprite row
  .const SPRITES_FIRST_YPOS = $31
  .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/$40
  .label render_screen_showing = 5
  .label irq_raster_next = 6
  .label irq_sprite_ypos = 7
  .label irq_sprite_ptr = 8
  .label irq_cnt = 9
  .label sin_idx = 3
  // @begin
bbegin:
  jmp b1
  // @1
b1:
  // [1] (byte) render_screen_showing#0 ← (byte) 0 -- vbuz1=vbuc1 
  // The screen currently being showed to the user. $00 for screen 1 / $20 for screen 2.
  lda #0
  sta.z render_screen_showing
  // 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 b2
  // @2
b2:
  // [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.z irq_raster_next
  // [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte) $15 -- vbuz1=vbuc1 
  // Y-pos of the sprites on the next IRQ
  lda #SPRITES_FIRST_YPOS+$15
  sta.z irq_sprite_ypos
  // [5] phi from @2 to toSpritePtr1 [phi:@2->toSpritePtr1]
toSpritePtr1_from_b2:
  jmp toSpritePtr1
  // toSpritePtr1
toSpritePtr1:
  jmp b5
  // @5
b5:
  // [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 
  // Index of the sprites to show on the next IRQ
  lda #toSpritePtr1_return+3
  sta.z irq_sprite_ptr
  // [7] (byte) irq_cnt#0 ← (byte) 0 -- vbuz1=vbuc1 
  // Counting the 10 IRQs
  lda #0
  sta.z irq_cnt
  jmp b3
  // @3
b3:
  // kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff  }}
  // [9] phi from @3 to @4 [phi:@3->@4]
b4_from_b3:
  jmp b4
  // @4
b4:
  // [10] call main 
  // [12] phi from @4 to main [phi:@4->main]
main_from_b4:
  jsr main
  // [11] phi from @4 to @end [phi:@4->@end]
bend_from_b4:
  jmp bend
  // @end
bend:
  // main
main: {
    .const toSpritePtr2_return = SIN_SPRITE/$40
    .const vicSelectGfxBank1_toDd001_return = 3
    .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f
    .label xpos = 3
    .label ypos = 2
    jmp vicSelectGfxBank1
    // main::vicSelectGfxBank1
  vicSelectGfxBank1:
    // [13] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
    // [14] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001]
  vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1:
    jmp vicSelectGfxBank1_toDd001
    // main::vicSelectGfxBank1_toDd001
  vicSelectGfxBank1_toDd001:
    jmp vicSelectGfxBank1_b1
    // main::vicSelectGfxBank1_@1
  vicSelectGfxBank1_b1:
    // [15] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
    // [16] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181]
  toD0181_from_vicSelectGfxBank1_b1:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp b3
    // main::@3
  b3:
    // [17] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [18] call sprites_init 
    jsr sprites_init
    jmp b5
    // main::@5
  b5:
    // [19] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff -- _deref_pbuc1=vbuc2 
    lda #$ff
    sta SPRITES_ENABLE
    // [20] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
    // [20] phi (byte) main::ypos#2 = (byte) $32 [phi:main::@5->main::@1#0] -- vbuz1=vbuc1 
    lda #$32
    sta.z ypos
    // [20] phi (byte) main::xpos#2 = (byte) $18 [phi:main::@5->main::@1#1] -- vbuz1=vbuc1 
    lda #$18
    sta.z xpos
    // [20] phi (byte) main::s#2 = (byte) 4 [phi:main::@5->main::@1#2] -- vbuyy=vbuc1 
    ldy #4
    jmp b1
    // [20] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  b1_from_b4:
    // [20] phi (byte) main::ypos#2 = (byte) main::ypos#1 [phi:main::@4->main::@1#0] -- register_copy 
    // [20] phi (byte) main::xpos#2 = (byte) main::xpos#1 [phi:main::@4->main::@1#1] -- register_copy 
    // [20] phi (byte) main::s#2 = (byte) main::s#1 [phi:main::@4->main::@1#2] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [21] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 
    tya
    asl
    tax
    // [22] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z xpos
    sta SPRITES_XPOS,x
    // [23] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z ypos
    sta SPRITES_YPOS,x
    // [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3 -- vbuaa=vbuyy_minus_vbuc1 
    tya
    sec
    sbc #3
    // [25] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuyy=vbuaa 
    sta SPRITES_COLS,y
    // [26] phi from main::@1 to main::toSpritePtr2 [phi:main::@1->main::toSpritePtr2]
  toSpritePtr2_from_b1:
    jmp toSpritePtr2
    // main::toSpritePtr2
  toSpritePtr2:
    jmp b4
    // main::@4
  b4:
    // [27] *((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
    // [28] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z xpos
    axs #-[$18]
    stx.z xpos
    // [29] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z ypos
    axs #-[$18]
    stx.z ypos
    // [30] (byte) main::s#1 ← ++ (byte) main::s#2 -- vbuyy=_inc_vbuyy 
    iny
    // [31] if((byte) main::s#1!=(byte) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #8
    bne b1_from_b4
    // [32] phi from main::@4 to main::@2 [phi:main::@4->main::@2]
  b2_from_b4:
    jmp b2
    // main::@2
  b2:
    // [33] call sprites_irq_init 
    jsr sprites_irq_init
    // [34] phi from main::@2 to main::@6 [phi:main::@2->main::@6]
  b6_from_b2:
    jmp b6
    // main::@6
  b6:
    // [35] call loop 
    // [37] phi from main::@6 to loop [phi:main::@6->loop]
  loop_from_b6:
    jsr loop
    jmp breturn
    // main::@return
  breturn:
    // [36] return 
    rts
}
  // loop
loop: {
    .label s = 2
    // [38] phi from loop to loop::@1 [phi:loop->loop::@1]
  b1_from_loop:
    // [38] phi (byte) sin_idx#10 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z sin_idx
    jmp b1
    // loop::@1
  b1:
    jmp b2
    // loop::@2
  b2:
    // [39] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne b2
    jmp b3
    // loop::@3
  b3:
    // [40] (byte) loop::idx#0 ← (byte) sin_idx#10 -- vbuxx=vbuz1 
    ldx.z sin_idx
    // [41] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4]
  b4_from_b3:
    // [41] phi (byte) loop::idx#2 = (byte) loop::idx#0 [phi:loop::@3->loop::@4#0] -- register_copy 
    // [41] phi (byte) loop::s#2 = (byte) 4 [phi:loop::@3->loop::@4#1] -- vbuz1=vbuc1 
    lda #4
    sta.z s
    jmp b4
    // [41] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4]
  b4_from_b4:
    // [41] phi (byte) loop::idx#2 = (byte) loop::idx#1 [phi:loop::@4->loop::@4#0] -- register_copy 
    // [41] phi (byte) loop::s#2 = (byte) loop::s#1 [phi:loop::@4->loop::@4#1] -- register_copy 
    jmp b4
    // loop::@4
  b4:
    // [42] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 
    lda.z s
    asl
    // [43] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte[$100]) SIN#0 + (byte) loop::idx#2) -- pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuxx 
    tay
    lda SIN,x
    sta SPRITES_YPOS,y
    // [44] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a -- vbuxx=vbuxx_plus_vbuc1 
    txa
    axs #-[$a]
    // [45] (byte) loop::s#1 ← ++ (byte) loop::s#2 -- vbuz1=_inc_vbuz1 
    inc.z s
    // [46] if((byte) loop::s#1!=(byte) 8) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z s
    bne b4_from_b4
    jmp b5
    // loop::@5
  b5:
    // [47] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 -- vbuz1=_inc_vbuz1 
    inc.z sin_idx
    // [38] phi from loop::@5 to loop::@1 [phi:loop::@5->loop::@1]
  b1_from_b5:
    // [38] phi (byte) sin_idx#10 = (byte) sin_idx#3 [phi:loop::@5->loop::@1#0] -- register_copy 
    jmp b1
}
  // sprites_irq_init
// Setup the IRQ
sprites_irq_init: {
    // asm { sei  }
    sei
    // [49] *((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
    // asm { ldaCIA1_INTERRUPT  }
    lda CIA1_INTERRUPT
    // [51] *((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
    // [52] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [53] *((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
    // [54] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line
    lda #$7f
    and VIC_CONTROL
    sta VIC_CONTROL
    // [55] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 
    lda #IRQ_RASTER_FIRST
    sta RASTER
    // [56] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // [57] *((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
    // asm { cli  }
    cli
    jmp breturn
    // sprites_irq_init::@return
  breturn:
    // [59] return 
    rts
}
  // sprites_init
// Setup the sprites
sprites_init: {
    .label xpos = 3
    // [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 
    lda #$f
    sta SPRITES_ENABLE
    // [61] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta SPRITES_MC
    // [62] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_MC
    sta SPRITES_EXPAND_Y
    // [63] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 
    lda SPRITES_EXPAND_Y
    sta SPRITES_EXPAND_X
    // [64] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1]
  b1_from_sprites_init:
    // [64] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 
    lda #$18+$f*8
    sta.z xpos
    // [64] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 
    ldy #0
    jmp b1
    // [64] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1]
  b1_from_b1:
    // [64] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy 
    // [64] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy 
    jmp b1
    // sprites_init::@1
  b1:
    // [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 
    tya
    asl
    tax
    // [66] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z xpos
    sta SPRITES_XPOS,x
    // [67] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #BLACK
    sta SPRITES_COLS,y
    // [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z xpos
    axs #-[$18]
    stx.z xpos
    // [69] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy 
    iny
    // [70] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #4
    bne b1_from_b1
    jmp breturn
    // sprites_init::@return
  breturn:
    // [71] return 
    rts
}
  // 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/$40
    .label raster_sprite_gfx_modify = 4
    // entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    stx regx+1
    // asm { cld  }
    //(*BGCOL)++;
    // Clear decimal flag (because it is used by the score algorithm)
    cld
    // [73] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 
    // Place the sprites
    lda.z irq_sprite_ypos
    // [74] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS
    // [75] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+2
    // [76] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+4
    // [77] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+6
    // [78] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuxx=vbuz1_plus_1 
    ldx.z irq_raster_next
    inx
    // [79] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx 
    // Wait for the y-position before changing sprite pointers
    stx.z raster_sprite_gfx_modify
    jmp b8
    // sprites_irq::@8
  b8:
    // [80] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 
    lda RASTER
    cmp.z raster_sprite_gfx_modify
    bcc b8
    jmp b9
    // sprites_irq::@9
  b9:
    // [81] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 
    ldx.z irq_sprite_ptr
    // [82] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 
    lda.z render_screen_showing
    cmp #0
    beq b1
    jmp b10
    // sprites_irq::@10
  b10:
    // [83] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_2
    // [84] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx 
    inx
    txa
    // [85] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+1
    // [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+2
    // [87] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
    // [88] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+3
    jmp b2
    // sprites_irq::@2
  b2:
    // [89] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 
    inc.z irq_cnt
    // [90] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 
    lda #9
    cmp.z irq_cnt
    beq b3
    jmp b6
    // sprites_irq::@6
  b6:
    // [91] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 
    lda #$a
    cmp.z irq_cnt
    beq b4
    jmp b7
    // sprites_irq::@7
  b7:
    // [92] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_raster_next
    axs #-[$14]
    stx.z irq_raster_next
    // [93] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ypos
    axs #-[$15]
    stx.z irq_sprite_ypos
    // [94] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ptr
    axs #-[3]
    stx.z irq_sprite_ptr
    // [95] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5]
  b5_from_b11:
  b5_from_b4:
  b5_from_b7:
    // [95] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy 
    // [95] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy 
    // [95] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy 
    // [95] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy 
    jmp b5
    // sprites_irq::@5
  b5:
    // [96] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 
    // Setup next interrupt
    lda.z irq_raster_next
    sta RASTER
    // [97] *((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
    // sprites_irq::@return
  breturn:
    // [98] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
  regx:
    ldx #00
    rti
    // sprites_irq::@4
  b4:
    // [99] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 
    lda #0
    sta.z irq_cnt
    // [100] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
    lda #IRQ_RASTER_FIRST
    sta.z irq_raster_next
    // [101] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ypos
    axs #-[$15]
    stx.z irq_sprite_ypos
    // [102] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ptr
    axs #-[3]
    stx.z irq_sprite_ptr
    jmp b5_from_b4
    // sprites_irq::@3
  b3:
    // [103] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_raster_next
    axs #-[$15]
    stx.z irq_raster_next
    // [104] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 
    lda #SPRITES_FIRST_YPOS
    sta.z irq_sprite_ypos
    // [105] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2]
  toSpritePtr2_from_b3:
    jmp toSpritePtr2
    // sprites_irq::toSpritePtr2
  toSpritePtr2:
    jmp b11
    // sprites_irq::@11
  b11:
    // [106] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 
    lda #toSpritePtr2_return
    sta.z irq_sprite_ptr
    jmp b5_from_b11
    // sprites_irq::@1
  b1:
    // [107] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1
    // [108] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx 
    inx
    // [109] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1+1
    // [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1+2
    // [111] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx 
    inx
    txa
    // [112] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+3
    jmp b2
}
  // File Data
SIN:
.var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }

.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_SPRITE "SIN_SPRITE"
  .fill $40, $ff


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp toSpritePtr1
Removing instruction jmp b5
Removing instruction jmp b3
Removing instruction jmp b4
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 b3
Removing instruction jmp b5
Removing instruction jmp b1
Removing instruction jmp toSpritePtr2
Removing instruction jmp b4
Removing instruction jmp b2
Removing instruction jmp b6
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b8
Removing instruction jmp b9
Removing instruction jmp b10
Removing instruction jmp b2
Removing instruction jmp b6
Removing instruction jmp b7
Removing instruction jmp b5
Removing instruction jmp breturn
Removing instruction jmp toSpritePtr2
Removing instruction jmp b11
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda SPRITES_MC
Removing instruction lda SPRITES_EXPAND_Y
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b4 with b1
Replacing label b4_from_b4 with b4
Replacing label b1 with b2
Replacing label b1_from_b1 with b1
Replacing label b5_from_b4 with b5
Replacing label b5_from_b11 with b5
Removing instruction b1:
Removing instruction toSpritePtr1_from_b2:
Removing instruction toSpritePtr1:
Removing instruction b3:
Removing instruction b4_from_b3:
Removing instruction main_from_b4:
Removing instruction bend_from_b4:
Removing instruction vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1:
Removing instruction vicSelectGfxBank1_toDd001:
Removing instruction toD0181_from_vicSelectGfxBank1_b1:
Removing instruction toD0181:
Removing instruction b1_from_b4:
Removing instruction toSpritePtr2_from_b1:
Removing instruction toSpritePtr2:
Removing instruction b2_from_b4:
Removing instruction b6_from_b2:
Removing instruction loop_from_b6:
Removing instruction b1:
Removing instruction b4_from_b4:
Removing instruction b1_from_b1:
Removing instruction b5_from_b11:
Removing instruction b5_from_b4:
Removing instruction b5_from_b7:
Removing instruction breturn:
Removing instruction toSpritePtr2_from_b3:
Removing instruction toSpritePtr2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction b5:
Removing instruction b4:
Removing instruction bend:
Removing instruction vicSelectGfxBank1:
Removing instruction vicSelectGfxBank1_b1:
Removing instruction b3:
Removing instruction b5:
Removing instruction b1_from_b5:
Removing instruction b4:
Removing instruction b2:
Removing instruction b6:
Removing instruction breturn:
Removing instruction b1_from_loop:
Removing instruction b3:
Removing instruction b4_from_b3:
Removing instruction b5:
Removing instruction b1_from_b5:
Removing instruction breturn:
Removing instruction b1_from_sprites_init:
Removing instruction breturn:
Removing instruction b9:
Removing instruction b10:
Removing instruction b6:
Removing instruction b7:
Removing instruction b11:
Succesful ASM optimization Pass5UnusedLabelElimination
Adding RTS to root block 
Succesful ASM optimization Pass5AddMainRts
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
(label) @1
(label) @2
(label) @3
(label) @4
(label) @5
(label) @begin
(label) @end
(byte) BLACK
(const byte) BLACK#0 BLACK = (byte) 0
(byte*) CIA1_INTERRUPT
(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333
(byte*) CIA2_PORT_A
(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = (byte*) 56576
(byte*) CIA2_PORT_A_DDR
(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = (byte*) 56578
(byte) CIA_INTERRUPT_CLEAR
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(void()**) HARDWARE_IRQ
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534
(byte*) IRQ_ENABLE
(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = (byte*) 53274
(byte) IRQ_RASTER
(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte) 1
(byte) IRQ_RASTER_FIRST
(const byte) IRQ_RASTER_FIRST#0 IRQ_RASTER_FIRST = (const byte) SPRITES_FIRST_YPOS#0+(byte) $13
(byte*) IRQ_STATUS
(const byte*) IRQ_STATUS#0 IRQ_STATUS = (byte*) 53273
(byte*) PLAYFIELD_CHARSET
(const byte*) PLAYFIELD_CHARSET#0 PLAYFIELD_CHARSET = (byte*) 10240
(byte*) PLAYFIELD_SCREEN_1
(const byte*) PLAYFIELD_SCREEN_1#0 PLAYFIELD_SCREEN_1 = (byte*) 1024
(byte*) PLAYFIELD_SCREEN_2
(const byte*) PLAYFIELD_SCREEN_2#0 PLAYFIELD_SCREEN_2 = (byte*) 11264
(byte*) PLAYFIELD_SPRITES
(const byte*) PLAYFIELD_SPRITES#0 PLAYFIELD_SPRITES = (byte*) 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*) 1
(byte*) PROCPORT_DDR
(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0
(byte) PROCPORT_DDR_MEMORY_MASK
(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7
(byte) PROCPORT_RAM_IO
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) 5
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte[$100]) SIN
(const byte[$100]) SIN#0 SIN = kickasm {{ .var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }
 }}
(byte*) SIN_SPRITE
(const byte*) SIN_SPRITE#0 SIN_SPRITE = (byte*) 10240
(byte*) SPRITES_COLS
(const byte*) SPRITES_COLS#0 SPRITES_COLS = (byte*) 53287
(byte*) SPRITES_ENABLE
(const byte*) SPRITES_ENABLE#0 SPRITES_ENABLE = (byte*) 53269
(byte*) SPRITES_EXPAND_X
(const byte*) SPRITES_EXPAND_X#0 SPRITES_EXPAND_X = (byte*) 53277
(byte*) SPRITES_EXPAND_Y
(const byte*) SPRITES_EXPAND_Y#0 SPRITES_EXPAND_Y = (byte*) 53271
(byte) SPRITES_FIRST_YPOS
(const byte) SPRITES_FIRST_YPOS#0 SPRITES_FIRST_YPOS = (byte) $31
(byte*) SPRITES_MC
(const byte*) SPRITES_MC#0 SPRITES_MC = (byte*) 53276
(byte*) SPRITES_XPOS
(const byte*) SPRITES_XPOS#0 SPRITES_XPOS = (byte*) 53248
(byte*) SPRITES_YPOS
(const byte*) SPRITES_YPOS#0 SPRITES_YPOS = (byte*) 53249
(word) SPRITE_PTRS
(const word) SPRITE_PTRS#0 SPRITE_PTRS = (word) $3f8
(byte*) VIC_CONTROL
(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265
(byte) irq_cnt
(byte) irq_cnt#0 irq_cnt zp ZP_BYTE:9 0.17391304347826086
(byte) irq_cnt#1 irq_cnt zp ZP_BYTE:9 1.0
(byte) irq_cnt#2 irq_cnt zp ZP_BYTE:9 1.0
(byte) irq_cnt#3 irq_cnt zp ZP_BYTE:9 60.0
(byte) irq_raster_next
(byte) irq_raster_next#0 irq_raster_next zp ZP_BYTE:6 0.3076923076923077
(byte) irq_raster_next#1 irq_raster_next zp ZP_BYTE:6 1.0
(byte) irq_raster_next#2 irq_raster_next zp ZP_BYTE:6 1.3333333333333333
(byte) irq_raster_next#3 irq_raster_next zp ZP_BYTE:6 1.3333333333333333
(byte) irq_raster_next#4 irq_raster_next zp ZP_BYTE:6 8.0
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0 irq_sprite_ptr zp ZP_BYTE:8 0.25806451612903225
(byte) irq_sprite_ptr#1 irq_sprite_ptr zp ZP_BYTE:8 4.0
(byte) irq_sprite_ptr#11 irq_sprite_ptr zp ZP_BYTE:8 60.0
(byte) irq_sprite_ptr#2 irq_sprite_ptr zp ZP_BYTE:8 4.0
(byte) irq_sprite_ptr#3 irq_sprite_ptr zp ZP_BYTE:8 4.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 irq_sprite_ypos zp ZP_BYTE:7 0.27586206896551724
(byte) irq_sprite_ypos#1 irq_sprite_ypos zp ZP_BYTE:7 1.3333333333333333
(byte) irq_sprite_ypos#11 irq_sprite_ypos zp ZP_BYTE:7 60.0
(byte) irq_sprite_ypos#2 irq_sprite_ypos zp ZP_BYTE:7 2.0
(byte) irq_sprite_ypos#3 irq_sprite_ypos zp ZP_BYTE:7 2.0
(void()) loop()
(byte~) loop::$1 reg byte a 202.0
(label) loop::@1
(label) loop::@2
(label) loop::@3
(label) loop::@4
(label) loop::@5
(byte) loop::idx
(byte) loop::idx#0 reg byte x 22.0
(byte) loop::idx#1 reg byte x 67.33333333333333
(byte) loop::idx#2 reg byte x 104.66666666666666
(byte) loop::s
(byte) loop::s#1 s zp ZP_BYTE:2 151.5
(byte) loop::s#2 s zp ZP_BYTE:2 75.75
(void()) main()
(byte~) main::$6 reg byte a 22.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(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
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) 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) $3fff*(byte) 4|>(word)(const byte*) PLAYFIELD_CHARSET#0/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(label) main::toSpritePtr2
(word~) main::toSpritePtr2_$0
(number~) 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) $40
(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
(number~) main::vicSelectGfxBank1_toDd001_$2
(number~) 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) 3
(byte) main::xpos
(byte) main::xpos#1 xpos zp ZP_BYTE:3 5.5
(byte) main::xpos#2 xpos zp ZP_BYTE:3 4.125
(byte) main::ypos
(byte) main::ypos#1 ypos zp ZP_BYTE:2 7.333333333333333
(byte) main::ypos#2 ypos zp ZP_BYTE:2 3.666666666666667
(byte) render_screen_showing
(byte) render_screen_showing#0 render_screen_showing zp ZP_BYTE:5 0.4
(byte) sin_idx
(byte) sin_idx#10 sin_idx zp ZP_BYTE:3 3.666666666666667
(byte) sin_idx#3 sin_idx zp ZP_BYTE:3 22.0
(void()) sprites_init()
(label) sprites_init::@1
(label) sprites_init::@return
(byte) sprites_init::s
(byte) sprites_init::s#1 reg byte y 16.5
(byte) sprites_init::s#2 reg byte y 8.8
(byte) sprites_init::s2
(byte) sprites_init::s2#0 reg byte x 22.0
(byte) sprites_init::xpos
(byte) sprites_init::xpos#1 xpos zp ZP_BYTE:3 7.333333333333333
(byte) sprites_init::xpos#2 xpos zp ZP_BYTE:3 8.25
interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
(byte~) sprites_irq::$0 reg byte x 4.0
(label) sprites_irq::@1
(label) sprites_irq::@10
(label) sprites_irq::@11
(label) sprites_irq::@2
(label) sprites_irq::@3
(label) sprites_irq::@4
(label) sprites_irq::@5
(label) sprites_irq::@6
(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 x 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:4 6.5
(label) sprites_irq::toSpritePtr2
(word~) sprites_irq::toSpritePtr2_$0
(number~) 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) $40
(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
(number~) toSpritePtr1_$1
(byte~) toSpritePtr1_$2
(byte) toSpritePtr1_return
(const byte) toSpritePtr1_return#0 toSpritePtr1_return = (byte)(word)(const byte*) PLAYFIELD_SPRITES#0/(byte) $40
(byte*) toSpritePtr1_sprite

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


FINAL ASSEMBLER
Score: 11662

  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // 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 = 5
  // 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
  // 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
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // 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 Y-position of the first sprite row
  .const SPRITES_FIRST_YPOS = $31
  .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/$40
  .label render_screen_showing = 5
  .label irq_raster_next = 6
  .label irq_sprite_ypos = 7
  .label irq_sprite_ptr = 8
  .label irq_cnt = 9
  .label sin_idx = 3
  // @begin
bbegin:
  // @1
  // render_screen_showing = 0
  // [1] (byte) render_screen_showing#0 ← (byte) 0 -- vbuz1=vbuc1 
  // The screen currently being showed to the user. $00 for screen 1 / $20 for screen 2.
  lda #0
  sta.z render_screen_showing
  // kickasm
  // 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 	  	} 	}  }}
  // @2
  // irq_raster_next = IRQ_RASTER_FIRST
  // [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.z irq_raster_next
  // irq_sprite_ypos = SPRITES_FIRST_YPOS + 21
  // [4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte) $15 -- vbuz1=vbuc1 
  // Y-pos of the sprites on the next IRQ
  lda #SPRITES_FIRST_YPOS+$15
  sta.z irq_sprite_ypos
  // [5] phi from @2 to toSpritePtr1 [phi:@2->toSpritePtr1]
  // toSpritePtr1
  // @5
  // irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES) + 3
  // [6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 
  // Index of the sprites to show on the next IRQ
  lda #toSpritePtr1_return+3
  sta.z irq_sprite_ptr
  // irq_cnt = 0
  // [7] (byte) irq_cnt#0 ← (byte) 0 -- vbuz1=vbuc1 
  // Counting the 10 IRQs
  lda #0
  sta.z irq_cnt
  // @3
  // kickasm
  // kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff  }}
  // [9] phi from @3 to @4 [phi:@3->@4]
  // @4
  // [10] call main 
  // [12] phi from @4 to main [phi:@4->main]
  jsr main
  rts
  // [11] phi from @4 to @end [phi:@4->@end]
  // @end
  // main
main: {
    .const toSpritePtr2_return = SIN_SPRITE/$40
    .const vicSelectGfxBank1_toDd001_return = 3
    .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f
    .label xpos = 3
    .label ypos = 2
    // main::vicSelectGfxBank1
    // *CIA2_PORT_A_DDR = %00000011
    // [13] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
    // [14] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001]
    // main::vicSelectGfxBank1_toDd001
    // main::vicSelectGfxBank1_@1
    // *CIA2_PORT_A = toDd00(gfx)
    // [15] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
    // [16] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181]
    // main::toD0181
    // main::@3
    // *D018 = toD018(PLAYFIELD_SCREEN_1, PLAYFIELD_CHARSET)
    // [17] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // sprites_init()
    // [18] call sprites_init 
    jsr sprites_init
    // main::@5
    // *SPRITES_ENABLE = $ff
    // [19] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff -- _deref_pbuc1=vbuc2 
    lda #$ff
    sta SPRITES_ENABLE
    // [20] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
    // [20] phi (byte) main::ypos#2 = (byte) $32 [phi:main::@5->main::@1#0] -- vbuz1=vbuc1 
    lda #$32
    sta.z ypos
    // [20] phi (byte) main::xpos#2 = (byte) $18 [phi:main::@5->main::@1#1] -- vbuz1=vbuc1 
    lda #$18
    sta.z xpos
    // [20] phi (byte) main::s#2 = (byte) 4 [phi:main::@5->main::@1#2] -- vbuyy=vbuc1 
    ldy #4
    // [20] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
    // [20] phi (byte) main::ypos#2 = (byte) main::ypos#1 [phi:main::@4->main::@1#0] -- register_copy 
    // [20] phi (byte) main::xpos#2 = (byte) main::xpos#1 [phi:main::@4->main::@1#1] -- register_copy 
    // [20] phi (byte) main::s#2 = (byte) main::s#1 [phi:main::@4->main::@1#2] -- register_copy 
    // main::@1
  b1:
    // s2 = s*2
    // [21] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 
    tya
    asl
    tax
    // SPRITES_XPOS[s2] = xpos
    // [22] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z xpos
    sta SPRITES_XPOS,x
    // SPRITES_YPOS[s2] = ypos
    // [23] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z ypos
    sta SPRITES_YPOS,x
    // s-3
    // [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3 -- vbuaa=vbuyy_minus_vbuc1 
    tya
    sec
    sbc #3
    // SPRITES_COLS[s] = s-3
    // [25] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuyy=vbuaa 
    sta SPRITES_COLS,y
    // [26] phi from main::@1 to main::toSpritePtr2 [phi:main::@1->main::toSpritePtr2]
    // main::toSpritePtr2
    // main::@4
    // PLAYFIELD_SPRITE_PTRS_1[s] = toSpritePtr(SIN_SPRITE)
    // [27] *((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
    // xpos +=  24
    // [28] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z xpos
    axs #-[$18]
    stx.z xpos
    // ypos +=  24
    // [29] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z ypos
    axs #-[$18]
    stx.z ypos
    // for(byte s:4..7)
    // [30] (byte) main::s#1 ← ++ (byte) main::s#2 -- vbuyy=_inc_vbuyy 
    iny
    // [31] if((byte) main::s#1!=(byte) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #8
    bne b1
    // [32] phi from main::@4 to main::@2 [phi:main::@4->main::@2]
    // main::@2
    // sprites_irq_init()
    // [33] call sprites_irq_init 
    jsr sprites_irq_init
    // [34] phi from main::@2 to main::@6 [phi:main::@2->main::@6]
    // main::@6
    // loop()
    // [35] call loop 
    // [37] phi from main::@6 to loop [phi:main::@6->loop]
    jsr loop
    // main::@return
    // }
    // [36] return 
    rts
}
  // loop
loop: {
    .label s = 2
    // [38] phi from loop to loop::@1 [phi:loop->loop::@1]
    // [38] phi (byte) sin_idx#10 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z sin_idx
    // loop::@1
    // loop::@2
  b2:
    // while (*RASTER!=$ff)
    // [39] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne b2
    // loop::@3
    // idx = sin_idx
    // [40] (byte) loop::idx#0 ← (byte) sin_idx#10 -- vbuxx=vbuz1 
    ldx.z sin_idx
    // [41] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4]
    // [41] phi (byte) loop::idx#2 = (byte) loop::idx#0 [phi:loop::@3->loop::@4#0] -- register_copy 
    // [41] phi (byte) loop::s#2 = (byte) 4 [phi:loop::@3->loop::@4#1] -- vbuz1=vbuc1 
    lda #4
    sta.z s
    // [41] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4]
    // [41] phi (byte) loop::idx#2 = (byte) loop::idx#1 [phi:loop::@4->loop::@4#0] -- register_copy 
    // [41] phi (byte) loop::s#2 = (byte) loop::s#1 [phi:loop::@4->loop::@4#1] -- register_copy 
    // loop::@4
  b4:
    // s*2
    // [42] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 
    lda.z s
    asl
    // SPRITES_YPOS[s*2] = SIN[idx]
    // [43] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte[$100]) SIN#0 + (byte) loop::idx#2) -- pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuxx 
    tay
    lda SIN,x
    sta SPRITES_YPOS,y
    // idx += 10
    // [44] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a -- vbuxx=vbuxx_plus_vbuc1 
    txa
    axs #-[$a]
    // for(byte s:4..7)
    // [45] (byte) loop::s#1 ← ++ (byte) loop::s#2 -- vbuz1=_inc_vbuz1 
    inc.z s
    // [46] if((byte) loop::s#1!=(byte) 8) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z s
    bne b4
    // loop::@5
    // sin_idx++;
    // [47] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 -- vbuz1=_inc_vbuz1 
    inc.z sin_idx
    // [38] phi from loop::@5 to loop::@1 [phi:loop::@5->loop::@1]
    // [38] phi (byte) sin_idx#10 = (byte) sin_idx#3 [phi:loop::@5->loop::@1#0] -- register_copy 
    jmp b2
}
  // sprites_irq_init
// Setup the IRQ
sprites_irq_init: {
    // asm
    // asm { sei  }
    sei
    // *IRQ_STATUS = IRQ_RASTER
    // [49] *((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
    // asm
    // asm { ldaCIA1_INTERRUPT  }
    lda CIA1_INTERRUPT
    // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
    // [51] *((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
    // *PROCPORT = PROCPORT_RAM_IO
    // [52] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR
    // [53] *((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
    // *VIC_CONTROL &=$7f
    // [54] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line
    lda #$7f
    and VIC_CONTROL
    sta VIC_CONTROL
    // *RASTER = IRQ_RASTER_FIRST
    // [55] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 
    lda #IRQ_RASTER_FIRST
    sta RASTER
    // *IRQ_ENABLE = IRQ_RASTER
    // [56] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // *HARDWARE_IRQ = &sprites_irq
    // [57] *((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
    // asm
    // asm { cli  }
    cli
    // sprites_irq_init::@return
    // }
    // [59] return 
    rts
}
  // sprites_init
// Setup the sprites
sprites_init: {
    .label xpos = 3
    // *SPRITES_ENABLE = %00001111
    // [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 
    lda #$f
    sta SPRITES_ENABLE
    // *SPRITES_MC = 0
    // [61] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta SPRITES_MC
    // *SPRITES_EXPAND_Y = *SPRITES_MC = 0
    // [62] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 
    sta SPRITES_EXPAND_Y
    // *SPRITES_EXPAND_X = *SPRITES_EXPAND_Y = *SPRITES_MC = 0
    // [63] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 
    sta SPRITES_EXPAND_X
    // [64] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1]
    // [64] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 
    lda #$18+$f*8
    sta.z xpos
    // [64] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 
    ldy #0
    // [64] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1]
    // [64] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy 
    // [64] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy 
    // sprites_init::@1
  b1:
    // s2 = s*2
    // [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 
    tya
    asl
    tax
    // SPRITES_XPOS[s2] = xpos
    // [66] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z xpos
    sta SPRITES_XPOS,x
    // SPRITES_COLS[s] = BLACK
    // [67] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #BLACK
    sta SPRITES_COLS,y
    // xpos = xpos+24
    // [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z xpos
    axs #-[$18]
    stx.z xpos
    // for(byte s:0..3)
    // [69] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy 
    iny
    // [70] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #4
    bne b1
    // sprites_init::@return
    // }
    // [71] return 
    rts
}
  // 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/$40
    .label raster_sprite_gfx_modify = 4
    // entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    stx regx+1
    // asm
    // asm { cld  }
    //(*BGCOL)++;
    // Clear decimal flag (because it is used by the score algorithm)
    cld
    // ypos = irq_sprite_ypos
    // [73] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 
    // Place the sprites
    lda.z irq_sprite_ypos
    // SPRITES_YPOS[0] = ypos
    // [74] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS
    // SPRITES_YPOS[2] = ypos
    // [75] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+2
    // SPRITES_YPOS[4] = ypos
    // [76] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+4
    // SPRITES_YPOS[6] = ypos
    // [77] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa 
    sta SPRITES_YPOS+6
    // irq_raster_next+1
    // [78] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuxx=vbuz1_plus_1 
    ldx.z irq_raster_next
    inx
    // raster_sprite_gfx_modify = irq_raster_next+1
    // [79] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx 
    // Wait for the y-position before changing sprite pointers
    stx.z raster_sprite_gfx_modify
    // sprites_irq::@8
  b8:
    // while(*RASTER<raster_sprite_gfx_modify)
    // [80] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 
    lda RASTER
    cmp.z raster_sprite_gfx_modify
    bcc b8
    // sprites_irq::@9
    // ptr = irq_sprite_ptr
    // [81] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 
    ldx.z irq_sprite_ptr
    // if(render_screen_showing==0)
    // [82] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 
    lda.z render_screen_showing
    cmp #0
    beq b1
    // sprites_irq::@10
    // PLAYFIELD_SPRITE_PTRS_2[0] = ptr++
    // [83] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_2
    // PLAYFIELD_SPRITE_PTRS_2[0] = ptr++;
    // [84] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx 
    inx
    txa
    // PLAYFIELD_SPRITE_PTRS_2[1] = ptr
    // [85] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+1
    // PLAYFIELD_SPRITE_PTRS_2[2] = ptr++
    // [86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+2
    // PLAYFIELD_SPRITE_PTRS_2[2] = ptr++;
    // [87] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
    // PLAYFIELD_SPRITE_PTRS_2[3] = ptr
    // [88] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_2+3
    // sprites_irq::@2
  b2:
    // ++irq_cnt;
    // [89] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 
    inc.z irq_cnt
    // if(irq_cnt==9)
    // [90] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 
    lda #9
    cmp.z irq_cnt
    beq b3
    // sprites_irq::@6
    // if(irq_cnt==10)
    // [91] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 
    lda #$a
    cmp.z irq_cnt
    beq b4
    // sprites_irq::@7
    // irq_raster_next += 20
    // [92] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_raster_next
    axs #-[$14]
    stx.z irq_raster_next
    // irq_sprite_ypos += 21
    // [93] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ypos
    axs #-[$15]
    stx.z irq_sprite_ypos
    // irq_sprite_ptr += 3
    // [94] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ptr
    axs #-[3]
    stx.z irq_sprite_ptr
    // [95] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5]
    // [95] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy 
    // [95] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy 
    // [95] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy 
    // [95] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy 
    // sprites_irq::@5
  b5:
    // *RASTER = irq_raster_next
    // [96] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 
    // Setup next interrupt
    lda.z irq_raster_next
    sta RASTER
    // *IRQ_STATUS = IRQ_RASTER
    // [97] *((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
    // sprites_irq::@return
    // }
    // [98] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
  regx:
    ldx #00
    rti
    // sprites_irq::@4
  b4:
    // irq_cnt = 0
    // [99] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 
    lda #0
    sta.z irq_cnt
    // irq_raster_next = IRQ_RASTER_FIRST
    // [100] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 
    lda #IRQ_RASTER_FIRST
    sta.z irq_raster_next
    // irq_sprite_ypos += 21
    // [101] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ypos
    axs #-[$15]
    stx.z irq_sprite_ypos
    // irq_sprite_ptr += 3
    // [102] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_sprite_ptr
    axs #-[3]
    stx.z irq_sprite_ptr
    jmp b5
    // sprites_irq::@3
  b3:
    // irq_raster_next += 21
    // [103] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z irq_raster_next
    axs #-[$15]
    stx.z irq_raster_next
    // irq_sprite_ypos = SPRITES_FIRST_YPOS
    // [104] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 
    lda #SPRITES_FIRST_YPOS
    sta.z irq_sprite_ypos
    // [105] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2]
    // sprites_irq::toSpritePtr2
    // sprites_irq::@11
    // irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES)
    // [106] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 
    lda #toSpritePtr2_return
    sta.z irq_sprite_ptr
    jmp b5
    // sprites_irq::@1
  b1:
    // PLAYFIELD_SPRITE_PTRS_1[0] = ptr++
    // [107] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1
    // PLAYFIELD_SPRITE_PTRS_1[0] = ptr++;
    // [108] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx 
    inx
    // PLAYFIELD_SPRITE_PTRS_1[1] = ptr
    // [109] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1+1
    // PLAYFIELD_SPRITE_PTRS_1[2] = ptr++
    // [110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx 
    stx PLAYFIELD_SPRITE_PTRS_1+2
    // PLAYFIELD_SPRITE_PTRS_1[2] = ptr++;
    // [111] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx 
    inx
    txa
    // PLAYFIELD_SPRITE_PTRS_1[3] = ptr
    // [112] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa 
    sta PLAYFIELD_SPRITE_PTRS_1+3
    jmp b2
}
  // File Data
SIN:
.var AMPL = 200-21
    .for(var i=0; i<256; i++) {
  	  .byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
    }

.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_SPRITE "SIN_SPRITE"
  .fill $40, $ff


