
void __start()
__start: scope:[__start]  from
  [0] phi()
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  [1] sin_idx_x = $77
  [2] sin_idx_y = $4f
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  [3] phi()
  [4] call main
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  [5] return 
  to:@return

__interrupt(rom_sys_cx16) void irq_vsync()
irq_vsync: scope:[irq_vsync]  from
  [6] sin_idx_x = ++ sin_idx_x
  [7] if(sin_idx_x!=SINX_LEN) goto irq_vsync::@1
  to:irq_vsync::@3
irq_vsync::@3: scope:[irq_vsync]  from irq_vsync
  [8] sin_idx_x = 0
  to:irq_vsync::@1
irq_vsync::@1: scope:[irq_vsync]  from irq_vsync irq_vsync::@3
  [9] sin_idx_y = -- sin_idx_y
  [10] if(sin_idx_y!=$ffff) goto irq_vsync::@2
  to:irq_vsync::@4
irq_vsync::@4: scope:[irq_vsync]  from irq_vsync::@1
  [11] sin_idx_y = SINY_LEN-1
  to:irq_vsync::@2
irq_vsync::@2: scope:[irq_vsync]  from irq_vsync::@1 irq_vsync::@4
  [12] irq_vsync::i_x#0 = sin_idx_x
  [13] irq_vsync::i_y#0 = sin_idx_y
  to:irq_vsync::@5
irq_vsync::@5: scope:[irq_vsync]  from irq_vsync::@2 irq_vsync::@9
  [14] irq_vsync::vram_sprite_pos#2 = phi( irq_vsync::@2/(char *)word0 VERA_SPRITE_ATTR+2, irq_vsync::@9/irq_vsync::vram_sprite_pos#1 )
  [14] irq_vsync::i_y#3 = phi( irq_vsync::@2/irq_vsync::i_y#0, irq_vsync::@9/irq_vsync::i_y#9 )
  [14] irq_vsync::i_x#3 = phi( irq_vsync::@2/irq_vsync::i_x#0, irq_vsync::@9/irq_vsync::i_x#7 )
  [14] irq_vsync::s#2 = phi( irq_vsync::@2/0, irq_vsync::@9/irq_vsync::s#1 )
  [15] if(irq_vsync::s#2<$20) goto irq_vsync::@6
  to:irq_vsync::@7
irq_vsync::@7: scope:[irq_vsync]  from irq_vsync::@5
  [16] *VERA_ISR = VERA_VSYNC
  to:irq_vsync::@return
irq_vsync::@return: scope:[irq_vsync]  from irq_vsync::@7
  [17] return 
  to:@return
irq_vsync::@6: scope:[irq_vsync]  from irq_vsync::@5
  [18] irq_vsync::$11 = irq_vsync::i_x#3 << 1
  [19] irq_vsync::$13 = SINX + irq_vsync::$11
  [20] *((unsigned int *)&SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X) = *irq_vsync::$13
  [21] irq_vsync::$12 = irq_vsync::i_y#3 << 1
  [22] irq_vsync::$14 = SINY + irq_vsync::$12
  [23] *((unsigned int *)&SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y) = *irq_vsync::$14
  [24] memcpy_to_vram::vdest#3 = (void *)irq_vsync::vram_sprite_pos#2
  [25] call memcpy_to_vram
  to:irq_vsync::@12
irq_vsync::@12: scope:[irq_vsync]  from irq_vsync::@6
  [26] irq_vsync::vram_sprite_pos#1 = irq_vsync::vram_sprite_pos#2 + SIZEOF_STRUCT_VERA_SPRITE
  [27] irq_vsync::i_x#1 = irq_vsync::i_x#3 + $19
  [28] if(irq_vsync::i_x#1<SINX_LEN) goto irq_vsync::@8
  to:irq_vsync::@10
irq_vsync::@10: scope:[irq_vsync]  from irq_vsync::@12
  [29] irq_vsync::i_x#2 = irq_vsync::i_x#1 - SINX_LEN
  to:irq_vsync::@8
irq_vsync::@8: scope:[irq_vsync]  from irq_vsync::@10 irq_vsync::@12
  [30] irq_vsync::i_x#7 = phi( irq_vsync::@10/irq_vsync::i_x#2, irq_vsync::@12/irq_vsync::i_x#1 )
  [31] irq_vsync::i_y#1 = irq_vsync::i_y#3 + $13
  [32] if(irq_vsync::i_y#1<SINY_LEN) goto irq_vsync::@9
  to:irq_vsync::@11
irq_vsync::@11: scope:[irq_vsync]  from irq_vsync::@8
  [33] irq_vsync::i_y#2 = irq_vsync::i_y#1 - SINY_LEN
  to:irq_vsync::@9
irq_vsync::@9: scope:[irq_vsync]  from irq_vsync::@11 irq_vsync::@8
  [34] irq_vsync::i_y#9 = phi( irq_vsync::@11/irq_vsync::i_y#2, irq_vsync::@8/irq_vsync::i_y#1 )
  [35] irq_vsync::s#1 = ++ irq_vsync::s#2
  to:irq_vsync::@5

void main()
main: scope:[main]  from __start::@1
  [36] phi()
  [37] call memcpy_to_vram
  to:main::@5
main::@5: scope:[main]  from main
  [38] phi()
  [39] call memcpy_to_vram
  to:main::@1
main::@1: scope:[main]  from main::@5 main::@6
  [40] main::vram_sprite_attr#2 = phi( main::@5/(char *)word0 VERA_SPRITE_ATTR, main::@6/main::vram_sprite_attr#1 )
  [40] main::s#2 = phi( main::@5/0, main::@6/main::s#1 )
  [41] if(main::s#2<$20) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@1
  [42] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL
  [43] *VERA_DC_VIDEO = *VERA_DC_VIDEO | VERA_SPRITES_ENABLE
  to:main::SEI1
main::SEI1: scope:[main]  from main::@3
  asm { sei  }
  to:main::@4
main::@4: scope:[main]  from main::SEI1
  [45] *KERNEL_IRQ = &irq_vsync
  [46] *VERA_IEN = VERA_VSYNC
  to:main::CLI1
main::CLI1: scope:[main]  from main::@4
  asm { cli  }
  to:main::@return
main::@return: scope:[main]  from main::CLI1
  [48] return 
  to:@return
main::@2: scope:[main]  from main::@1
  [49] *((unsigned int *)&SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X) = *((unsigned int *)&SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X) + $a
  [50] *((unsigned int *)&SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y) = *((unsigned int *)&SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y) + $a
  [51] memcpy_to_vram::vdest#2 = (void *)main::vram_sprite_attr#2
  [52] call memcpy_to_vram
  to:main::@6
main::@6: scope:[main]  from main::@2
  [53] main::vram_sprite_attr#1 = main::vram_sprite_attr#2 + SIZEOF_STRUCT_VERA_SPRITE
  [54] main::s#1 = ++ main::s#2
  to:main::@1

void memcpy_to_vram(char vbank , void *vdest , void *src , unsigned int num)
memcpy_to_vram: scope:[memcpy_to_vram]  from irq_vsync::@6 main main::@2 main::@5
  [55] memcpy_to_vram::num#4 = phi( irq_vsync::@6/4, main/(unsigned int)$40*$40, main::@2/SIZEOF_STRUCT_VERA_SPRITE, main::@5/$200 )
  [55] memcpy_to_vram::src#4 = phi( irq_vsync::@6/(void *)&SPRITE_ATTR+2, main/(void *)SPRITE_PIXELS, main::@2/(void *)&SPRITE_ATTR, main::@5/(void *)SPRITE_PIXELS+(unsigned int)$40*$40 )
  [55] memcpy_to_vram::vbank#4 = phi( irq_vsync::@6/irq_vsync::vram_sprite_attr_bank, main/0, main::@2/(char)word1 VERA_SPRITE_ATTR, main::@5/byte2 VERA_PALETTE )
  [55] memcpy_to_vram::vdest#4 = phi( irq_vsync::@6/memcpy_to_vram::vdest#3, main/(void *)(char *)word0 SPRITE_PIXELS_VRAM, main::@2/memcpy_to_vram::vdest#2, main::@5/(void *)(char *)word0 VERA_PALETTE )
  [56] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
  [57] memcpy_to_vram::$0 = byte0  memcpy_to_vram::vdest#4
  [58] *VERA_ADDRX_L = memcpy_to_vram::$0
  [59] memcpy_to_vram::$1 = byte1  memcpy_to_vram::vdest#4
  [60] *VERA_ADDRX_M = memcpy_to_vram::$1
  [61] memcpy_to_vram::$2 = VERA_INC_1 | memcpy_to_vram::vbank#4
  [62] *VERA_ADDRX_H = memcpy_to_vram::$2
  [63] memcpy_to_vram::end#0 = (char *)memcpy_to_vram::src#4 + memcpy_to_vram::num#4
  [64] memcpy_to_vram::s#4 = (char *)memcpy_to_vram::src#4
  to:memcpy_to_vram::@1
memcpy_to_vram::@1: scope:[memcpy_to_vram]  from memcpy_to_vram memcpy_to_vram::@2
  [65] memcpy_to_vram::s#2 = phi( memcpy_to_vram/memcpy_to_vram::s#4, memcpy_to_vram::@2/memcpy_to_vram::s#1 )
  [66] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2
  to:memcpy_to_vram::@return
memcpy_to_vram::@return: scope:[memcpy_to_vram]  from memcpy_to_vram::@1
  [67] return 
  to:@return
memcpy_to_vram::@2: scope:[memcpy_to_vram]  from memcpy_to_vram::@1
  [68] *VERA_DATA0 = *memcpy_to_vram::s#2
  [69] memcpy_to_vram::s#1 = ++ memcpy_to_vram::s#2
  to:memcpy_to_vram::@1
