Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
Fixing pointer addition (signed word*~) render_sine::$1 ← (const signed word*) sin + (word) render_sine::sin_idx
Fixing pointer addition (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word) render_sine::sin_idx
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean condition *((byte*) strlen::str)
Warning! Adding boolean cast to non-boolean condition (number~) abs_u16::$1
Warning! Adding boolean cast to non-boolean condition (number~) sgn_u16::$1
Identified constant variable (byte*) SCREEN
Identified constant variable (byte*) BITMAP
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Inlined call call vicSelectGfxBank (const byte*) SCREEN 
Inlined call (byte~) main::$1 ← call toD018 (const byte*) SCREEN (const byte*) BITMAP 
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) divr16u::@7
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) div32u16u::@1
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) @11
Culled Empty Block (label) @12
Culled Empty Block (label) @13
Culled Empty Block (label) @14
Culled Empty Block (label) @15
Culled Empty Block (label) mul16u::@5
Culled Empty Block (label) mul16u::@6
Culled Empty Block (label) mul16u::@8
Culled Empty Block (label) mul16u::@9
Culled Empty Block (label) @16
Culled Empty Block (label) mul16s::@5
Culled Empty Block (label) @17
Culled Empty Block (label) @18
Culled Empty Block (label) sin16s_gen2::@4
Culled Empty Block (label) sin16s_gen2::@3
Culled Empty Block (label) sin16s_gen2::@5
Culled Empty Block (label) sin16s_gen2::@6
Culled Empty Block (label) @19
Culled Empty Block (label) @20
Culled Empty Block (label) sin16s::@7
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) mulu16_sel::@1
Culled Empty Block (label) @23
Culled Empty Block (label) @24
Culled Empty Block (label) @25
Culled Empty Block (label) @26
Culled Empty Block (label) memset::@7
Culled Empty Block (label) memset::@6
Culled Empty Block (label) memset::@8
Culled Empty Block (label) memset::@9
Culled Empty Block (label) memset::@3
Culled Empty Block (label) @27
Culled Empty Block (label) @28
Culled Empty Block (label) bitmap_init::@8
Culled Empty Block (label) @30
Culled Empty Block (label) @31
Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @35
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::@4
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@6
Culled Empty Block (label) @36
Culled Empty Block (label) render_sine::@5
Culled Empty Block (label) render_sine::@3
Culled Empty Block (label) render_sine::@6
Culled Empty Block (label) render_sine::@8
Culled Empty Block (label) @37
Culled Empty Block (label) wrap_y::@4
Culled Empty Block (label) wrap_y::@3
Culled Empty Block (label) wrap_y::@5
Culled Empty Block (label) wrap_y::@6
Culled Empty Block (label) wrap_y::@10
Culled Empty Block (label) wrap_y::@11
Culled Empty Block (label) wrap_y::@12
Culled Empty Block (label) wrap_y::@13

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@6
@6: scope:[]  from @begin
  (word) rem16u#0 ← (word) 0
  to:@29

(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
divr16u: scope:[divr16u]  from div32u16u div32u16u::@2
  (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 )
  (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 )
  (word) divr16u::rem#10 ← phi( div32u16u/(word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 )
  (word) divr16u::quotient#0 ← (word) 0
  (byte) divr16u::i#0 ← (byte) 0
  to:divr16u::@1
divr16u::@1: scope:[divr16u]  from divr16u divr16u::@3
  (byte) divr16u::i#5 ← phi( divr16u/(byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 )
  (word) divr16u::divisor#4 ← phi( divr16u/(word) divr16u::divisor#6 divr16u::@3/(word) divr16u::divisor#7 )
  (word) divr16u::quotient#6 ← phi( divr16u/(word) divr16u::quotient#0 divr16u::@3/(word) divr16u::quotient#8 )
  (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#6 )
  (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 )
  (word~) divr16u::$0 ← (word) divr16u::rem#5 << (number) 1
  (word) divr16u::rem#0 ← (word~) divr16u::$0
  (byte~) divr16u::$1 ← > (word) divr16u::dividend#3
  (number~) divr16u::$2 ← (byte~) divr16u::$1 & (number) $80
  (bool~) divr16u::$3 ← (number~) divr16u::$2 != (number) 0
  (bool~) divr16u::$4 ← ! (bool~) divr16u::$3
  if((bool~) divr16u::$4) goto divr16u::@2
  to:divr16u::@4
divr16u::@2: scope:[divr16u]  from divr16u::@1 divr16u::@4
  (byte) divr16u::i#3 ← phi( divr16u::@1/(byte) divr16u::i#5 divr16u::@4/(byte) divr16u::i#6 )
  (word) divr16u::divisor#2 ← phi( divr16u::@1/(word) divr16u::divisor#4 divr16u::@4/(word) divr16u::divisor#5 )
  (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 )
  (word) divr16u::quotient#3 ← phi( divr16u::@1/(word) divr16u::quotient#6 divr16u::@4/(word) divr16u::quotient#7 )
  (word) divr16u::dividend#4 ← phi( divr16u::@1/(word) divr16u::dividend#3 divr16u::@4/(word) divr16u::dividend#7 )
  (word~) divr16u::$6 ← (word) divr16u::dividend#4 << (number) 1
  (word) divr16u::dividend#0 ← (word~) divr16u::$6
  (word~) divr16u::$7 ← (word) divr16u::quotient#3 << (number) 1
  (word) divr16u::quotient#1 ← (word~) divr16u::$7
  (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2
  (bool~) divr16u::$9 ← ! (bool~) divr16u::$8
  if((bool~) divr16u::$9) goto divr16u::@3
  to:divr16u::@5
divr16u::@4: scope:[divr16u]  from divr16u::@1
  (byte) divr16u::i#6 ← phi( divr16u::@1/(byte) divr16u::i#5 )
  (word) divr16u::divisor#5 ← phi( divr16u::@1/(word) divr16u::divisor#4 )
  (word) divr16u::quotient#7 ← phi( divr16u::@1/(word) divr16u::quotient#6 )
  (word) divr16u::dividend#7 ← phi( divr16u::@1/(word) divr16u::dividend#3 )
  (word) divr16u::rem#7 ← phi( divr16u::@1/(word) divr16u::rem#0 )
  (number~) divr16u::$5 ← (word) divr16u::rem#7 | (number) 1
  (word) divr16u::rem#1 ← (number~) divr16u::$5
  to:divr16u::@2
divr16u::@3: scope:[divr16u]  from divr16u::@2 divr16u::@5
  (word) divr16u::divisor#7 ← phi( divr16u::@2/(word) divr16u::divisor#2 divr16u::@5/(word) divr16u::divisor#3 )
  (word) divr16u::quotient#8 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 )
  (word) divr16u::dividend#6 ← phi( divr16u::@2/(word) divr16u::dividend#0 divr16u::@5/(word) divr16u::dividend#8 )
  (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 )
  (byte) divr16u::i#2 ← phi( divr16u::@2/(byte) divr16u::i#3 divr16u::@5/(byte) divr16u::i#4 )
  (byte) divr16u::i#1 ← (byte) divr16u::i#2 + rangenext(0,$f)
  (bool~) divr16u::$11 ← (byte) divr16u::i#1 != rangelast(0,$f)
  if((bool~) divr16u::$11) goto divr16u::@1
  to:divr16u::@6
divr16u::@5: scope:[divr16u]  from divr16u::@2
  (word) divr16u::dividend#8 ← phi( divr16u::@2/(word) divr16u::dividend#0 )
  (byte) divr16u::i#4 ← phi( divr16u::@2/(byte) divr16u::i#3 )
  (word) divr16u::divisor#3 ← phi( divr16u::@2/(word) divr16u::divisor#2 )
  (word) divr16u::rem#8 ← phi( divr16u::@2/(word) divr16u::rem#6 )
  (word) divr16u::quotient#4 ← phi( divr16u::@2/(word) divr16u::quotient#1 )
  (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#4
  (word~) divr16u::$10 ← (word) divr16u::rem#8 - (word) divr16u::divisor#3
  (word) divr16u::rem#2 ← (word~) divr16u::$10
  to:divr16u::@3
divr16u::@6: scope:[divr16u]  from divr16u::@3
  (word) divr16u::quotient#5 ← phi( divr16u::@3/(word) divr16u::quotient#8 )
  (word) divr16u::rem#9 ← phi( divr16u::@3/(word) divr16u::rem#11 )
  (word) rem16u#1 ← (word) divr16u::rem#9
  (word) divr16u::return#0 ← (word) divr16u::quotient#5
  to:divr16u::@return
divr16u::@return: scope:[divr16u]  from divr16u::@6
  (word) rem16u#11 ← phi( divr16u::@6/(word) rem16u#1 )
  (word) divr16u::return#4 ← phi( divr16u::@6/(word) divr16u::return#0 )
  (word) divr16u::return#1 ← (word) divr16u::return#4
  (word) rem16u#2 ← (word) rem16u#11
  return 
  to:@return

(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor)
div32u16u: scope:[div32u16u]  from sin16s_gen2
  (word) rem16u#20 ← phi( sin16s_gen2/(word) rem16u#21 )
  (word) div32u16u::divisor#1 ← phi( sin16s_gen2/(word) div32u16u::divisor#0 )
  (dword) div32u16u::dividend#1 ← phi( sin16s_gen2/(dword) div32u16u::dividend#0 )
  (word~) div32u16u::$0 ← > (dword) div32u16u::dividend#1
  (word) divr16u::dividend#1 ← (word~) div32u16u::$0
  (word) divr16u::divisor#0 ← (word) div32u16u::divisor#1
  (word) divr16u::rem#3 ← (number) 0
  call divr16u 
  (word) divr16u::return#2 ← (word) divr16u::return#1
  to:div32u16u::@2
div32u16u::@2: scope:[div32u16u]  from div32u16u
  (word) div32u16u::divisor#2 ← phi( div32u16u/(word) div32u16u::divisor#1 )
  (dword) div32u16u::dividend#2 ← phi( div32u16u/(dword) div32u16u::dividend#1 )
  (word) rem16u#12 ← phi( div32u16u/(word) rem16u#2 )
  (word) divr16u::return#5 ← phi( div32u16u/(word) divr16u::return#2 )
  (word~) div32u16u::$1 ← (word) divr16u::return#5
  (word) rem16u#3 ← (word) rem16u#12
  (word) div32u16u::quotient_hi#0 ← (word~) div32u16u::$1
  (word~) div32u16u::$2 ← < (dword) div32u16u::dividend#2
  (word) divr16u::dividend#2 ← (word~) div32u16u::$2
  (word) divr16u::divisor#1 ← (word) div32u16u::divisor#2
  (word) divr16u::rem#4 ← (word) rem16u#3
  call divr16u 
  (word) divr16u::return#3 ← (word) divr16u::return#1
  to:div32u16u::@3
div32u16u::@3: scope:[div32u16u]  from div32u16u::@2
  (word) div32u16u::quotient_hi#1 ← phi( div32u16u::@2/(word) div32u16u::quotient_hi#0 )
  (word) rem16u#13 ← phi( div32u16u::@2/(word) rem16u#2 )
  (word) divr16u::return#6 ← phi( div32u16u::@2/(word) divr16u::return#3 )
  (word~) div32u16u::$3 ← (word) divr16u::return#6
  (word) rem16u#4 ← (word) rem16u#13
  (word) div32u16u::quotient_lo#0 ← (word~) div32u16u::$3
  (dword) div32u16u::quotient#0 ← (dword){ (word) div32u16u::quotient_hi#1, (word) div32u16u::quotient_lo#0 }
  (dword) div32u16u::return#0 ← (dword) div32u16u::quotient#0
  to:div32u16u::@return
div32u16u::@return: scope:[div32u16u]  from div32u16u::@3
  (word) rem16u#14 ← phi( div32u16u::@3/(word) rem16u#4 )
  (dword) div32u16u::return#3 ← phi( div32u16u::@3/(dword) div32u16u::return#0 )
  (dword) div32u16u::return#1 ← (dword) div32u16u::return#3
  (word) rem16u#5 ← (word) rem16u#14
  return 
  to:@return

(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
mul16u: scope:[mul16u]  from mul16s mulu16_sel
  (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 )
  (word) mul16u::b#2 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 )
  (dword) mul16u::res#0 ← (dword) 0
  (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2
  to:mul16u::@1
mul16u::@1: scope:[mul16u]  from mul16u mul16u::@4
  (dword) mul16u::mb#5 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@4/(dword) mul16u::mb#1 )
  (dword) mul16u::res#4 ← phi( mul16u/(dword) mul16u::res#0 mul16u::@4/(dword) mul16u::res#6 )
  (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@4/(word) mul16u::a#0 )
  (bool~) mul16u::$0 ← (word) mul16u::a#3 != (number) 0
  if((bool~) mul16u::$0) goto mul16u::@2
  to:mul16u::@3
mul16u::@2: scope:[mul16u]  from mul16u::@1
  (dword) mul16u::res#5 ← phi( mul16u::@1/(dword) mul16u::res#4 )
  (dword) mul16u::mb#4 ← phi( mul16u::@1/(dword) mul16u::mb#5 )
  (word) mul16u::a#4 ← phi( mul16u::@1/(word) mul16u::a#3 )
  (number~) mul16u::$1 ← (word) mul16u::a#4 & (number) 1
  (bool~) mul16u::$2 ← (number~) mul16u::$1 != (number) 0
  (bool~) mul16u::$3 ← ! (bool~) mul16u::$2
  if((bool~) mul16u::$3) goto mul16u::@4
  to:mul16u::@7
mul16u::@3: scope:[mul16u]  from mul16u::@1
  (dword) mul16u::res#2 ← phi( mul16u::@1/(dword) mul16u::res#4 )
  (dword) mul16u::return#0 ← (dword) mul16u::res#2
  to:mul16u::@return
mul16u::@4: scope:[mul16u]  from mul16u::@2 mul16u::@7
  (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#5 mul16u::@7/(dword) mul16u::res#1 )
  (dword) mul16u::mb#2 ← phi( mul16u::@2/(dword) mul16u::mb#4 mul16u::@7/(dword) mul16u::mb#3 )
  (word) mul16u::a#5 ← phi( mul16u::@2/(word) mul16u::a#4 mul16u::@7/(word) mul16u::a#7 )
  (word~) mul16u::$5 ← (word) mul16u::a#5 >> (number) 1
  (word) mul16u::a#0 ← (word~) mul16u::$5
  (dword~) mul16u::$6 ← (dword) mul16u::mb#2 << (number) 1
  (dword) mul16u::mb#1 ← (dword~) mul16u::$6
  to:mul16u::@1
mul16u::@7: scope:[mul16u]  from mul16u::@2
  (word) mul16u::a#7 ← phi( mul16u::@2/(word) mul16u::a#4 )
  (dword) mul16u::mb#3 ← phi( mul16u::@2/(dword) mul16u::mb#4 )
  (dword) mul16u::res#3 ← phi( mul16u::@2/(dword) mul16u::res#5 )
  (dword~) mul16u::$4 ← (dword) mul16u::res#3 + (dword) mul16u::mb#3
  (dword) mul16u::res#1 ← (dword~) mul16u::$4
  to:mul16u::@4
mul16u::@return: scope:[mul16u]  from mul16u::@3
  (dword) mul16u::return#4 ← phi( mul16u::@3/(dword) mul16u::return#0 )
  (dword) mul16u::return#1 ← (dword) mul16u::return#4
  return 
  to:@return

(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b)
mul16s: scope:[mul16s]  from sin16s_gen2::@8
  (signed word) mul16s::b#1 ← phi( sin16s_gen2::@8/(signed word) mul16s::b#0 )
  (signed word) mul16s::a#1 ← phi( sin16s_gen2::@8/(signed word) mul16s::a#0 )
  (word~) mul16s::$0 ← ((word)) (signed word) mul16s::a#1
  (word~) mul16s::$1 ← ((word)) (signed word) mul16s::b#1
  (word) mul16u::a#1 ← (word~) mul16s::$0
  (word) mul16u::b#0 ← (word~) mul16s::$1
  call mul16u 
  (dword) mul16u::return#2 ← (dword) mul16u::return#1
  to:mul16s::@6
mul16s::@6: scope:[mul16s]  from mul16s
  (signed word) mul16s::b#4 ← phi( mul16s/(signed word) mul16s::b#1 )
  (signed word) mul16s::a#2 ← phi( mul16s/(signed word) mul16s::a#1 )
  (dword) mul16u::return#5 ← phi( mul16s/(dword) mul16u::return#2 )
  (dword~) mul16s::$2 ← (dword) mul16u::return#5
  (dword) mul16s::m#0 ← (dword~) mul16s::$2
  (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (number) 0
  (bool~) mul16s::$4 ← ! (bool~) mul16s::$3
  if((bool~) mul16s::$4) goto mul16s::@1
  to:mul16s::@3
mul16s::@1: scope:[mul16s]  from mul16s::@3 mul16s::@6
  (signed word) mul16s::a#4 ← phi( mul16s::@3/(signed word) mul16s::a#5 mul16s::@6/(signed word) mul16s::a#2 )
  (dword) mul16s::m#6 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@6/(dword) mul16s::m#0 )
  (signed word) mul16s::b#2 ← phi( mul16s::@3/(signed word) mul16s::b#3 mul16s::@6/(signed word) mul16s::b#4 )
  (bool~) mul16s::$5 ← (signed word) mul16s::b#2 < (number) 0
  (bool~) mul16s::$6 ← ! (bool~) mul16s::$5
  if((bool~) mul16s::$6) goto mul16s::@2
  to:mul16s::@4
mul16s::@3: scope:[mul16s]  from mul16s::@6
  (signed word) mul16s::a#5 ← phi( mul16s::@6/(signed word) mul16s::a#2 )
  (signed word) mul16s::b#3 ← phi( mul16s::@6/(signed word) mul16s::b#4 )
  (dword) mul16s::m#3 ← phi( mul16s::@6/(dword) mul16s::m#0 )
  (word~) mul16s::$9 ← > (dword) mul16s::m#3
  (word~) mul16s::$10 ← ((word)) (signed word) mul16s::b#3
  (word~) mul16s::$11 ← (word~) mul16s::$9 - (word~) mul16s::$10
  (word~) mul16s::$16 ← (word~) mul16s::$11
  (dword) mul16s::m#1 ← (dword) mul16s::m#3 hi= (word~) mul16s::$16
  to:mul16s::@1
mul16s::@2: scope:[mul16s]  from mul16s::@1 mul16s::@4
  (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#6 mul16s::@4/(dword) mul16s::m#2 )
  (signed dword~) mul16s::$7 ← ((signed dword)) (dword) mul16s::m#4
  (signed dword) mul16s::return#0 ← (signed dword~) mul16s::$7
  to:mul16s::@return
mul16s::@4: scope:[mul16s]  from mul16s::@1
  (signed word) mul16s::a#3 ← phi( mul16s::@1/(signed word) mul16s::a#4 )
  (dword) mul16s::m#5 ← phi( mul16s::@1/(dword) mul16s::m#6 )
  (word~) mul16s::$13 ← > (dword) mul16s::m#5
  (word~) mul16s::$14 ← ((word)) (signed word) mul16s::a#3
  (word~) mul16s::$15 ← (word~) mul16s::$13 - (word~) mul16s::$14
  (word~) mul16s::$17 ← (word~) mul16s::$15
  (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17
  to:mul16s::@2
mul16s::@return: scope:[mul16s]  from mul16s::@2
  (signed dword) mul16s::return#3 ← phi( mul16s::@2/(signed dword) mul16s::return#0 )
  (signed dword) mul16s::return#1 ← (signed dword) mul16s::return#3
  return 
  to:@return

(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max)
sin16s_gen2: scope:[sin16s_gen2]  from main::@10
  (signed word*) sin16s_gen2::sintab#7 ← phi( main::@10/(signed word*) sin16s_gen2::sintab#1 )
  (word) rem16u#21 ← phi( main::@10/(word) rem16u#23 )
  (word) sin16s_gen2::wavelength#1 ← phi( main::@10/(word) sin16s_gen2::wavelength#0 )
  (signed word) sin16s_gen2::min#1 ← phi( main::@10/(signed word) sin16s_gen2::min#0 )
  (signed word) sin16s_gen2::max#1 ← phi( main::@10/(signed word) sin16s_gen2::max#0 )
  (signed word~) sin16s_gen2::$0 ← (signed word) sin16s_gen2::max#1 - (signed word) sin16s_gen2::min#1
  (signed word) sin16s_gen2::ampl#0 ← (signed word~) sin16s_gen2::$0
  (signed word~) sin16s_gen2::$1 ← (signed word) sin16s_gen2::ampl#0 >> (number) 1
  (signed word~) sin16s_gen2::$2 ← (signed word) sin16s_gen2::min#1 + (signed word~) sin16s_gen2::$1
  (signed word) sin16s_gen2::offs#0 ← (signed word~) sin16s_gen2::$2
  (dword) div32u16u::dividend#0 ← (const dword) PI2_u4f28
  (word) div32u16u::divisor#0 ← (word) sin16s_gen2::wavelength#1
  call div32u16u 
  (dword) div32u16u::return#2 ← (dword) div32u16u::return#1
  to:sin16s_gen2::@7
sin16s_gen2::@7: scope:[sin16s_gen2]  from sin16s_gen2
  (signed word*) sin16s_gen2::sintab#6 ← phi( sin16s_gen2/(signed word*) sin16s_gen2::sintab#7 )
  (signed word) sin16s_gen2::offs#5 ← phi( sin16s_gen2/(signed word) sin16s_gen2::offs#0 )
  (signed word) sin16s_gen2::ampl#4 ← phi( sin16s_gen2/(signed word) sin16s_gen2::ampl#0 )
  (word) sin16s_gen2::wavelength#3 ← phi( sin16s_gen2/(word) sin16s_gen2::wavelength#1 )
  (word) rem16u#15 ← phi( sin16s_gen2/(word) rem16u#5 )
  (dword) div32u16u::return#4 ← phi( sin16s_gen2/(dword) div32u16u::return#2 )
  (dword~) sin16s_gen2::$3 ← (dword) div32u16u::return#4
  (word) rem16u#6 ← (word) rem16u#15
  (dword) sin16s_gen2::step#0 ← (dword~) sin16s_gen2::$3
  (dword) sin16s_gen2::x#0 ← (dword) 0
  (word) sin16s_gen2::i#0 ← (word) 0
  to:sin16s_gen2::@1
sin16s_gen2::@1: scope:[sin16s_gen2]  from sin16s_gen2::@7 sin16s_gen2::@9
  (dword) sin16s_gen2::step#4 ← phi( sin16s_gen2::@7/(dword) sin16s_gen2::step#0 sin16s_gen2::@9/(dword) sin16s_gen2::step#1 )
  (signed word*) sin16s_gen2::sintab#5 ← phi( sin16s_gen2::@7/(signed word*) sin16s_gen2::sintab#6 sin16s_gen2::@9/(signed word*) sin16s_gen2::sintab#0 )
  (signed word) sin16s_gen2::offs#4 ← phi( sin16s_gen2::@7/(signed word) sin16s_gen2::offs#5 sin16s_gen2::@9/(signed word) sin16s_gen2::offs#1 )
  (signed word) sin16s_gen2::ampl#3 ← phi( sin16s_gen2::@7/(signed word) sin16s_gen2::ampl#4 sin16s_gen2::@9/(signed word) sin16s_gen2::ampl#5 )
  (word) rem16u#22 ← phi( sin16s_gen2::@7/(word) rem16u#6 sin16s_gen2::@9/(word) rem16u#26 )
  (dword) sin16s_gen2::x#4 ← phi( sin16s_gen2::@7/(dword) sin16s_gen2::x#0 sin16s_gen2::@9/(dword) sin16s_gen2::x#1 )
  (word) sin16s_gen2::wavelength#2 ← phi( sin16s_gen2::@7/(word) sin16s_gen2::wavelength#3 sin16s_gen2::@9/(word) sin16s_gen2::wavelength#4 )
  (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@7/(word) sin16s_gen2::i#0 sin16s_gen2::@9/(word) sin16s_gen2::i#1 )
  (bool~) sin16s_gen2::$4 ← (word) sin16s_gen2::i#2 < (word) sin16s_gen2::wavelength#2
  if((bool~) sin16s_gen2::$4) goto sin16s_gen2::@2
  to:sin16s_gen2::@return
sin16s_gen2::@2: scope:[sin16s_gen2]  from sin16s_gen2::@1
  (word) rem16u#33 ← phi( sin16s_gen2::@1/(word) rem16u#22 )
  (word) sin16s_gen2::wavelength#6 ← phi( sin16s_gen2::@1/(word) sin16s_gen2::wavelength#2 )
  (word) sin16s_gen2::i#5 ← phi( sin16s_gen2::@1/(word) sin16s_gen2::i#2 )
  (dword) sin16s_gen2::step#3 ← phi( sin16s_gen2::@1/(dword) sin16s_gen2::step#4 )
  (signed word*) sin16s_gen2::sintab#4 ← phi( sin16s_gen2::@1/(signed word*) sin16s_gen2::sintab#5 )
  (signed word) sin16s_gen2::offs#3 ← phi( sin16s_gen2::@1/(signed word) sin16s_gen2::offs#4 )
  (signed word) sin16s_gen2::ampl#2 ← phi( sin16s_gen2::@1/(signed word) sin16s_gen2::ampl#3 )
  (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@1/(dword) sin16s_gen2::x#4 )
  (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2
  call sin16s 
  (signed word) sin16s::return#0 ← (signed word) sin16s::return#2
  to:sin16s_gen2::@8
sin16s_gen2::@8: scope:[sin16s_gen2]  from sin16s_gen2::@2
  (word) rem16u#31 ← phi( sin16s_gen2::@2/(word) rem16u#33 )
  (word) sin16s_gen2::wavelength#5 ← phi( sin16s_gen2::@2/(word) sin16s_gen2::wavelength#6 )
  (word) sin16s_gen2::i#4 ← phi( sin16s_gen2::@2/(word) sin16s_gen2::i#5 )
  (dword) sin16s_gen2::step#2 ← phi( sin16s_gen2::@2/(dword) sin16s_gen2::step#3 )
  (dword) sin16s_gen2::x#5 ← phi( sin16s_gen2::@2/(dword) sin16s_gen2::x#2 )
  (signed word*) sin16s_gen2::sintab#3 ← phi( sin16s_gen2::@2/(signed word*) sin16s_gen2::sintab#4 )
  (signed word) sin16s_gen2::offs#2 ← phi( sin16s_gen2::@2/(signed word) sin16s_gen2::offs#3 )
  (signed word) sin16s_gen2::ampl#1 ← phi( sin16s_gen2::@2/(signed word) sin16s_gen2::ampl#2 )
  (signed word) sin16s::return#3 ← phi( sin16s_gen2::@2/(signed word) sin16s::return#0 )
  (signed word~) sin16s_gen2::$5 ← (signed word) sin16s::return#3
  (signed word) mul16s::a#0 ← (signed word~) sin16s_gen2::$5
  (signed word) mul16s::b#0 ← (signed word) sin16s_gen2::ampl#1
  call mul16s 
  (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#1
  to:sin16s_gen2::@9
sin16s_gen2::@9: scope:[sin16s_gen2]  from sin16s_gen2::@8
  (signed word) sin16s_gen2::ampl#5 ← phi( sin16s_gen2::@8/(signed word) sin16s_gen2::ampl#1 )
  (word) rem16u#26 ← phi( sin16s_gen2::@8/(word) rem16u#31 )
  (word) sin16s_gen2::wavelength#4 ← phi( sin16s_gen2::@8/(word) sin16s_gen2::wavelength#5 )
  (word) sin16s_gen2::i#3 ← phi( sin16s_gen2::@8/(word) sin16s_gen2::i#4 )
  (dword) sin16s_gen2::step#1 ← phi( sin16s_gen2::@8/(dword) sin16s_gen2::step#2 )
  (dword) sin16s_gen2::x#3 ← phi( sin16s_gen2::@8/(dword) sin16s_gen2::x#5 )
  (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@8/(signed word*) sin16s_gen2::sintab#3 )
  (signed word) sin16s_gen2::offs#1 ← phi( sin16s_gen2::@8/(signed word) sin16s_gen2::offs#2 )
  (signed dword) mul16s::return#4 ← phi( sin16s_gen2::@8/(signed dword) mul16s::return#2 )
  (signed dword~) sin16s_gen2::$6 ← (signed dword) mul16s::return#4
  (word~) sin16s_gen2::$7 ← > (signed dword~) sin16s_gen2::$6
  (signed word~) sin16s_gen2::$8 ← ((signed word)) (word~) sin16s_gen2::$7
  (signed word~) sin16s_gen2::$9 ← (signed word) sin16s_gen2::offs#1 + (signed word~) sin16s_gen2::$8
  *((signed word*) sin16s_gen2::sintab#2) ← (signed word~) sin16s_gen2::$9
  (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD
  (dword~) sin16s_gen2::$10 ← (dword) sin16s_gen2::x#3 + (dword) sin16s_gen2::step#1
  (dword) sin16s_gen2::x#1 ← (dword~) sin16s_gen2::$10
  (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#3
  to:sin16s_gen2::@1
sin16s_gen2::@return: scope:[sin16s_gen2]  from sin16s_gen2::@1
  (word) rem16u#16 ← phi( sin16s_gen2::@1/(word) rem16u#22 )
  (word) rem16u#7 ← (word) rem16u#16
  return 
  to:@return

(signed word()) sin16s((dword) sin16s::x)
sin16s: scope:[sin16s]  from sin16s_gen2::@2
  (dword) sin16s::x#3 ← phi( sin16s_gen2::@2/(dword) sin16s::x#0 )
  (byte) sin16s::isUpper#0 ← (byte) 0
  (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (const dword) PI_u4f28
  (bool~) sin16s::$1 ← ! (bool~) sin16s::$0
  if((bool~) sin16s::$1) goto sin16s::@1
  to:sin16s::@4
sin16s::@1: scope:[sin16s]  from sin16s sin16s::@4
  (byte) sin16s::isUpper#8 ← phi( sin16s/(byte) sin16s::isUpper#0 sin16s::@4/(byte) sin16s::isUpper#1 )
  (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#3 sin16s::@4/(dword) sin16s::x#1 )
  (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (const dword) PI_HALF_u4f28
  (bool~) sin16s::$3 ← ! (bool~) sin16s::$2
  if((bool~) sin16s::$3) goto sin16s::@2
  to:sin16s::@5
sin16s::@4: scope:[sin16s]  from sin16s
  (dword) sin16s::x#5 ← phi( sin16s/(dword) sin16s::x#3 )
  (dword~) sin16s::$17 ← (dword) sin16s::x#5 - (const dword) PI_u4f28
  (dword) sin16s::x#1 ← (dword~) sin16s::$17
  (byte) sin16s::isUpper#1 ← (number) 1
  to:sin16s::@1
sin16s::@2: scope:[sin16s]  from sin16s::@1 sin16s::@5
  (byte) sin16s::isUpper#7 ← phi( sin16s::@1/(byte) sin16s::isUpper#8 sin16s::@5/(byte) sin16s::isUpper#9 )
  (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 )
  (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (number) 3
  (word~) sin16s::$5 ← > (dword~) sin16s::$4
  (word) sin16s::x1#0 ← (word~) sin16s::$5
  (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0
  (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0
  (byte) mulu16_sel::select#0 ← (number) 0
  call mulu16_sel 
  (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#6
  to:sin16s::@8
sin16s::@8: scope:[sin16s]  from sin16s::@2
  (byte) sin16s::isUpper#6 ← phi( sin16s::@2/(byte) sin16s::isUpper#7 )
  (word) sin16s::x1#1 ← phi( sin16s::@2/(word) sin16s::x1#0 )
  (word) mulu16_sel::return#7 ← phi( sin16s::@2/(word) mulu16_sel::return#0 )
  (word~) sin16s::$6 ← (word) mulu16_sel::return#7
  (word) sin16s::x2#0 ← (word~) sin16s::$6
  (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0
  (word) mulu16_sel::v2#1 ← (word) sin16s::x1#1
  (byte) mulu16_sel::select#1 ← (number) 1
  call mulu16_sel 
  (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#6
  to:sin16s::@9
sin16s::@9: scope:[sin16s]  from sin16s::@8
  (byte) sin16s::isUpper#5 ← phi( sin16s::@8/(byte) sin16s::isUpper#6 )
  (word) sin16s::x1#4 ← phi( sin16s::@8/(word) sin16s::x1#1 )
  (word) mulu16_sel::return#8 ← phi( sin16s::@8/(word) mulu16_sel::return#1 )
  (word~) sin16s::$7 ← (word) mulu16_sel::return#8
  (word) sin16s::x3#0 ← (word~) sin16s::$7
  (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0
  (word) mulu16_sel::v2#2 ← (number) $10000/(number) 6
  (byte) mulu16_sel::select#2 ← (number) 1
  call mulu16_sel 
  (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#6
  to:sin16s::@10
sin16s::@10: scope:[sin16s]  from sin16s::@9
  (byte) sin16s::isUpper#4 ← phi( sin16s::@9/(byte) sin16s::isUpper#5 )
  (word) sin16s::x3#1 ← phi( sin16s::@9/(word) sin16s::x3#0 )
  (word) sin16s::x1#2 ← phi( sin16s::@9/(word) sin16s::x1#4 )
  (word) mulu16_sel::return#9 ← phi( sin16s::@9/(word) mulu16_sel::return#2 )
  (word~) sin16s::$8 ← (word) mulu16_sel::return#9
  (word) sin16s::x3_6#0 ← (word~) sin16s::$8
  (word~) sin16s::$9 ← (word) sin16s::x1#2 - (word) sin16s::x3_6#0
  (word) sin16s::usinx#0 ← (word~) sin16s::$9
  (word) mulu16_sel::v1#3 ← (word) sin16s::x3#1
  (word) mulu16_sel::v2#3 ← (word) sin16s::x1#2
  (byte) mulu16_sel::select#3 ← (number) 0
  call mulu16_sel 
  (word) mulu16_sel::return#3 ← (word) mulu16_sel::return#6
  to:sin16s::@11
sin16s::@11: scope:[sin16s]  from sin16s::@10
  (byte) sin16s::isUpper#3 ← phi( sin16s::@10/(byte) sin16s::isUpper#4 )
  (word) sin16s::usinx#4 ← phi( sin16s::@10/(word) sin16s::usinx#0 )
  (word) sin16s::x1#3 ← phi( sin16s::@10/(word) sin16s::x1#2 )
  (word) mulu16_sel::return#10 ← phi( sin16s::@10/(word) mulu16_sel::return#3 )
  (word~) sin16s::$10 ← (word) mulu16_sel::return#10
  (word) sin16s::x4#0 ← (word~) sin16s::$10
  (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0
  (word) mulu16_sel::v2#4 ← (word) sin16s::x1#3
  (byte) mulu16_sel::select#4 ← (number) 0
  call mulu16_sel 
  (word) mulu16_sel::return#4 ← (word) mulu16_sel::return#6
  to:sin16s::@12
sin16s::@12: scope:[sin16s]  from sin16s::@11
  (byte) sin16s::isUpper#2 ← phi( sin16s::@11/(byte) sin16s::isUpper#3 )
  (word) sin16s::usinx#2 ← phi( sin16s::@11/(word) sin16s::usinx#4 )
  (word) mulu16_sel::return#11 ← phi( sin16s::@11/(word) mulu16_sel::return#4 )
  (word~) sin16s::$11 ← (word) mulu16_sel::return#11
  (word) sin16s::x5#0 ← (word~) sin16s::$11
  (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4
  (word) sin16s::x5_128#0 ← (word~) sin16s::$12
  (word~) sin16s::$13 ← (word) sin16s::usinx#2 + (word) sin16s::x5_128#0
  (word) sin16s::usinx#1 ← (word~) sin16s::$13
  (signed word~) sin16s::$14 ← ((signed word)) (word) sin16s::usinx#1
  (signed word) sin16s::sinx#0 ← (signed word~) sin16s::$14
  (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0
  (bool~) sin16s::$16 ← ! (bool~) sin16s::$15
  if((bool~) sin16s::$16) goto sin16s::@3
  to:sin16s::@6
sin16s::@5: scope:[sin16s]  from sin16s::@1
  (byte) sin16s::isUpper#9 ← phi( sin16s::@1/(byte) sin16s::isUpper#8 )
  (dword) sin16s::x#7 ← phi( sin16s::@1/(dword) sin16s::x#4 )
  (dword~) sin16s::$18 ← (const dword) PI_u4f28 - (dword) sin16s::x#7
  (dword) sin16s::x#2 ← (dword~) sin16s::$18
  to:sin16s::@2
sin16s::@3: scope:[sin16s]  from sin16s::@12 sin16s::@6
  (signed word) sin16s::sinx#2 ← phi( sin16s::@12/(signed word) sin16s::sinx#0 sin16s::@6/(signed word) sin16s::sinx#1 )
  (signed word) sin16s::return#1 ← (signed word) sin16s::sinx#2
  to:sin16s::@return
sin16s::@6: scope:[sin16s]  from sin16s::@12
  (word) sin16s::usinx#3 ← phi( sin16s::@12/(word) sin16s::usinx#1 )
  (signed word~) sin16s::$19 ← ((signed word)) (word) sin16s::usinx#3
  (signed word~) sin16s::$20 ← - (signed word~) sin16s::$19
  (signed word) sin16s::sinx#1 ← (signed word~) sin16s::$20
  to:sin16s::@3
sin16s::@return: scope:[sin16s]  from sin16s::@3
  (signed word) sin16s::return#4 ← phi( sin16s::@3/(signed word) sin16s::return#1 )
  (signed word) sin16s::return#2 ← (signed word) sin16s::return#4
  return 
  to:@return

(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
mulu16_sel: scope:[mulu16_sel]  from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9
  (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 )
  (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 )
  (word) mulu16_sel::v1#5 ← phi( sin16s::@10/(word) mulu16_sel::v1#3 sin16s::@11/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@8/(word) mulu16_sel::v1#1 sin16s::@9/(word) mulu16_sel::v1#2 )
  (word) mul16u::a#2 ← (word) mulu16_sel::v1#5
  (word) mul16u::b#1 ← (word) mulu16_sel::v2#5
  call mul16u 
  (dword) mul16u::return#3 ← (dword) mul16u::return#1
  to:mulu16_sel::@2
mulu16_sel::@2: scope:[mulu16_sel]  from mulu16_sel
  (byte) mulu16_sel::select#5 ← phi( mulu16_sel/(byte) mulu16_sel::select#6 )
  (dword) mul16u::return#6 ← phi( mulu16_sel/(dword) mul16u::return#3 )
  (dword~) mulu16_sel::$0 ← (dword) mul16u::return#6
  (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5
  (word~) mulu16_sel::$2 ← > (dword~) mulu16_sel::$1
  (word) mulu16_sel::return#5 ← (word~) mulu16_sel::$2
  to:mulu16_sel::@return
mulu16_sel::@return: scope:[mulu16_sel]  from mulu16_sel::@2
  (word) mulu16_sel::return#12 ← phi( mulu16_sel::@2/(word) mulu16_sel::return#5 )
  (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12
  return 
  to:@return

(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset]  from bitmap_clear bitmap_clear::@1
  (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 )
  (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 )
  (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 )
  (bool~) memset::$0 ← (word) memset::num#2 > (number) 0
  (bool~) memset::$1 ← ! (bool~) memset::$0
  if((bool~) memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@4
  (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 )
  (void*) memset::return#0 ← (void*) memset::str#2
  to:memset::@return
memset::@2: scope:[memset]  from memset
  (byte) memset::c#4 ← phi( memset/(byte) memset::c#5 )
  (word) memset::num#3 ← phi( memset/(word) memset::num#2 )
  (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 )
  (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3
  (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3
  (byte*) memset::end#0 ← (byte*~) memset::$3
  (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3
  to:memset::@4
memset::@4: scope:[memset]  from memset::@2 memset::@5
  (byte) memset::c#3 ← phi( memset::@2/(byte) memset::c#4 memset::@5/(byte) memset::c#2 )
  (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@5/(void*) memset::str#6 )
  (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@5/(byte*) memset::end#2 )
  (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@5/(byte*) memset::dst#1 )
  (bool~) memset::$4 ← (byte*) memset::dst#2 != (byte*) memset::end#1
  if((bool~) memset::$4) goto memset::@5
  to:memset::@1
memset::@5: scope:[memset]  from memset::@4
  (void*) memset::str#6 ← phi( memset::@4/(void*) memset::str#5 )
  (byte*) memset::end#2 ← phi( memset::@4/(byte*) memset::end#1 )
  (byte*) memset::dst#3 ← phi( memset::@4/(byte*) memset::dst#2 )
  (byte) memset::c#2 ← phi( memset::@4/(byte) memset::c#3 )
  *((byte*) memset::dst#3) ← (byte) memset::c#2
  (byte*) memset::dst#1 ← ++ (byte*) memset::dst#3
  to:memset::@4
memset::@return: scope:[memset]  from memset::@1
  (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 )
  (void*) memset::return#1 ← (void*) memset::return#4
  return 
  to:@return
@29: scope:[]  from @6
  (word) rem16u#30 ← phi( @6/(word) rem16u#0 )
  (byte*) bitmap_screen#0 ← (byte*) 0
  (byte*) bitmap_gfx#0 ← (byte*) 0
  to:@38

(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
bitmap_init: scope:[bitmap_init]  from main::@8
  (byte*) bitmap_init::screen#1 ← phi( main::@8/(byte*) bitmap_init::screen#0 )
  (byte*) bitmap_init::gfx#1 ← phi( main::@8/(byte*) bitmap_init::gfx#0 )
  (byte*) bitmap_gfx#1 ← (byte*) bitmap_init::gfx#1
  (byte*) bitmap_screen#1 ← (byte*) bitmap_init::screen#1
  (byte) bitmap_init::bits#0 ← (byte) $80
  (byte) bitmap_init::x#0 ← (byte) 0
  to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init]  from bitmap_init bitmap_init::@2
  (byte*) bitmap_screen#26 ← phi( bitmap_init/(byte*) bitmap_screen#1 bitmap_init::@2/(byte*) bitmap_screen#23 )
  (byte*) bitmap_gfx#27 ← phi( bitmap_init/(byte*) bitmap_gfx#1 bitmap_init::@2/(byte*) bitmap_gfx#24 )
  (byte*) bitmap_init::gfx#4 ← phi( bitmap_init/(byte*) bitmap_init::gfx#1 bitmap_init::@2/(byte*) bitmap_init::gfx#3 )
  (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) bitmap_init::x#0 bitmap_init::@2/(byte) bitmap_init::x#1 )
  (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) bitmap_init::bits#0 bitmap_init::@2/(byte) bitmap_init::bits#4 )
  *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
  (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1
  (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0
  (bool~) bitmap_init::$1 ← ! (bool~) bitmap_init::$0
  if((bool~) bitmap_init::$1) goto bitmap_init::@2
  to:bitmap_init::@3
bitmap_init::@2: scope:[bitmap_init]  from bitmap_init::@1 bitmap_init::@3
  (byte*) bitmap_screen#23 ← phi( bitmap_init::@1/(byte*) bitmap_screen#26 bitmap_init::@3/(byte*) bitmap_screen#27 )
  (byte*) bitmap_gfx#24 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#27 bitmap_init::@3/(byte*) bitmap_gfx#28 )
  (byte*) bitmap_init::gfx#3 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 bitmap_init::@3/(byte*) bitmap_init::gfx#5 )
  (byte) bitmap_init::bits#4 ← phi( bitmap_init::@1/(byte) bitmap_init::bits#1 bitmap_init::@3/(byte) bitmap_init::bits#2 )
  (byte) bitmap_init::x#3 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 bitmap_init::@3/(byte) bitmap_init::x#4 )
  (byte) bitmap_init::x#1 ← (byte) bitmap_init::x#3 + rangenext(0,$ff)
  (bool~) bitmap_init::$2 ← (byte) bitmap_init::x#1 != rangelast(0,$ff)
  if((bool~) bitmap_init::$2) goto bitmap_init::@1
  to:bitmap_init::@4
bitmap_init::@3: scope:[bitmap_init]  from bitmap_init::@1
  (byte*) bitmap_screen#27 ← phi( bitmap_init::@1/(byte*) bitmap_screen#26 )
  (byte*) bitmap_gfx#28 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#27 )
  (byte*) bitmap_init::gfx#5 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 )
  (byte) bitmap_init::x#4 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 )
  (byte) bitmap_init::bits#2 ← (number) $80
  to:bitmap_init::@2
bitmap_init::@4: scope:[bitmap_init]  from bitmap_init::@2
  (byte*) bitmap_screen#20 ← phi( bitmap_init::@2/(byte*) bitmap_screen#23 )
  (byte*) bitmap_gfx#21 ← phi( bitmap_init::@2/(byte*) bitmap_gfx#24 )
  (byte*) bitmap_init::gfx#2 ← phi( bitmap_init::@2/(byte*) bitmap_init::gfx#3 )
  (byte*) bitmap_init::yoffs#0 ← (byte*) bitmap_init::gfx#2
  (byte) bitmap_init::y#0 ← (byte) 0
  to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init]  from bitmap_init::@4 bitmap_init::@6
  (byte*) bitmap_screen#15 ← phi( bitmap_init::@4/(byte*) bitmap_screen#20 bitmap_init::@6/(byte*) bitmap_screen#11 )
  (byte*) bitmap_gfx#16 ← phi( bitmap_init::@4/(byte*) bitmap_gfx#21 bitmap_init::@6/(byte*) bitmap_gfx#11 )
  (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@4/(byte*) bitmap_init::yoffs#0 bitmap_init::@6/(byte*) bitmap_init::yoffs#4 )
  (byte) bitmap_init::y#2 ← phi( bitmap_init::@4/(byte) bitmap_init::y#0 bitmap_init::@6/(byte) bitmap_init::y#1 )
  (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7
  (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
  (number~) bitmap_init::$5 ← (number~) bitmap_init::$3 | (byte~) bitmap_init::$4
  *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (number~) bitmap_init::$5
  (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
  *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
  (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (number) 7
  (bool~) bitmap_init::$8 ← (number~) bitmap_init::$7 == (number) 7
  (bool~) bitmap_init::$9 ← ! (bool~) bitmap_init::$8
  if((bool~) bitmap_init::$9) goto bitmap_init::@6
  to:bitmap_init::@7
bitmap_init::@6: scope:[bitmap_init]  from bitmap_init::@5 bitmap_init::@7
  (byte*) bitmap_screen#11 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 bitmap_init::@7/(byte*) bitmap_screen#16 )
  (byte*) bitmap_gfx#11 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 bitmap_init::@7/(byte*) bitmap_gfx#17 )
  (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 bitmap_init::@7/(byte*) bitmap_init::yoffs#1 )
  (byte) bitmap_init::y#3 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 bitmap_init::@7/(byte) bitmap_init::y#4 )
  (byte) bitmap_init::y#1 ← (byte) bitmap_init::y#3 + rangenext(0,$ff)
  (bool~) bitmap_init::$11 ← (byte) bitmap_init::y#1 != rangelast(0,$ff)
  if((bool~) bitmap_init::$11) goto bitmap_init::@5
  to:bitmap_init::@return
bitmap_init::@7: scope:[bitmap_init]  from bitmap_init::@5
  (byte*) bitmap_screen#16 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 )
  (byte*) bitmap_gfx#17 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 )
  (byte) bitmap_init::y#4 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 )
  (byte*) bitmap_init::yoffs#3 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 )
  (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8
  (byte*) bitmap_init::yoffs#1 ← (byte*~) bitmap_init::$10
  to:bitmap_init::@6
bitmap_init::@return: scope:[bitmap_init]  from bitmap_init::@6
  (byte*) bitmap_screen#6 ← phi( bitmap_init::@6/(byte*) bitmap_screen#11 )
  (byte*) bitmap_gfx#6 ← phi( bitmap_init::@6/(byte*) bitmap_gfx#11 )
  (byte*) bitmap_gfx#2 ← (byte*) bitmap_gfx#6
  (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6
  return 
  to:@return

(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
bitmap_clear: scope:[bitmap_clear]  from main::@9
  (byte*) bitmap_gfx#12 ← phi( main::@9/(byte*) bitmap_gfx#3 )
  (byte*) bitmap_screen#7 ← phi( main::@9/(byte*) bitmap_screen#3 )
  (byte) bitmap_clear::bgcol#1 ← phi( main::@9/(byte) bitmap_clear::bgcol#0 )
  (byte) bitmap_clear::fgcol#1 ← phi( main::@9/(byte) bitmap_clear::fgcol#0 )
  (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10
  (number~) bitmap_clear::$1 ← (number~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1
  (byte) bitmap_clear::col#0 ← (number~) bitmap_clear::$1
  (void*) memset::str#0 ← (void*)(byte*) bitmap_screen#7
  (byte) memset::c#0 ← (byte) bitmap_clear::col#0
  (word) memset::num#0 ← (word) $3e8
  call memset 
  (void*) memset::return#2 ← (void*) memset::return#1
  to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear]  from bitmap_clear
  (byte*) bitmap_gfx#7 ← phi( bitmap_clear/(byte*) bitmap_gfx#12 )
  (void*) memset::str#1 ← (void*)(byte*) bitmap_gfx#7
  (byte) memset::c#1 ← (number) 0
  (word) memset::num#1 ← (word) $1f40
  call memset 
  (void*) memset::return#3 ← (void*) memset::return#1
  to:bitmap_clear::@2
bitmap_clear::@2: scope:[bitmap_clear]  from bitmap_clear::@1
  to:bitmap_clear::@return
bitmap_clear::@return: scope:[bitmap_clear]  from bitmap_clear::@2
  return 
  to:@return

(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
bitmap_plot: scope:[bitmap_plot]  from render_sine::@11 render_sine::@9
  (word) bitmap_plot::x#2 ← phi( render_sine::@11/(word) bitmap_plot::x#1 render_sine::@9/(word) bitmap_plot::x#0 )
  (byte) bitmap_plot::y#2 ← phi( render_sine::@11/(byte) bitmap_plot::y#1 render_sine::@9/(byte) bitmap_plot::y#0 )
  (byte*~) bitmap_plot::$0 ← ((byte*)) { *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2), *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2) }
  (byte*) bitmap_plot::plotter#0 ← (byte*~) bitmap_plot::$0
  (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (number) $fff8
  (byte*) bitmap_plot::plotter#1 ← (byte*) bitmap_plot::plotter#0 + (number~) bitmap_plot::$1
  (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2
  *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte*) bitmap_plot_bit + (byte~) bitmap_plot::$2)
  to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot]  from bitmap_plot
  return 
  to:@return

(void()) main()
main: scope:[main]  from @38
  (word) rem16u#41 ← phi( @38/(word) rem16u#25 )
  (byte*) bitmap_screen#32 ← phi( @38/(byte*) bitmap_screen#14 )
  (byte*) bitmap_gfx#33 ← phi( @38/(byte*) bitmap_gfx#15 )
  asm { sei  }
  *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK
  *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO
  *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(number) 3
  (byte*) main::vicSelectGfxBank1_gfx#0 ← (const byte*) SCREEN
  to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main]  from main
  (word) rem16u#40 ← phi( main/(word) rem16u#41 )
  (byte*) bitmap_screen#31 ← phi( main/(byte*) bitmap_screen#32 )
  (byte*) bitmap_gfx#32 ← phi( main/(byte*) bitmap_gfx#33 )
  (byte*) main::vicSelectGfxBank1_gfx#1 ← phi( main/(byte*) main::vicSelectGfxBank1_gfx#0 )
  *((const byte*) CIA2_PORT_A_DDR) ← (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
  (word) rem16u#39 ← phi( main::vicSelectGfxBank1/(word) rem16u#40 )
  (byte*) bitmap_screen#30 ← phi( main::vicSelectGfxBank1/(byte*) bitmap_screen#31 )
  (byte*) bitmap_gfx#31 ← phi( main::vicSelectGfxBank1/(byte*) bitmap_gfx#32 )
  (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 ← phi( main::vicSelectGfxBank1/(byte*) main::vicSelectGfxBank1_toDd001_gfx#0 )
  (word~) main::vicSelectGfxBank1_toDd001_$0 ← ((word)) (byte*) main::vicSelectGfxBank1_toDd001_gfx#1
  (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (word~) main::vicSelectGfxBank1_toDd001_$0
  (number~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (number) $40
  (number~) main::vicSelectGfxBank1_toDd001_$3 ← (number) 3 ^ (number~) main::vicSelectGfxBank1_toDd001_$2
  (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (number~) main::vicSelectGfxBank1_toDd001_$3
  to:main::vicSelectGfxBank1_toDd001_@return
main::vicSelectGfxBank1_toDd001_@return: scope:[main]  from main::vicSelectGfxBank1_toDd001
  (word) rem16u#38 ← phi( main::vicSelectGfxBank1_toDd001/(word) rem16u#39 )
  (byte*) bitmap_screen#29 ← phi( main::vicSelectGfxBank1_toDd001/(byte*) bitmap_screen#30 )
  (byte*) bitmap_gfx#30 ← phi( main::vicSelectGfxBank1_toDd001/(byte*) bitmap_gfx#31 )
  (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
  (word) rem16u#37 ← phi( main::vicSelectGfxBank1_toDd001_@return/(word) rem16u#38 )
  (byte*) bitmap_screen#28 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte*) bitmap_screen#29 )
  (byte*) bitmap_gfx#29 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte*) bitmap_gfx#30 )
  (byte) main::vicSelectGfxBank1_toDd001_return#3 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte) main::vicSelectGfxBank1_toDd001_return#1 )
  (byte~) main::vicSelectGfxBank1_$0 ← (byte) main::vicSelectGfxBank1_toDd001_return#3
  *((const byte*) CIA2_PORT_A) ← (byte~) main::vicSelectGfxBank1_$0
  to:main::@7
main::@7: scope:[main]  from main::vicSelectGfxBank1_@1
  (word) rem16u#36 ← phi( main::vicSelectGfxBank1_@1/(word) rem16u#37 )
  (byte*) bitmap_screen#24 ← phi( main::vicSelectGfxBank1_@1/(byte*) bitmap_screen#28 )
  (byte*) bitmap_gfx#25 ← phi( main::vicSelectGfxBank1_@1/(byte*) bitmap_gfx#29 )
  *((const byte*) D016) ← (const byte) VIC_CSEL
  (byte*) main::toD0181_screen#0 ← (const byte*) SCREEN
  (byte*) main::toD0181_gfx#0 ← (const byte*) BITMAP
  to:main::toD0181
main::toD0181: scope:[main]  from main::@7
  (word) rem16u#35 ← phi( main::@7/(word) rem16u#36 )
  (byte*) bitmap_screen#21 ← phi( main::@7/(byte*) bitmap_screen#24 )
  (byte*) bitmap_gfx#22 ← phi( main::@7/(byte*) bitmap_gfx#25 )
  (byte*) main::toD0181_gfx#1 ← phi( main::@7/(byte*) main::toD0181_gfx#0 )
  (byte*) main::toD0181_screen#1 ← phi( main::@7/(byte*) main::toD0181_screen#0 )
  (word~) main::toD0181_$0 ← ((word)) (byte*) main::toD0181_screen#1
  (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (number) $3fff
  (number~) main::toD0181_$2 ← (number~) main::toD0181_$1 * (number) 4
  (number~) main::toD0181_$3 ← > (number~) main::toD0181_$2
  (word~) main::toD0181_$4 ← ((word)) (byte*) main::toD0181_gfx#1
  (byte~) main::toD0181_$5 ← > (word~) main::toD0181_$4
  (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (number) 4
  (number~) main::toD0181_$7 ← (number~) main::toD0181_$6 & (number) $f
  (number~) main::toD0181_$8 ← (number~) main::toD0181_$3 | (number~) main::toD0181_$7
  (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8
  to:main::toD0181_@return
main::toD0181_@return: scope:[main]  from main::toD0181
  (word) rem16u#34 ← phi( main::toD0181/(word) rem16u#35 )
  (byte*) bitmap_screen#17 ← phi( main::toD0181/(byte*) bitmap_screen#21 )
  (byte*) bitmap_gfx#18 ← phi( main::toD0181/(byte*) bitmap_gfx#22 )
  (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::@8
main::@8: scope:[main]  from main::toD0181_@return
  (word) rem16u#32 ← phi( main::toD0181_@return/(word) rem16u#34 )
  (byte*) bitmap_screen#12 ← phi( main::toD0181_@return/(byte*) bitmap_screen#17 )
  (byte*) bitmap_gfx#13 ← phi( main::toD0181_@return/(byte*) bitmap_gfx#18 )
  (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 )
  (byte~) main::$1 ← (byte) main::toD0181_return#3
  *((const byte*) D018) ← (byte~) main::$1
  (byte*) bitmap_init::gfx#0 ← (const byte*) BITMAP
  (byte*) bitmap_init::screen#0 ← (const byte*) SCREEN
  call bitmap_init 
  to:main::@9
main::@9: scope:[main]  from main::@8
  (word) rem16u#27 ← phi( main::@8/(word) rem16u#32 )
  (byte*) bitmap_screen#8 ← phi( main::@8/(byte*) bitmap_screen#2 )
  (byte*) bitmap_gfx#8 ← phi( main::@8/(byte*) bitmap_gfx#2 )
  (byte*) bitmap_gfx#3 ← (byte*) bitmap_gfx#8
  (byte*) bitmap_screen#3 ← (byte*) bitmap_screen#8
  (byte) bitmap_clear::bgcol#0 ← (const byte) BLACK
  (byte) bitmap_clear::fgcol#0 ← (const byte) WHITE
  call bitmap_clear 
  to:main::@10
main::@10: scope:[main]  from main::@9
  (byte*) bitmap_screen#25 ← phi( main::@9/(byte*) bitmap_screen#3 )
  (byte*) bitmap_gfx#26 ← phi( main::@9/(byte*) bitmap_gfx#3 )
  (word) rem16u#23 ← phi( main::@9/(word) rem16u#27 )
  (signed word*) sin16s_gen2::sintab#1 ← (const signed word*) sin
  (word) sin16s_gen2::wavelength#0 ← (const word) SIN_SIZE
  (signed word) sin16s_gen2::min#0 ← (number) -$140
  (signed word) sin16s_gen2::max#0 ← (number) $140
  call sin16s_gen2 
  to:main::@11
main::@11: scope:[main]  from main::@10
  (byte*) bitmap_screen#22 ← phi( main::@10/(byte*) bitmap_screen#25 )
  (byte*) bitmap_gfx#23 ← phi( main::@10/(byte*) bitmap_gfx#26 )
  (word) rem16u#17 ← phi( main::@10/(word) rem16u#7 )
  (word) rem16u#8 ← (word) rem16u#17
  call render_sine 
  to:main::@12
main::@12: scope:[main]  from main::@11
  (word) rem16u#28 ← phi( main::@11/(word) rem16u#8 )
  (byte*) bitmap_screen#18 ← phi( main::@11/(byte*) bitmap_screen#22 )
  (byte*) bitmap_gfx#19 ← phi( main::@11/(byte*) bitmap_gfx#23 )
  to:main::@1
main::@1: scope:[main]  from main::@12 main::@2
  (word) rem16u#24 ← phi( main::@12/(word) rem16u#28 main::@2/(word) rem16u#29 )
  (byte*) bitmap_screen#13 ← phi( main::@12/(byte*) bitmap_screen#18 main::@2/(byte*) bitmap_screen#19 )
  (byte*) bitmap_gfx#14 ← phi( main::@12/(byte*) bitmap_gfx#19 main::@2/(byte*) bitmap_gfx#20 )
  if(true) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  (word) rem16u#29 ← phi( main::@1/(word) rem16u#24 )
  (byte*) bitmap_screen#19 ← phi( main::@1/(byte*) bitmap_screen#13 )
  (byte*) bitmap_gfx#20 ← phi( main::@1/(byte*) bitmap_gfx#14 )
  *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL)
  to:main::@1
main::@return: scope:[main]  from main::@1
  (word) rem16u#18 ← phi( main::@1/(word) rem16u#24 )
  (byte*) bitmap_screen#9 ← phi( main::@1/(byte*) bitmap_screen#13 )
  (byte*) bitmap_gfx#9 ← phi( main::@1/(byte*) bitmap_gfx#14 )
  (byte*) bitmap_gfx#4 ← (byte*) bitmap_gfx#9
  (byte*) bitmap_screen#4 ← (byte*) bitmap_screen#9
  (word) rem16u#9 ← (word) rem16u#18
  return 
  to:@return

(void()) render_sine()
render_sine: scope:[render_sine]  from main::@11
  (word) render_sine::xpos#0 ← (word) 0
  (word) render_sine::sin_idx#0 ← (word) 0
  to:render_sine::@1
render_sine::@1: scope:[render_sine]  from render_sine render_sine::@4
  (word) render_sine::xpos#8 ← phi( render_sine/(word) render_sine::xpos#0 render_sine::@4/(word) render_sine::xpos#9 )
  (word) render_sine::sin_idx#2 ← phi( render_sine/(word) render_sine::sin_idx#0 render_sine::@4/(word) render_sine::sin_idx#1 )
  (bool~) render_sine::$0 ← (word) render_sine::sin_idx#2 < (const word) SIN_SIZE
  if((bool~) render_sine::$0) goto render_sine::@2
  to:render_sine::@return
render_sine::@2: scope:[render_sine]  from render_sine::@1
  (word) render_sine::xpos#6 ← phi( render_sine::@1/(word) render_sine::xpos#8 )
  (word) render_sine::sin_idx#3 ← phi( render_sine::@1/(word) render_sine::sin_idx#2 )
  (word~) render_sine::$10 ← (word) render_sine::sin_idx#3 * (const byte) SIZEOF_SIGNED_WORD
  (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10
  (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1)
  (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0
  call wrap_y 
  (byte) wrap_y::return#0 ← (byte) wrap_y::return#3
  to:render_sine::@9
render_sine::@9: scope:[render_sine]  from render_sine::@2
  (word) render_sine::sin_idx#6 ← phi( render_sine::@2/(word) render_sine::sin_idx#3 )
  (word) render_sine::xpos#3 ← phi( render_sine::@2/(word) render_sine::xpos#6 )
  (byte) wrap_y::return#4 ← phi( render_sine::@2/(byte) wrap_y::return#0 )
  (byte~) render_sine::$2 ← (byte) wrap_y::return#4
  (byte) render_sine::ypos#0 ← (byte~) render_sine::$2
  (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3
  (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0
  call bitmap_plot 
  to:render_sine::@10
render_sine::@10: scope:[render_sine]  from render_sine::@9
  (word) render_sine::xpos#7 ← phi( render_sine::@9/(word) render_sine::xpos#3 )
  (word) render_sine::sin_idx#4 ← phi( render_sine::@9/(word) render_sine::sin_idx#6 )
  (word~) render_sine::$11 ← (word) render_sine::sin_idx#4 * (const byte) SIZEOF_SIGNED_WORD
  (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11
  (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4)
  (number~) render_sine::$5 ← (signed word) render_sine::sin2_val#0 + (number) $a
  (signed word) wrap_y::y#1 ← (number~) render_sine::$5
  call wrap_y 
  (byte) wrap_y::return#1 ← (byte) wrap_y::return#3
  to:render_sine::@11
render_sine::@11: scope:[render_sine]  from render_sine::@10
  (word) render_sine::sin_idx#9 ← phi( render_sine::@10/(word) render_sine::sin_idx#4 )
  (word) render_sine::xpos#4 ← phi( render_sine::@10/(word) render_sine::xpos#7 )
  (byte) wrap_y::return#5 ← phi( render_sine::@10/(byte) wrap_y::return#1 )
  (byte~) render_sine::$6 ← (byte) wrap_y::return#5
  (byte) render_sine::ypos2#0 ← (byte~) render_sine::$6
  (word) bitmap_plot::x#1 ← (word) render_sine::xpos#4
  (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0
  call bitmap_plot 
  to:render_sine::@12
render_sine::@12: scope:[render_sine]  from render_sine::@11
  (word) render_sine::sin_idx#7 ← phi( render_sine::@11/(word) render_sine::sin_idx#9 )
  (word) render_sine::xpos#5 ← phi( render_sine::@11/(word) render_sine::xpos#4 )
  (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#5
  (bool~) render_sine::$8 ← (word) render_sine::xpos#1 == (number) $140
  (bool~) render_sine::$9 ← ! (bool~) render_sine::$8
  if((bool~) render_sine::$9) goto render_sine::@4
  to:render_sine::@7
render_sine::@4: scope:[render_sine]  from render_sine::@12 render_sine::@7
  (word) render_sine::xpos#9 ← phi( render_sine::@12/(word) render_sine::xpos#1 render_sine::@7/(word) render_sine::xpos#2 )
  (word) render_sine::sin_idx#5 ← phi( render_sine::@12/(word) render_sine::sin_idx#7 render_sine::@7/(word) render_sine::sin_idx#8 )
  (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#5
  to:render_sine::@1
render_sine::@7: scope:[render_sine]  from render_sine::@12
  (word) render_sine::sin_idx#8 ← phi( render_sine::@12/(word) render_sine::sin_idx#7 )
  (word) render_sine::xpos#2 ← (number) 0
  to:render_sine::@4
render_sine::@return: scope:[render_sine]  from render_sine::@1
  return 
  to:@return

(byte()) wrap_y((signed word) wrap_y::y)
wrap_y: scope:[wrap_y]  from render_sine::@10 render_sine::@2
  (signed word) wrap_y::y#9 ← phi( render_sine::@10/(signed word) wrap_y::y#1 render_sine::@2/(signed word) wrap_y::y#0 )
  to:wrap_y::@1
wrap_y::@1: scope:[wrap_y]  from wrap_y wrap_y::@2
  (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 )
  (bool~) wrap_y::$1 ← (signed word) wrap_y::y#4 >= (number) $c8
  if((bool~) wrap_y::$1) goto wrap_y::@2
  to:wrap_y::@7
wrap_y::@2: scope:[wrap_y]  from wrap_y::@1
  (signed word) wrap_y::y#5 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 )
  (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#5 - (number) $c8
  to:wrap_y::@1
wrap_y::@7: scope:[wrap_y]  from wrap_y::@1 wrap_y::@8
  (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@8/(signed word) wrap_y::y#3 )
  (bool~) wrap_y::$2 ← (signed word) wrap_y::y#6 < (number) 0
  if((bool~) wrap_y::$2) goto wrap_y::@8
  to:wrap_y::@9
wrap_y::@8: scope:[wrap_y]  from wrap_y::@7
  (signed word) wrap_y::y#7 ← phi( wrap_y::@7/(signed word) wrap_y::y#6 )
  (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#7 + (number) $c8
  to:wrap_y::@7
wrap_y::@9: scope:[wrap_y]  from wrap_y::@7
  (signed word) wrap_y::y#8 ← phi( wrap_y::@7/(signed word) wrap_y::y#6 )
  (byte~) wrap_y::$0 ← ((byte)) (signed word) wrap_y::y#8
  (byte) wrap_y::return#2 ← (byte~) wrap_y::$0
  to:wrap_y::@return
wrap_y::@return: scope:[wrap_y]  from wrap_y::@9
  (byte) wrap_y::return#6 ← phi( wrap_y::@9/(byte) wrap_y::return#2 )
  (byte) wrap_y::return#3 ← (byte) wrap_y::return#6
  return 
  to:@return
@38: scope:[]  from @29
  (word) rem16u#25 ← phi( @29/(word) rem16u#30 )
  (byte*) bitmap_screen#14 ← phi( @29/(byte*) bitmap_screen#0 )
  (byte*) bitmap_gfx#15 ← phi( @29/(byte*) bitmap_gfx#0 )
  call main 
  to:@39
@39: scope:[]  from @38
  (word) rem16u#19 ← phi( @38/(word) rem16u#9 )
  (byte*) bitmap_screen#10 ← phi( @38/(byte*) bitmap_screen#4 )
  (byte*) bitmap_gfx#10 ← phi( @38/(byte*) bitmap_gfx#4 )
  (byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#10
  (byte*) bitmap_screen#5 ← (byte*) bitmap_screen#10
  (word) rem16u#10 ← (word) rem16u#19
  to:@end
@end: scope:[]  from @39

SYMBOL TABLE SSA
(label) @29
(label) @38
(label) @39
(label) @6
(label) @begin
(label) @end
(const byte*) BGCOL = (byte*)(number) $d021
(const byte*) BITMAP = (byte*)(number) $2000
(const byte) BLACK = (byte) 0
(const byte*) CIA2_PORT_A = (byte*)(number) $dd00
(const byte*) CIA2_PORT_A_DDR = (byte*)(number) $dd02
(const byte*) D011 = (byte*)(number) $d011
(const byte*) D016 = (byte*)(number) $d016
(const byte*) D018 = (byte*)(number) $d018
(const dword) PI2_u4f28 = (dword) $6487ed51
(const dword) PI_HALF_u4f28 = (dword) $1921fb54
(const dword) PI_u4f28 = (dword) $3243f6a9
(const byte*) PROCPORT = (byte*)(number) 1
(const byte*) PROCPORT_DDR = (byte*)(number) 0
(const byte) PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO = (byte) 5
(const byte*) SCREEN = (byte*)(number) $400
(const word) SIN_SIZE = (word) $200
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(const byte) VIC_BMM = (byte) $20
(const byte) VIC_CSEL = (byte) 8
(const byte) VIC_DEN = (byte) $10
(const byte) VIC_RSEL = (byte) 8
(const byte) WHITE = (byte) 1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(number~) bitmap_clear::$0
(number~) bitmap_clear::$1
(label) bitmap_clear::@1
(label) bitmap_clear::@2
(label) bitmap_clear::@return
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::bgcol#0
(byte) bitmap_clear::bgcol#1
(byte) bitmap_clear::col
(byte) bitmap_clear::col#0
(byte) bitmap_clear::fgcol
(byte) bitmap_clear::fgcol#0
(byte) bitmap_clear::fgcol#1
(byte*) bitmap_gfx
(byte*) bitmap_gfx#0
(byte*) bitmap_gfx#1
(byte*) bitmap_gfx#10
(byte*) bitmap_gfx#11
(byte*) bitmap_gfx#12
(byte*) bitmap_gfx#13
(byte*) bitmap_gfx#14
(byte*) bitmap_gfx#15
(byte*) bitmap_gfx#16
(byte*) bitmap_gfx#17
(byte*) bitmap_gfx#18
(byte*) bitmap_gfx#19
(byte*) bitmap_gfx#2
(byte*) bitmap_gfx#20
(byte*) bitmap_gfx#21
(byte*) bitmap_gfx#22
(byte*) bitmap_gfx#23
(byte*) bitmap_gfx#24
(byte*) bitmap_gfx#25
(byte*) bitmap_gfx#26
(byte*) bitmap_gfx#27
(byte*) bitmap_gfx#28
(byte*) bitmap_gfx#29
(byte*) bitmap_gfx#3
(byte*) bitmap_gfx#30
(byte*) bitmap_gfx#31
(byte*) bitmap_gfx#32
(byte*) bitmap_gfx#33
(byte*) bitmap_gfx#4
(byte*) bitmap_gfx#5
(byte*) bitmap_gfx#6
(byte*) bitmap_gfx#7
(byte*) bitmap_gfx#8
(byte*) bitmap_gfx#9
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
(bool~) bitmap_init::$0
(bool~) bitmap_init::$1
(byte*~) bitmap_init::$10
(bool~) bitmap_init::$11
(bool~) bitmap_init::$2
(number~) bitmap_init::$3
(byte~) bitmap_init::$4
(number~) bitmap_init::$5
(byte~) bitmap_init::$6
(number~) bitmap_init::$7
(bool~) bitmap_init::$8
(bool~) bitmap_init::$9
(label) bitmap_init::@1
(label) bitmap_init::@2
(label) bitmap_init::@3
(label) bitmap_init::@4
(label) bitmap_init::@5
(label) bitmap_init::@6
(label) bitmap_init::@7
(label) bitmap_init::@return
(byte) bitmap_init::bits
(byte) bitmap_init::bits#0
(byte) bitmap_init::bits#1
(byte) bitmap_init::bits#2
(byte) bitmap_init::bits#3
(byte) bitmap_init::bits#4
(byte*) bitmap_init::gfx
(byte*) bitmap_init::gfx#0
(byte*) bitmap_init::gfx#1
(byte*) bitmap_init::gfx#2
(byte*) bitmap_init::gfx#3
(byte*) bitmap_init::gfx#4
(byte*) bitmap_init::gfx#5
(byte*) bitmap_init::screen
(byte*) bitmap_init::screen#0
(byte*) bitmap_init::screen#1
(byte) bitmap_init::x
(byte) bitmap_init::x#0
(byte) bitmap_init::x#1
(byte) bitmap_init::x#2
(byte) bitmap_init::x#3
(byte) bitmap_init::x#4
(byte) bitmap_init::y
(byte) bitmap_init::y#0
(byte) bitmap_init::y#1
(byte) bitmap_init::y#2
(byte) bitmap_init::y#3
(byte) bitmap_init::y#4
(byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#0
(byte*) bitmap_init::yoffs#1
(byte*) bitmap_init::yoffs#2
(byte*) bitmap_init::yoffs#3
(byte*) bitmap_init::yoffs#4
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(byte*~) bitmap_plot::$0
(number~) bitmap_plot::$1
(byte~) bitmap_plot::$2
(label) bitmap_plot::@return
(byte*) bitmap_plot::plotter
(byte*) bitmap_plot::plotter#0
(byte*) bitmap_plot::plotter#1
(word) bitmap_plot::x
(word) bitmap_plot::x#0
(word) bitmap_plot::x#1
(word) bitmap_plot::x#2
(byte) bitmap_plot::y
(byte) bitmap_plot::y#0
(byte) bitmap_plot::y#1
(byte) bitmap_plot::y#2
(const byte*) bitmap_plot_bit[(number) $100]  = { fill( $100, 0) }
(const byte*) bitmap_plot_yhi[(number) $100]  = { fill( $100, 0) }
(const byte*) bitmap_plot_ylo[(number) $100]  = { fill( $100, 0) }
(byte*) bitmap_screen
(byte*) bitmap_screen#0
(byte*) bitmap_screen#1
(byte*) bitmap_screen#10
(byte*) bitmap_screen#11
(byte*) bitmap_screen#12
(byte*) bitmap_screen#13
(byte*) bitmap_screen#14
(byte*) bitmap_screen#15
(byte*) bitmap_screen#16
(byte*) bitmap_screen#17
(byte*) bitmap_screen#18
(byte*) bitmap_screen#19
(byte*) bitmap_screen#2
(byte*) bitmap_screen#20
(byte*) bitmap_screen#21
(byte*) bitmap_screen#22
(byte*) bitmap_screen#23
(byte*) bitmap_screen#24
(byte*) bitmap_screen#25
(byte*) bitmap_screen#26
(byte*) bitmap_screen#27
(byte*) bitmap_screen#28
(byte*) bitmap_screen#29
(byte*) bitmap_screen#3
(byte*) bitmap_screen#30
(byte*) bitmap_screen#31
(byte*) bitmap_screen#32
(byte*) bitmap_screen#4
(byte*) bitmap_screen#5
(byte*) bitmap_screen#6
(byte*) bitmap_screen#7
(byte*) bitmap_screen#8
(byte*) bitmap_screen#9
(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor)
(word~) div32u16u::$0
(word~) div32u16u::$1
(word~) div32u16u::$2
(word~) div32u16u::$3
(label) div32u16u::@2
(label) div32u16u::@3
(label) div32u16u::@return
(dword) div32u16u::dividend
(dword) div32u16u::dividend#0
(dword) div32u16u::dividend#1
(dword) div32u16u::dividend#2
(word) div32u16u::divisor
(word) div32u16u::divisor#0
(word) div32u16u::divisor#1
(word) div32u16u::divisor#2
(dword) div32u16u::quotient
(dword) div32u16u::quotient#0
(word) div32u16u::quotient_hi
(word) div32u16u::quotient_hi#0
(word) div32u16u::quotient_hi#1
(word) div32u16u::quotient_lo
(word) div32u16u::quotient_lo#0
(dword) div32u16u::return
(dword) div32u16u::return#0
(dword) div32u16u::return#1
(dword) div32u16u::return#2
(dword) div32u16u::return#3
(dword) div32u16u::return#4
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
(word~) divr16u::$0
(byte~) divr16u::$1
(word~) divr16u::$10
(bool~) divr16u::$11
(number~) divr16u::$2
(bool~) divr16u::$3
(bool~) divr16u::$4
(number~) divr16u::$5
(word~) divr16u::$6
(word~) divr16u::$7
(bool~) divr16u::$8
(bool~) divr16u::$9
(label) divr16u::@1
(label) divr16u::@2
(label) divr16u::@3
(label) divr16u::@4
(label) divr16u::@5
(label) divr16u::@6
(label) divr16u::@return
(word) divr16u::dividend
(word) divr16u::dividend#0
(word) divr16u::dividend#1
(word) divr16u::dividend#2
(word) divr16u::dividend#3
(word) divr16u::dividend#4
(word) divr16u::dividend#5
(word) divr16u::dividend#6
(word) divr16u::dividend#7
(word) divr16u::dividend#8
(word) divr16u::divisor
(word) divr16u::divisor#0
(word) divr16u::divisor#1
(word) divr16u::divisor#2
(word) divr16u::divisor#3
(word) divr16u::divisor#4
(word) divr16u::divisor#5
(word) divr16u::divisor#6
(word) divr16u::divisor#7
(byte) divr16u::i
(byte) divr16u::i#0
(byte) divr16u::i#1
(byte) divr16u::i#2
(byte) divr16u::i#3
(byte) divr16u::i#4
(byte) divr16u::i#5
(byte) divr16u::i#6
(word) divr16u::quotient
(word) divr16u::quotient#0
(word) divr16u::quotient#1
(word) divr16u::quotient#2
(word) divr16u::quotient#3
(word) divr16u::quotient#4
(word) divr16u::quotient#5
(word) divr16u::quotient#6
(word) divr16u::quotient#7
(word) divr16u::quotient#8
(word) divr16u::rem
(word) divr16u::rem#0
(word) divr16u::rem#1
(word) divr16u::rem#10
(word) divr16u::rem#11
(word) divr16u::rem#2
(word) divr16u::rem#3
(word) divr16u::rem#4
(word) divr16u::rem#5
(word) divr16u::rem#6
(word) divr16u::rem#7
(word) divr16u::rem#8
(word) divr16u::rem#9
(word) divr16u::return
(word) divr16u::return#0
(word) divr16u::return#1
(word) divr16u::return#2
(word) divr16u::return#3
(word) divr16u::return#4
(word) divr16u::return#5
(word) divr16u::return#6
(void()) main()
(byte~) main::$1
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@2
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(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
(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::vicSelectGfxBank1
(byte~) main::vicSelectGfxBank1_$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
(byte~) main::vicSelectGfxBank1_toDd001_$1
(number~) main::vicSelectGfxBank1_toDd001_$2
(number~) main::vicSelectGfxBank1_toDd001_$3
(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
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(bool~) memset::$0
(bool~) memset::$1
(byte*~) memset::$2
(byte*~) memset::$3
(bool~) memset::$4
(label) memset::@1
(label) memset::@2
(label) memset::@4
(label) memset::@5
(label) memset::@return
(byte) memset::c
(byte) memset::c#0
(byte) memset::c#1
(byte) memset::c#2
(byte) memset::c#3
(byte) memset::c#4
(byte) memset::c#5
(byte*) memset::dst
(byte*) memset::dst#0
(byte*) memset::dst#1
(byte*) memset::dst#2
(byte*) memset::dst#3
(byte*) memset::end
(byte*) memset::end#0
(byte*) memset::end#1
(byte*) memset::end#2
(word) memset::num
(word) memset::num#0
(word) memset::num#1
(word) memset::num#2
(word) memset::num#3
(void*) memset::return
(void*) memset::return#0
(void*) memset::return#1
(void*) memset::return#2
(void*) memset::return#3
(void*) memset::return#4
(void*) memset::str
(void*) memset::str#0
(void*) memset::str#1
(void*) memset::str#2
(void*) memset::str#3
(void*) memset::str#4
(void*) memset::str#5
(void*) memset::str#6
(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b)
(word~) mul16s::$0
(word~) mul16s::$1
(word~) mul16s::$10
(word~) mul16s::$11
(word~) mul16s::$13
(word~) mul16s::$14
(word~) mul16s::$15
(word~) mul16s::$16
(word~) mul16s::$17
(dword~) mul16s::$2
(bool~) mul16s::$3
(bool~) mul16s::$4
(bool~) mul16s::$5
(bool~) mul16s::$6
(signed dword~) mul16s::$7
(word~) mul16s::$9
(label) mul16s::@1
(label) mul16s::@2
(label) mul16s::@3
(label) mul16s::@4
(label) mul16s::@6
(label) mul16s::@return
(signed word) mul16s::a
(signed word) mul16s::a#0
(signed word) mul16s::a#1
(signed word) mul16s::a#2
(signed word) mul16s::a#3
(signed word) mul16s::a#4
(signed word) mul16s::a#5
(signed word) mul16s::b
(signed word) mul16s::b#0
(signed word) mul16s::b#1
(signed word) mul16s::b#2
(signed word) mul16s::b#3
(signed word) mul16s::b#4
(dword) mul16s::m
(dword) mul16s::m#0
(dword) mul16s::m#1
(dword) mul16s::m#2
(dword) mul16s::m#3
(dword) mul16s::m#4
(dword) mul16s::m#5
(dword) mul16s::m#6
(signed dword) mul16s::return
(signed dword) mul16s::return#0
(signed dword) mul16s::return#1
(signed dword) mul16s::return#2
(signed dword) mul16s::return#3
(signed dword) mul16s::return#4
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(bool~) mul16u::$0
(number~) mul16u::$1
(bool~) mul16u::$2
(bool~) mul16u::$3
(dword~) mul16u::$4
(word~) mul16u::$5
(dword~) mul16u::$6
(label) mul16u::@1
(label) mul16u::@2
(label) mul16u::@3
(label) mul16u::@4
(label) mul16u::@7
(label) mul16u::@return
(word) mul16u::a
(word) mul16u::a#0
(word) mul16u::a#1
(word) mul16u::a#2
(word) mul16u::a#3
(word) mul16u::a#4
(word) mul16u::a#5
(word) mul16u::a#6
(word) mul16u::a#7
(word) mul16u::b
(word) mul16u::b#0
(word) mul16u::b#1
(word) mul16u::b#2
(dword) mul16u::mb
(dword) mul16u::mb#0
(dword) mul16u::mb#1
(dword) mul16u::mb#2
(dword) mul16u::mb#3
(dword) mul16u::mb#4
(dword) mul16u::mb#5
(dword) mul16u::res
(dword) mul16u::res#0
(dword) mul16u::res#1
(dword) mul16u::res#2
(dword) mul16u::res#3
(dword) mul16u::res#4
(dword) mul16u::res#5
(dword) mul16u::res#6
(dword) mul16u::return
(dword) mul16u::return#0
(dword) mul16u::return#1
(dword) mul16u::return#2
(dword) mul16u::return#3
(dword) mul16u::return#4
(dword) mul16u::return#5
(dword) mul16u::return#6
(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
(dword~) mulu16_sel::$0
(dword~) mulu16_sel::$1
(word~) mulu16_sel::$2
(label) mulu16_sel::@2
(label) mulu16_sel::@return
(word) mulu16_sel::return
(word) mulu16_sel::return#0
(word) mulu16_sel::return#1
(word) mulu16_sel::return#10
(word) mulu16_sel::return#11
(word) mulu16_sel::return#12
(word) mulu16_sel::return#2
(word) mulu16_sel::return#3
(word) mulu16_sel::return#4
(word) mulu16_sel::return#5
(word) mulu16_sel::return#6
(word) mulu16_sel::return#7
(word) mulu16_sel::return#8
(word) mulu16_sel::return#9
(byte) mulu16_sel::select
(byte) mulu16_sel::select#0
(byte) mulu16_sel::select#1
(byte) mulu16_sel::select#2
(byte) mulu16_sel::select#3
(byte) mulu16_sel::select#4
(byte) mulu16_sel::select#5
(byte) mulu16_sel::select#6
(word) mulu16_sel::v1
(word) mulu16_sel::v1#0
(word) mulu16_sel::v1#1
(word) mulu16_sel::v1#2
(word) mulu16_sel::v1#3
(word) mulu16_sel::v1#4
(word) mulu16_sel::v1#5
(word) mulu16_sel::v2
(word) mulu16_sel::v2#0
(word) mulu16_sel::v2#1
(word) mulu16_sel::v2#2
(word) mulu16_sel::v2#3
(word) mulu16_sel::v2#4
(word) mulu16_sel::v2#5
(word) rem16u
(word) rem16u#0
(word) rem16u#1
(word) rem16u#10
(word) rem16u#11
(word) rem16u#12
(word) rem16u#13
(word) rem16u#14
(word) rem16u#15
(word) rem16u#16
(word) rem16u#17
(word) rem16u#18
(word) rem16u#19
(word) rem16u#2
(word) rem16u#20
(word) rem16u#21
(word) rem16u#22
(word) rem16u#23
(word) rem16u#24
(word) rem16u#25
(word) rem16u#26
(word) rem16u#27
(word) rem16u#28
(word) rem16u#29
(word) rem16u#3
(word) rem16u#30
(word) rem16u#31
(word) rem16u#32
(word) rem16u#33
(word) rem16u#34
(word) rem16u#35
(word) rem16u#36
(word) rem16u#37
(word) rem16u#38
(word) rem16u#39
(word) rem16u#4
(word) rem16u#40
(word) rem16u#41
(word) rem16u#5
(word) rem16u#6
(word) rem16u#7
(word) rem16u#8
(word) rem16u#9
(void()) render_sine()
(bool~) render_sine::$0
(signed word*~) render_sine::$1
(word~) render_sine::$10
(word~) render_sine::$11
(byte~) render_sine::$2
(signed word*~) render_sine::$4
(number~) render_sine::$5
(byte~) render_sine::$6
(bool~) render_sine::$8
(bool~) render_sine::$9
(label) render_sine::@1
(label) render_sine::@10
(label) render_sine::@11
(label) render_sine::@12
(label) render_sine::@2
(label) render_sine::@4
(label) render_sine::@7
(label) render_sine::@9
(label) render_sine::@return
(signed word) render_sine::sin2_val
(signed word) render_sine::sin2_val#0
(word) render_sine::sin_idx
(word) render_sine::sin_idx#0
(word) render_sine::sin_idx#1
(word) render_sine::sin_idx#2
(word) render_sine::sin_idx#3
(word) render_sine::sin_idx#4
(word) render_sine::sin_idx#5
(word) render_sine::sin_idx#6
(word) render_sine::sin_idx#7
(word) render_sine::sin_idx#8
(word) render_sine::sin_idx#9
(signed word) render_sine::sin_val
(signed word) render_sine::sin_val#0
(word) render_sine::xpos
(word) render_sine::xpos#0
(word) render_sine::xpos#1
(word) render_sine::xpos#2
(word) render_sine::xpos#3
(word) render_sine::xpos#4
(word) render_sine::xpos#5
(word) render_sine::xpos#6
(word) render_sine::xpos#7
(word) render_sine::xpos#8
(word) render_sine::xpos#9
(byte) render_sine::ypos
(byte) render_sine::ypos#0
(byte) render_sine::ypos2
(byte) render_sine::ypos2#0
(const signed word*) sin[(number) $200]  = { fill( $200, 0) }
(signed word()) sin16s((dword) sin16s::x)
(bool~) sin16s::$0
(bool~) sin16s::$1
(word~) sin16s::$10
(word~) sin16s::$11
(word~) sin16s::$12
(word~) sin16s::$13
(signed word~) sin16s::$14
(bool~) sin16s::$15
(bool~) sin16s::$16
(dword~) sin16s::$17
(dword~) sin16s::$18
(signed word~) sin16s::$19
(bool~) sin16s::$2
(signed word~) sin16s::$20
(bool~) sin16s::$3
(dword~) sin16s::$4
(word~) sin16s::$5
(word~) sin16s::$6
(word~) sin16s::$7
(word~) sin16s::$8
(word~) sin16s::$9
(label) sin16s::@1
(label) sin16s::@10
(label) sin16s::@11
(label) sin16s::@12
(label) sin16s::@2
(label) sin16s::@3
(label) sin16s::@4
(label) sin16s::@5
(label) sin16s::@6
(label) sin16s::@8
(label) sin16s::@9
(label) sin16s::@return
(byte) sin16s::isUpper
(byte) sin16s::isUpper#0
(byte) sin16s::isUpper#1
(byte) sin16s::isUpper#2
(byte) sin16s::isUpper#3
(byte) sin16s::isUpper#4
(byte) sin16s::isUpper#5
(byte) sin16s::isUpper#6
(byte) sin16s::isUpper#7
(byte) sin16s::isUpper#8
(byte) sin16s::isUpper#9
(signed word) sin16s::return
(signed word) sin16s::return#0
(signed word) sin16s::return#1
(signed word) sin16s::return#2
(signed word) sin16s::return#3
(signed word) sin16s::return#4
(signed word) sin16s::sinx
(signed word) sin16s::sinx#0
(signed word) sin16s::sinx#1
(signed word) sin16s::sinx#2
(word) sin16s::usinx
(word) sin16s::usinx#0
(word) sin16s::usinx#1
(word) sin16s::usinx#2
(word) sin16s::usinx#3
(word) sin16s::usinx#4
(dword) sin16s::x
(dword) sin16s::x#0
(dword) sin16s::x#1
(dword) sin16s::x#2
(dword) sin16s::x#3
(dword) sin16s::x#4
(dword) sin16s::x#5
(dword) sin16s::x#6
(dword) sin16s::x#7
(word) sin16s::x1
(word) sin16s::x1#0
(word) sin16s::x1#1
(word) sin16s::x1#2
(word) sin16s::x1#3
(word) sin16s::x1#4
(word) sin16s::x2
(word) sin16s::x2#0
(word) sin16s::x3
(word) sin16s::x3#0
(word) sin16s::x3#1
(word) sin16s::x3_6
(word) sin16s::x3_6#0
(word) sin16s::x4
(word) sin16s::x4#0
(word) sin16s::x5
(word) sin16s::x5#0
(word) sin16s::x5_128
(word) sin16s::x5_128#0
(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max)
(signed word~) sin16s_gen2::$0
(signed word~) sin16s_gen2::$1
(dword~) sin16s_gen2::$10
(signed word~) sin16s_gen2::$2
(dword~) sin16s_gen2::$3
(bool~) sin16s_gen2::$4
(signed word~) sin16s_gen2::$5
(signed dword~) sin16s_gen2::$6
(word~) sin16s_gen2::$7
(signed word~) sin16s_gen2::$8
(signed word~) sin16s_gen2::$9
(label) sin16s_gen2::@1
(label) sin16s_gen2::@2
(label) sin16s_gen2::@7
(label) sin16s_gen2::@8
(label) sin16s_gen2::@9
(label) sin16s_gen2::@return
(signed word) sin16s_gen2::ampl
(signed word) sin16s_gen2::ampl#0
(signed word) sin16s_gen2::ampl#1
(signed word) sin16s_gen2::ampl#2
(signed word) sin16s_gen2::ampl#3
(signed word) sin16s_gen2::ampl#4
(signed word) sin16s_gen2::ampl#5
(word) sin16s_gen2::i
(word) sin16s_gen2::i#0
(word) sin16s_gen2::i#1
(word) sin16s_gen2::i#2
(word) sin16s_gen2::i#3
(word) sin16s_gen2::i#4
(word) sin16s_gen2::i#5
(signed word) sin16s_gen2::max
(signed word) sin16s_gen2::max#0
(signed word) sin16s_gen2::max#1
(signed word) sin16s_gen2::min
(signed word) sin16s_gen2::min#0
(signed word) sin16s_gen2::min#1
(signed word) sin16s_gen2::offs
(signed word) sin16s_gen2::offs#0
(signed word) sin16s_gen2::offs#1
(signed word) sin16s_gen2::offs#2
(signed word) sin16s_gen2::offs#3
(signed word) sin16s_gen2::offs#4
(signed word) sin16s_gen2::offs#5
(signed word*) sin16s_gen2::sintab
(signed word*) sin16s_gen2::sintab#0
(signed word*) sin16s_gen2::sintab#1
(signed word*) sin16s_gen2::sintab#2
(signed word*) sin16s_gen2::sintab#3
(signed word*) sin16s_gen2::sintab#4
(signed word*) sin16s_gen2::sintab#5
(signed word*) sin16s_gen2::sintab#6
(signed word*) sin16s_gen2::sintab#7
(dword) sin16s_gen2::step
(dword) sin16s_gen2::step#0
(dword) sin16s_gen2::step#1
(dword) sin16s_gen2::step#2
(dword) sin16s_gen2::step#3
(dword) sin16s_gen2::step#4
(word) sin16s_gen2::wavelength
(word) sin16s_gen2::wavelength#0
(word) sin16s_gen2::wavelength#1
(word) sin16s_gen2::wavelength#2
(word) sin16s_gen2::wavelength#3
(word) sin16s_gen2::wavelength#4
(word) sin16s_gen2::wavelength#5
(word) sin16s_gen2::wavelength#6
(dword) sin16s_gen2::x
(dword) sin16s_gen2::x#0
(dword) sin16s_gen2::x#1
(dword) sin16s_gen2::x#2
(dword) sin16s_gen2::x#3
(dword) sin16s_gen2::x#4
(dword) sin16s_gen2::x#5
(const signed word*) sin2[(number) $200]  = kickasm {{ .for(var i=0; i<512; i++) {
  	  .word sin(toRadians([i*360]/512))*320
    }
 }}
(byte()) wrap_y((signed word) wrap_y::y)
(byte~) wrap_y::$0
(bool~) wrap_y::$1
(bool~) wrap_y::$2
(label) wrap_y::@1
(label) wrap_y::@2
(label) wrap_y::@7
(label) wrap_y::@8
(label) wrap_y::@9
(label) wrap_y::@return
(byte) wrap_y::return
(byte) wrap_y::return#0
(byte) wrap_y::return#1
(byte) wrap_y::return#2
(byte) wrap_y::return#3
(byte) wrap_y::return#4
(byte) wrap_y::return#5
(byte) wrap_y::return#6
(signed word) wrap_y::y
(signed word) wrap_y::y#0
(signed word) wrap_y::y#1
(signed word) wrap_y::y#2
(signed word) wrap_y::y#3
(signed word) wrap_y::y#4
(signed word) wrap_y::y#5
(signed word) wrap_y::y#6
(signed word) wrap_y::y#7
(signed word) wrap_y::y#8
(signed word) wrap_y::y#9

Fixing inline constructor with div32u16u::$4 ← (word)div32u16u::quotient_hi#1 dw= (word)div32u16u::quotient_lo#0
Fixing inline constructor with bitmap_plot::$3 ← (byte)*(bitmap_plot_yhi + bitmap_plot::y#2) w= (byte)*(bitmap_plot_ylo + bitmap_plot::y#2)
Successful SSA optimization Pass2FixInlineConstructors
Adding number conversion cast (unumber) 1 in (word~) divr16u::$0 ← (word) divr16u::rem#5 << (number) 1
Adding number conversion cast (unumber) $80 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (number) $80
Adding number conversion cast (unumber) divr16u::$2 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (unumber)(number) $80
Adding number conversion cast (unumber) 0 in (bool~) divr16u::$3 ← (unumber~) divr16u::$2 != (number) 0
Adding number conversion cast (unumber) 1 in (word~) divr16u::$6 ← (word) divr16u::dividend#4 << (number) 1
Adding number conversion cast (unumber) 1 in (word~) divr16u::$7 ← (word) divr16u::quotient#3 << (number) 1
Adding number conversion cast (unumber) 1 in (number~) divr16u::$5 ← (word) divr16u::rem#7 | (number) 1
Adding number conversion cast (unumber) divr16u::$5 in (number~) divr16u::$5 ← (word) divr16u::rem#7 | (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (word) divr16u::rem#3 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) mul16u::$0 ← (word) mul16u::a#3 != (number) 0
Adding number conversion cast (unumber) 1 in (number~) mul16u::$1 ← (word) mul16u::a#4 & (number) 1
Adding number conversion cast (unumber) mul16u::$1 in (number~) mul16u::$1 ← (word) mul16u::a#4 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) mul16u::$2 ← (unumber~) mul16u::$1 != (number) 0
Adding number conversion cast (unumber) 1 in (word~) mul16u::$5 ← (word) mul16u::a#5 >> (number) 1
Adding number conversion cast (unumber) 1 in (dword~) mul16u::$6 ← (dword) mul16u::mb#2 << (number) 1
Adding number conversion cast (snumber) 0 in (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (number) 0
Adding number conversion cast (snumber) 0 in (bool~) mul16s::$5 ← (signed word) mul16s::b#2 < (number) 0
Adding number conversion cast (snumber) 1 in (signed word~) sin16s_gen2::$1 ← (signed word) sin16s_gen2::ampl#0 >> (number) 1
Adding number conversion cast (unumber) 1 in (byte) sin16s::isUpper#1 ← (number) 1
Adding number conversion cast (unumber) 3 in (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (number) 3
Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (byte) mulu16_sel::select#1 ← (number) 1
Adding number conversion cast (unumber) $10000/6 in (word) mulu16_sel::v2#2 ← (number) $10000/(number) 6
Adding number conversion cast (unumber) 1 in (byte) mulu16_sel::select#2 ← (number) 1
Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#3 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#4 ← (number) 0
Adding number conversion cast (unumber) 4 in (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4
Adding number conversion cast (unumber) 0 in (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0
Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0
Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1
Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#2 ← (number) $80
Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7
Adding number conversion cast (unumber) bitmap_init::$3 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) bitmap_init::$5 in (number~) bitmap_init::$5 ← (unumber~) bitmap_init::$3 | (byte~) bitmap_init::$4
Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (number) 7
Adding number conversion cast (unumber) bitmap_init::$7 in (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) 7 in (bool~) bitmap_init::$8 ← (unumber~) bitmap_init::$7 == (number) 7
Adding number conversion cast (unumber) $28*8 in (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8
Adding number conversion cast (unumber) $10 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10
Adding number conversion cast (unumber) bitmap_clear::$0 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (unumber)(number) $10
Adding number conversion cast (unumber) bitmap_clear::$1 in (number~) bitmap_clear::$1 ← (unumber~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1
Adding number conversion cast (unumber) 0 in (byte) memset::c#1 ← (number) 0
Adding number conversion cast (unumber) $fff8 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (number) $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (unumber)(number) $fff8
Adding number conversion cast (unumber) VIC_BMM|VIC_DEN|VIC_RSEL|3 in *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(number) 3
Adding number conversion cast (unumber) 3 in *((const byte*) D011) ← ((unumber)) (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(number) 3
Adding number conversion cast (unumber) 3 in *((const byte*) CIA2_PORT_A_DDR) ← (number) 3
Adding number conversion cast (unumber) $40 in (number~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (number) $40
Adding number conversion cast (unumber) main::vicSelectGfxBank1_toDd001_$2 in (number~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (unumber)(number) $40
Adding number conversion cast (unumber) 3 in (number~) main::vicSelectGfxBank1_toDd001_$3 ← (number) 3 ^ (unumber~) main::vicSelectGfxBank1_toDd001_$2
Adding number conversion cast (unumber) main::vicSelectGfxBank1_toDd001_$3 in (number~) main::vicSelectGfxBank1_toDd001_$3 ← (unumber)(number) 3 ^ (unumber~) main::vicSelectGfxBank1_toDd001_$2
Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (number) $3fff
Adding number conversion cast (unumber) main::toD0181_$1 in (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2 ← (unumber~) main::toD0181_$1 * (number) 4
Adding number conversion cast (unumber) main::toD0181_$2 in (number~) main::toD0181_$2 ← (unumber~) main::toD0181_$1 * (unumber)(number) 4
Adding number conversion cast (unumber) main::toD0181_$3 in (number~) main::toD0181_$3 ← > (unumber~) main::toD0181_$2
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (number) 4
Adding number conversion cast (unumber) main::toD0181_$6 in (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (unumber)(number) 4
Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (number) $f
Adding number conversion cast (unumber) main::toD0181_$7 in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (unumber)(number) $f
Adding number conversion cast (unumber) main::toD0181_$8 in (number~) main::toD0181_$8 ← (unumber~) main::toD0181_$3 | (unumber~) main::toD0181_$7
Adding number conversion cast (snumber) -$140 in (signed word) sin16s_gen2::min#0 ← (number) -$140
Adding number conversion cast (snumber) $140 in (signed word) sin16s_gen2::max#0 ← (number) $140
Adding number conversion cast (snumber) $a in (number~) render_sine::$5 ← (signed word) render_sine::sin2_val#0 + (number) $a
Adding number conversion cast (snumber) render_sine::$5 in (number~) render_sine::$5 ← (signed word) render_sine::sin2_val#0 + (snumber)(number) $a
Adding number conversion cast (unumber) $140 in (bool~) render_sine::$8 ← (word) render_sine::xpos#1 == (number) $140
Adding number conversion cast (unumber) 0 in (word) render_sine::xpos#2 ← (number) 0
Adding number conversion cast (snumber) $c8 in (bool~) wrap_y::$1 ← (signed word) wrap_y::y#4 >= (number) $c8
Adding number conversion cast (snumber) $c8 in (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#5 - (number) $c8
Adding number conversion cast (snumber) 0 in (bool~) wrap_y::$2 ← (signed word) wrap_y::y#6 < (number) 0
Adding number conversion cast (snumber) $c8 in (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#7 + (number) $c8
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (word) divr16u::rem#3 ← (unumber)(number) 0
Inlining cast (word~) mul16s::$0 ← (word)(signed word) mul16s::a#1
Inlining cast (word~) mul16s::$1 ← (word)(signed word) mul16s::b#1
Inlining cast (word~) mul16s::$10 ← (word)(signed word) mul16s::b#3
Inlining cast (signed dword~) mul16s::$7 ← (signed dword)(dword) mul16s::m#4
Inlining cast (word~) mul16s::$14 ← (word)(signed word) mul16s::a#3
Inlining cast (signed word~) sin16s_gen2::$8 ← (signed word)(word~) sin16s_gen2::$7
Inlining cast (byte) sin16s::isUpper#1 ← (unumber)(number) 1
Inlining cast (byte) mulu16_sel::select#0 ← (unumber)(number) 0
Inlining cast (byte) mulu16_sel::select#1 ← (unumber)(number) 1
Inlining cast (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6
Inlining cast (byte) mulu16_sel::select#2 ← (unumber)(number) 1
Inlining cast (byte) mulu16_sel::select#3 ← (unumber)(number) 0
Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0
Inlining cast (signed word~) sin16s::$14 ← (signed word)(word) sin16s::usinx#1
Inlining cast (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#3
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte) memset::c#1 ← (unumber)(number) 0
Inlining cast *((const byte*) D011) ← (unumber)(const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(unumber)(number) 3
Inlining cast *((const byte*) CIA2_PORT_A_DDR) ← (unumber)(number) 3
Inlining cast (word~) main::vicSelectGfxBank1_toDd001_$0 ← (word)(byte*) main::vicSelectGfxBank1_toDd001_gfx#1
Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast (signed word) sin16s_gen2::min#0 ← (snumber)(number) -$140
Inlining cast (signed word) sin16s_gen2::max#0 ← (snumber)(number) $140
Inlining cast (word) render_sine::xpos#2 ← (unumber)(number) 0
Inlining cast (byte~) wrap_y::$0 ← (byte)(signed word) wrap_y::y#8
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 0
Simplifying constant pointer cast (byte*) 1
Simplifying constant pointer cast (byte*) 53281
Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53270
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 56576
Simplifying constant pointer cast (byte*) 56578
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast 1
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast (word) div32u16u::quotient_hi#1
Simplifying constant integer cast (word) div32u16u::quotient_lo#0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2)
Simplifying constant integer cast *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2)
Simplifying constant integer cast $fff8
Simplifying constant integer cast (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(unumber)(number) 3
Simplifying constant integer cast 3
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 -$140
Simplifying constant integer cast $140
Simplifying constant integer cast $a
Simplifying constant integer cast $140
Simplifying constant integer cast 0
Simplifying constant integer cast $c8
Simplifying constant integer cast $c8
Simplifying constant integer cast 0
Simplifying constant integer cast $c8
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
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) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $fff8
Finalized unsigned number type (byte) 3
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 signed number type (signed word) -$140
Finalized signed number type (signed word) $140
Finalized signed number type (signed byte) $a
Finalized unsigned number type (word) $140
Finalized unsigned number type (byte) 0
Finalized signed number type (signed word) $c8
Finalized signed number type (signed word) $c8
Finalized signed number type (signed byte) 0
Finalized signed number type (signed word) $c8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80
Inferred type updated to word in (unumber~) divr16u::$5 ← (word) divr16u::rem#7 | (byte) 1
Inferred type updated to byte in (unumber~) mul16u::$1 ← (word) mul16u::a#4 & (byte) 1
Inferred type updated to byte in (unumber~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (byte) 7
Inferred type updated to byte in (unumber~) bitmap_init::$5 ← (byte~) bitmap_init::$3 | (byte~) bitmap_init::$4
Inferred type updated to byte in (unumber~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
Inferred type updated to byte in (unumber~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (byte) $10
Inferred type updated to byte in (unumber~) bitmap_clear::$1 ← (byte~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1
Inferred type updated to word in (unumber~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8
Inferred type updated to byte in (unumber~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (byte) $40
Inferred type updated to byte in (unumber~) main::vicSelectGfxBank1_toDd001_$3 ← (byte) 3 ^ (byte~) main::vicSelectGfxBank1_toDd001_$2
Inferred type updated to word in (unumber~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (word) $3fff
Inferred type updated to word in (unumber~) main::toD0181_$2 ← (word~) main::toD0181_$1 * (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$3 ← > (word~) main::toD0181_$2
Inferred type updated to byte in (unumber~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$7 ← (byte~) main::toD0181_$6 & (byte) $f
Inferred type updated to byte in (unumber~) main::toD0181_$8 ← (byte~) main::toD0181_$3 | (byte~) main::toD0181_$7
Inferred type updated to signed word in (snumber~) render_sine::$5 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a
Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_plot::$0 ← (word~) bitmap_plot::$3
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [10] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte) 0 from [9] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte) 0
Inversing boolean not [18] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [17] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2
Inversing boolean not [75] (bool~) mul16u::$3 ← (byte~) mul16u::$1 == (byte) 0 from [74] (bool~) mul16u::$2 ← (byte~) mul16u::$1 != (byte) 0
Inversing boolean not [101] (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (signed byte) 0 from [100] (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (signed byte) 0
Inversing boolean not [105] (bool~) mul16s::$6 ← (signed word) mul16s::b#2 >= (signed byte) 0 from [104] (bool~) mul16s::$5 ← (signed word) mul16s::b#2 < (signed byte) 0
Inversing boolean not [170] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (const dword) PI_u4f28 from [169] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (const dword) PI_u4f28
Inversing boolean not [174] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (const dword) PI_HALF_u4f28 from [173] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (const dword) PI_HALF_u4f28
Inversing boolean not [233] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [232] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0
Inversing boolean not [262] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [261] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0
Inversing boolean not [292] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [291] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0
Inversing boolean not [312] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [311] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7
Inversing boolean not [453] (bool~) render_sine::$9 ← (word) render_sine::xpos#1 != (word) $140 from [452] (bool~) render_sine::$8 ← (word) render_sine::xpos#1 == (word) $140
Successful SSA optimization Pass2UnaryNotSimplification
Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 
Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 
Alias (word) divr16u::quotient#1 = (word~) divr16u::$7 (word) divr16u::quotient#4 
Alias (word) divr16u::dividend#3 = (word) divr16u::dividend#7 
Alias (word) divr16u::quotient#6 = (word) divr16u::quotient#7 
Alias (word) divr16u::divisor#4 = (word) divr16u::divisor#5 
Alias (byte) divr16u::i#5 = (byte) divr16u::i#6 
Alias (word) divr16u::rem#1 = (word~) divr16u::$5 
Alias (word) divr16u::rem#6 = (word) divr16u::rem#8 
Alias (word) divr16u::divisor#2 = (word) divr16u::divisor#3 
Alias (byte) divr16u::i#3 = (byte) divr16u::i#4 
Alias (word) divr16u::rem#2 = (word~) divr16u::$10 
Alias (word) divr16u::rem#11 = (word) divr16u::rem#9 
Alias (word) divr16u::return#0 = (word) divr16u::quotient#5 (word) divr16u::quotient#8 (word) divr16u::return#4 (word) divr16u::return#1 
Alias (word) rem16u#1 = (word) rem16u#11 (word) rem16u#2 
Alias (word) divr16u::dividend#1 = (word~) div32u16u::$0 
Alias (word) divr16u::return#2 = (word) divr16u::return#5 
Alias (dword) div32u16u::dividend#1 = (dword) div32u16u::dividend#2 
Alias (word) div32u16u::divisor#1 = (word) div32u16u::divisor#2 
Alias (word) rem16u#12 = (word) rem16u#3 
Alias (word) div32u16u::quotient_hi#0 = (word~) div32u16u::$1 (word) div32u16u::quotient_hi#1 
Alias (word) divr16u::dividend#2 = (word~) div32u16u::$2 
Alias (word) divr16u::return#3 = (word) divr16u::return#6 
Alias (word) rem16u#13 = (word) rem16u#4 (word) rem16u#14 (word) rem16u#5 
Alias (word) div32u16u::quotient_lo#0 = (word~) div32u16u::$3 
Alias (dword) div32u16u::return#0 = (dword) div32u16u::quotient#0 (dword~) div32u16u::$4 (dword) div32u16u::return#3 (dword) div32u16u::return#1 
Alias (word) mul16u::a#3 = (word) mul16u::a#4 (word) mul16u::a#7 
Alias (dword) mul16u::mb#3 = (dword) mul16u::mb#4 (dword) mul16u::mb#5 
Alias (dword) mul16u::res#2 = (dword) mul16u::res#5 (dword) mul16u::res#4 (dword) mul16u::return#0 (dword) mul16u::res#3 (dword) mul16u::return#4 (dword) mul16u::return#1 
Alias (word) mul16u::a#0 = (word~) mul16u::$5 
Alias (dword) mul16u::mb#1 = (dword~) mul16u::$6 
Alias (dword) mul16u::res#1 = (dword~) mul16u::$4 
Alias (word) mul16u::a#1 = (word~) mul16s::$0 
Alias (word) mul16u::b#0 = (word~) mul16s::$1 
Alias (dword) mul16u::return#2 = (dword) mul16u::return#5 
Alias (signed word) mul16s::a#1 = (signed word) mul16s::a#2 (signed word) mul16s::a#5 
Alias (signed word) mul16s::b#1 = (signed word) mul16s::b#4 (signed word) mul16s::b#3 
Alias (dword) mul16s::m#0 = (dword~) mul16s::$2 (dword) mul16s::m#3 
Alias (word~) mul16s::$16 = (word~) mul16s::$11 
Alias (signed dword) mul16s::return#0 = (signed dword~) mul16s::$7 (signed dword) mul16s::return#3 (signed dword) mul16s::return#1 
Alias (dword) mul16s::m#5 = (dword) mul16s::m#6 
Alias (signed word) mul16s::a#3 = (signed word) mul16s::a#4 
Alias (word~) mul16s::$17 = (word~) mul16s::$15 
Alias (signed word) sin16s_gen2::ampl#0 = (signed word~) sin16s_gen2::$0 (signed word) sin16s_gen2::ampl#4 
Alias (signed word) sin16s_gen2::offs#0 = (signed word~) sin16s_gen2::$2 (signed word) sin16s_gen2::offs#5 
Alias (dword) div32u16u::return#2 = (dword) div32u16u::return#4 
Alias (word) sin16s_gen2::wavelength#1 = (word) sin16s_gen2::wavelength#3 
Alias (signed word*) sin16s_gen2::sintab#6 = (signed word*) sin16s_gen2::sintab#7 
Alias (word) rem16u#15 = (word) rem16u#6 
Alias (dword) sin16s_gen2::step#0 = (dword~) sin16s_gen2::$3 
Alias (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#4 (dword) sin16s_gen2::x#5 (dword) sin16s_gen2::x#3 
Alias (signed word) sin16s_gen2::ampl#1 = (signed word) sin16s_gen2::ampl#2 (signed word) sin16s_gen2::ampl#3 (signed word) sin16s_gen2::ampl#5 
Alias (signed word) sin16s_gen2::offs#1 = (signed word) sin16s_gen2::offs#3 (signed word) sin16s_gen2::offs#4 (signed word) sin16s_gen2::offs#2 
Alias (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#4 (signed word*) sin16s_gen2::sintab#5 (signed word*) sin16s_gen2::sintab#3 
Alias (dword) sin16s_gen2::step#1 = (dword) sin16s_gen2::step#3 (dword) sin16s_gen2::step#4 (dword) sin16s_gen2::step#2 
Alias (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#5 (word) sin16s_gen2::i#4 (word) sin16s_gen2::i#3 
Alias (word) sin16s_gen2::wavelength#2 = (word) sin16s_gen2::wavelength#6 (word) sin16s_gen2::wavelength#5 (word) sin16s_gen2::wavelength#4 
Alias (word) rem16u#16 = (word) rem16u#33 (word) rem16u#22 (word) rem16u#31 (word) rem16u#26 (word) rem16u#7 
Alias (signed word) sin16s::return#0 = (signed word) sin16s::return#3 
Alias (signed word) mul16s::a#0 = (signed word~) sin16s_gen2::$5 
Alias (signed dword) mul16s::return#2 = (signed dword) mul16s::return#4 
Alias (dword) sin16s_gen2::x#1 = (dword~) sin16s_gen2::$10 
Alias (dword) sin16s::x#3 = (dword) sin16s::x#5 
Alias (dword) sin16s::x#1 = (dword~) sin16s::$17 
Alias (word) sin16s::x1#0 = (word~) sin16s::$5 (word) sin16s::x1#1 (word) sin16s::x1#4 (word) sin16s::x1#2 (word) sin16s::x1#3 
Alias (word) mulu16_sel::return#0 = (word) mulu16_sel::return#7 
Alias (byte) sin16s::isUpper#2 = (byte) sin16s::isUpper#6 (byte) sin16s::isUpper#7 (byte) sin16s::isUpper#5 (byte) sin16s::isUpper#4 (byte) sin16s::isUpper#3 
Alias (word) sin16s::x2#0 = (word~) sin16s::$6 
Alias (word) mulu16_sel::return#1 = (word) mulu16_sel::return#8 
Alias (word) sin16s::x3#0 = (word~) sin16s::$7 (word) sin16s::x3#1 
Alias (word) mulu16_sel::return#2 = (word) mulu16_sel::return#9 
Alias (word) sin16s::x3_6#0 = (word~) sin16s::$8 
Alias (word) sin16s::usinx#0 = (word~) sin16s::$9 (word) sin16s::usinx#4 (word) sin16s::usinx#2 
Alias (word) mulu16_sel::return#10 = (word) mulu16_sel::return#3 
Alias (word) sin16s::x4#0 = (word~) sin16s::$10 
Alias (word) mulu16_sel::return#11 = (word) mulu16_sel::return#4 
Alias (word) sin16s::x5#0 = (word~) sin16s::$11 
Alias (word) sin16s::x5_128#0 = (word~) sin16s::$12 
Alias (word) sin16s::usinx#1 = (word~) sin16s::$13 (word) sin16s::usinx#3 
Alias (signed word) sin16s::sinx#0 = (signed word~) sin16s::$14 
Alias (dword) sin16s::x#4 = (dword) sin16s::x#7 
Alias (byte) sin16s::isUpper#8 = (byte) sin16s::isUpper#9 
Alias (dword) sin16s::x#2 = (dword~) sin16s::$18 
Alias (signed word) sin16s::return#1 = (signed word) sin16s::sinx#2 (signed word) sin16s::return#4 (signed word) sin16s::return#2 
Alias (signed word) sin16s::sinx#1 = (signed word~) sin16s::$20 
Alias (dword) mul16u::return#3 = (dword) mul16u::return#6 
Alias (byte) mulu16_sel::select#5 = (byte) mulu16_sel::select#6 
Alias (word) mulu16_sel::return#12 = (word) mulu16_sel::return#5 (word~) mulu16_sel::$2 (word) mulu16_sel::return#6 
Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 
Alias (void*) memset::str#3 = (void*) memset::str#4 
Alias (word) memset::num#2 = (word) memset::num#3 
Alias (byte) memset::c#4 = (byte) memset::c#5 
Alias (byte*) memset::end#0 = (byte*~) memset::$3 
Alias (byte) memset::c#2 = (byte) memset::c#3 
Alias (byte*) memset::dst#2 = (byte*) memset::dst#3 
Alias (byte*) memset::end#1 = (byte*) memset::end#2 
Alias (void*) memset::str#5 = (void*) memset::str#6 
Alias (word) rem16u#0 = (word) rem16u#30 (word) rem16u#25 
Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 
Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 
Alias (byte*) bitmap_gfx#27 = (byte*) bitmap_gfx#28 
Alias (byte*) bitmap_screen#26 = (byte*) bitmap_screen#27 
Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#3 (byte*) bitmap_init::yoffs#0 
Alias (byte*) bitmap_gfx#21 = (byte*) bitmap_gfx#24 
Alias (byte*) bitmap_screen#20 = (byte*) bitmap_screen#23 
Alias (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#3 
Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#4 
Alias (byte*) bitmap_gfx#16 = (byte*) bitmap_gfx#17 
Alias (byte*) bitmap_screen#15 = (byte*) bitmap_screen#16 
Alias (byte*) bitmap_init::yoffs#1 = (byte*~) bitmap_init::$10 
Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#6 (byte*) bitmap_gfx#2 
Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#6 (byte*) bitmap_screen#2 
Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$1 
Alias (byte*) bitmap_gfx#12 = (byte*) bitmap_gfx#7 
Alias (byte*) bitmap_plot::plotter#0 = (byte*~) bitmap_plot::$0 
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*) bitmap_gfx#13 = (byte*) bitmap_gfx#32 (byte*) bitmap_gfx#33 (byte*) bitmap_gfx#31 (byte*) bitmap_gfx#30 (byte*) bitmap_gfx#29 (byte*) bitmap_gfx#25 (byte*) bitmap_gfx#22 (byte*) bitmap_gfx#18 
Alias (byte*) bitmap_screen#12 = (byte*) bitmap_screen#31 (byte*) bitmap_screen#32 (byte*) bitmap_screen#30 (byte*) bitmap_screen#29 (byte*) bitmap_screen#28 (byte*) bitmap_screen#24 (byte*) bitmap_screen#21 (byte*) bitmap_screen#17 
Alias (word) rem16u#23 = (word) rem16u#40 (word) rem16u#41 (word) rem16u#39 (word) rem16u#38 (word) rem16u#37 (word) rem16u#36 (word) rem16u#35 (word) rem16u#34 (word) rem16u#32 (word) rem16u#27 
Alias (byte) main::vicSelectGfxBank1_toDd001_return#0 = (byte~) main::vicSelectGfxBank1_toDd001_$3 (byte) main::vicSelectGfxBank1_toDd001_return#2 (byte) main::vicSelectGfxBank1_toDd001_return#1 (byte) main::vicSelectGfxBank1_toDd001_return#3 (byte~) main::vicSelectGfxBank1_$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 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 
Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#3 (byte*) bitmap_gfx#8 (byte*) bitmap_gfx#26 (byte*) bitmap_gfx#23 
Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#3 (byte*) bitmap_screen#8 (byte*) bitmap_screen#25 (byte*) bitmap_screen#22 
Alias (word) rem16u#17 = (word) rem16u#8 (word) rem16u#28 
Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#20 (byte*) bitmap_gfx#9 (byte*) bitmap_gfx#4 
Alias (byte*) bitmap_screen#13 = (byte*) bitmap_screen#19 (byte*) bitmap_screen#9 (byte*) bitmap_screen#4 
Alias (word) rem16u#18 = (word) rem16u#29 (word) rem16u#24 (word) rem16u#9 
Alias (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#3 (word) render_sine::sin_idx#6 (word) render_sine::sin_idx#4 (word) render_sine::sin_idx#9 (word) render_sine::sin_idx#7 (word) render_sine::sin_idx#8 
Alias (word) render_sine::xpos#3 = (word) render_sine::xpos#6 (word) render_sine::xpos#8 (word) render_sine::xpos#7 (word) render_sine::xpos#4 (word) render_sine::xpos#5 
Alias (byte) wrap_y::return#0 = (byte) wrap_y::return#4 
Alias (byte) render_sine::ypos#0 = (byte~) render_sine::$2 
Alias (signed word) wrap_y::y#1 = (signed word~) render_sine::$5 
Alias (byte) wrap_y::return#1 = (byte) wrap_y::return#5 
Alias (byte) render_sine::ypos2#0 = (byte~) render_sine::$6 
Alias (signed word) wrap_y::y#4 = (signed word) wrap_y::y#5 
Alias (signed word) wrap_y::y#6 = (signed word) wrap_y::y#7 (signed word) wrap_y::y#8 
Alias (byte) wrap_y::return#2 = (byte~) wrap_y::$0 (byte) wrap_y::return#6 (byte) wrap_y::return#3 
Alias (byte*) bitmap_gfx#0 = (byte*) bitmap_gfx#15 
Alias (byte*) bitmap_screen#0 = (byte*) bitmap_screen#14 
Alias (byte*) bitmap_gfx#10 = (byte*) bitmap_gfx#5 
Alias (byte*) bitmap_screen#10 = (byte*) bitmap_screen#5 
Alias (word) rem16u#10 = (word) rem16u#19 
Successful SSA optimization Pass2AliasElimination
Alias (word) divr16u::dividend#3 = (word) divr16u::dividend#4 
Alias (word) divr16u::quotient#3 = (word) divr16u::quotient#6 
Alias (word) divr16u::divisor#2 = (word) divr16u::divisor#4 (word) divr16u::divisor#7 
Alias (byte) divr16u::i#2 = (byte) divr16u::i#3 (byte) divr16u::i#5 
Alias (word) divr16u::dividend#0 = (word) divr16u::dividend#6 
Alias (word) mul16u::a#3 = (word) mul16u::a#5 
Alias (dword) mul16u::mb#2 = (dword) mul16u::mb#3 
Alias (signed word) mul16s::b#1 = (signed word) mul16s::b#2 
Alias (signed word) mul16s::a#1 = (signed word) mul16s::a#3 
Alias (byte) sin16s::isUpper#2 = (byte) sin16s::isUpper#8 
Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#3 
Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#4 
Alias (byte*) bitmap_gfx#21 = (byte*) bitmap_gfx#27 
Alias (byte*) bitmap_screen#20 = (byte*) bitmap_screen#26 
Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#3 
Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#16 
Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#15 
Alias (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#5 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (word) divr16u::divisor#2 (word) divr16u::divisor#6
Identical Phi Values (dword) div32u16u::dividend#1 (dword) div32u16u::dividend#0
Identical Phi Values (word) div32u16u::divisor#1 (word) div32u16u::divisor#0
Identical Phi Values (word) rem16u#20 (word) rem16u#21
Identical Phi Values (word) rem16u#12 (word) rem16u#1
Identical Phi Values (word) rem16u#13 (word) rem16u#1
Identical Phi Values (signed word) mul16s::a#1 (signed word) mul16s::a#0
Identical Phi Values (signed word) mul16s::b#1 (signed word) mul16s::b#0
Identical Phi Values (signed word) sin16s_gen2::max#1 (signed word) sin16s_gen2::max#0
Identical Phi Values (signed word) sin16s_gen2::min#1 (signed word) sin16s_gen2::min#0
Identical Phi Values (word) sin16s_gen2::wavelength#1 (word) sin16s_gen2::wavelength#0
Identical Phi Values (word) rem16u#21 (word) rem16u#23
Identical Phi Values (signed word*) sin16s_gen2::sintab#6 (signed word*) sin16s_gen2::sintab#1
Identical Phi Values (word) rem16u#15 (word) rem16u#13
Identical Phi Values (word) sin16s_gen2::wavelength#2 (word) sin16s_gen2::wavelength#1
Identical Phi Values (word) rem16u#16 (word) rem16u#15
Identical Phi Values (signed word) sin16s_gen2::ampl#1 (signed word) sin16s_gen2::ampl#0
Identical Phi Values (signed word) sin16s_gen2::offs#1 (signed word) sin16s_gen2::offs#0
Identical Phi Values (dword) sin16s_gen2::step#1 (dword) sin16s_gen2::step#0
Identical Phi Values (dword) sin16s::x#3 (dword) sin16s::x#0
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#5 (void*) memset::str#3
Identical Phi Values (byte) memset::c#2 (byte) memset::c#4
Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0
Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0
Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1
Identical Phi Values (byte*) bitmap_gfx#21 (byte*) bitmap_gfx#1
Identical Phi Values (byte*) bitmap_screen#20 (byte*) bitmap_screen#1
Identical Phi Values (byte*) bitmap_gfx#11 (byte*) bitmap_gfx#21
Identical Phi Values (byte*) bitmap_screen#11 (byte*) bitmap_screen#20
Identical Phi Values (byte) bitmap_clear::fgcol#1 (byte) bitmap_clear::fgcol#0
Identical Phi Values (byte) bitmap_clear::bgcol#1 (byte) bitmap_clear::bgcol#0
Identical Phi Values (byte*) bitmap_screen#7 (byte*) bitmap_screen#18
Identical Phi Values (byte*) bitmap_gfx#12 (byte*) bitmap_gfx#19
Identical Phi Values (byte*) bitmap_gfx#13 (byte*) bitmap_gfx#0
Identical Phi Values (byte*) bitmap_screen#12 (byte*) bitmap_screen#0
Identical Phi Values (word) rem16u#23 (word) rem16u#0
Identical Phi Values (byte*) bitmap_gfx#19 (byte*) bitmap_gfx#11
Identical Phi Values (byte*) bitmap_screen#18 (byte*) bitmap_screen#11
Identical Phi Values (word) rem16u#17 (word) rem16u#16
Identical Phi Values (byte*) bitmap_gfx#14 (byte*) bitmap_gfx#19
Identical Phi Values (byte*) bitmap_screen#13 (byte*) bitmap_screen#18
Identical Phi Values (word) rem16u#18 (word) rem16u#17
Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14
Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13
Identical Phi Values (word) rem16u#10 (word) rem16u#18
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#3
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [310] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3
Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1
Simple Condition (bool~) mul16u::$0 [46] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2
Simple Condition (bool~) mul16u::$3 [49] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4
Simple Condition (bool~) mul16s::$4 [62] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1
Simple Condition (bool~) mul16s::$6 [65] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2
Simple Condition (bool~) sin16s_gen2::$4 [91] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2
Simple Condition (bool~) sin16s::$1 [111] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1
Simple Condition (bool~) sin16s::$3 [114] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2
Simple Condition (bool~) sin16s::$16 [155] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3
Simple Condition (bool~) memset::$1 [172] if((word) memset::num#2<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [179] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5
Simple Condition (bool~) bitmap_init::$1 [194] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2
Simple Condition (bool~) bitmap_init::$2 [198] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1
Simple Condition (bool~) bitmap_init::$9 [210] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6
Simple Condition (bool~) bitmap_init::$11 [214] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5
Simple Condition (bool~) render_sine::$0 [286] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2
Simple Condition (bool~) render_sine::$9 [309] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@4
Simple Condition (bool~) wrap_y::$1 [317] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2
Simple Condition (bool~) wrap_y::$2 [321] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@8
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [133] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) rem16u#0 = 0
Constant (const word) divr16u::quotient#0 = 0
Constant (const byte) divr16u::i#0 = 0
Constant (const word) divr16u::rem#3 = 0
Constant (const dword) mul16u::res#0 = 0
Constant (const dword) div32u16u::dividend#0 = PI2_u4f28
Constant (const dword) sin16s_gen2::x#0 = 0
Constant (const word) sin16s_gen2::i#0 = 0
Constant (const byte) sin16s::isUpper#0 = 0
Constant (const byte) sin16s::isUpper#1 = 1
Constant (const byte) mulu16_sel::select#0 = 0
Constant (const byte) mulu16_sel::select#1 = 1
Constant (const word) mulu16_sel::v2#2 = (unumber)$10000/6
Constant (const byte) mulu16_sel::select#2 = 1
Constant (const byte) mulu16_sel::select#3 = 0
Constant (const byte) mulu16_sel::select#4 = 0
Constant (const byte*) bitmap_screen#0 = (byte*) 0
Constant (const byte*) bitmap_gfx#0 = (byte*) 0
Constant (const byte) bitmap_init::bits#0 = $80
Constant (const byte) bitmap_init::x#0 = 0
Constant (const byte) bitmap_init::bits#2 = $80
Constant (const byte) bitmap_init::y#0 = 0
Constant (const word) memset::num#0 = $3e8
Constant (const byte) memset::c#1 = 0
Constant (const word) memset::num#1 = $1f40
Constant (const byte*) main::vicSelectGfxBank1_gfx#0 = SCREEN
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = BITMAP
Constant (const byte*) bitmap_init::gfx#0 = BITMAP
Constant (const byte*) bitmap_init::screen#0 = SCREEN
Constant (const byte) bitmap_clear::bgcol#0 = BLACK
Constant (const byte) bitmap_clear::fgcol#0 = WHITE
Constant (const signed word*) sin16s_gen2::sintab#1 = sin
Constant (const word) sin16s_gen2::wavelength#0 = SIN_SIZE
Constant (const signed word) sin16s_gen2::min#0 = -$140
Constant (const signed word) sin16s_gen2::max#0 = $140
Constant (const word) render_sine::xpos#0 = 0
Constant (const word) render_sine::sin_idx#0 = 0
Constant (const word) render_sine::xpos#2 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) div32u16u::divisor#0 = sin16s_gen2::wavelength#0
Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0
Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0
Constant (const word) main::vicSelectGfxBank1_toDd001_$0 = (word)main::vicSelectGfxBank1_gfx#0
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0
Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0
Constant (const void*) memset::str#0 = (void*)bitmap_screen#1
Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [279] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++
Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10
Resolved ranged next value [196] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++
Resolved ranged comparison value [198] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0
Resolved ranged next value [212] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++
Resolved ranged comparison value [214] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0
Simplifying expression containing zero bitmap_clear::$0 in [219] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (void*) memset::return#2 and assignment [168] (void*) memset::return#2 ← (void*) memset::str#3
Eliminating unused variable (void*) memset::return#3 and assignment [170] (void*) memset::return#3 ← (void*) memset::str#3
Eliminating unused constant (const byte) bitmap_clear::bgcol#0
Eliminating unused constant (const word) rem16u#0
Eliminating unused constant (const byte*) bitmap_screen#0
Eliminating unused constant (const byte*) bitmap_gfx#0
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const byte) BLACK
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1
Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 
Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0
Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0
Constant right-side identified [59] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0
Constant right-side identified [163] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10
Constant right-side identified [181] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0
Constant right-side identified [186] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff
Constant right-side identified [189] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0
Constant (const word) divr16u::dividend#2 = <div32u16u::dividend#0
Constant (const signed word) sin16s_gen2::ampl#0 = sin16s_gen2::max#0-sin16s_gen2::min#0
Constant (const byte) bitmap_clear::col#0 = bitmap_clear::fgcol#0*$10
Constant (const byte) main::vicSelectGfxBank1_toDd001_$1 = >main::vicSelectGfxBank1_toDd001_$0
Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff
Constant (const byte) main::toD0181_$5 = >main::toD0181_$4
Successful SSA optimization Pass2ConstantIdentification
Constant (const signed word) mul16s::b#0 = sin16s_gen2::ampl#0
Constant (const byte) memset::c#0 = bitmap_clear::col#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) mul16u::b#0 = (word)mul16s::b#0
Constant (const word) mul16s::$10 = (word)mul16s::b#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [47] if((const signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2
Successful SSA optimization Pass2ConstantIfs
Eliminating variable (word~) mul16s::$13 from unused block mul16s::@4
Eliminating variable (word~) mul16s::$14 from unused block mul16s::@4
Eliminating variable (word~) mul16s::$17 from unused block mul16s::@4
Eliminating variable (dword) mul16s::m#2 from unused block mul16s::@4
Removing PHI-reference to removed block (mul16s::@4) in block mul16s::@2
Removing unused block mul16s::@4
Successful SSA optimization Pass2EliminateUnusedBlocks
Alias (dword) mul16s::m#4 = (dword) mul16s::m#5 
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [49] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1
Constant right-side identified [167] (byte~) main::vicSelectGfxBank1_toDd001_$2 ← (const byte) main::vicSelectGfxBank1_toDd001_$1 / (byte) $40
Constant right-side identified [171] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4
Constant right-side identified [173] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const signed word) sin16s_gen2::$1 = sin16s_gen2::ampl#0>>1
Constant (const byte) main::vicSelectGfxBank1_toDd001_$2 = main::vicSelectGfxBank1_toDd001_$1/$40
Constant (const word) main::toD0181_$2 = main::toD0181_$1*4
Constant (const byte) main::toD0181_$6 = main::toD0181_$5/4
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero (const byte) main::vicSelectGfxBank1_toDd001_$1/(byte) $40 in 
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero 3 in [168] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) main::vicSelectGfxBank1_toDd001_$1
Eliminating unused constant (const byte) main::vicSelectGfxBank1_toDd001_$2
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const word) main::vicSelectGfxBank1_toDd001_$0
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const byte*) main::vicSelectGfxBank1_gfx#0
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [49] (signed word) sin16s_gen2::offs#0 ← (const signed word) sin16s_gen2::min#0 + (const signed word) sin16s_gen2::$1
Constant right-side identified [169] (byte~) main::toD0181_$3 ← > (const word) main::toD0181_$2
Constant right-side identified [170] (byte~) main::toD0181_$7 ← (const byte) main::toD0181_$6 & (byte) $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const signed word) sin16s_gen2::offs#0 = sin16s_gen2::min#0+sin16s_gen2::$1
Constant (const byte) main::vicSelectGfxBank1_toDd001_return#0 = 3
Constant (const byte) main::toD0181_$3 = >main::toD0181_$2
Constant (const byte) main::toD0181_$7 = main::toD0181_$6&$f
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero (const signed word) sin16s_gen2::min#0+(const signed word) sin16s_gen2::$1 in 
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero sin16s_gen2::$8 in [64] (signed word~) sin16s_gen2::$9 ← (const signed word) sin16s_gen2::offs#0 + (signed word~) sin16s_gen2::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const signed word) sin16s_gen2::$1
Eliminating unused constant (const signed word) sin16s_gen2::offs#0
Successful SSA optimization PassNEliminateUnusedVars
Alias (signed word~) sin16s_gen2::$9 = (signed word~) sin16s_gen2::$8 
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [166] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_return#0 = main::toD0181_$3|main::toD0181_$7
Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [62] (signed word~) sin16s_gen2::$9 ← (signed word)(word~) sin16s_gen2::$7 keeping sin16s_gen2::$9
Inlining Noop Cast [153] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [102] (signed word) sin16s::sinx#0 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1
Inlining Noop Cast [106] (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1
Inlining Noop Cast [120] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3
Inlining Noop Cast [122] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Rewriting multiplication to use shift [174] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD
Rewriting multiplication to use shift [184] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const word) divr16u::quotient#0
Inlining constant with var siblings (const byte) divr16u::i#0
Inlining constant with var siblings (const word) divr16u::rem#3
Inlining constant with var siblings (const word) divr16u::divisor#0
Inlining constant with var siblings (const word) divr16u::divisor#1
Inlining constant with var siblings (const word) divr16u::dividend#1
Inlining constant with var siblings (const word) divr16u::dividend#2
Inlining constant with var siblings (const dword) mul16u::res#0
Inlining constant with var siblings (const word) mul16u::b#0
Inlining constant with var siblings (const dword) sin16s_gen2::x#0
Inlining constant with var siblings (const word) sin16s_gen2::i#0
Inlining constant with var siblings (const signed word*) sin16s_gen2::sintab#1
Inlining constant with var siblings (const byte) sin16s::isUpper#0
Inlining constant with var siblings (const byte) sin16s::isUpper#1
Inlining constant with var siblings (const byte) mulu16_sel::select#0
Inlining constant with var siblings (const byte) mulu16_sel::select#1
Inlining constant with var siblings (const word) mulu16_sel::v2#2
Inlining constant with var siblings (const byte) mulu16_sel::select#2
Inlining constant with var siblings (const byte) mulu16_sel::select#3
Inlining constant with var siblings (const byte) mulu16_sel::select#4
Inlining constant with var siblings (const word) memset::num#0
Inlining constant with var siblings (const byte) memset::c#1
Inlining constant with var siblings (const word) memset::num#1
Inlining constant with var siblings (const void*) memset::str#0
Inlining constant with var siblings (const void*) memset::str#1
Inlining constant with var siblings (const byte) memset::c#0
Inlining constant with var siblings (const byte) bitmap_init::bits#0
Inlining constant with var siblings (const byte) bitmap_init::x#0
Inlining constant with var siblings (const byte) bitmap_init::bits#2
Inlining constant with var siblings (const byte) bitmap_init::y#0
Inlining constant with var siblings (const word) render_sine::xpos#0
Inlining constant with var siblings (const word) render_sine::sin_idx#0
Inlining constant with var siblings (const word) render_sine::xpos#2
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN
Constant inlined divr16u::rem#3 = (byte) 0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP
Constant inlined sin16s_gen2::i#0 = (word) 0
Constant inlined sin16s::isUpper#0 = (byte) 0
Constant inlined memset::num#1 = (word) $1f40
Constant inlined memset::num#0 = (word) $3e8
Constant inlined mul16u::b#0 = (word)(const signed word) sin16s_gen2::ampl#0
Constant inlined mulu16_sel::select#4 = (byte) 0
Constant inlined mulu16_sel::select#2 = (byte) 1
Constant inlined mulu16_sel::select#3 = (byte) 0
Constant inlined mulu16_sel::select#0 = (byte) 0
Constant inlined sin16s::isUpper#1 = (byte) 1
Constant inlined mulu16_sel::select#1 = (byte) 1
Constant inlined mul16s::$10 = (word)(const signed word) sin16s_gen2::ampl#0
Constant inlined mul16s::b#0 = (const signed word) sin16s_gen2::ampl#0
Constant inlined main::toD0181_$7 = >(word)(const byte*) BITMAP/(byte) 4&(byte) $f
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined sin16s_gen2::wavelength#0 = (const word) SIN_SIZE
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN&(word) $3fff
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN
Constant inlined main::toD0181_$6 = >(word)(const byte*) BITMAP/(byte) 4
Constant inlined main::toD0181_$5 = >(word)(const byte*) BITMAP
Constant inlined main::toD0181_$4 = (word)(const byte*) BITMAP
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined sin16s_gen2::sintab#1 = (const signed word*) sin
Constant inlined memset::c#0 = (const byte) bitmap_clear::col#0
Constant inlined bitmap_init::x#0 = (byte) 0
Constant inlined memset::c#1 = (byte) 0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP
Constant inlined divr16u::i#0 = (byte) 0
Constant inlined div32u16u::dividend#0 = (const dword) PI2_u4f28
Constant inlined bitmap_init::bits#0 = (byte) $80
Constant inlined render_sine::xpos#0 = (word) 0
Constant inlined bitmap_init::bits#2 = (byte) $80
Constant inlined divr16u::quotient#0 = (word) 0
Constant inlined sin16s_gen2::x#0 = (dword) 0
Constant inlined mul16u::res#0 = (dword) 0
Constant inlined divr16u::divisor#1 = (const word) SIN_SIZE
Constant inlined divr16u::divisor#0 = (const word) SIN_SIZE
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP
Constant inlined render_sine::sin_idx#0 = (word) 0
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN
Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE
Constant inlined divr16u::dividend#1 = >(const dword) PI2_u4f28
Constant inlined divr16u::dividend#2 = <(const dword) PI2_u4f28
Constant inlined bitmap_screen#1 = (const byte*) SCREEN
Constant inlined render_sine::xpos#2 = (byte) 0
Constant inlined mulu16_sel::v2#2 = (word)(number) $10000/(number) 6
Constant inlined bitmap_init::y#0 = (byte) 0
Constant inlined div32u16u::divisor#0 = (const word) SIN_SIZE
Successful SSA optimization Pass2ConstantInlining
Identical Phi Values (word) divr16u::divisor#6 (const word) SIN_SIZE
Successful SSA optimization Pass2IdenticalPhiElimination
Added new block during phi lifting divr16u::@8(between divr16u::@3 and divr16u::@1)
Added new block during phi lifting divr16u::@9(between divr16u::@1 and divr16u::@2)
Added new block during phi lifting divr16u::@10(between divr16u::@2 and divr16u::@3)
Added new block during phi lifting mul16u::@10(between mul16u::@2 and mul16u::@4)
Added new block during phi lifting mul16s::@7(between mul16s::@6 and mul16s::@1)
Added new block during phi lifting sin16s::@13(between sin16s and sin16s::@1)
Fixing phi predecessor for sin16s::isUpper#2 to new block ( sin16s -> sin16s::@13 ) during phi lifting.
Added new block during phi lifting sin16s::@14(between sin16s::@1 and sin16s::@2)
Added new block during phi lifting sin16s::@15(between sin16s::@12 and sin16s::@3)
Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1)
Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2)
Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5)
Added new block during phi lifting bitmap_init::@12(between bitmap_init::@5 and bitmap_init::@6)
Added new block during phi lifting render_sine::@13(between render_sine::@12 and render_sine::@4)
Added new block during phi lifting wrap_y::@14(between wrap_y::@1 and wrap_y::@7)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @6
Adding NOP phi() at start of @29
Adding NOP phi() at start of @38
Adding NOP phi() at start of @39
Adding NOP phi() at start of @end
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::toD0181
Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of main::@11
Adding NOP phi() at start of main::@12
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of render_sine
Adding NOP phi() at start of render_sine::@7
Adding NOP phi() at start of sin16s_gen2
Adding NOP phi() at start of mul16u::@3
Adding NOP phi() at start of div32u16u
Adding NOP phi() at start of bitmap_clear
Adding NOP phi() at start of bitmap_clear::@1
Adding NOP phi() at start of bitmap_clear::@2
Adding NOP phi() at start of memset::@1
Adding NOP phi() at start of bitmap_init
Adding NOP phi() at start of bitmap_init::@3
Adding NOP phi() at start of bitmap_init::@4
CALL GRAPH
Calls in [] to main:4 
Calls in [main] to bitmap_init:19 bitmap_clear:21 sin16s_gen2:23 render_sine:25 
Calls in [render_sine] to wrap_y:38 bitmap_plot:45 wrap_y:51 bitmap_plot:58 
Calls in [sin16s_gen2] to div32u16u:88 sin16s:95 mul16s:98 
Calls in [mul16s] to mul16u:111 
Calls in [sin16s] to mulu16_sel:156 mulu16_sel:163 mulu16_sel:168 mulu16_sel:176 mulu16_sel:183 
Calls in [mulu16_sel] to mul16u:201 
Calls in [div32u16u] to divr16u:208 divr16u:213 
Calls in [bitmap_clear] to memset:249 memset:251 

Created 44 initial phi equivalence classes
Coalesced [37] wrap_y::y#11 ← wrap_y::y#0
Coalesced [43] bitmap_plot::y#4 ← bitmap_plot::y#0
Coalesced [44] bitmap_plot::x#4 ← bitmap_plot::x#0
Coalesced [50] wrap_y::y#10 ← wrap_y::y#1
Coalesced [56] bitmap_plot::y#3 ← bitmap_plot::y#1
Coalesced [57] bitmap_plot::x#3 ← bitmap_plot::x#1
Coalesced [64] render_sine::sin_idx#10 ← render_sine::sin_idx#1
Coalesced [65] render_sine::xpos#10 ← render_sine::xpos#9
Coalesced [66] render_sine::xpos#11 ← render_sine::xpos#1
Coalesced [75] wrap_y::y#12 ← wrap_y::y#9
Coalesced [78] wrap_y::y#14 ← wrap_y::y#4
Coalesced [84] wrap_y::y#15 ← wrap_y::y#3
Coalesced [86] wrap_y::y#13 ← wrap_y::y#2
Coalesced [106] sin16s_gen2::i#6 ← sin16s_gen2::i#1
Coalesced [107] sin16s_gen2::x#6 ← sin16s_gen2::x#1
Coalesced [108] sin16s_gen2::sintab#8 ← sin16s_gen2::sintab#0
Coalesced [110] mul16u::a#8 ← mul16u::a#1
Coalesced [118] mul16s::m#7 ← mul16s::m#1
Coalesced [122] mul16s::m#8 ← mul16s::m#0
Coalesced [125] mul16u::a#10 ← mul16u::a#6
Coalesced [126] mul16u::mb#6 ← mul16u::mb#0
Coalesced [134] mul16u::res#9 ← mul16u::res#1
Coalesced [138] mul16u::a#11 ← mul16u::a#0
Coalesced [139] mul16u::res#7 ← mul16u::res#6
Coalesced [140] mul16u::mb#7 ← mul16u::mb#1
Coalesced (already) [141] mul16u::res#8 ← mul16u::res#2
Coalesced [144] sin16s::x#9 ← sin16s::x#1
Coalesced [148] sin16s::x#11 ← sin16s::x#2
Coalesced [154] mulu16_sel::v1#8 ← mulu16_sel::v1#0
Coalesced [155] mulu16_sel::v2#8 ← mulu16_sel::v2#0
Coalesced [161] mulu16_sel::v1#9 ← mulu16_sel::v1#1
Coalesced [162] mulu16_sel::v2#9 ← mulu16_sel::v2#1
Coalesced [167] mulu16_sel::v1#10 ← mulu16_sel::v1#2
Coalesced [174] mulu16_sel::v1#6 ← mulu16_sel::v1#3
Coalesced [175] mulu16_sel::v2#6 ← mulu16_sel::v2#3
Coalesced [181] mulu16_sel::v1#7 ← mulu16_sel::v1#4
Coalesced [182] mulu16_sel::v2#7 ← mulu16_sel::v2#4
Coalesced [190] sin16s::return#6 ← sin16s::sinx#1
Coalesced [194] sin16s::x#10 ← sin16s::x#4
Coalesced [195] sin16s::x#8 ← sin16s::x#0
Coalesced [199] mul16u::b#3 ← mul16u::b#1
Coalesced [200] mul16u::a#9 ← mul16u::a#2
Coalesced [212] divr16u::rem#12 ← divr16u::rem#4
Coalesced [219] divr16u::rem#13 ← divr16u::rem#10
Coalesced [220] divr16u::dividend#9 ← divr16u::dividend#5
Coalesced [227] divr16u::rem#16 ← divr16u::rem#1
Coalesced [234] divr16u::rem#18 ← divr16u::rem#2
Coalesced [235] divr16u::return#8 ← divr16u::quotient#2
Coalesced [241] divr16u::rem#14 ← divr16u::rem#11
Coalesced [242] divr16u::dividend#10 ← divr16u::dividend#0
Coalesced [243] divr16u::quotient#9 ← divr16u::return#0
Coalesced [244] divr16u::i#7 ← divr16u::i#1
Coalesced [245] divr16u::rem#17 ← divr16u::rem#6
Coalesced [246] divr16u::return#7 ← divr16u::quotient#1
Coalesced [247] divr16u::rem#15 ← divr16u::rem#0
Coalesced [264] memset::dst#5 ← memset::dst#1
Coalesced [284] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1
Coalesced [289] bitmap_init::y#5 ← bitmap_init::y#1
Coalesced [290] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4
Coalesced (already) [291] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2
Coalesced [292] bitmap_init::bits#5 ← bitmap_init::bits#4
Coalesced [293] bitmap_init::x#5 ← bitmap_init::x#1
Coalesced [294] bitmap_init::bits#6 ← bitmap_init::bits#1
Coalesced down to 31 phi equivalence classes
Culled Empty Block (label) @6
Culled Empty Block (label) @29
Culled Empty Block (label) @39
Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@return
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::@1
Culled Empty Block (label) render_sine::@7
Culled Empty Block (label) wrap_y::@14
Culled Empty Block (label) mul16s::@7
Culled Empty Block (label) mul16u::@3
Culled Empty Block (label) mul16u::@10
Culled Empty Block (label) sin16s::@14
Culled Empty Block (label) sin16s::@13
Culled Empty Block (label) divr16u::@8
Culled Empty Block (label) divr16u::@10
Culled Empty Block (label) divr16u::@9
Culled Empty Block (label) bitmap_clear::@2
Culled Empty Block (label) memset::@1
Culled Empty Block (label) bitmap_init::@3
Culled Empty Block (label) bitmap_init::@4
Culled Empty Block (label) bitmap_init::@11
Culled Empty Block (label) bitmap_init::@12
Culled Empty Block (label) bitmap_init::@9
Renumbering block @38 to @1
Renumbering block div32u16u::@2 to div32u16u::@1
Renumbering block div32u16u::@3 to div32u16u::@2
Renumbering block mul16u::@4 to mul16u::@3
Renumbering block mul16u::@7 to mul16u::@4
Renumbering block mul16s::@6 to mul16s::@4
Renumbering block sin16s_gen2::@7 to sin16s_gen2::@3
Renumbering block sin16s_gen2::@8 to sin16s_gen2::@4
Renumbering block sin16s_gen2::@9 to sin16s_gen2::@5
Renumbering block sin16s::@8 to sin16s::@7
Renumbering block sin16s::@9 to sin16s::@8
Renumbering block sin16s::@10 to sin16s::@9
Renumbering block sin16s::@11 to sin16s::@10
Renumbering block sin16s::@12 to sin16s::@11
Renumbering block sin16s::@15 to sin16s::@12
Renumbering block mulu16_sel::@2 to mulu16_sel::@1
Renumbering block memset::@2 to memset::@1
Renumbering block memset::@4 to memset::@2
Renumbering block memset::@5 to memset::@3
Renumbering block bitmap_init::@5 to bitmap_init::@3
Renumbering block bitmap_init::@6 to bitmap_init::@4
Renumbering block bitmap_init::@7 to bitmap_init::@5
Renumbering block bitmap_init::@10 to bitmap_init::@6
Renumbering block main::@2 to main::@1
Renumbering block main::@7 to main::@2
Renumbering block main::@8 to main::@3
Renumbering block main::@9 to main::@4
Renumbering block main::@10 to main::@5
Renumbering block main::@11 to main::@6
Renumbering block render_sine::@4 to render_sine::@3
Renumbering block render_sine::@9 to render_sine::@4
Renumbering block render_sine::@10 to render_sine::@5
Renumbering block render_sine::@11 to render_sine::@6
Renumbering block render_sine::@12 to render_sine::@7
Renumbering block render_sine::@13 to render_sine::@8
Renumbering block wrap_y::@7 to wrap_y::@3
Renumbering block wrap_y::@8 to wrap_y::@4
Renumbering block wrap_y::@9 to wrap_y::@5
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of render_sine
Adding NOP phi() at start of render_sine::@8
Adding NOP phi() at start of sin16s_gen2
Adding NOP phi() at start of div32u16u
Adding NOP phi() at start of bitmap_clear
Adding NOP phi() at start of bitmap_clear::@1
Adding NOP phi() at start of bitmap_init
Adding NOP phi() at start of bitmap_init::@6

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()

(void()) main()
main: scope:[main]  from @1
  asm { sei  }
  [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK
  [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO
  [7] *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3
  to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main]  from main
  [8] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3
  to:main::vicSelectGfxBank1_toDd001
main::vicSelectGfxBank1_toDd001: scope:[main]  from main::vicSelectGfxBank1
  [9] phi()
  to:main::vicSelectGfxBank1_@1
main::vicSelectGfxBank1_@1: scope:[main]  from main::vicSelectGfxBank1_toDd001
  [10] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
  to:main::@2
main::@2: scope:[main]  from main::vicSelectGfxBank1_@1
  [11] *((const byte*) D016) ← (const byte) VIC_CSEL
  to:main::toD0181
main::toD0181: scope:[main]  from main::@2
  [12] phi()
  to:main::@3
main::@3: scope:[main]  from main::toD0181
  [13] *((const byte*) D018) ← (const byte) main::toD0181_return#0
  [14] call bitmap_init 
  to:main::@4
main::@4: scope:[main]  from main::@3
  [15] phi()
  [16] call bitmap_clear 
  to:main::@5
main::@5: scope:[main]  from main::@4
  [17] phi()
  [18] call sin16s_gen2 
  to:main::@6
main::@6: scope:[main]  from main::@5
  [19] phi()
  [20] call render_sine 
  to:main::@1
main::@1: scope:[main]  from main::@1 main::@6
  [21] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL)
  to:main::@1

(void()) render_sine()
render_sine: scope:[render_sine]  from main::@6
  [22] phi()
  to:render_sine::@1
render_sine::@1: scope:[render_sine]  from render_sine render_sine::@3
  [23] (word) render_sine::xpos#3 ← phi( render_sine/(word) 0 render_sine::@3/(word) render_sine::xpos#9 )
  [23] (word) render_sine::sin_idx#2 ← phi( render_sine/(word) 0 render_sine::@3/(word) render_sine::sin_idx#1 )
  [24] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2
  to:render_sine::@return
render_sine::@return: scope:[render_sine]  from render_sine::@1
  [25] return 
  to:@return
render_sine::@2: scope:[render_sine]  from render_sine::@1
  [26] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1
  [27] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10
  [28] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1)
  [29] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0
  [30] call wrap_y 
  [31] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2
  to:render_sine::@4
render_sine::@4: scope:[render_sine]  from render_sine::@2
  [32] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0
  [33] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3
  [34] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0
  [35] call bitmap_plot 
  to:render_sine::@5
render_sine::@5: scope:[render_sine]  from render_sine::@4
  [36] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1
  [37] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11
  [38] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4)
  [39] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a
  [40] call wrap_y 
  [41] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2
  to:render_sine::@6
render_sine::@6: scope:[render_sine]  from render_sine::@5
  [42] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1
  [43] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3
  [44] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0
  [45] call bitmap_plot 
  to:render_sine::@7
render_sine::@7: scope:[render_sine]  from render_sine::@6
  [46] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3
  [47] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8
  to:render_sine::@3
render_sine::@8: scope:[render_sine]  from render_sine::@7
  [48] phi()
  to:render_sine::@3
render_sine::@3: scope:[render_sine]  from render_sine::@7 render_sine::@8
  [49] (word) render_sine::xpos#9 ← phi( render_sine::@8/(word) render_sine::xpos#1 render_sine::@7/(byte) 0 )
  [50] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2
  to:render_sine::@1

(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
bitmap_plot: scope:[bitmap_plot]  from render_sine::@4 render_sine::@6
  [51] (word) bitmap_plot::x#2 ← phi( render_sine::@6/(word) bitmap_plot::x#1 render_sine::@4/(word) bitmap_plot::x#0 )
  [51] (byte) bitmap_plot::y#2 ← phi( render_sine::@6/(byte) bitmap_plot::y#1 render_sine::@4/(byte) bitmap_plot::y#0 )
  [52] (word) bitmap_plot::plotter#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2)
  [53] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8
  [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
  [55] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2
  [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte*) bitmap_plot_bit + (byte~) bitmap_plot::$2)
  to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot]  from bitmap_plot
  [57] return 
  to:@return

(byte()) wrap_y((signed word) wrap_y::y)
wrap_y: scope:[wrap_y]  from render_sine::@2 render_sine::@5
  [58] (signed word) wrap_y::y#9 ← phi( render_sine::@5/(signed word) wrap_y::y#1 render_sine::@2/(signed word) wrap_y::y#0 )
  to:wrap_y::@1
wrap_y::@1: scope:[wrap_y]  from wrap_y wrap_y::@2
  [59] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 )
  [60] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2
  to:wrap_y::@3
wrap_y::@3: scope:[wrap_y]  from wrap_y::@1 wrap_y::@4
  [61] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 )
  [62] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4
  to:wrap_y::@5
wrap_y::@5: scope:[wrap_y]  from wrap_y::@3
  [63] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6
  to:wrap_y::@return
wrap_y::@return: scope:[wrap_y]  from wrap_y::@5
  [64] return 
  to:@return
wrap_y::@4: scope:[wrap_y]  from wrap_y::@3
  [65] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8
  to:wrap_y::@3
wrap_y::@2: scope:[wrap_y]  from wrap_y::@1
  [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8
  to:wrap_y::@1

(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max)
sin16s_gen2: scope:[sin16s_gen2]  from main::@5
  [67] phi()
  [68] call div32u16u 
  [69] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0
  to:sin16s_gen2::@3
sin16s_gen2::@3: scope:[sin16s_gen2]  from sin16s_gen2
  [70] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2
  to:sin16s_gen2::@1
sin16s_gen2::@1: scope:[sin16s_gen2]  from sin16s_gen2::@3 sin16s_gen2::@5
  [71] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@3/(const signed word*) sin sin16s_gen2::@5/(signed word*) sin16s_gen2::sintab#0 )
  [71] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@3/(dword) 0 sin16s_gen2::@5/(dword) sin16s_gen2::x#1 )
  [71] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@3/(word) 0 sin16s_gen2::@5/(word) sin16s_gen2::i#1 )
  [72] if((word) sin16s_gen2::i#2<(const word) SIN_SIZE) goto sin16s_gen2::@2
  to:sin16s_gen2::@return
sin16s_gen2::@return: scope:[sin16s_gen2]  from sin16s_gen2::@1
  [73] return 
  to:@return
sin16s_gen2::@2: scope:[sin16s_gen2]  from sin16s_gen2::@1
  [74] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2
  [75] call sin16s 
  [76] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1
  to:sin16s_gen2::@4
sin16s_gen2::@4: scope:[sin16s_gen2]  from sin16s_gen2::@2
  [77] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0
  [78] call mul16s 
  [79] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0
  to:sin16s_gen2::@5
sin16s_gen2::@5: scope:[sin16s_gen2]  from sin16s_gen2::@4
  [80] (signed dword~) sin16s_gen2::$6 ← (signed dword) mul16s::return#2
  [81] (word~) sin16s_gen2::$9 ← > (signed dword~) sin16s_gen2::$6
  [82] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$9
  [83] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD
  [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0
  [85] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2
  to:sin16s_gen2::@1

(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b)
mul16s: scope:[mul16s]  from sin16s_gen2::@4
  [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0
  [87] call mul16u 
  [88] (dword) mul16u::return#2 ← (dword) mul16u::res#2
  to:mul16s::@4
mul16s::@4: scope:[mul16s]  from mul16s
  [89] (dword) mul16s::m#0 ← (dword) mul16u::return#2
  [90] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1
  to:mul16s::@3
mul16s::@3: scope:[mul16s]  from mul16s::@4
  [91] (word~) mul16s::$9 ← > (dword) mul16s::m#0
  [92] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0
  [93] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16
  to:mul16s::@1
mul16s::@1: scope:[mul16s]  from mul16s::@3 mul16s::@4
  [94] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 )
  to:mul16s::@2
mul16s::@2: scope:[mul16s]  from mul16s::@1
  [95] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
  to:mul16s::@return
mul16s::@return: scope:[mul16s]  from mul16s::@2
  [96] return 
  to:@return

(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
mul16u: scope:[mul16u]  from mul16s mulu16_sel
  [97] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 )
  [97] (word) mul16u::b#2 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 )
  [98] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2
  to:mul16u::@1
mul16u::@1: scope:[mul16u]  from mul16u mul16u::@3
  [99] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 )
  [99] (dword) mul16u::res#2 ← phi( mul16u/(dword) 0 mul16u::@3/(dword) mul16u::res#6 )
  [99] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 )
  [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2
  to:mul16u::@return
mul16u::@return: scope:[mul16u]  from mul16u::@1
  [101] return 
  to:@return
mul16u::@2: scope:[mul16u]  from mul16u::@1
  [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1
  [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3
  to:mul16u::@4
mul16u::@4: scope:[mul16u]  from mul16u::@2
  [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2
  to:mul16u::@3
mul16u::@3: scope:[mul16u]  from mul16u::@2 mul16u::@4
  [105] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 )
  [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1
  [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1
  to:mul16u::@1

(signed word()) sin16s((dword) sin16s::x)
sin16s: scope:[sin16s]  from sin16s_gen2::@2
  [108] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1
  to:sin16s::@4
sin16s::@4: scope:[sin16s]  from sin16s
  [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28
  to:sin16s::@1
sin16s::@1: scope:[sin16s]  from sin16s sin16s::@4
  [110] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 )
  [110] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 )
  [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2
  to:sin16s::@5
sin16s::@5: scope:[sin16s]  from sin16s::@1
  [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28 - (dword) sin16s::x#4
  to:sin16s::@2
sin16s::@2: scope:[sin16s]  from sin16s::@1 sin16s::@5
  [113] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 )
  [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3
  [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4
  [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0
  [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0
  [118] call mulu16_sel 
  [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12
  to:sin16s::@7
sin16s::@7: scope:[sin16s]  from sin16s::@2
  [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0
  [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0
  [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0
  [123] call mulu16_sel 
  [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12
  to:sin16s::@8
sin16s::@8: scope:[sin16s]  from sin16s::@7
  [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1
  [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0
  [127] call mulu16_sel 
  [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12
  to:sin16s::@9
sin16s::@9: scope:[sin16s]  from sin16s::@8
  [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2
  [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0
  [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0
  [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0
  [133] call mulu16_sel 
  [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12
  to:sin16s::@10
sin16s::@10: scope:[sin16s]  from sin16s::@9
  [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10
  [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0
  [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0
  [138] call mulu16_sel 
  [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12
  to:sin16s::@11
sin16s::@11: scope:[sin16s]  from sin16s::@10
  [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11
  [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4
  [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0
  [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12
  to:sin16s::@6
sin16s::@6: scope:[sin16s]  from sin16s::@11
  [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1
  to:sin16s::@3
sin16s::@3: scope:[sin16s]  from sin16s::@12 sin16s::@6
  [145] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 )
  to:sin16s::@return
sin16s::@return: scope:[sin16s]  from sin16s::@3
  [146] return 
  to:@return
sin16s::@12: scope:[sin16s]  from sin16s::@11
  [147] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1
  to:sin16s::@3

(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
mulu16_sel: scope:[mulu16_sel]  from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9
  [148] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 )
  [148] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 )
  [148] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 )
  [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5
  [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5
  [151] call mul16u 
  [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2
  to:mulu16_sel::@1
mulu16_sel::@1: scope:[mulu16_sel]  from mulu16_sel
  [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3
  [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5
  [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1
  to:mulu16_sel::@return
mulu16_sel::@return: scope:[mulu16_sel]  from mulu16_sel::@1
  [156] return 
  to:@return

(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor)
div32u16u: scope:[div32u16u]  from sin16s_gen2
  [157] phi()
  [158] call divr16u 
  [159] (word) divr16u::return#2 ← (word) divr16u::return#0
  to:div32u16u::@1
div32u16u::@1: scope:[div32u16u]  from div32u16u
  [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2
  [161] (word) divr16u::rem#4 ← (word) rem16u#1
  [162] call divr16u 
  [163] (word) divr16u::return#3 ← (word) divr16u::return#0
  to:div32u16u::@2
div32u16u::@2: scope:[div32u16u]  from div32u16u::@1
  [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3
  [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0
  to:div32u16u::@return
div32u16u::@return: scope:[div32u16u]  from div32u16u::@2
  [166] return 
  to:@return

(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
divr16u: scope:[divr16u]  from div32u16u div32u16u::@1
  [167] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28 div32u16u::@1/<(const dword) PI2_u4f28 )
  [167] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 )
  to:divr16u::@1
divr16u::@1: scope:[divr16u]  from divr16u divr16u::@3
  [168] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 )
  [168] (word) divr16u::quotient#3 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::return#0 )
  [168] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 )
  [168] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 )
  [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1
  [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3
  [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80
  [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
  to:divr16u::@4
divr16u::@4: scope:[divr16u]  from divr16u::@1
  [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1
  to:divr16u::@2
divr16u::@2: scope:[divr16u]  from divr16u::@1 divr16u::@4
  [174] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 )
  [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1
  [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1
  [177] if((word) divr16u::rem#6<(const word) SIN_SIZE) goto divr16u::@3
  to:divr16u::@5
divr16u::@5: scope:[divr16u]  from divr16u::@2
  [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1
  [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE
  to:divr16u::@3
divr16u::@3: scope:[divr16u]  from divr16u::@2 divr16u::@5
  [180] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 )
  [180] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 )
  [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2
  [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1
  to:divr16u::@6
divr16u::@6: scope:[divr16u]  from divr16u::@3
  [183] (word) rem16u#1 ← (word) divr16u::rem#11
  to:divr16u::@return
divr16u::@return: scope:[divr16u]  from divr16u::@6
  [184] return 
  to:@return

(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
bitmap_clear: scope:[bitmap_clear]  from main::@4
  [185] phi()
  [186] call memset 
  to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear]  from bitmap_clear
  [187] phi()
  [188] call memset 
  to:bitmap_clear::@return
bitmap_clear::@return: scope:[bitmap_clear]  from bitmap_clear::@1
  [189] return 
  to:@return

(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset]  from bitmap_clear bitmap_clear::@1
  [190] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
  [190] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
  [190] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
  [191] if((word) memset::num#2<=(byte) 0) goto memset::@return
  to:memset::@1
memset::@1: scope:[memset]  from memset
  [192] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
  [193] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
  to:memset::@2
memset::@2: scope:[memset]  from memset::@1 memset::@3
  [194] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
  [195] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
  to:memset::@return
memset::@return: scope:[memset]  from memset memset::@2
  [196] return 
  to:@return
memset::@3: scope:[memset]  from memset::@2
  [197] *((byte*) memset::dst#2) ← (byte) memset::c#4
  [198] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  to:memset::@2

(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
bitmap_init: scope:[bitmap_init]  from main::@3
  [199] phi()
  to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init]  from bitmap_init bitmap_init::@2
  [200] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
  [200] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
  [201] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
  [202] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
  [203] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
  to:bitmap_init::@2
bitmap_init::@6: scope:[bitmap_init]  from bitmap_init::@1
  [204] phi()
  to:bitmap_init::@2
bitmap_init::@2: scope:[bitmap_init]  from bitmap_init::@1 bitmap_init::@6
  [205] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
  [206] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
  [207] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
  to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init]  from bitmap_init::@2 bitmap_init::@4
  [208] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
  [208] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
  [209] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
  [210] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
  [211] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
  [212] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
  [213] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
  [214] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
  [215] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
  to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init]  from bitmap_init::@3
  [216] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
  to:bitmap_init::@4
bitmap_init::@4: scope:[bitmap_init]  from bitmap_init::@3 bitmap_init::@5
  [217] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
  [218] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
  [219] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
  to:bitmap_init::@return
bitmap_init::@return: scope:[bitmap_init]  from bitmap_init::@4
  [220] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
(byte) bitmap_clear::fgcol
(byte*) bitmap_gfx
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
(byte~) bitmap_init::$4 22.0
(byte~) bitmap_init::$5 22.0
(byte~) bitmap_init::$6 22.0
(byte~) bitmap_init::$7 5.5
(byte) bitmap_init::bits
(byte) bitmap_init::bits#1 11.0
(byte) bitmap_init::bits#3 16.5
(byte) bitmap_init::bits#4 7.333333333333333
(byte*) bitmap_init::gfx
(byte*) bitmap_init::screen
(byte) bitmap_init::x
(byte) bitmap_init::x#1 16.5
(byte) bitmap_init::x#2 5.5
(byte) bitmap_init::y
(byte) bitmap_init::y#1 16.5
(byte) bitmap_init::y#2 5.5
(byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#1 22.0
(byte*) bitmap_init::yoffs#2 6.875
(byte*) bitmap_init::yoffs#4 11.0
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(word~) bitmap_plot::$1 4.0
(byte~) bitmap_plot::$2 4.0
(byte*) bitmap_plot::plotter
(word) bitmap_plot::plotter#0 1.0
(byte*) bitmap_plot::plotter#1 3.0
(word) bitmap_plot::x
(word) bitmap_plot::x#0 11.0
(word) bitmap_plot::x#1 11.0
(word) bitmap_plot::x#2 6.5
(byte) bitmap_plot::y
(byte) bitmap_plot::y#0 22.0
(byte) bitmap_plot::y#1 22.0
(byte) bitmap_plot::y#2 26.0
(byte*) bitmap_screen
(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor)
(dword) div32u16u::dividend
(word) div32u16u::divisor
(dword) div32u16u::quotient
(word) div32u16u::quotient_hi
(word) div32u16u::quotient_hi#0 0.8
(word) div32u16u::quotient_lo
(word) div32u16u::quotient_lo#0 4.0
(dword) div32u16u::return
(dword) div32u16u::return#0 1.3333333333333333
(dword) div32u16u::return#2 4.0
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
(byte~) divr16u::$1 22.0
(byte~) divr16u::$2 22.0
(word) divr16u::dividend
(word) divr16u::dividend#0 2.75
(word) divr16u::dividend#3 5.0
(word) divr16u::dividend#5 2.0
(word) divr16u::divisor
(byte) divr16u::i
(byte) divr16u::i#1 16.5
(byte) divr16u::i#2 1.6923076923076923
(word) divr16u::quotient
(word) divr16u::quotient#1 16.5
(word) divr16u::quotient#2 11.0
(word) divr16u::quotient#3 2.75
(word) divr16u::rem
(word) divr16u::rem#0 8.25
(word) divr16u::rem#1 22.0
(word) divr16u::rem#10 4.0
(word) divr16u::rem#11 11.666666666666666
(word) divr16u::rem#2 22.0
(word) divr16u::rem#4 4.0
(word) divr16u::rem#5 24.0
(word) divr16u::rem#6 11.0
(word) divr16u::return
(word) divr16u::return#0 5.285714285714286
(word) divr16u::return#2 4.0
(word) divr16u::return#3 4.0
(void()) main()
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(byte*) main::toD0181_screen
(byte*) main::vicSelectGfxBank1_gfx
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte) main::vicSelectGfxBank1_toDd001_return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(byte) memset::c
(byte) memset::c#4 1.375
(byte*) memset::dst
(byte*) memset::dst#1 22.0
(byte*) memset::dst#2 15.333333333333332
(byte*) memset::dst#4 4.0
(byte*) memset::end
(byte*) memset::end#0 2.1666666666666665
(word) memset::num
(word) memset::num#2 2.0
(void*) memset::return
(void*) memset::str
(void*) memset::str#3
(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b)
(word~) mul16s::$16 4.0
(word~) mul16s::$9 4.0
(signed word) mul16s::a
(signed word) mul16s::a#0 2.6
(signed word) mul16s::b
(dword) mul16s::m
(dword) mul16s::m#0 2.0
(dword) mul16s::m#1 4.0
(dword) mul16s::m#4 4.0
(signed dword) mul16s::return
(signed dword) mul16s::return#0 4.333333333333333
(signed dword) mul16s::return#2 22.0
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(byte~) mul16u::$1 202.0
(word) mul16u::a
(word) mul16u::a#0 101.0
(word) mul16u::a#1 4.0
(word) mul16u::a#2 2.0
(word) mul16u::a#3 67.66666666666666
(word) mul16u::a#6 3.0
(word) mul16u::b
(word) mul16u::b#1 4.0
(word) mul16u::b#2 2.0
(dword) mul16u::mb
(dword) mul16u::mb#0 4.0
(dword) mul16u::mb#1 202.0
(dword) mul16u::mb#2 43.57142857142858
(dword) mul16u::res
(dword) mul16u::res#1 202.0
(dword) mul16u::res#2 43.85714285714286
(dword) mul16u::res#6 101.0
(dword) mul16u::return
(dword) mul16u::return#2 4.0
(dword) mul16u::return#3 4.0
(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
(dword~) mulu16_sel::$0 4.0
(dword~) mulu16_sel::$1 4.0
(word) mulu16_sel::return
(word) mulu16_sel::return#0 4.0
(word) mulu16_sel::return#1 4.0
(word) mulu16_sel::return#10 4.0
(word) mulu16_sel::return#11 4.0
(word) mulu16_sel::return#12 1.714285714285714
(word) mulu16_sel::return#2 4.0
(byte) mulu16_sel::select
(byte) mulu16_sel::select#5 0.3333333333333333
(word) mulu16_sel::v1
(word) mulu16_sel::v1#0 2.0
(word) mulu16_sel::v1#1 2.0
(word) mulu16_sel::v1#2 4.0
(word) mulu16_sel::v1#3 2.0
(word) mulu16_sel::v1#4 2.0
(word) mulu16_sel::v1#5 12.0
(word) mulu16_sel::v2
(word) mulu16_sel::v2#0 4.0
(word) mulu16_sel::v2#1 4.0
(word) mulu16_sel::v2#3 4.0
(word) mulu16_sel::v2#4 4.0
(word) mulu16_sel::v2#5 5.0
(word) rem16u
(word) rem16u#1 0.8
(void()) render_sine()
(signed word*~) render_sine::$1 22.0
(word~) render_sine::$10 22.0
(word~) render_sine::$11 22.0
(signed word*~) render_sine::$4 22.0
(signed word) render_sine::sin2_val
(signed word) render_sine::sin2_val#0 22.0
(word) render_sine::sin_idx
(word) render_sine::sin_idx#1 22.0
(word) render_sine::sin_idx#2 2.1153846153846154
(signed word) render_sine::sin_val
(signed word) render_sine::sin_val#0 22.0
(word) render_sine::xpos
(word) render_sine::xpos#1 11.0
(word) render_sine::xpos#3 2.0
(word) render_sine::xpos#9 11.0
(byte) render_sine::ypos
(byte) render_sine::ypos#0 11.0
(byte) render_sine::ypos2
(byte) render_sine::ypos2#0 11.0
(signed word()) sin16s((dword) sin16s::x)
(dword~) sin16s::$4 4.0
(byte) sin16s::isUpper
(byte) sin16s::isUpper#2 0.06060606060606061
(signed word) sin16s::return
(signed word) sin16s::return#0 22.0
(signed word) sin16s::return#1 5.0
(signed word) sin16s::return#5 4.0
(signed word) sin16s::sinx
(signed word) sin16s::sinx#1 4.0
(word) sin16s::usinx
(word) sin16s::usinx#0 0.3333333333333333
(word) sin16s::usinx#1 1.0
(dword) sin16s::x
(dword) sin16s::x#0 8.5
(dword) sin16s::x#1 4.0
(dword) sin16s::x#2 4.0
(dword) sin16s::x#4 5.0
(dword) sin16s::x#6 6.0
(word) sin16s::x1
(word) sin16s::x1#0 0.6363636363636365
(word) sin16s::x2
(word) sin16s::x2#0 4.0
(word) sin16s::x3
(word) sin16s::x3#0 1.0
(word) sin16s::x3_6
(word) sin16s::x3_6#0 4.0
(word) sin16s::x4
(word) sin16s::x4#0 4.0
(word) sin16s::x5
(word) sin16s::x5#0 4.0
(word) sin16s::x5_128
(word) sin16s::x5_128#0 4.0
(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max)
(signed dword~) sin16s_gen2::$6 22.0
(word~) sin16s_gen2::$9 11.0
(signed word) sin16s_gen2::ampl
(word) sin16s_gen2::i
(word) sin16s_gen2::i#1 22.0
(word) sin16s_gen2::i#2 2.5384615384615383
(signed word) sin16s_gen2::max
(signed word) sin16s_gen2::min
(signed word) sin16s_gen2::offs
(signed word*) sin16s_gen2::sintab
(signed word*) sin16s_gen2::sintab#0 7.333333333333333
(signed word*) sin16s_gen2::sintab#2 3.0
(dword) sin16s_gen2::step
(dword) sin16s_gen2::step#0 0.8666666666666666
(word) sin16s_gen2::wavelength
(dword) sin16s_gen2::x
(dword) sin16s_gen2::x#1 11.0
(dword) sin16s_gen2::x#2 2.75
(byte()) wrap_y((signed word) wrap_y::y)
(byte) wrap_y::return
(byte) wrap_y::return#0 22.0
(byte) wrap_y::return#1 22.0
(byte) wrap_y::return#2 6.0
(signed word) wrap_y::y
(signed word) wrap_y::y#0 22.0
(signed word) wrap_y::y#1 22.0
(signed word) wrap_y::y#2 202.0
(signed word) wrap_y::y#3 202.0
(signed word) wrap_y::y#4 203.0
(signed word) wrap_y::y#6 202.0
(signed word) wrap_y::y#9 24.0

Initial phi equivalence classes
[ render_sine::sin_idx#2 render_sine::sin_idx#1 ]
[ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 ]
[ bitmap_plot::y#2 bitmap_plot::y#1 bitmap_plot::y#0 ]
[ bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ]
[ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 ]
[ sin16s_gen2::i#2 sin16s_gen2::i#1 ]
[ sin16s_gen2::x#2 sin16s_gen2::x#1 ]
[ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
[ mul16s::m#4 mul16s::m#1 mul16s::m#0 ]
[ mul16u::b#2 mul16u::b#1 ]
[ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ]
[ mul16u::res#2 mul16u::res#6 mul16u::res#1 ]
[ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
[ sin16s::isUpper#2 ]
[ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ]
[ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ]
[ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ]
[ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ]
[ mulu16_sel::select#5 ]
[ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
[ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ]
[ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ]
[ divr16u::i#2 divr16u::i#1 ]
[ memset::num#2 ]
[ memset::str#3 ]
[ memset::c#4 ]
[ memset::dst#2 memset::dst#4 memset::dst#1 ]
[ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
[ bitmap_init::x#2 bitmap_init::x#1 ]
[ bitmap_init::y#2 bitmap_init::y#1 ]
[ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
Added variable render_sine::$10 to live range equivalence class [ render_sine::$10 ]
Added variable render_sine::$1 to live range equivalence class [ render_sine::$1 ]
Added variable render_sine::sin_val#0 to live range equivalence class [ render_sine::sin_val#0 ]
Added variable wrap_y::return#0 to live range equivalence class [ wrap_y::return#0 ]
Added variable render_sine::ypos#0 to live range equivalence class [ render_sine::ypos#0 ]
Added variable render_sine::$11 to live range equivalence class [ render_sine::$11 ]
Added variable render_sine::$4 to live range equivalence class [ render_sine::$4 ]
Added variable render_sine::sin2_val#0 to live range equivalence class [ render_sine::sin2_val#0 ]
Added variable wrap_y::return#1 to live range equivalence class [ wrap_y::return#1 ]
Added variable render_sine::ypos2#0 to live range equivalence class [ render_sine::ypos2#0 ]
Added variable bitmap_plot::plotter#0 to live range equivalence class [ bitmap_plot::plotter#0 ]
Added variable bitmap_plot::$1 to live range equivalence class [ bitmap_plot::$1 ]
Added variable bitmap_plot::plotter#1 to live range equivalence class [ bitmap_plot::plotter#1 ]
Added variable bitmap_plot::$2 to live range equivalence class [ bitmap_plot::$2 ]
Added variable wrap_y::return#2 to live range equivalence class [ wrap_y::return#2 ]
Added variable div32u16u::return#2 to live range equivalence class [ div32u16u::return#2 ]
Added variable sin16s_gen2::step#0 to live range equivalence class [ sin16s_gen2::step#0 ]
Added variable sin16s::return#0 to live range equivalence class [ sin16s::return#0 ]
Added variable mul16s::a#0 to live range equivalence class [ mul16s::a#0 ]
Added variable mul16s::return#2 to live range equivalence class [ mul16s::return#2 ]
Added variable sin16s_gen2::$6 to live range equivalence class [ sin16s_gen2::$6 ]
Added variable sin16s_gen2::$9 to live range equivalence class [ sin16s_gen2::$9 ]
Added variable mul16u::return#2 to live range equivalence class [ mul16u::return#2 ]
Added variable mul16s::$9 to live range equivalence class [ mul16s::$9 ]
Added variable mul16s::$16 to live range equivalence class [ mul16s::$16 ]
Added variable mul16s::return#0 to live range equivalence class [ mul16s::return#0 ]
Added variable mul16u::$1 to live range equivalence class [ mul16u::$1 ]
Added variable sin16s::$4 to live range equivalence class [ sin16s::$4 ]
Added variable sin16s::x1#0 to live range equivalence class [ sin16s::x1#0 ]
Added variable mulu16_sel::return#0 to live range equivalence class [ mulu16_sel::return#0 ]
Added variable sin16s::x2#0 to live range equivalence class [ sin16s::x2#0 ]
Added variable mulu16_sel::return#1 to live range equivalence class [ mulu16_sel::return#1 ]
Added variable sin16s::x3#0 to live range equivalence class [ sin16s::x3#0 ]
Added variable mulu16_sel::return#2 to live range equivalence class [ mulu16_sel::return#2 ]
Added variable sin16s::x3_6#0 to live range equivalence class [ sin16s::x3_6#0 ]
Added variable sin16s::usinx#0 to live range equivalence class [ sin16s::usinx#0 ]
Added variable mulu16_sel::return#10 to live range equivalence class [ mulu16_sel::return#10 ]
Added variable sin16s::x4#0 to live range equivalence class [ sin16s::x4#0 ]
Added variable mulu16_sel::return#11 to live range equivalence class [ mulu16_sel::return#11 ]
Added variable sin16s::x5#0 to live range equivalence class [ sin16s::x5#0 ]
Added variable sin16s::x5_128#0 to live range equivalence class [ sin16s::x5_128#0 ]
Added variable sin16s::usinx#1 to live range equivalence class [ sin16s::usinx#1 ]
Added variable mul16u::return#3 to live range equivalence class [ mul16u::return#3 ]
Added variable mulu16_sel::$0 to live range equivalence class [ mulu16_sel::$0 ]
Added variable mulu16_sel::$1 to live range equivalence class [ mulu16_sel::$1 ]
Added variable mulu16_sel::return#12 to live range equivalence class [ mulu16_sel::return#12 ]
Added variable divr16u::return#2 to live range equivalence class [ divr16u::return#2 ]
Added variable div32u16u::quotient_hi#0 to live range equivalence class [ div32u16u::quotient_hi#0 ]
Added variable divr16u::return#3 to live range equivalence class [ divr16u::return#3 ]
Added variable div32u16u::quotient_lo#0 to live range equivalence class [ div32u16u::quotient_lo#0 ]
Added variable div32u16u::return#0 to live range equivalence class [ div32u16u::return#0 ]
Added variable divr16u::$1 to live range equivalence class [ divr16u::$1 ]
Added variable divr16u::$2 to live range equivalence class [ divr16u::$2 ]
Added variable rem16u#1 to live range equivalence class [ rem16u#1 ]
Added variable memset::end#0 to live range equivalence class [ memset::end#0 ]
Added variable bitmap_init::$7 to live range equivalence class [ bitmap_init::$7 ]
Added variable bitmap_init::$4 to live range equivalence class [ bitmap_init::$4 ]
Added variable bitmap_init::$5 to live range equivalence class [ bitmap_init::$5 ]
Added variable bitmap_init::$6 to live range equivalence class [ bitmap_init::$6 ]
Complete equivalence classes
[ render_sine::sin_idx#2 render_sine::sin_idx#1 ]
[ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 ]
[ bitmap_plot::y#2 bitmap_plot::y#1 bitmap_plot::y#0 ]
[ bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ]
[ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 ]
[ sin16s_gen2::i#2 sin16s_gen2::i#1 ]
[ sin16s_gen2::x#2 sin16s_gen2::x#1 ]
[ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
[ mul16s::m#4 mul16s::m#1 mul16s::m#0 ]
[ mul16u::b#2 mul16u::b#1 ]
[ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ]
[ mul16u::res#2 mul16u::res#6 mul16u::res#1 ]
[ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
[ sin16s::isUpper#2 ]
[ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ]
[ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ]
[ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ]
[ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ]
[ mulu16_sel::select#5 ]
[ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
[ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ]
[ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ]
[ divr16u::i#2 divr16u::i#1 ]
[ memset::num#2 ]
[ memset::str#3 ]
[ memset::c#4 ]
[ memset::dst#2 memset::dst#4 memset::dst#1 ]
[ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
[ bitmap_init::x#2 bitmap_init::x#1 ]
[ bitmap_init::y#2 bitmap_init::y#1 ]
[ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
[ render_sine::$10 ]
[ render_sine::$1 ]
[ render_sine::sin_val#0 ]
[ wrap_y::return#0 ]
[ render_sine::ypos#0 ]
[ render_sine::$11 ]
[ render_sine::$4 ]
[ render_sine::sin2_val#0 ]
[ wrap_y::return#1 ]
[ render_sine::ypos2#0 ]
[ bitmap_plot::plotter#0 ]
[ bitmap_plot::$1 ]
[ bitmap_plot::plotter#1 ]
[ bitmap_plot::$2 ]
[ wrap_y::return#2 ]
[ div32u16u::return#2 ]
[ sin16s_gen2::step#0 ]
[ sin16s::return#0 ]
[ mul16s::a#0 ]
[ mul16s::return#2 ]
[ sin16s_gen2::$6 ]
[ sin16s_gen2::$9 ]
[ mul16u::return#2 ]
[ mul16s::$9 ]
[ mul16s::$16 ]
[ mul16s::return#0 ]
[ mul16u::$1 ]
[ sin16s::$4 ]
[ sin16s::x1#0 ]
[ mulu16_sel::return#0 ]
[ sin16s::x2#0 ]
[ mulu16_sel::return#1 ]
[ sin16s::x3#0 ]
[ mulu16_sel::return#2 ]
[ sin16s::x3_6#0 ]
[ sin16s::usinx#0 ]
[ mulu16_sel::return#10 ]
[ sin16s::x4#0 ]
[ mulu16_sel::return#11 ]
[ sin16s::x5#0 ]
[ sin16s::x5_128#0 ]
[ sin16s::usinx#1 ]
[ mul16u::return#3 ]
[ mulu16_sel::$0 ]
[ mulu16_sel::$1 ]
[ mulu16_sel::return#12 ]
[ divr16u::return#2 ]
[ div32u16u::quotient_hi#0 ]
[ divr16u::return#3 ]
[ div32u16u::quotient_lo#0 ]
[ div32u16u::return#0 ]
[ divr16u::$1 ]
[ divr16u::$2 ]
[ rem16u#1 ]
[ memset::end#0 ]
[ bitmap_init::$7 ]
[ bitmap_init::$4 ]
[ bitmap_init::$5 ]
[ bitmap_init::$6 ]
Allocated zp[2]:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ]
Allocated zp[2]:4 [ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 ]
Allocated zp[1]:6 [ bitmap_plot::y#2 bitmap_plot::y#1 bitmap_plot::y#0 ]
Allocated zp[2]:7 [ bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ]
Allocated zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 ]
Allocated zp[2]:11 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ]
Allocated zp[4]:13 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ]
Allocated zp[2]:17 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
Allocated zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ]
Allocated zp[2]:23 [ mul16u::b#2 mul16u::b#1 ]
Allocated zp[2]:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ]
Allocated zp[4]:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ]
Allocated zp[4]:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
Allocated zp[1]:35 [ sin16s::isUpper#2 ]
Allocated zp[4]:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ]
Allocated zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ]
Allocated zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ]
Allocated zp[2]:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ]
Allocated zp[1]:46 [ mulu16_sel::select#5 ]
Allocated zp[2]:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
Allocated zp[2]:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ]
Allocated zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ]
Allocated zp[1]:53 [ divr16u::i#2 divr16u::i#1 ]
Allocated zp[2]:54 [ memset::num#2 ]
Allocated zp[2]:56 [ memset::str#3 ]
Allocated zp[1]:58 [ memset::c#4 ]
Allocated zp[2]:59 [ memset::dst#2 memset::dst#4 memset::dst#1 ]
Allocated zp[1]:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
Allocated zp[1]:62 [ bitmap_init::x#2 bitmap_init::x#1 ]
Allocated zp[1]:63 [ bitmap_init::y#2 bitmap_init::y#1 ]
Allocated zp[2]:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
Allocated zp[2]:66 [ render_sine::$10 ]
Allocated zp[2]:68 [ render_sine::$1 ]
Allocated zp[2]:70 [ render_sine::sin_val#0 ]
Allocated zp[1]:72 [ wrap_y::return#0 ]
Allocated zp[1]:73 [ render_sine::ypos#0 ]
Allocated zp[2]:74 [ render_sine::$11 ]
Allocated zp[2]:76 [ render_sine::$4 ]
Allocated zp[2]:78 [ render_sine::sin2_val#0 ]
Allocated zp[1]:80 [ wrap_y::return#1 ]
Allocated zp[1]:81 [ render_sine::ypos2#0 ]
Allocated zp[2]:82 [ bitmap_plot::plotter#0 ]
Allocated zp[2]:84 [ bitmap_plot::$1 ]
Allocated zp[2]:86 [ bitmap_plot::plotter#1 ]
Allocated zp[1]:88 [ bitmap_plot::$2 ]
Allocated zp[1]:89 [ wrap_y::return#2 ]
Allocated zp[4]:90 [ div32u16u::return#2 ]
Allocated zp[4]:94 [ sin16s_gen2::step#0 ]
Allocated zp[2]:98 [ sin16s::return#0 ]
Allocated zp[2]:100 [ mul16s::a#0 ]
Allocated zp[4]:102 [ mul16s::return#2 ]
Allocated zp[4]:106 [ sin16s_gen2::$6 ]
Allocated zp[2]:110 [ sin16s_gen2::$9 ]
Allocated zp[4]:112 [ mul16u::return#2 ]
Allocated zp[2]:116 [ mul16s::$9 ]
Allocated zp[2]:118 [ mul16s::$16 ]
Allocated zp[4]:120 [ mul16s::return#0 ]
Allocated zp[1]:124 [ mul16u::$1 ]
Allocated zp[4]:125 [ sin16s::$4 ]
Allocated zp[2]:129 [ sin16s::x1#0 ]
Allocated zp[2]:131 [ mulu16_sel::return#0 ]
Allocated zp[2]:133 [ sin16s::x2#0 ]
Allocated zp[2]:135 [ mulu16_sel::return#1 ]
Allocated zp[2]:137 [ sin16s::x3#0 ]
Allocated zp[2]:139 [ mulu16_sel::return#2 ]
Allocated zp[2]:141 [ sin16s::x3_6#0 ]
Allocated zp[2]:143 [ sin16s::usinx#0 ]
Allocated zp[2]:145 [ mulu16_sel::return#10 ]
Allocated zp[2]:147 [ sin16s::x4#0 ]
Allocated zp[2]:149 [ mulu16_sel::return#11 ]
Allocated zp[2]:151 [ sin16s::x5#0 ]
Allocated zp[2]:153 [ sin16s::x5_128#0 ]
Allocated zp[2]:155 [ sin16s::usinx#1 ]
Allocated zp[4]:157 [ mul16u::return#3 ]
Allocated zp[4]:161 [ mulu16_sel::$0 ]
Allocated zp[4]:165 [ mulu16_sel::$1 ]
Allocated zp[2]:169 [ mulu16_sel::return#12 ]
Allocated zp[2]:171 [ divr16u::return#2 ]
Allocated zp[2]:173 [ div32u16u::quotient_hi#0 ]
Allocated zp[2]:175 [ divr16u::return#3 ]
Allocated zp[2]:177 [ div32u16u::quotient_lo#0 ]
Allocated zp[4]:179 [ div32u16u::return#0 ]
Allocated zp[1]:183 [ divr16u::$1 ]
Allocated zp[1]:184 [ divr16u::$2 ]
Allocated zp[2]:185 [ rem16u#1 ]
Allocated zp[2]:187 [ memset::end#0 ]
Allocated zp[1]:189 [ bitmap_init::$7 ]
Allocated zp[1]:190 [ bitmap_init::$4 ]
Allocated zp[1]:191 [ bitmap_init::$5 ]
Allocated zp[1]:192 [ bitmap_init::$6 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Generate a big sinus and plot it on a bitmap
  // 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
  .label BGCOL = $d021
  .label D011 = $d011
  .const VIC_BMM = $20
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label D016 = $d016
  .const VIC_CSEL = 8
  .label D018 = $d018
  // 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
  .const WHITE = 1
  // PI*2 in u[4.28] format
  .const PI2_u4f28 = $6487ed51
  // PI in u[4.28] format
  .const PI_u4f28 = $3243f6a9
  // PI/2 in u[4.28] format
  .const PI_HALF_u4f28 = $1921fb54
  .const SIN_SIZE = $200
  .const SIZEOF_SIGNED_WORD = 2
  .label SCREEN = $400
  .label BITMAP = $2000
  // Remainder after unsigned 16-bit division
  .label rem16u = $b9
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .const vicSelectGfxBank1_toDd001_return = 3
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
    // asm { sei  }
    sei
    // [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 
    // Disable normal interrupt
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [7] *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_BMM|VIC_DEN|VIC_RSEL|3
    sta D011
    jmp vicSelectGfxBank1
    // main::vicSelectGfxBank1
  vicSelectGfxBank1:
    // [8] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
    // [9] 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:
    // [10] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
    jmp __b2
    // main::@2
  __b2:
    // [11] *((const byte*) D016) ← (const byte) VIC_CSEL -- _deref_pbuc1=vbuc2 
    lda #VIC_CSEL
    sta D016
    // [12] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181]
  toD0181_from___b2:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp __b3
    // main::@3
  __b3:
    // [13] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [14] call bitmap_init 
    // [199] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init]
  bitmap_init_from___b3:
    jsr bitmap_init
    // [15] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  __b4_from___b3:
    jmp __b4
    // main::@4
  __b4:
    // [16] call bitmap_clear 
    // [185] phi from main::@4 to bitmap_clear [phi:main::@4->bitmap_clear]
  bitmap_clear_from___b4:
    jsr bitmap_clear
    // [17] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [18] call sin16s_gen2 
    // [67] phi from main::@5 to sin16s_gen2 [phi:main::@5->sin16s_gen2]
  sin16s_gen2_from___b5:
    jsr sin16s_gen2
    // [19] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [20] call render_sine 
    // [22] phi from main::@6 to render_sine [phi:main::@6->render_sine]
  render_sine_from___b6:
    jsr render_sine
    jmp __b1
    // main::@1
  __b1:
    // [21] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
    jmp __b1
}
  // render_sine
render_sine: {
    .label __1 = $44
    .label __4 = $4c
    .label __10 = $42
    .label __11 = $4a
    .label sin_val = $46
    .label ypos = $49
    .label sin2_val = $4e
    .label ypos2 = $51
    .label xpos = 4
    .label sin_idx = 2
    // [23] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1]
  __b1_from_render_sine:
    // [23] phi (word) render_sine::xpos#3 = (word) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z xpos
    lda #>0
    sta.z xpos+1
    // [23] phi (word) render_sine::sin_idx#2 = (word) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z sin_idx
    lda #>0
    sta.z sin_idx+1
    jmp __b1
    // render_sine::@1
  __b1:
    // [24] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2 -- vwuz1_lt_vwuc1_then_la1 
    lda.z sin_idx+1
    cmp #>SIN_SIZE
    bcc __b2
    bne !+
    lda.z sin_idx
    cmp #<SIN_SIZE
    bcc __b2
  !:
    jmp __breturn
    // render_sine::@return
  __breturn:
    // [25] return 
    rts
    // render_sine::@2
  __b2:
    // [26] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 
    lda.z sin_idx
    asl
    sta.z __10
    lda.z sin_idx+1
    rol
    sta.z __10+1
    // [27] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz2 
    lda.z __10
    clc
    adc #<sin
    sta.z __1
    lda.z __10+1
    adc #>sin
    sta.z __1+1
    // [28] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1) -- vwsz1=_deref_pwsz2 
    ldy #0
    lda (__1),y
    sta.z sin_val
    iny
    lda (__1),y
    sta.z sin_val+1
    // [29] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 -- vwsz1=vwsz2 
    lda.z sin_val
    sta.z wrap_y.y
    lda.z sin_val+1
    sta.z wrap_y.y+1
    // [30] call wrap_y 
    // [58] phi from render_sine::@2 to wrap_y [phi:render_sine::@2->wrap_y]
  wrap_y_from___b2:
    // [58] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@2->wrap_y#0] -- register_copy 
    jsr wrap_y
    // [31] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 -- vbuz1=vbuz2 
    lda.z wrap_y.return_2
    sta.z wrap_y.return
    jmp __b4
    // render_sine::@4
  __b4:
    // [32] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuz1=vbuz2 
    lda.z wrap_y.return
    sta.z ypos
    // [33] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 -- vwuz1=vwuz2 
    lda.z xpos
    sta.z bitmap_plot.x
    lda.z xpos+1
    sta.z bitmap_plot.x+1
    // [34] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 -- vbuz1=vbuz2 
    lda.z ypos
    sta.z bitmap_plot.y
    // [35] call bitmap_plot 
    // [51] phi from render_sine::@4 to bitmap_plot [phi:render_sine::@4->bitmap_plot]
  bitmap_plot_from___b4:
    // [51] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@4->bitmap_plot#0] -- register_copy 
    // [51] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@4->bitmap_plot#1] -- register_copy 
    jsr bitmap_plot
    jmp __b5
    // render_sine::@5
  __b5:
    // [36] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 
    lda.z sin_idx
    asl
    sta.z __11
    lda.z sin_idx+1
    rol
    sta.z __11+1
    // [37] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz2 
    lda.z __11
    clc
    adc #<sin2
    sta.z __4
    lda.z __11+1
    adc #>sin2
    sta.z __4+1
    // [38] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4) -- vwsz1=_deref_pwsz2 
    ldy #0
    lda (__4),y
    sta.z sin2_val
    iny
    lda (__4),y
    sta.z sin2_val+1
    // [39] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz2_plus_vbsc1 
    lda.z sin2_val
    clc
    adc #<$a
    sta.z wrap_y.y
    lda.z sin2_val+1
    adc #>$a
    sta.z wrap_y.y+1
    // [40] call wrap_y 
    // [58] phi from render_sine::@5 to wrap_y [phi:render_sine::@5->wrap_y]
  wrap_y_from___b5:
    // [58] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@5->wrap_y#0] -- register_copy 
    jsr wrap_y
    // [41] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 -- vbuz1=vbuz2 
    lda.z wrap_y.return_2
    sta.z wrap_y.return_1
    jmp __b6
    // render_sine::@6
  __b6:
    // [42] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuz1=vbuz2 
    lda.z wrap_y.return_1
    sta.z ypos2
    // [43] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 -- vwuz1=vwuz2 
    lda.z xpos
    sta.z bitmap_plot.x
    lda.z xpos+1
    sta.z bitmap_plot.x+1
    // [44] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 -- vbuz1=vbuz2 
    lda.z ypos2
    sta.z bitmap_plot.y
    // [45] call bitmap_plot 
    // [51] phi from render_sine::@6 to bitmap_plot [phi:render_sine::@6->bitmap_plot]
  bitmap_plot_from___b6:
    // [51] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@6->bitmap_plot#0] -- register_copy 
    // [51] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@6->bitmap_plot#1] -- register_copy 
    jsr bitmap_plot
    jmp __b7
    // render_sine::@7
  __b7:
    // [46] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 
    inc.z xpos
    bne !+
    inc.z xpos+1
  !:
    // [47] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8 -- vwuz1_neq_vwuc1_then_la1 
    lda.z xpos+1
    cmp #>$140
    bne __b8_from___b7
    lda.z xpos
    cmp #<$140
    bne __b8_from___b7
    // [49] phi from render_sine::@7 to render_sine::@3 [phi:render_sine::@7->render_sine::@3]
  __b3_from___b7:
    // [49] phi (word) render_sine::xpos#9 = (byte) 0 [phi:render_sine::@7->render_sine::@3#0] -- vwuz1=vbuc1 
    lda #<0
    sta.z xpos
    lda #>0
    sta.z xpos+1
    jmp __b3
    // [48] phi from render_sine::@7 to render_sine::@8 [phi:render_sine::@7->render_sine::@8]
  __b8_from___b7:
    jmp __b8
    // render_sine::@8
  __b8:
    // [49] phi from render_sine::@8 to render_sine::@3 [phi:render_sine::@8->render_sine::@3]
  __b3_from___b8:
    // [49] phi (word) render_sine::xpos#9 = (word) render_sine::xpos#1 [phi:render_sine::@8->render_sine::@3#0] -- register_copy 
    jmp __b3
    // render_sine::@3
  __b3:
    // [50] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 
    inc.z sin_idx
    bne !+
    inc.z sin_idx+1
  !:
    // [23] phi from render_sine::@3 to render_sine::@1 [phi:render_sine::@3->render_sine::@1]
  __b1_from___b3:
    // [23] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#9 [phi:render_sine::@3->render_sine::@1#0] -- register_copy 
    // [23] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@3->render_sine::@1#1] -- register_copy 
    jmp __b1
}
  // bitmap_plot
// Plot a single dot in the bitmap
// bitmap_plot(word zp(7) x, byte zp(6) y)
bitmap_plot: {
    .label __1 = $54
    .label __2 = $58
    .label plotter = $52
    .label plotter_1 = $56
    .label x = 7
    .label y = 6
    // [52] (word) bitmap_plot::plotter#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 
    ldy.z y
    lda bitmap_plot_yhi,y
    sta.z plotter+1
    lda bitmap_plot_ylo,y
    sta.z plotter
    // [53] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 
    lda.z x
    and #<$fff8
    sta.z __1
    lda.z x+1
    and #>$fff8
    sta.z __1+1
    // [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 -- pbuz1=pbuz2_plus_vwuz3 
    lda.z plotter
    clc
    adc.z __1
    sta.z plotter_1
    lda.z plotter+1
    adc.z __1+1
    sta.z plotter_1+1
    // [55] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuz1=_lo_vwuz2 
    lda.z x
    sta.z __2
    // [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte*) bitmap_plot_bit + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 
    ldy #0
    lda (plotter_1),y
    ldy.z __2
    ora bitmap_plot_bit,y
    ldy #0
    sta (plotter_1),y
    jmp __breturn
    // bitmap_plot::@return
  __breturn:
    // [57] return 
    rts
}
  // wrap_y
// wrap_y(signed word zp(9) y)
wrap_y: {
    .label y = 9
    .label return = $48
    .label return_1 = $50
    .label return_2 = $59
    // [59] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1]
  __b1_from_wrap_y:
  __b1_from___b2:
    // [59] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy 
    jmp __b1
    // wrap_y::@1
  __b1:
    // [60] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 
    lda.z y
    cmp #<$c8
    lda.z y+1
    sbc #>$c8
    bvc !+
    eor #$80
  !:
    bpl __b2
    // [61] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3]
  __b3_from___b1:
  __b3_from___b4:
    // [61] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy 
    jmp __b3
    // wrap_y::@3
  __b3:
    // [62] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 
    lda.z y+1
    bmi __b4
    jmp __b5
    // wrap_y::@5
  __b5:
    // [63] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuz1=_byte_vwsz2 
    lda.z y
    sta.z return_2
    jmp __breturn
    // wrap_y::@return
  __breturn:
    // [64] return 
    rts
    // wrap_y::@4
  __b4:
    // [65] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 
    clc
    lda.z y
    adc #<$c8
    sta.z y
    lda.z y+1
    adc #>$c8
    sta.z y+1
    jmp __b3_from___b4
    // wrap_y::@2
  __b2:
    // [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 
    lda.z y
    sec
    sbc #<$c8
    sta.z y
    lda.z y+1
    sbc #>$c8
    sta.z y+1
    jmp __b1_from___b2
}
  // sin16s_gen2
// Generate signed word sinus table - with values in the range min-max.
// sintab - the table to generate into
// wavelength - the number of sinus points in a total sinus wavelength (the size of the table)
// sin16s_gen2(signed word* zp($11) sintab)
sin16s_gen2: {
    .const min = -$140
    .const max = $140
    .label ampl = max-min
    .label __6 = $6a
    .label __9 = $6e
    .label step = $5e
    .label sintab = $11
    // u[4.28]
    // Iterate over the table
    .label x = $d
    .label i = $b
    // [68] call div32u16u 
    // [157] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u]
  div32u16u_from_sin16s_gen2:
    jsr div32u16u
    // [69] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 
    lda.z div32u16u.return
    sta.z div32u16u.return_1
    lda.z div32u16u.return+1
    sta.z div32u16u.return_1+1
    lda.z div32u16u.return+2
    sta.z div32u16u.return_1+2
    lda.z div32u16u.return+3
    sta.z div32u16u.return_1+3
    jmp __b3
    // sin16s_gen2::@3
  __b3:
    // [70] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 
    lda.z div32u16u.return_1
    sta.z step
    lda.z div32u16u.return_1+1
    sta.z step+1
    lda.z div32u16u.return_1+2
    sta.z step+2
    lda.z div32u16u.return_1+3
    sta.z step+3
    // [71] phi from sin16s_gen2::@3 to sin16s_gen2::@1 [phi:sin16s_gen2::@3->sin16s_gen2::@1]
  __b1_from___b3:
    // [71] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word*) sin [phi:sin16s_gen2::@3->sin16s_gen2::@1#0] -- pwsz1=pwsc1 
    lda #<sin
    sta.z sintab
    lda #>sin
    sta.z sintab+1
    // [71] phi (dword) sin16s_gen2::x#2 = (dword) 0 [phi:sin16s_gen2::@3->sin16s_gen2::@1#1] -- vduz1=vduc1 
    lda #<0
    sta.z x
    lda #>0
    sta.z x+1
    lda #<0>>$10
    sta.z x+2
    lda #>0>>$10
    sta.z x+3
    // [71] phi (word) sin16s_gen2::i#2 = (word) 0 [phi:sin16s_gen2::@3->sin16s_gen2::@1#2] -- vwuz1=vwuc1 
    lda #<0
    sta.z i
    lda #>0
    sta.z i+1
    jmp __b1
  // u[4.28]
    // sin16s_gen2::@1
  __b1:
    // [72] if((word) sin16s_gen2::i#2<(const word) SIN_SIZE) goto sin16s_gen2::@2 -- vwuz1_lt_vwuc1_then_la1 
    lda.z i+1
    cmp #>SIN_SIZE
    bcc __b2
    bne !+
    lda.z i
    cmp #<SIN_SIZE
    bcc __b2
  !:
    jmp __breturn
    // sin16s_gen2::@return
  __breturn:
    // [73] return 
    rts
    // sin16s_gen2::@2
  __b2:
    // [74] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 
    lda.z x
    sta.z sin16s.x
    lda.z x+1
    sta.z sin16s.x+1
    lda.z x+2
    sta.z sin16s.x+2
    lda.z x+3
    sta.z sin16s.x+3
    // [75] call sin16s 
    jsr sin16s
    // [76] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 
    lda.z sin16s.return_1
    sta.z sin16s.return
    lda.z sin16s.return_1+1
    sta.z sin16s.return+1
    jmp __b4
    // sin16s_gen2::@4
  __b4:
    // [77] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 
    lda.z sin16s.return
    sta.z mul16s.a
    lda.z sin16s.return+1
    sta.z mul16s.a+1
    // [78] call mul16s 
    jsr mul16s
    // [79] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 
    lda.z mul16s.return
    sta.z mul16s.return_1
    lda.z mul16s.return+1
    sta.z mul16s.return_1+1
    lda.z mul16s.return+2
    sta.z mul16s.return_1+2
    lda.z mul16s.return+3
    sta.z mul16s.return_1+3
    jmp __b5
    // sin16s_gen2::@5
  __b5:
    // [80] (signed dword~) sin16s_gen2::$6 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 
    lda.z mul16s.return_1
    sta.z __6
    lda.z mul16s.return_1+1
    sta.z __6+1
    lda.z mul16s.return_1+2
    sta.z __6+2
    lda.z mul16s.return_1+3
    sta.z __6+3
    // [81] (word~) sin16s_gen2::$9 ← > (signed dword~) sin16s_gen2::$6 -- vwuz1=_hi_vdsz2 
    lda.z __6+2
    sta.z __9
    lda.z __6+3
    sta.z __9+1
    // [82] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$9 -- _deref_pwsz1=vwsz2 
    ldy #0
    lda.z __9
    sta (sintab),y
    iny
    lda.z __9+1
    sta (sintab),y
    // [83] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 
    lda #SIZEOF_SIGNED_WORD
    clc
    adc.z sintab
    sta.z sintab
    bcc !+
    inc.z sintab+1
  !:
    // [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 
    lda.z x
    clc
    adc.z step
    sta.z x
    lda.z x+1
    adc.z step+1
    sta.z x+1
    lda.z x+2
    adc.z step+2
    sta.z x+2
    lda.z x+3
    adc.z step+3
    sta.z x+3
    // [85] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [71] phi from sin16s_gen2::@5 to sin16s_gen2::@1 [phi:sin16s_gen2::@5->sin16s_gen2::@1]
  __b1_from___b5:
    // [71] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@5->sin16s_gen2::@1#0] -- register_copy 
    // [71] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@5->sin16s_gen2::@1#1] -- register_copy 
    // [71] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@5->sin16s_gen2::@1#2] -- register_copy 
    jmp __b1
}
  // mul16s
// Multiply of two signed words to a signed double word
// Fixes offsets introduced by using unsigned multiplication
// mul16s(signed word zp($64) a)
mul16s: {
    .label __9 = $74
    .label __16 = $76
    .label m = $13
    .label return = $78
    .label a = $64
    .label return_1 = $66
    // [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 -- vwuz1=vwuz2 
    lda.z a
    sta.z mul16u.a
    lda.z a+1
    sta.z mul16u.a+1
    // [87] call mul16u 
    // [97] phi from mul16s to mul16u [phi:mul16s->mul16u]
  mul16u_from_mul16s:
    // [97] phi (word) mul16u::a#6 = (word) mul16u::a#1 [phi:mul16s->mul16u#0] -- register_copy 
    // [97] phi (word) mul16u::b#2 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vwuz1=vwuc1 
    lda #<sin16s_gen2.ampl
    sta.z mul16u.b
    lda #>sin16s_gen2.ampl
    sta.z mul16u.b+1
    jsr mul16u
    // [88] (dword) mul16u::return#2 ← (dword) mul16u::res#2 -- vduz1=vduz2 
    lda.z mul16u.res
    sta.z mul16u.return
    lda.z mul16u.res+1
    sta.z mul16u.return+1
    lda.z mul16u.res+2
    sta.z mul16u.return+2
    lda.z mul16u.res+3
    sta.z mul16u.return+3
    jmp __b4
    // mul16s::@4
  __b4:
    // [89] (dword) mul16s::m#0 ← (dword) mul16u::return#2 -- vduz1=vduz2 
    lda.z mul16u.return
    sta.z m
    lda.z mul16u.return+1
    sta.z m+1
    lda.z mul16u.return+2
    sta.z m+2
    lda.z mul16u.return+3
    sta.z m+3
    // [90] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 
    lda.z a+1
    bpl __b1_from___b4
    jmp __b3
    // mul16s::@3
  __b3:
    // [91] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 
    lda.z m+2
    sta.z __9
    lda.z m+3
    sta.z __9+1
    // [92] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz2_minus_vwuc1 
    lda.z __9
    sec
    sbc #<sin16s_gen2.ampl
    sta.z __16
    lda.z __9+1
    sbc #>sin16s_gen2.ampl
    sta.z __16+1
    // [93] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 
    lda.z __16
    sta.z m+2
    lda.z __16+1
    sta.z m+3
    // [94] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1]
  __b1_from___b3:
  __b1_from___b4:
    // [94] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy 
    jmp __b1
    // mul16s::@1
  __b1:
    jmp __b2
    // mul16s::@2
  __b2:
    // [95] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 -- vdsz1=vdsz2 
    lda.z m
    sta.z return
    lda.z m+1
    sta.z return+1
    lda.z m+2
    sta.z return+2
    lda.z m+3
    sta.z return+3
    jmp __breturn
    // mul16s::@return
  __breturn:
    // [96] return 
    rts
}
  // mul16u
// Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word
// mul16u(word zp($19) a, word zp($17) b)
mul16u: {
    .label __1 = $7c
    .label mb = $1f
    .label a = $19
    .label res = $1b
    .label return = $70
    .label b = $17
    .label return_1 = $9d
    // [98] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2 -- vduz1=_dword_vwuz2 
    lda.z b
    sta.z mb
    lda.z b+1
    sta.z mb+1
    lda #0
    sta.z mb+2
    sta.z mb+3
    // [99] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1]
  __b1_from_mul16u:
    // [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy 
    // [99] phi (dword) mul16u::res#2 = (dword) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vduc1 
    lda #<0
    sta.z res
    lda #>0
    sta.z res+1
    lda #<0>>$10
    sta.z res+2
    lda #>0>>$10
    sta.z res+3
    // [99] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy 
    jmp __b1
    // mul16u::@1
  __b1:
    // [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 
    lda.z a
    bne __b2
    lda.z a+1
    bne __b2
    jmp __breturn
    // mul16u::@return
  __breturn:
    // [101] return 
    rts
    // mul16u::@2
  __b2:
    // [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuz1=vwuz2_band_vbuc1 
    lda #1
    and.z a
    sta.z __1
    // [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuz1_eq_0_then_la1 
    lda.z __1
    cmp #0
    beq __b3_from___b2
    jmp __b4
    // mul16u::@4
  __b4:
    // [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 
    lda.z res
    clc
    adc.z mb
    sta.z res
    lda.z res+1
    adc.z mb+1
    sta.z res+1
    lda.z res+2
    adc.z mb+2
    sta.z res+2
    lda.z res+3
    adc.z mb+3
    sta.z res+3
    // [105] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3]
  __b3_from___b2:
  __b3_from___b4:
    // [105] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy 
    jmp __b3
    // mul16u::@3
  __b3:
    // [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 
    lsr.z a+1
    ror.z a
    // [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 
    asl.z mb
    rol.z mb+1
    rol.z mb+2
    rol.z mb+3
    // [99] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1]
  __b1_from___b3:
    // [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy 
    // [99] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy 
    // [99] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy 
    jmp __b1
}
  // sin16s
// Calculate signed word sinus sin(x)
// x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28
// result: signed word sin(x) s[0.15] - using the full range  -$7fff - $7fff
// sin16s(dword zp($24) x)
sin16s: {
    .label __4 = $7d
    .label x = $24
    .label return = $62
    .label x1 = $81
    .label x2 = $85
    .label x3 = $89
    .label x3_6 = $8d
    .label usinx = $8f
    .label x4 = $93
    .label x5 = $97
    .label x5_128 = $99
    .label usinx_1 = $9b
    .label return_1 = $28
    .label sinx = $28
    // Move x1 into the range 0-PI/2 using sinus mirror symmetries
    .label isUpper = $23
    // [108] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 
    lda.z x+3
    cmp #>PI_u4f28>>$10
    bcc __b1_from_sin16s
    bne !+
    lda.z x+2
    cmp #<PI_u4f28>>$10
    bcc __b1_from_sin16s
    bne !+
    lda.z x+1
    cmp #>PI_u4f28
    bcc __b1_from_sin16s
    bne !+
    lda.z x
    cmp #<PI_u4f28
    bcc __b1_from_sin16s
  !:
    jmp __b4
    // sin16s::@4
  __b4:
    // [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28 -- vduz1=vduz1_minus_vduc1 
    lda.z x
    sec
    sbc #<PI_u4f28
    sta.z x
    lda.z x+1
    sbc #>PI_u4f28
    sta.z x+1
    lda.z x+2
    sbc #<PI_u4f28>>$10
    sta.z x+2
    lda.z x+3
    sbc #>PI_u4f28>>$10
    sta.z x+3
    // [110] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1]
  __b1_from___b4:
    // [110] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 
    lda #1
    sta.z isUpper
    // [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy 
    jmp __b1
    // [110] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1]
  __b1_from_sin16s:
    // [110] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z isUpper
    // [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy 
    jmp __b1
    // sin16s::@1
  __b1:
    // [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 
    lda.z x+3
    cmp #>PI_HALF_u4f28>>$10
    bcc __b2_from___b1
    bne !+
    lda.z x+2
    cmp #<PI_HALF_u4f28>>$10
    bcc __b2_from___b1
    bne !+
    lda.z x+1
    cmp #>PI_HALF_u4f28
    bcc __b2_from___b1
    bne !+
    lda.z x
    cmp #<PI_HALF_u4f28
    bcc __b2_from___b1
  !:
    jmp __b5
    // sin16s::@5
  __b5:
    // [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 
    lda #<PI_u4f28
    sec
    sbc.z x
    sta.z x
    lda #>PI_u4f28
    sbc.z x+1
    sta.z x+1
    lda #<PI_u4f28>>$10
    sbc.z x+2
    sta.z x+2
    lda #>PI_u4f28>>$10
    sbc.z x+3
    sta.z x+3
    // [113] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2]
  __b2_from___b1:
  __b2_from___b5:
    // [113] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy 
    jmp __b2
    // sin16s::@2
  __b2:
    // [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 
    lda.z x
    asl
    sta.z __4
    lda.z x+1
    rol
    sta.z __4+1
    lda.z x+2
    rol
    sta.z __4+2
    lda.z x+3
    rol
    sta.z __4+3
    asl.z __4
    rol.z __4+1
    rol.z __4+2
    rol.z __4+3
    asl.z __4
    rol.z __4+1
    rol.z __4+2
    rol.z __4+3
    // [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 
    lda.z __4+2
    sta.z x1
    lda.z __4+3
    sta.z x1+1
    // [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v1
    lda.z x1+1
    sta.z mulu16_sel.v1+1
    // [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [118] call mulu16_sel 
    // [148] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel]
  mulu16_sel_from___b2:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 
    lda #0
    sta.z mulu16_sel.select
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_5
    sta.z mulu16_sel.return
    lda.z mulu16_sel.return_5+1
    sta.z mulu16_sel.return+1
    jmp __b7
    // sin16s::@7
  __b7:
    // [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return
    sta.z x2
    lda.z mulu16_sel.return+1
    sta.z x2+1
    // [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 
    lda.z x2
    sta.z mulu16_sel.v1
    lda.z x2+1
    sta.z mulu16_sel.v1+1
    // [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [123] call mulu16_sel 
    // [148] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel]
  mulu16_sel_from___b7:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 
    lda #1
    sta.z mulu16_sel.select
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_5
    sta.z mulu16_sel.return_1
    lda.z mulu16_sel.return_5+1
    sta.z mulu16_sel.return_1+1
    jmp __b8
    // sin16s::@8
  __b8:
    // [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_1
    sta.z x3
    lda.z mulu16_sel.return_1+1
    sta.z x3+1
    // [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 
    lda.z x3
    sta.z mulu16_sel.v1
    lda.z x3+1
    sta.z mulu16_sel.v1+1
    // [127] call mulu16_sel 
    // [148] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel]
  mulu16_sel_from___b8:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 
    lda #1
    sta.z mulu16_sel.select
    // [148] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 
    lda #<$10000/6
    sta.z mulu16_sel.v2
    lda #>$10000/6
    sta.z mulu16_sel.v2+1
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_5
    sta.z mulu16_sel.return_2
    lda.z mulu16_sel.return_5+1
    sta.z mulu16_sel.return_2+1
    jmp __b9
    // sin16s::@9
  __b9:
    // [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_2
    sta.z x3_6
    lda.z mulu16_sel.return_2+1
    sta.z x3_6+1
    // [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 
    lda.z x1
    sec
    sbc.z x3_6
    sta.z usinx
    lda.z x1+1
    sbc.z x3_6+1
    sta.z usinx+1
    // [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 
    lda.z x3
    sta.z mulu16_sel.v1
    lda.z x3+1
    sta.z mulu16_sel.v1+1
    // [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [133] call mulu16_sel 
    // [148] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel]
  mulu16_sel_from___b9:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 
    lda #0
    sta.z mulu16_sel.select
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_5
    sta.z mulu16_sel.return_3
    lda.z mulu16_sel.return_5+1
    sta.z mulu16_sel.return_3+1
    jmp __b10
    // sin16s::@10
  __b10:
    // [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_3
    sta.z x4
    lda.z mulu16_sel.return_3+1
    sta.z x4+1
    // [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 
    lda.z x4
    sta.z mulu16_sel.v1
    lda.z x4+1
    sta.z mulu16_sel.v1+1
    // [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [138] call mulu16_sel 
    // [148] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel]
  mulu16_sel_from___b10:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 
    lda #0
    sta.z mulu16_sel.select
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_5
    sta.z mulu16_sel.return_4
    lda.z mulu16_sel.return_5+1
    sta.z mulu16_sel.return_4+1
    jmp __b11
    // sin16s::@11
  __b11:
    // [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return_4
    sta.z x5
    lda.z mulu16_sel.return_4+1
    sta.z x5+1
    // [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 
    lda.z x5+1
    lsr
    sta.z x5_128+1
    lda.z x5
    ror
    sta.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    // [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 
    lda.z usinx
    clc
    adc.z x5_128
    sta.z usinx_1
    lda.z usinx+1
    adc.z x5_128+1
    sta.z usinx_1+1
    // [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 
    lda.z isUpper
    cmp #0
    beq __b12
    jmp __b6
    // sin16s::@6
  __b6:
    // [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc.z usinx_1
    sta.z sinx
    lda #0
    sbc.z usinx_1+1
    sta.z sinx+1
    // [145] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3]
  __b3_from___b12:
  __b3_from___b6:
    // [145] phi (signed word) sin16s::return#1 = (signed word) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy 
    jmp __b3
    // sin16s::@3
  __b3:
    jmp __breturn
    // sin16s::@return
  __breturn:
    // [146] return 
    rts
    // sin16s::@12
  __b12:
    // [147] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 
    lda.z usinx_1
    sta.z return_1
    lda.z usinx_1+1
    sta.z return_1+1
    jmp __b3_from___b12
}
  // mulu16_sel
// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result.
// The select parameter indicates how many of the highest bits of the 32-bit result to skip
// mulu16_sel(word zp($2a) v1, word zp($2c) v2, byte zp($2e) select)
mulu16_sel: {
    .label __0 = $a1
    .label __1 = $a5
    .label v1 = $2a
    .label v2 = $2c
    .label return = $83
    .label return_1 = $87
    .label return_2 = $8b
    .label return_3 = $91
    .label return_4 = $95
    .label select = $2e
    .label return_5 = $a9
    // [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 
    lda.z v1
    sta.z mul16u.a
    lda.z v1+1
    sta.z mul16u.a+1
    // [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 
    lda.z v2
    sta.z mul16u.b
    lda.z v2+1
    sta.z mul16u.b+1
    // [151] call mul16u 
    // [97] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u]
  mul16u_from_mulu16_sel:
    // [97] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy 
    // [97] phi (word) mul16u::b#2 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- register_copy 
    jsr mul16u
    // [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 
    lda.z mul16u.res
    sta.z mul16u.return_1
    lda.z mul16u.res+1
    sta.z mul16u.return_1+1
    lda.z mul16u.res+2
    sta.z mul16u.return_1+2
    lda.z mul16u.res+3
    sta.z mul16u.return_1+3
    jmp __b1
    // mulu16_sel::@1
  __b1:
    // [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 
    lda.z mul16u.return_1
    sta.z __0
    lda.z mul16u.return_1+1
    sta.z __0+1
    lda.z mul16u.return_1+2
    sta.z __0+2
    lda.z mul16u.return_1+3
    sta.z __0+3
    // [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 
    lda.z __0
    sta.z __1
    lda.z __0+1
    sta.z __1+1
    lda.z __0+2
    sta.z __1+2
    lda.z __0+3
    sta.z __1+3
    ldx.z select
    beq !e+
  !:
    asl.z __1
    rol.z __1+1
    rol.z __1+2
    rol.z __1+3
    dex
    bne !-
  !e:
    // [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 
    lda.z __1+2
    sta.z return_5
    lda.z __1+3
    sta.z return_5+1
    jmp __breturn
    // mulu16_sel::@return
  __breturn:
    // [156] return 
    rts
}
  // div32u16u
// Divide unsigned 32-bit dword dividend with a 16-bit word divisor
// The 16-bit word remainder can be found in rem16u after the division
div32u16u: {
    .label quotient_hi = $ad
    .label quotient_lo = $b1
    .label return = $b3
    .label return_1 = $5a
    // [158] call divr16u 
    // [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u]
  divr16u_from_div32u16u:
    // [167] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 
    lda #<PI2_u4f28>>$10
    sta.z divr16u.dividend
    lda #>PI2_u4f28>>$10
    sta.z divr16u.dividend+1
    // [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z divr16u.rem
    lda #>0
    sta.z divr16u.rem+1
    jsr divr16u
    // [159] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 
    lda.z divr16u.return
    sta.z divr16u.return_1
    lda.z divr16u.return+1
    sta.z divr16u.return_1+1
    jmp __b1
    // div32u16u::@1
  __b1:
    // [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 
    lda.z divr16u.return_1
    sta.z quotient_hi
    lda.z divr16u.return_1+1
    sta.z quotient_hi+1
    // [161] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 
    lda.z rem16u
    sta.z divr16u.rem
    lda.z rem16u+1
    sta.z divr16u.rem+1
    // [162] call divr16u 
    // [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u]
  divr16u_from___b1:
    // [167] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 
    lda #<PI2_u4f28&$ffff
    sta.z divr16u.dividend
    lda #>PI2_u4f28&$ffff
    sta.z divr16u.dividend+1
    // [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy 
    jsr divr16u
    // [163] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 
    lda.z divr16u.return
    sta.z divr16u.return_2
    lda.z divr16u.return+1
    sta.z divr16u.return_2+1
    jmp __b2
    // div32u16u::@2
  __b2:
    // [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 
    lda.z divr16u.return_2
    sta.z quotient_lo
    lda.z divr16u.return_2+1
    sta.z quotient_lo+1
    // [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 
    lda.z quotient_hi
    sta.z return+2
    lda.z quotient_hi+1
    sta.z return+3
    lda.z quotient_lo
    sta.z return
    lda.z quotient_lo+1
    sta.z return+1
    jmp __breturn
    // div32u16u::@return
  __breturn:
    // [166] return 
    rts
}
  // divr16u
// Performs division on two 16 bit unsigned words and an initial remainder
// Returns the quotient dividend/divisor.
// The final remainder will be set into the global variable rem16u
// Implemented using simple binary division
// divr16u(word zp($31) dividend, word zp($2f) rem)
divr16u: {
    .label __1 = $b7
    .label __2 = $b8
    .label rem = $2f
    .label dividend = $31
    .label quotient = $33
    .label i = $35
    .label return = $33
    .label return_1 = $ab
    .label return_2 = $af
    // [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1]
  __b1_from_divr16u:
    // [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [168] phi (word) divr16u::quotient#3 = (word) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z quotient
    lda #>0
    sta.z quotient+1
    // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy 
    // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy 
    jmp __b1
    // [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1]
  __b1_from___b3:
    // [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy 
    // [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy 
    // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy 
    // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy 
    jmp __b1
    // divr16u::@1
  __b1:
    // [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z rem
    rol.z rem+1
    // [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 
    lda.z dividend+1
    sta.z __1
    // [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 
    lda #$80
    and.z __1
    sta.z __2
    // [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 
    lda.z __2
    cmp #0
    beq __b2_from___b1
    jmp __b4
    // divr16u::@4
  __b4:
    // [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 
    lda #1
    ora.z rem
    sta.z rem
    // [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2]
  __b2_from___b1:
  __b2_from___b4:
    // [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy 
    jmp __b2
    // divr16u::@2
  __b2:
    // [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z dividend
    rol.z dividend+1
    // [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z quotient
    rol.z quotient+1
    // [177] if((word) divr16u::rem#6<(const word) SIN_SIZE) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 
    lda.z rem+1
    cmp #>SIN_SIZE
    bcc __b3_from___b2
    bne !+
    lda.z rem
    cmp #<SIN_SIZE
    bcc __b3_from___b2
  !:
    jmp __b5
    // divr16u::@5
  __b5:
    // [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 
    inc.z quotient
    bne !+
    inc.z quotient+1
  !:
    // [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE -- vwuz1=vwuz1_minus_vwuc1 
    lda.z rem
    sec
    sbc #<SIN_SIZE
    sta.z rem
    lda.z rem+1
    sbc #>SIN_SIZE
    sta.z rem+1
    // [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3]
  __b3_from___b2:
  __b3_from___b5:
    // [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy 
    // [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy 
    jmp __b3
    // divr16u::@3
  __b3:
    // [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp.z i
    bne __b1_from___b3
    jmp __b6
    // divr16u::@6
  __b6:
    // [183] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 
    lda.z rem
    sta.z rem16u
    lda.z rem+1
    sta.z rem16u+1
    jmp __breturn
    // divr16u::@return
  __breturn:
    // [184] return 
    rts
}
  // bitmap_clear
// Clear all graphics on the bitmap
// bgcol - the background color to fill the screen with
// fgcol - the foreground color to fill the screen with
bitmap_clear: {
    .const col = WHITE*$10
    // [186] call memset 
    // [190] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
  memset_from_bitmap_clear:
    // [190] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 
    lda #col
    sta.z memset.c
    // [190] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 
    lda #<SCREEN
    sta.z memset.str
    lda #>SCREEN
    sta.z memset.str+1
    // [190] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 
    lda #<$3e8
    sta.z memset.num
    lda #>$3e8
    sta.z memset.num+1
    jsr memset
    // [187] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1]
  __b1_from_bitmap_clear:
    jmp __b1
    // bitmap_clear::@1
  __b1:
    // [188] call memset 
    // [190] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
  memset_from___b1:
    // [190] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 
    lda #0
    sta.z memset.c
    // [190] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 
    lda #<BITMAP
    sta.z memset.str
    lda #>BITMAP
    sta.z memset.str+1
    // [190] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 
    lda #<$1f40
    sta.z memset.num
    lda #>$1f40
    sta.z memset.num+1
    jsr memset
    jmp __breturn
    // bitmap_clear::@return
  __breturn:
    // [189] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp($38) str, byte zp($3a) c, word zp($36) num)
memset: {
    .label end = $bb
    .label dst = $3b
    .label num = $36
    .label str = $38
    .label c = $3a
    // [191] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 
    lda.z num
    bne !+
    lda.z num+1
    beq __breturn
  !:
    jmp __b1
    // memset::@1
  __b1:
    // [192] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 
    lda.z str
    clc
    adc.z num
    sta.z end
    lda.z str+1
    adc.z num+1
    sta.z end+1
    // [193] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 
    lda.z str
    sta.z dst
    lda.z str+1
    sta.z dst+1
    // [194] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
  __b2_from___b1:
  __b2_from___b3:
    // [194] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy 
    jmp __b2
    // memset::@2
  __b2:
    // [195] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 
    lda.z dst+1
    cmp.z end+1
    bne __b3
    lda.z dst
    cmp.z end
    bne __b3
    jmp __breturn
    // memset::@return
  __breturn:
    // [196] return 
    rts
    // memset::@3
  __b3:
    // [197] *((byte*) memset::dst#2) ← (byte) memset::c#4 -- _deref_pbuz1=vbuz2 
    lda.z c
    ldy #0
    sta (dst),y
    // [198] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    jmp __b2_from___b3
}
  // bitmap_init
// Initialize bitmap plotting tables
bitmap_init: {
    .label __4 = $be
    .label __5 = $bf
    .label __6 = $c0
    .label __7 = $bd
    .label bits = $3d
    .label x = $3e
    .label y = $3f
    .label yoffs = $40
    // [200] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1]
  __b1_from_bitmap_init:
    // [200] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z x
    // [200] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 
    lda #$80
    sta.z bits
    jmp __b1
    // [200] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1]
  __b1_from___b2:
    // [200] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy 
    // [200] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy 
    jmp __b1
    // bitmap_init::@1
  __b1:
    // [201] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z bits
    ldy.z x
    sta bitmap_plot_bit,y
    // [202] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 
    lsr.z bits
    // [203] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 
    lda.z bits
    cmp #0
    bne __b6_from___b1
    // [205] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2]
  __b2_from___b1:
    // [205] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 
    lda #$80
    sta.z bits
    jmp __b2
    // [204] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6]
  __b6_from___b1:
    jmp __b6
    // bitmap_init::@6
  __b6:
    // [205] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2]
  __b2_from___b6:
    // [205] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy 
    jmp __b2
    // bitmap_init::@2
  __b2:
    // [206] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 
    inc.z x
    // [207] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 
    lda.z x
    cmp #0
    bne __b1_from___b2
    // [208] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
  __b3_from___b2:
    // [208] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta.z yoffs
    lda #>BITMAP
    sta.z yoffs+1
    // [208] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    jmp __b3
    // [208] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3]
  __b3_from___b4:
    // [208] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy 
    // [208] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy 
    jmp __b3
    // bitmap_init::@3
  __b3:
    // [209] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and.z y
    sta.z __7
    // [210] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 
    lda.z yoffs
    sta.z __4
    // [211] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 
    lda.z __7
    ora.z __4
    sta.z __5
    // [212] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z __5
    ldy.z y
    sta bitmap_plot_ylo,y
    // [213] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 
    lda.z yoffs+1
    sta.z __6
    // [214] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z __6
    ldy.z y
    sta bitmap_plot_yhi,y
    // [215] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp.z __7
    bne __b4_from___b3
    jmp __b5
    // bitmap_init::@5
  __b5:
    // [216] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z yoffs
    adc #<$28*8
    sta.z yoffs
    lda.z yoffs+1
    adc #>$28*8
    sta.z yoffs+1
    // [217] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4]
  __b4_from___b3:
  __b4_from___b5:
    // [217] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy 
    jmp __b4
    // bitmap_init::@4
  __b4:
    // [218] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [219] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 
    lda.z y
    cmp #0
    bne __b3_from___b4
    jmp __breturn
    // bitmap_init::@return
  __breturn:
    // [220] return 
    rts
}
  // File Data
  // Tables for the plotter - initialized by calling bitmap_init();
  bitmap_plot_ylo: .fill $100, 0
  bitmap_plot_yhi: .fill $100, 0
  bitmap_plot_bit: .fill $100, 0
  .align $100
  sin: .fill 2*$200, 0
sin2:
.for(var i=0; i<512; i++) {
  	  .word sin(toRadians([i*360]/512))*320
    }


REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:190 [ bitmap_init::$4 ] has ALU potential.
Statement [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] *((const byte*) D016) ← (const byte) VIC_CSEL [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [24] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ) always clobbers reg byte a 
Statement [26] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ) always clobbers reg byte a 
Statement [27] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$1 ] ) always clobbers reg byte a 
Statement [28] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ) always clobbers reg byte a reg byte y 
Statement [29] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ) always clobbers reg byte a 
Statement [33] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:73 [ render_sine::ypos#0 ]
Statement [36] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ) always clobbers reg byte a 
Statement [37] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$4 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$4 ] ) always clobbers reg byte a 
Statement [38] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ) always clobbers reg byte a reg byte y 
Statement [39] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ) always clobbers reg byte a 
Statement [43] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:81 [ render_sine::ypos2#0 ]
Statement [47] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ) always clobbers reg byte a 
Statement [52] (word) bitmap_plot::plotter#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2) [ bitmap_plot::x#2 bitmap_plot::plotter#0 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 ] ) always clobbers reg byte a 
Statement [53] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 [ bitmap_plot::x#2 bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a 
Statement [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#2 bitmap_plot::plotter#1 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] ) always clobbers reg byte a 
Statement [55] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a 
Statement [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte*) bitmap_plot_bit + (byte~) bitmap_plot::$2) [ ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ) always clobbers reg byte a reg byte y 
Statement [60] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 [ wrap_y::y#4 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] ) always clobbers reg byte a 
Statement [62] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 [ wrap_y::y#6 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] ) always clobbers reg byte a 
Statement [63] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 [ wrap_y::return#2 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] ) always clobbers reg byte a 
Statement [65] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 [ wrap_y::y#3 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] ) always clobbers reg byte a 
Statement [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 [ wrap_y::y#2 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] ) always clobbers reg byte a 
Statement [69] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:2::sin16s_gen2:18 [ div32u16u::return#2 ] ) always clobbers reg byte a 
Statement [70] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 ] ) always clobbers reg byte a 
Statement [72] if((word) sin16s_gen2::i#2<(const word) SIN_SIZE) goto sin16s_gen2::@2 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ) always clobbers reg byte a 
Statement [74] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#0 ] ) always clobbers reg byte a 
Statement [76] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::return#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::return#0 ] ) always clobbers reg byte a 
Statement [77] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 ] ) always clobbers reg byte a 
Statement [79] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::return#2 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::return#2 ] ) always clobbers reg byte a 
Statement [80] (signed dword~) sin16s_gen2::$6 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$6 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$6 ] ) always clobbers reg byte a 
Statement [81] (word~) sin16s_gen2::$9 ← > (signed dword~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$9 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$9 ] ) always clobbers reg byte a 
Statement [82] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$9 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ) always clobbers reg byte a reg byte y 
Statement [83] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a 
Statement [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a 
Statement [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [ mul16s::a#0 mul16u::a#1 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::a#1 ] ) always clobbers reg byte a 
Statement [88] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#0 mul16u::return#2 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::return#2 ] ) always clobbers reg byte a 
Statement [89] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#0 mul16s::m#0 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16s::m#0 ] ) always clobbers reg byte a 
Statement [90] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 [ mul16s::m#0 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#0 ] ) always clobbers reg byte a 
Statement [91] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::m#0 mul16s::$9 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a 
Statement [92] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 [ mul16s::m#0 mul16s::$16 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a 
Statement [93] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::m#1 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#1 ] ) always clobbers reg byte a 
Statement [95] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::return#0 ] ) always clobbers reg byte a 
Statement [98] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2 [ mul16u::a#6 mul16u::mb#0 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:35 [ sin16s::isUpper#2 ]
Removing always clobbered register reg byte a as potential for zp[1]:46 [ mulu16_sel::select#5 ]
Statement [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a 
Statement [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a 
Statement [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a 
Statement [108] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 [ sin16s::x#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#0 ] ) always clobbers reg byte a 
Statement [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28 [ sin16s::x#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#1 ] ) always clobbers reg byte a 
Statement [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a 
Statement [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a 
Statement [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a 
Statement [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a 
Statement [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a 
Statement [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a 
Statement [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a 
Statement [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a 
Statement [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a 
Statement [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a 
Statement [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a 
Statement [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a 
Statement [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a 
Statement [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a 
Statement [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a 
Statement [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a 
Statement [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a 
Statement [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a 
Statement [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a 
Statement [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a 
Statement [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a 
Statement [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a 
Statement [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a 
Statement [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a 
Statement [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a 
Statement [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a 
Statement [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::sinx#1 ] ) always clobbers reg byte a 
Statement [147] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::return#5 ] ) always clobbers reg byte a 
Statement [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a 
Statement [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a 
Statement [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a 
Statement [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a 
Statement [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a 
Statement [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a 
Statement [159] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a 
Statement [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a 
Statement [161] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a 
Statement [163] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a 
Statement [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a 
Statement [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::return#0 ] ) always clobbers reg byte a 
Statement [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:53 [ divr16u::i#2 divr16u::i#1 ]
Statement [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a 
Statement [177] if((word) divr16u::rem#6<(const word) SIN_SIZE) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a 
Statement [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a 
Statement [183] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::return#0 rem16u#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a 
Statement [191] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#4 ] ( main:2::bitmap_clear:16::memset:186 [ memset::num#2 memset::str#3 memset::c#4 ] main:2::bitmap_clear:16::memset:188 [ memset::num#2 memset::str#3 memset::c#4 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:58 [ memset::c#4 ]
Statement [192] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:2::bitmap_clear:16::memset:186 [ memset::str#3 memset::c#4 memset::end#0 ] main:2::bitmap_clear:16::memset:188 [ memset::str#3 memset::c#4 memset::end#0 ] ) always clobbers reg byte a 
Statement [193] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:2::bitmap_clear:16::memset:186 [ memset::c#4 memset::end#0 memset::dst#4 ] main:2::bitmap_clear:16::memset:188 [ memset::c#4 memset::end#0 memset::dst#4 ] ) always clobbers reg byte a 
Statement [195] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:186 [ memset::c#4 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:188 [ memset::c#4 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a 
Statement [197] *((byte*) memset::dst#2) ← (byte) memset::c#4 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:186 [ memset::c#4 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:188 [ memset::c#4 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:58 [ memset::c#4 ]
Statement [216] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:63 [ bitmap_init::y#2 bitmap_init::y#1 ]
Statement [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] *((const byte*) D016) ← (const byte) VIC_CSEL [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [24] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ) always clobbers reg byte a 
Statement [26] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ) always clobbers reg byte a 
Statement [27] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$1 ] ) always clobbers reg byte a 
Statement [28] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ) always clobbers reg byte a reg byte y 
Statement [29] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ) always clobbers reg byte a 
Statement [33] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ) always clobbers reg byte a 
Statement [36] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ) always clobbers reg byte a 
Statement [37] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$4 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$4 ] ) always clobbers reg byte a 
Statement [38] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ) always clobbers reg byte a reg byte y 
Statement [39] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ) always clobbers reg byte a 
Statement [43] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ) always clobbers reg byte a 
Statement [47] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ( main:2::render_sine:20 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ) always clobbers reg byte a 
Statement [52] (word) bitmap_plot::plotter#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2) [ bitmap_plot::x#2 bitmap_plot::plotter#0 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 ] ) always clobbers reg byte a 
Statement [53] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 [ bitmap_plot::x#2 bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a 
Statement [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#2 bitmap_plot::plotter#1 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] ) always clobbers reg byte a 
Statement [55] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a 
Statement [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte*) bitmap_plot_bit + (byte~) bitmap_plot::$2) [ ] ( main:2::render_sine:20::bitmap_plot:35 [ render_sine::sin_idx#2 render_sine::xpos#3 ] main:2::render_sine:20::bitmap_plot:45 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ) always clobbers reg byte a reg byte y 
Statement [60] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 [ wrap_y::y#4 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] ) always clobbers reg byte a 
Statement [62] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 [ wrap_y::y#6 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] ) always clobbers reg byte a 
Statement [63] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 [ wrap_y::return#2 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] ) always clobbers reg byte a 
Statement [65] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 [ wrap_y::y#3 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] ) always clobbers reg byte a 
Statement [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 [ wrap_y::y#2 ] ( main:2::render_sine:20::wrap_y:30 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] main:2::render_sine:20::wrap_y:40 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] ) always clobbers reg byte a 
Statement [69] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:2::sin16s_gen2:18 [ div32u16u::return#2 ] ) always clobbers reg byte a 
Statement [70] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 ] ) always clobbers reg byte a 
Statement [72] if((word) sin16s_gen2::i#2<(const word) SIN_SIZE) goto sin16s_gen2::@2 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ) always clobbers reg byte a 
Statement [74] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#0 ] ) always clobbers reg byte a 
Statement [76] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::return#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::return#0 ] ) always clobbers reg byte a 
Statement [77] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 ] ) always clobbers reg byte a 
Statement [79] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::return#2 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::return#2 ] ) always clobbers reg byte a 
Statement [80] (signed dword~) sin16s_gen2::$6 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$6 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$6 ] ) always clobbers reg byte a 
Statement [81] (word~) sin16s_gen2::$9 ← > (signed dword~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$9 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::$9 ] ) always clobbers reg byte a 
Statement [82] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$9 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 ] ) always clobbers reg byte a reg byte y 
Statement [83] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a 
Statement [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:2::sin16s_gen2:18 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a 
Statement [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [ mul16s::a#0 mul16u::a#1 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::a#1 ] ) always clobbers reg byte a 
Statement [88] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#0 mul16u::return#2 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::return#2 ] ) always clobbers reg byte a 
Statement [89] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#0 mul16s::m#0 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16s::m#0 ] ) always clobbers reg byte a 
Statement [90] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 [ mul16s::m#0 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#0 ] ) always clobbers reg byte a 
Statement [91] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::m#0 mul16s::$9 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a 
Statement [92] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 [ mul16s::m#0 mul16s::$16 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a 
Statement [93] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::m#1 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::m#1 ] ) always clobbers reg byte a 
Statement [95] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:2::sin16s_gen2:18::mul16s:78 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::return#0 ] ) always clobbers reg byte a 
Statement [98] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2 [ mul16u::a#6 mul16u::mb#0 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#6 mul16u::mb#0 ] ) always clobbers reg byte a 
Statement [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a 
Statement [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a 
Statement [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:2::sin16s_gen2:18::mul16s:78::mul16u:87 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 mul16s::a#0 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a 
Statement [108] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 [ sin16s::x#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#0 ] ) always clobbers reg byte a 
Statement [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28 [ sin16s::x#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#1 ] ) always clobbers reg byte a 
Statement [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a 
Statement [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a 
Statement [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a 
Statement [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a 
Statement [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a 
Statement [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a 
Statement [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a 
Statement [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a 
Statement [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a 
Statement [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a 
Statement [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a 
Statement [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a 
Statement [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a 
Statement [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a 
Statement [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a 
Statement [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a 
Statement [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a 
Statement [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a 
Statement [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a 
Statement [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a 
Statement [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a 
Statement [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a 
Statement [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a 
Statement [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a 
Statement [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a 
Statement [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a 
Statement [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::sinx#1 ] ) always clobbers reg byte a 
Statement [147] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen2:18::sin16s:75 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::return#5 ] ) always clobbers reg byte a 
Statement [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a 
Statement [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a 
Statement [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a 
Statement [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a 
Statement [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a 
Statement [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:2::sin16s_gen2:18::sin16s:75::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a 
Statement [159] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a 
Statement [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a 
Statement [161] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a 
Statement [163] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a 
Statement [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a 
Statement [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:2::sin16s_gen2:18::div32u16u:68 [ div32u16u::return#0 ] ) always clobbers reg byte a 
Statement [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a 
Statement [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a 
Statement [177] if((word) divr16u::rem#6<(const word) SIN_SIZE) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a 
Statement [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a 
Statement [183] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:158 [ divr16u::return#0 rem16u#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a 
Statement [191] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#4 ] ( main:2::bitmap_clear:16::memset:186 [ memset::num#2 memset::str#3 memset::c#4 ] main:2::bitmap_clear:16::memset:188 [ memset::num#2 memset::str#3 memset::c#4 ] ) always clobbers reg byte a 
Statement [192] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:2::bitmap_clear:16::memset:186 [ memset::str#3 memset::c#4 memset::end#0 ] main:2::bitmap_clear:16::memset:188 [ memset::str#3 memset::c#4 memset::end#0 ] ) always clobbers reg byte a 
Statement [193] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:2::bitmap_clear:16::memset:186 [ memset::c#4 memset::end#0 memset::dst#4 ] main:2::bitmap_clear:16::memset:188 [ memset::c#4 memset::end#0 memset::dst#4 ] ) always clobbers reg byte a 
Statement [195] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:186 [ memset::c#4 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:188 [ memset::c#4 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a 
Statement [197] *((byte*) memset::dst#2) ← (byte) memset::c#4 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:186 [ memset::c#4 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:188 [ memset::c#4 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Statement [209] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a 
Statement [216] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a 
Potential registers zp[2]:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] : zp[2]:2 , 
Potential registers zp[2]:4 [ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 ] : zp[2]:4 , 
Potential registers zp[1]:6 [ bitmap_plot::y#2 bitmap_plot::y#1 bitmap_plot::y#0 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:7 [ bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ] : zp[2]:7 , 
Potential registers zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 ] : zp[2]:9 , 
Potential registers zp[2]:11 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] : zp[2]:11 , 
Potential registers zp[4]:13 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] : zp[4]:13 , 
Potential registers zp[2]:17 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] : zp[2]:17 , 
Potential registers zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] : zp[4]:19 , 
Potential registers zp[2]:23 [ mul16u::b#2 mul16u::b#1 ] : zp[2]:23 , 
Potential registers zp[2]:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] : zp[2]:25 , 
Potential registers zp[4]:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] : zp[4]:27 , 
Potential registers zp[4]:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] : zp[4]:31 , 
Potential registers zp[1]:35 [ sin16s::isUpper#2 ] : zp[1]:35 , reg byte x , reg byte y , 
Potential registers zp[4]:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] : zp[4]:36 , 
Potential registers zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] : zp[2]:40 , 
Potential registers zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] : zp[2]:42 , 
Potential registers zp[2]:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] : zp[2]:44 , 
Potential registers zp[1]:46 [ mulu16_sel::select#5 ] : zp[1]:46 , reg byte x , reg byte y , 
Potential registers zp[2]:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] : zp[2]:47 , 
Potential registers zp[2]:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] : zp[2]:49 , 
Potential registers zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp[2]:51 , 
Potential registers zp[1]:53 [ divr16u::i#2 divr16u::i#1 ] : zp[1]:53 , reg byte x , reg byte y , 
Potential registers zp[2]:54 [ memset::num#2 ] : zp[2]:54 , 
Potential registers zp[2]:56 [ memset::str#3 ] : zp[2]:56 , 
Potential registers zp[1]:58 [ memset::c#4 ] : zp[1]:58 , reg byte x , 
Potential registers zp[2]:59 [ memset::dst#2 memset::dst#4 memset::dst#1 ] : zp[2]:59 , 
Potential registers zp[1]:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp[1]:61 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:62 [ bitmap_init::x#2 bitmap_init::x#1 ] : zp[1]:62 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:63 [ bitmap_init::y#2 bitmap_init::y#1 ] : zp[1]:63 , reg byte x , reg byte y , 
Potential registers zp[2]:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] : zp[2]:64 , 
Potential registers zp[2]:66 [ render_sine::$10 ] : zp[2]:66 , 
Potential registers zp[2]:68 [ render_sine::$1 ] : zp[2]:68 , 
Potential registers zp[2]:70 [ render_sine::sin_val#0 ] : zp[2]:70 , 
Potential registers zp[1]:72 [ wrap_y::return#0 ] : zp[1]:72 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:73 [ render_sine::ypos#0 ] : zp[1]:73 , reg byte x , reg byte y , 
Potential registers zp[2]:74 [ render_sine::$11 ] : zp[2]:74 , 
Potential registers zp[2]:76 [ render_sine::$4 ] : zp[2]:76 , 
Potential registers zp[2]:78 [ render_sine::sin2_val#0 ] : zp[2]:78 , 
Potential registers zp[1]:80 [ wrap_y::return#1 ] : zp[1]:80 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:81 [ render_sine::ypos2#0 ] : zp[1]:81 , reg byte x , reg byte y , 
Potential registers zp[2]:82 [ bitmap_plot::plotter#0 ] : zp[2]:82 , 
Potential registers zp[2]:84 [ bitmap_plot::$1 ] : zp[2]:84 , 
Potential registers zp[2]:86 [ bitmap_plot::plotter#1 ] : zp[2]:86 , 
Potential registers zp[1]:88 [ bitmap_plot::$2 ] : zp[1]:88 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:89 [ wrap_y::return#2 ] : zp[1]:89 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[4]:90 [ div32u16u::return#2 ] : zp[4]:90 , 
Potential registers zp[4]:94 [ sin16s_gen2::step#0 ] : zp[4]:94 , 
Potential registers zp[2]:98 [ sin16s::return#0 ] : zp[2]:98 , 
Potential registers zp[2]:100 [ mul16s::a#0 ] : zp[2]:100 , 
Potential registers zp[4]:102 [ mul16s::return#2 ] : zp[4]:102 , 
Potential registers zp[4]:106 [ sin16s_gen2::$6 ] : zp[4]:106 , 
Potential registers zp[2]:110 [ sin16s_gen2::$9 ] : zp[2]:110 , 
Potential registers zp[4]:112 [ mul16u::return#2 ] : zp[4]:112 , 
Potential registers zp[2]:116 [ mul16s::$9 ] : zp[2]:116 , 
Potential registers zp[2]:118 [ mul16s::$16 ] : zp[2]:118 , 
Potential registers zp[4]:120 [ mul16s::return#0 ] : zp[4]:120 , 
Potential registers zp[1]:124 [ mul16u::$1 ] : zp[1]:124 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[4]:125 [ sin16s::$4 ] : zp[4]:125 , 
Potential registers zp[2]:129 [ sin16s::x1#0 ] : zp[2]:129 , 
Potential registers zp[2]:131 [ mulu16_sel::return#0 ] : zp[2]:131 , 
Potential registers zp[2]:133 [ sin16s::x2#0 ] : zp[2]:133 , 
Potential registers zp[2]:135 [ mulu16_sel::return#1 ] : zp[2]:135 , 
Potential registers zp[2]:137 [ sin16s::x3#0 ] : zp[2]:137 , 
Potential registers zp[2]:139 [ mulu16_sel::return#2 ] : zp[2]:139 , 
Potential registers zp[2]:141 [ sin16s::x3_6#0 ] : zp[2]:141 , 
Potential registers zp[2]:143 [ sin16s::usinx#0 ] : zp[2]:143 , 
Potential registers zp[2]:145 [ mulu16_sel::return#10 ] : zp[2]:145 , 
Potential registers zp[2]:147 [ sin16s::x4#0 ] : zp[2]:147 , 
Potential registers zp[2]:149 [ mulu16_sel::return#11 ] : zp[2]:149 , 
Potential registers zp[2]:151 [ sin16s::x5#0 ] : zp[2]:151 , 
Potential registers zp[2]:153 [ sin16s::x5_128#0 ] : zp[2]:153 , 
Potential registers zp[2]:155 [ sin16s::usinx#1 ] : zp[2]:155 , 
Potential registers zp[4]:157 [ mul16u::return#3 ] : zp[4]:157 , 
Potential registers zp[4]:161 [ mulu16_sel::$0 ] : zp[4]:161 , 
Potential registers zp[4]:165 [ mulu16_sel::$1 ] : zp[4]:165 , 
Potential registers zp[2]:169 [ mulu16_sel::return#12 ] : zp[2]:169 , 
Potential registers zp[2]:171 [ divr16u::return#2 ] : zp[2]:171 , 
Potential registers zp[2]:173 [ div32u16u::quotient_hi#0 ] : zp[2]:173 , 
Potential registers zp[2]:175 [ divr16u::return#3 ] : zp[2]:175 , 
Potential registers zp[2]:177 [ div32u16u::quotient_lo#0 ] : zp[2]:177 , 
Potential registers zp[4]:179 [ div32u16u::return#0 ] : zp[4]:179 , 
Potential registers zp[1]:183 [ divr16u::$1 ] : zp[1]:183 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:184 [ divr16u::$2 ] : zp[1]:184 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:185 [ rem16u#1 ] : zp[2]:185 , 
Potential registers zp[2]:187 [ memset::end#0 ] : zp[2]:187 , 
Potential registers zp[1]:189 [ bitmap_init::$7 ] : zp[1]:189 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:190 [ bitmap_init::$4 ] : zp[1]:190 , reg byte a , reg byte x , reg byte y , reg byte alu , 
Potential registers zp[1]:191 [ bitmap_init::$5 ] : zp[1]:191 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:192 [ bitmap_init::$6 ] : zp[1]:192 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [mul16u] 346.86: zp[4]:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] 249.57: zp[4]:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] 202: zp[1]:124 [ mul16u::$1 ] 177.67: zp[2]:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] 6: zp[2]:23 [ mul16u::b#2 mul16u::b#1 ] 4: zp[4]:112 [ mul16u::return#2 ] 4: zp[4]:157 [ mul16u::return#3 ] 
Uplift Scope [wrap_y] 877: zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 ] 22: zp[1]:72 [ wrap_y::return#0 ] 22: zp[1]:80 [ wrap_y::return#1 ] 6: zp[1]:89 [ wrap_y::return#2 ] 
Uplift Scope [divr16u] 106.92: zp[2]:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp[1]:183 [ divr16u::$1 ] 22: zp[1]:184 [ divr16u::$2 ] 18.19: zp[1]:53 [ divr16u::i#2 divr16u::i#1 ] 9.75: zp[2]:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] 4: zp[2]:171 [ divr16u::return#2 ] 4: zp[2]:175 [ divr16u::return#3 ] 
Uplift Scope [render_sine] 24.12: zp[2]:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] 24: zp[2]:4 [ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 ] 22: zp[2]:66 [ render_sine::$10 ] 22: zp[2]:68 [ render_sine::$1 ] 22: zp[2]:70 [ render_sine::sin_val#0 ] 22: zp[2]:74 [ render_sine::$11 ] 22: zp[2]:76 [ render_sine::$4 ] 22: zp[2]:78 [ render_sine::sin2_val#0 ] 11: zp[1]:73 [ render_sine::ypos#0 ] 11: zp[1]:81 [ render_sine::ypos2#0 ] 
Uplift Scope [bitmap_init] 39.88: zp[2]:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp[1]:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp[1]:62 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp[1]:63 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp[1]:190 [ bitmap_init::$4 ] 22: zp[1]:191 [ bitmap_init::$5 ] 22: zp[1]:192 [ bitmap_init::$6 ] 5.5: zp[1]:189 [ bitmap_init::$7 ] 
Uplift Scope [bitmap_plot] 70: zp[1]:6 [ bitmap_plot::y#2 bitmap_plot::y#1 bitmap_plot::y#0 ] 28.5: zp[2]:7 [ bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ] 4: zp[2]:84 [ bitmap_plot::$1 ] 4: zp[1]:88 [ bitmap_plot::$2 ] 3: zp[2]:86 [ bitmap_plot::plotter#1 ] 1: zp[2]:82 [ bitmap_plot::plotter#0 ] 
Uplift Scope [sin16s] 27.5: zp[4]:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] 22: zp[2]:98 [ sin16s::return#0 ] 13: zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] 4: zp[4]:125 [ sin16s::$4 ] 4: zp[2]:133 [ sin16s::x2#0 ] 4: zp[2]:141 [ sin16s::x3_6#0 ] 4: zp[2]:147 [ sin16s::x4#0 ] 4: zp[2]:151 [ sin16s::x5#0 ] 4: zp[2]:153 [ sin16s::x5_128#0 ] 1: zp[2]:137 [ sin16s::x3#0 ] 1: zp[2]:155 [ sin16s::usinx#1 ] 0.64: zp[2]:129 [ sin16s::x1#0 ] 0.33: zp[2]:143 [ sin16s::usinx#0 ] 0.06: zp[1]:35 [ sin16s::isUpper#2 ] 
Uplift Scope [sin16s_gen2] 24.54: zp[2]:11 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 22: zp[4]:106 [ sin16s_gen2::$6 ] 13.75: zp[4]:13 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 11: zp[2]:110 [ sin16s_gen2::$9 ] 10.33: zp[2]:17 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp[4]:94 [ sin16s_gen2::step#0 ] 
Uplift Scope [mulu16_sel] 24: zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp[2]:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp[2]:131 [ mulu16_sel::return#0 ] 4: zp[2]:135 [ mulu16_sel::return#1 ] 4: zp[2]:139 [ mulu16_sel::return#2 ] 4: zp[2]:145 [ mulu16_sel::return#10 ] 4: zp[2]:149 [ mulu16_sel::return#11 ] 4: zp[4]:161 [ mulu16_sel::$0 ] 4: zp[4]:165 [ mulu16_sel::$1 ] 1.71: zp[2]:169 [ mulu16_sel::return#12 ] 0.33: zp[1]:46 [ mulu16_sel::select#5 ] 
Uplift Scope [mul16s] 22: zp[4]:102 [ mul16s::return#2 ] 10: zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] 4.33: zp[4]:120 [ mul16s::return#0 ] 4: zp[2]:116 [ mul16s::$9 ] 4: zp[2]:118 [ mul16s::$16 ] 2.6: zp[2]:100 [ mul16s::a#0 ] 
Uplift Scope [memset] 41.33: zp[2]:59 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 2.17: zp[2]:187 [ memset::end#0 ] 2: zp[2]:54 [ memset::num#2 ] 1.38: zp[1]:58 [ memset::c#4 ] 0: zp[2]:56 [ memset::str#3 ] 
Uplift Scope [div32u16u] 4: zp[4]:90 [ div32u16u::return#2 ] 4: zp[2]:177 [ div32u16u::quotient_lo#0 ] 1.33: zp[4]:179 [ div32u16u::return#0 ] 0.8: zp[2]:173 [ div32u16u::quotient_hi#0 ] 
Uplift Scope [] 0.8: zp[2]:185 [ rem16u#1 ] 
Uplift Scope [bitmap_clear] 
Uplift Scope [main] 

Uplifting [mul16u] best 31403 combination zp[4]:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp[4]:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp[2]:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp[2]:23 [ mul16u::b#2 mul16u::b#1 ] zp[4]:112 [ mul16u::return#2 ] zp[4]:157 [ mul16u::return#3 ] 
Uplifting [wrap_y] best 31220 combination zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 ] reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#2 ] 
Uplifting [divr16u] best 31010 combination zp[2]:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp[2]:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp[2]:171 [ divr16u::return#2 ] zp[2]:175 [ divr16u::return#3 ] 
Uplifting [render_sine] best 30930 combination zp[2]:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] zp[2]:4 [ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 ] zp[2]:66 [ render_sine::$10 ] zp[2]:68 [ render_sine::$1 ] zp[2]:70 [ render_sine::sin_val#0 ] zp[2]:74 [ render_sine::$11 ] zp[2]:76 [ render_sine::$4 ] zp[2]:78 [ render_sine::sin2_val#0 ] reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos2#0 ] 
Uplifting [bitmap_init] best 30420 combination zp[2]:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:191 [ bitmap_init::$5 ] zp[1]:192 [ bitmap_init::$6 ] zp[1]:189 [ bitmap_init::$7 ] 
Limited combination testing to 100 combinations of 15360 possible.
Uplifting [bitmap_plot] best 30353 combination reg byte x [ bitmap_plot::y#2 bitmap_plot::y#1 bitmap_plot::y#0 ] zp[2]:7 [ bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ] zp[2]:84 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp[2]:86 [ bitmap_plot::plotter#1 ] zp[2]:82 [ bitmap_plot::plotter#0 ] 
Uplifting [sin16s] best 30344 combination zp[4]:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp[2]:98 [ sin16s::return#0 ] zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp[4]:125 [ sin16s::$4 ] zp[2]:133 [ sin16s::x2#0 ] zp[2]:141 [ sin16s::x3_6#0 ] zp[2]:147 [ sin16s::x4#0 ] zp[2]:151 [ sin16s::x5#0 ] zp[2]:153 [ sin16s::x5_128#0 ] zp[2]:137 [ sin16s::x3#0 ] zp[2]:155 [ sin16s::usinx#1 ] zp[2]:129 [ sin16s::x1#0 ] zp[2]:143 [ sin16s::usinx#0 ] reg byte y [ sin16s::isUpper#2 ] 
Uplifting [sin16s_gen2] best 30344 combination zp[2]:11 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp[4]:106 [ sin16s_gen2::$6 ] zp[4]:13 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp[2]:110 [ sin16s_gen2::$9 ] zp[2]:17 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp[4]:94 [ sin16s_gen2::step#0 ] 
Uplifting [mulu16_sel] best 30328 combination zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp[2]:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp[2]:131 [ mulu16_sel::return#0 ] zp[2]:135 [ mulu16_sel::return#1 ] zp[2]:139 [ mulu16_sel::return#2 ] zp[2]:145 [ mulu16_sel::return#10 ] zp[2]:149 [ mulu16_sel::return#11 ] zp[4]:161 [ mulu16_sel::$0 ] zp[4]:165 [ mulu16_sel::$1 ] zp[2]:169 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] 
Uplifting [mul16s] best 30328 combination zp[4]:102 [ mul16s::return#2 ] zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp[4]:120 [ mul16s::return#0 ] zp[2]:116 [ mul16s::$9 ] zp[2]:118 [ mul16s::$16 ] zp[2]:100 [ mul16s::a#0 ] 
Uplifting [memset] best 30312 combination zp[2]:59 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:187 [ memset::end#0 ] zp[2]:54 [ memset::num#2 ] reg byte x [ memset::c#4 ] zp[2]:56 [ memset::str#3 ] 
Uplifting [div32u16u] best 30312 combination zp[4]:90 [ div32u16u::return#2 ] zp[2]:177 [ div32u16u::quotient_lo#0 ] zp[4]:179 [ div32u16u::return#0 ] zp[2]:173 [ div32u16u::quotient_hi#0 ] 
Uplifting [] best 30312 combination zp[2]:185 [ rem16u#1 ] 
Uplifting [bitmap_clear] best 30312 combination 
Uplifting [main] best 30312 combination 
Attempting to uplift remaining variables inzp[1]:191 [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 30252 combination reg byte a [ bitmap_init::$5 ] 
Attempting to uplift remaining variables inzp[1]:192 [ bitmap_init::$6 ]
Uplifting [bitmap_init] best 30192 combination reg byte a [ bitmap_init::$6 ] 
Attempting to uplift remaining variables inzp[1]:189 [ bitmap_init::$7 ]
Uplifting [bitmap_init] best 30192 combination zp[1]:189 [ bitmap_init::$7 ] 
Coalescing zero page register [ zp[2]:4 [ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 ] ] with [ zp[2]:7 [ bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ] ] - score: 2
Coalescing zero page register [ zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp[2]:155 [ sin16s::usinx#1 ] ] - score: 2
Coalescing zero page register [ zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp[2]:137 [ sin16s::x3#0 ] ] - score: 2
Coalescing zero page register [ zp[2]:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp[2]:185 [ rem16u#1 ] ] - score: 2
Coalescing zero page register [ zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 ] ] with [ zp[2]:70 [ render_sine::sin_val#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 ] ] with [ zp[2]:78 [ render_sine::sin2_val#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] ] with [ zp[4]:112 [ mul16u::return#2 ] ] - score: 1
Coalescing zero page register [ zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 ] ] with [ zp[4]:120 [ mul16s::return#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:23 [ mul16u::b#2 mul16u::b#1 ] ] with [ zp[2]:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] - score: 1
Coalescing zero page register [ zp[4]:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp[4]:157 [ mul16u::return#3 ] ] - score: 1
Coalescing zero page register [ zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp[2]:98 [ sin16s::return#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp[2]:133 [ sin16s::x2#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp[2]:147 [ sin16s::x4#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp[2]:171 [ divr16u::return#2 ] ] - score: 1
Coalescing zero page register [ zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp[2]:175 [ divr16u::return#3 ] ] - score: 1
Coalescing zero page register [ zp[2]:54 [ memset::num#2 ] ] with [ zp[2]:187 [ memset::end#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:56 [ memset::str#3 ] ] with [ zp[2]:59 [ memset::dst#2 memset::dst#4 memset::dst#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:66 [ render_sine::$10 ] ] with [ zp[2]:68 [ render_sine::$1 ] ] - score: 1
Coalescing zero page register [ zp[2]:74 [ render_sine::$11 ] ] with [ zp[2]:76 [ render_sine::$4 ] ] - score: 1
Coalescing zero page register [ zp[2]:82 [ bitmap_plot::plotter#0 ] ] with [ zp[2]:86 [ bitmap_plot::plotter#1 ] ] - score: 1
Coalescing zero page register [ zp[4]:90 [ div32u16u::return#2 ] ] with [ zp[4]:94 [ sin16s_gen2::step#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:90 [ div32u16u::return#2 sin16s_gen2::step#0 ] ] with [ zp[4]:179 [ div32u16u::return#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:102 [ mul16s::return#2 ] ] with [ zp[4]:106 [ sin16s_gen2::$6 ] ] - score: 1
Coalescing zero page register [ zp[2]:116 [ mul16s::$9 ] ] with [ zp[2]:118 [ mul16s::$16 ] ] - score: 1
Coalescing zero page register [ zp[2]:131 [ mulu16_sel::return#0 ] ] with [ zp[2]:169 [ mulu16_sel::return#12 ] ] - score: 1
Coalescing zero page register [ zp[2]:139 [ mulu16_sel::return#2 ] ] with [ zp[2]:141 [ sin16s::x3_6#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:149 [ mulu16_sel::return#11 ] ] with [ zp[2]:151 [ sin16s::x5#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:161 [ mulu16_sel::$0 ] ] with [ zp[4]:165 [ mulu16_sel::$1 ] ] - score: 1
Coalescing zero page register [ zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 ] ] with [ zp[2]:66 [ render_sine::$10 render_sine::$1 ] ] - score: 1
Coalescing zero page register [ zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$1 ] ] with [ zp[2]:74 [ render_sine::$11 render_sine::$4 ] ] - score: 1
Coalescing zero page register [ zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 ] ] with [ zp[4]:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] - score: 1
Coalescing zero page register [ zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] with [ zp[4]:102 [ mul16s::return#2 sin16s_gen2::$6 ] ] - score: 1
Coalescing zero page register [ zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] with [ zp[2]:100 [ mul16s::a#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 ] ] with [ zp[2]:143 [ sin16s::usinx#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 ] ] with [ zp[2]:135 [ mulu16_sel::return#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 ] ] with [ zp[2]:145 [ mulu16_sel::return#10 ] ] - score: 1
Coalescing zero page register [ zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp[2]:177 [ div32u16u::quotient_lo#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:131 [ mulu16_sel::return#0 mulu16_sel::return#12 ] ] with [ zp[2]:139 [ mulu16_sel::return#2 sin16s::x3_6#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:131 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 ] ] with [ zp[2]:149 [ mulu16_sel::return#11 sin16s::x5#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$6 ] ] with [ zp[4]:161 [ mulu16_sel::$0 mulu16_sel::$1 ] ] - score: 1
Coalescing zero page register [ zp[2]:131 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 ] ] with [ zp[2]:153 [ sin16s::x5_128#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:11 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] ] with [ zp[2]:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] ]
Coalescing zero page register [ zp[2]:17 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] ] with [ zp[2]:4 [ render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ] ]
Coalescing zero page register [ zp[2]:23 [ mul16u::b#2 mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] with [ zp[2]:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$1 render_sine::$11 render_sine::$4 ] ]
Coalescing zero page register [ zp[4]:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp[4]:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$6 mulu16_sel::$0 mulu16_sel::$1 ] ]
Coalescing zero page register [ zp[2]:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] ] with [ zp[2]:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] ]
Coalescing zero page register [ zp[2]:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] ] with [ zp[2]:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 sin16s::usinx#0 ] ]
Coalescing zero page register [ zp[2]:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] ] with [ zp[2]:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] ]
Coalescing zero page register [ zp[2]:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] ] with [ zp[2]:54 [ memset::num#2 memset::end#0 ] ]
Coalescing zero page register [ zp[2]:82 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 ] ] with [ zp[2]:56 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ] ]
Coalescing zero page register [ zp[2]:110 [ sin16s_gen2::$9 ] ] with [ zp[2]:84 [ bitmap_plot::$1 ] ]
Coalescing zero page register [ zp[4]:125 [ sin16s::$4 ] ] with [ zp[4]:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] ]
Coalescing zero page register [ zp[2]:129 [ sin16s::x1#0 ] ] with [ zp[2]:116 [ mul16s::$9 mul16s::$16 ] ]
Coalescing zero page register [ zp[2]:173 [ div32u16u::quotient_hi#0 ] ] with [ zp[2]:131 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] ]
Coalescing zero page register [ zp[2]:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 memset::num#2 memset::end#0 ] ] with [ zp[2]:11 [ sin16s_gen2::i#2 sin16s_gen2::i#1 render_sine::sin_idx#2 render_sine::sin_idx#1 ] ]
Coalescing zero page register [ zp[2]:82 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ] ] with [ zp[2]:23 [ mul16u::b#2 mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$1 render_sine::$11 render_sine::$4 ] ]
Coalescing zero page register [ zp[2]:110 [ sin16s_gen2::$9 bitmap_plot::$1 ] ] with [ zp[2]:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] ]
Allocated (was zp[4]:13) zp[4]:2 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ]
Allocated (was zp[2]:17) zp[2]:6 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ]
Allocated (was zp[4]:36) zp[4]:8 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$6 mulu16_sel::$0 mulu16_sel::$1 ]
Allocated (was zp[2]:49) zp[2]:12 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 sin16s::usinx#0 ]
Allocated (was zp[2]:51) zp[2]:14 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ]
Allocated (was zp[2]:64) zp[2]:16 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 memset::num#2 memset::end#0 sin16s_gen2::i#2 sin16s_gen2::i#1 render_sine::sin_idx#2 render_sine::sin_idx#1 ]
Allocated (was zp[2]:82) zp[2]:18 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 mul16u::b#2 mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$1 render_sine::$11 render_sine::$4 ]
Allocated (was zp[4]:90) zp[4]:20 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ]
Allocated (was zp[2]:110) zp[2]:24 [ sin16s_gen2::$9 bitmap_plot::$1 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ]
Allocated (was zp[4]:125) zp[4]:26 [ sin16s::$4 mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
Allocated (was zp[2]:129) zp[2]:30 [ sin16s::x1#0 mul16s::$9 mul16s::$16 ]
Allocated (was zp[2]:173) zp[2]:32 [ div32u16u::quotient_hi#0 mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ]
Allocated (was zp[1]:189) zp[1]:34 [ bitmap_init::$7 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Generate a big sinus and plot it on a bitmap
  // 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
  .label BGCOL = $d021
  .label D011 = $d011
  .const VIC_BMM = $20
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label D016 = $d016
  .const VIC_CSEL = 8
  .label D018 = $d018
  // 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
  .const WHITE = 1
  // PI*2 in u[4.28] format
  .const PI2_u4f28 = $6487ed51
  // PI in u[4.28] format
  .const PI_u4f28 = $3243f6a9
  // PI/2 in u[4.28] format
  .const PI_HALF_u4f28 = $1921fb54
  .const SIN_SIZE = $200
  .const SIZEOF_SIGNED_WORD = 2
  .label SCREEN = $400
  .label BITMAP = $2000
  // Remainder after unsigned 16-bit division
  .label rem16u = $18
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .const vicSelectGfxBank1_toDd001_return = 3
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
    // asm { sei  }
    sei
    // [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 
    // Disable normal interrupt
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [7] *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_BMM|VIC_DEN|VIC_RSEL|3
    sta D011
    jmp vicSelectGfxBank1
    // main::vicSelectGfxBank1
  vicSelectGfxBank1:
    // [8] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
    // [9] 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:
    // [10] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
    jmp __b2
    // main::@2
  __b2:
    // [11] *((const byte*) D016) ← (const byte) VIC_CSEL -- _deref_pbuc1=vbuc2 
    lda #VIC_CSEL
    sta D016
    // [12] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181]
  toD0181_from___b2:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp __b3
    // main::@3
  __b3:
    // [13] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [14] call bitmap_init 
    // [199] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init]
  bitmap_init_from___b3:
    jsr bitmap_init
    // [15] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  __b4_from___b3:
    jmp __b4
    // main::@4
  __b4:
    // [16] call bitmap_clear 
    // [185] phi from main::@4 to bitmap_clear [phi:main::@4->bitmap_clear]
  bitmap_clear_from___b4:
    jsr bitmap_clear
    // [17] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [18] call sin16s_gen2 
    // [67] phi from main::@5 to sin16s_gen2 [phi:main::@5->sin16s_gen2]
  sin16s_gen2_from___b5:
    jsr sin16s_gen2
    // [19] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [20] call render_sine 
    // [22] phi from main::@6 to render_sine [phi:main::@6->render_sine]
  render_sine_from___b6:
    jsr render_sine
    jmp __b1
    // main::@1
  __b1:
    // [21] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
    jmp __b1
}
  // render_sine
render_sine: {
    .label __1 = $12
    .label __4 = $12
    .label __10 = $12
    .label __11 = $12
    .label sin_val = $12
    .label sin2_val = $12
    .label xpos = 6
    .label sin_idx = $10
    // [23] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1]
  __b1_from_render_sine:
    // [23] phi (word) render_sine::xpos#3 = (word) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z xpos
    lda #>0
    sta.z xpos+1
    // [23] phi (word) render_sine::sin_idx#2 = (word) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z sin_idx
    lda #>0
    sta.z sin_idx+1
    jmp __b1
    // render_sine::@1
  __b1:
    // [24] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2 -- vwuz1_lt_vwuc1_then_la1 
    lda.z sin_idx+1
    cmp #>SIN_SIZE
    bcc __b2
    bne !+
    lda.z sin_idx
    cmp #<SIN_SIZE
    bcc __b2
  !:
    jmp __breturn
    // render_sine::@return
  __breturn:
    // [25] return 
    rts
    // render_sine::@2
  __b2:
    // [26] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 
    lda.z sin_idx
    asl
    sta.z __10
    lda.z sin_idx+1
    rol
    sta.z __10+1
    // [27] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz1 
    clc
    lda.z __1
    adc #<sin
    sta.z __1
    lda.z __1+1
    adc #>sin
    sta.z __1+1
    // [28] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1) -- vwsz1=_deref_pwsz1 
    ldy #0
    lda (sin_val),y
    pha
    iny
    lda (sin_val),y
    sta.z sin_val+1
    pla
    sta.z sin_val
    // [29] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0
    // [30] call wrap_y 
    // [58] phi from render_sine::@2 to wrap_y [phi:render_sine::@2->wrap_y]
  wrap_y_from___b2:
    // [58] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@2->wrap_y#0] -- register_copy 
    jsr wrap_y
    // [31] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2
    jmp __b4
    // render_sine::@4
  __b4:
    // [32] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuxx=vbuaa 
    tax
    // [33] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3
    // [34] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0
    // [35] call bitmap_plot 
    // [51] phi from render_sine::@4 to bitmap_plot [phi:render_sine::@4->bitmap_plot]
  bitmap_plot_from___b4:
    // [51] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@4->bitmap_plot#0] -- register_copy 
    // [51] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@4->bitmap_plot#1] -- register_copy 
    jsr bitmap_plot
    jmp __b5
    // render_sine::@5
  __b5:
    // [36] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 
    lda.z sin_idx
    asl
    sta.z __11
    lda.z sin_idx+1
    rol
    sta.z __11+1
    // [37] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz1 
    clc
    lda.z __4
    adc #<sin2
    sta.z __4
    lda.z __4+1
    adc #>sin2
    sta.z __4+1
    // [38] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4) -- vwsz1=_deref_pwsz1 
    ldy #0
    lda (sin2_val),y
    pha
    iny
    lda (sin2_val),y
    sta.z sin2_val+1
    pla
    sta.z sin2_val
    // [39] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1 
    lda.z wrap_y.y
    clc
    adc #<$a
    sta.z wrap_y.y
    lda.z wrap_y.y+1
    adc #>$a
    sta.z wrap_y.y+1
    // [40] call wrap_y 
    // [58] phi from render_sine::@5 to wrap_y [phi:render_sine::@5->wrap_y]
  wrap_y_from___b5:
    // [58] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@5->wrap_y#0] -- register_copy 
    jsr wrap_y
    // [41] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2
    jmp __b6
    // render_sine::@6
  __b6:
    // [42] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuxx=vbuaa 
    tax
    // [43] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3
    // [44] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0
    // [45] call bitmap_plot 
    // [51] phi from render_sine::@6 to bitmap_plot [phi:render_sine::@6->bitmap_plot]
  bitmap_plot_from___b6:
    // [51] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@6->bitmap_plot#0] -- register_copy 
    // [51] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@6->bitmap_plot#1] -- register_copy 
    jsr bitmap_plot
    jmp __b7
    // render_sine::@7
  __b7:
    // [46] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 
    inc.z xpos
    bne !+
    inc.z xpos+1
  !:
    // [47] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8 -- vwuz1_neq_vwuc1_then_la1 
    lda.z xpos+1
    cmp #>$140
    bne __b8_from___b7
    lda.z xpos
    cmp #<$140
    bne __b8_from___b7
    // [49] phi from render_sine::@7 to render_sine::@3 [phi:render_sine::@7->render_sine::@3]
  __b3_from___b7:
    // [49] phi (word) render_sine::xpos#9 = (byte) 0 [phi:render_sine::@7->render_sine::@3#0] -- vwuz1=vbuc1 
    lda #<0
    sta.z xpos
    lda #>0
    sta.z xpos+1
    jmp __b3
    // [48] phi from render_sine::@7 to render_sine::@8 [phi:render_sine::@7->render_sine::@8]
  __b8_from___b7:
    jmp __b8
    // render_sine::@8
  __b8:
    // [49] phi from render_sine::@8 to render_sine::@3 [phi:render_sine::@8->render_sine::@3]
  __b3_from___b8:
    // [49] phi (word) render_sine::xpos#9 = (word) render_sine::xpos#1 [phi:render_sine::@8->render_sine::@3#0] -- register_copy 
    jmp __b3
    // render_sine::@3
  __b3:
    // [50] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 
    inc.z sin_idx
    bne !+
    inc.z sin_idx+1
  !:
    // [23] phi from render_sine::@3 to render_sine::@1 [phi:render_sine::@3->render_sine::@1]
  __b1_from___b3:
    // [23] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#9 [phi:render_sine::@3->render_sine::@1#0] -- register_copy 
    // [23] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@3->render_sine::@1#1] -- register_copy 
    jmp __b1
}
  // bitmap_plot
// Plot a single dot in the bitmap
// bitmap_plot(word zp(6) x, byte register(X) y)
bitmap_plot: {
    .label __1 = $18
    .label plotter = $12
    .label x = 6
    // [52] (word) bitmap_plot::plotter#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx 
    lda bitmap_plot_yhi,x
    sta.z plotter+1
    lda bitmap_plot_ylo,x
    sta.z plotter
    // [53] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 
    lda.z x
    and #<$fff8
    sta.z __1
    lda.z x+1
    and #>$fff8
    sta.z __1+1
    // [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 
    lda.z plotter
    clc
    adc.z __1
    sta.z plotter
    lda.z plotter+1
    adc.z __1+1
    sta.z plotter+1
    // [55] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuaa=_lo_vwuz1 
    lda.z x
    // [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte*) bitmap_plot_bit + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa 
    tay
    lda bitmap_plot_bit,y
    ldy #0
    ora (plotter),y
    ldy #0
    sta (plotter),y
    jmp __breturn
    // bitmap_plot::@return
  __breturn:
    // [57] return 
    rts
}
  // wrap_y
// wrap_y(signed word zp($12) y)
wrap_y: {
    .label y = $12
    // [59] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1]
  __b1_from_wrap_y:
  __b1_from___b2:
    // [59] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy 
    jmp __b1
    // wrap_y::@1
  __b1:
    // [60] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 
    lda.z y
    cmp #<$c8
    lda.z y+1
    sbc #>$c8
    bvc !+
    eor #$80
  !:
    bpl __b2
    // [61] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3]
  __b3_from___b1:
  __b3_from___b4:
    // [61] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy 
    jmp __b3
    // wrap_y::@3
  __b3:
    // [62] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 
    lda.z y+1
    bmi __b4
    jmp __b5
    // wrap_y::@5
  __b5:
    // [63] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuaa=_byte_vwsz1 
    lda.z y
    jmp __breturn
    // wrap_y::@return
  __breturn:
    // [64] return 
    rts
    // wrap_y::@4
  __b4:
    // [65] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 
    clc
    lda.z y
    adc #<$c8
    sta.z y
    lda.z y+1
    adc #>$c8
    sta.z y+1
    jmp __b3_from___b4
    // wrap_y::@2
  __b2:
    // [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 
    lda.z y
    sec
    sbc #<$c8
    sta.z y
    lda.z y+1
    sbc #>$c8
    sta.z y+1
    jmp __b1_from___b2
}
  // sin16s_gen2
// Generate signed word sinus table - with values in the range min-max.
// sintab - the table to generate into
// wavelength - the number of sinus points in a total sinus wavelength (the size of the table)
// sin16s_gen2(signed word* zp(6) sintab)
sin16s_gen2: {
    .const min = -$140
    .const max = $140
    .label ampl = max-min
    .label __6 = 8
    .label __9 = $18
    .label step = $14
    .label sintab = 6
    // u[4.28]
    // Iterate over the table
    .label x = 2
    .label i = $10
    // [68] call div32u16u 
    // [157] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u]
  div32u16u_from_sin16s_gen2:
    jsr div32u16u
    // [69] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0
    jmp __b3
    // sin16s_gen2::@3
  __b3:
    // [70] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2
    // [71] phi from sin16s_gen2::@3 to sin16s_gen2::@1 [phi:sin16s_gen2::@3->sin16s_gen2::@1]
  __b1_from___b3:
    // [71] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word*) sin [phi:sin16s_gen2::@3->sin16s_gen2::@1#0] -- pwsz1=pwsc1 
    lda #<sin
    sta.z sintab
    lda #>sin
    sta.z sintab+1
    // [71] phi (dword) sin16s_gen2::x#2 = (dword) 0 [phi:sin16s_gen2::@3->sin16s_gen2::@1#1] -- vduz1=vduc1 
    lda #<0
    sta.z x
    lda #>0
    sta.z x+1
    lda #<0>>$10
    sta.z x+2
    lda #>0>>$10
    sta.z x+3
    // [71] phi (word) sin16s_gen2::i#2 = (word) 0 [phi:sin16s_gen2::@3->sin16s_gen2::@1#2] -- vwuz1=vwuc1 
    lda #<0
    sta.z i
    lda #>0
    sta.z i+1
    jmp __b1
  // u[4.28]
    // sin16s_gen2::@1
  __b1:
    // [72] if((word) sin16s_gen2::i#2<(const word) SIN_SIZE) goto sin16s_gen2::@2 -- vwuz1_lt_vwuc1_then_la1 
    lda.z i+1
    cmp #>SIN_SIZE
    bcc __b2
    bne !+
    lda.z i
    cmp #<SIN_SIZE
    bcc __b2
  !:
    jmp __breturn
    // sin16s_gen2::@return
  __breturn:
    // [73] return 
    rts
    // sin16s_gen2::@2
  __b2:
    // [74] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 
    lda.z x
    sta.z sin16s.x
    lda.z x+1
    sta.z sin16s.x+1
    lda.z x+2
    sta.z sin16s.x+2
    lda.z x+3
    sta.z sin16s.x+3
    // [75] call sin16s 
    jsr sin16s
    // [76] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1
    jmp __b4
    // sin16s_gen2::@4
  __b4:
    // [77] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0
    // [78] call mul16s 
    jsr mul16s
    // [79] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0
    jmp __b5
    // sin16s_gen2::@5
  __b5:
    // [80] (signed dword~) sin16s_gen2::$6 ← (signed dword) mul16s::return#2
    // [81] (word~) sin16s_gen2::$9 ← > (signed dword~) sin16s_gen2::$6 -- vwuz1=_hi_vdsz2 
    lda.z __6+2
    sta.z __9
    lda.z __6+3
    sta.z __9+1
    // [82] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$9 -- _deref_pwsz1=vwsz2 
    ldy #0
    lda.z __9
    sta (sintab),y
    iny
    lda.z __9+1
    sta (sintab),y
    // [83] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 
    lda #SIZEOF_SIGNED_WORD
    clc
    adc.z sintab
    sta.z sintab
    bcc !+
    inc.z sintab+1
  !:
    // [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 
    lda.z x
    clc
    adc.z step
    sta.z x
    lda.z x+1
    adc.z step+1
    sta.z x+1
    lda.z x+2
    adc.z step+2
    sta.z x+2
    lda.z x+3
    adc.z step+3
    sta.z x+3
    // [85] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [71] phi from sin16s_gen2::@5 to sin16s_gen2::@1 [phi:sin16s_gen2::@5->sin16s_gen2::@1]
  __b1_from___b5:
    // [71] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@5->sin16s_gen2::@1#0] -- register_copy 
    // [71] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@5->sin16s_gen2::@1#1] -- register_copy 
    // [71] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@5->sin16s_gen2::@1#2] -- register_copy 
    jmp __b1
}
  // mul16s
// Multiply of two signed words to a signed double word
// Fixes offsets introduced by using unsigned multiplication
// mul16s(signed word zp($c) a)
mul16s: {
    .label __9 = $1e
    .label __16 = $1e
    .label m = 8
    .label return = 8
    .label a = $c
    // [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 -- vwuz1=vwuz2 
    lda.z a
    sta.z mul16u.a
    lda.z a+1
    sta.z mul16u.a+1
    // [87] call mul16u 
    // [97] phi from mul16s to mul16u [phi:mul16s->mul16u]
  mul16u_from_mul16s:
    // [97] phi (word) mul16u::a#6 = (word) mul16u::a#1 [phi:mul16s->mul16u#0] -- register_copy 
    // [97] phi (word) mul16u::b#2 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vwuz1=vwuc1 
    lda #<sin16s_gen2.ampl
    sta.z mul16u.b
    lda #>sin16s_gen2.ampl
    sta.z mul16u.b+1
    jsr mul16u
    // [88] (dword) mul16u::return#2 ← (dword) mul16u::res#2
    jmp __b4
    // mul16s::@4
  __b4:
    // [89] (dword) mul16s::m#0 ← (dword) mul16u::return#2
    // [90] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 
    lda.z a+1
    bpl __b1_from___b4
    jmp __b3
    // mul16s::@3
  __b3:
    // [91] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 
    lda.z m+2
    sta.z __9
    lda.z m+3
    sta.z __9+1
    // [92] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz1_minus_vwuc1 
    lda.z __16
    sec
    sbc #<sin16s_gen2.ampl
    sta.z __16
    lda.z __16+1
    sbc #>sin16s_gen2.ampl
    sta.z __16+1
    // [93] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 
    lda.z __16
    sta.z m+2
    lda.z __16+1
    sta.z m+3
    // [94] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1]
  __b1_from___b3:
  __b1_from___b4:
    // [94] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy 
    jmp __b1
    // mul16s::@1
  __b1:
    jmp __b2
    // mul16s::@2
  __b2:
    // [95] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
    jmp __breturn
    // mul16s::@return
  __breturn:
    // [96] return 
    rts
}
  // mul16u
// Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word
// mul16u(word zp($18) a, word zp($12) b)
mul16u: {
    .label mb = $1a
    .label a = $18
    .label res = 8
    .label return = 8
    .label b = $12
    // [98] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2 -- vduz1=_dword_vwuz2 
    lda.z b
    sta.z mb
    lda.z b+1
    sta.z mb+1
    lda #0
    sta.z mb+2
    sta.z mb+3
    // [99] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1]
  __b1_from_mul16u:
    // [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy 
    // [99] phi (dword) mul16u::res#2 = (dword) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vduc1 
    lda #<0
    sta.z res
    lda #>0
    sta.z res+1
    lda #<0>>$10
    sta.z res+2
    lda #>0>>$10
    sta.z res+3
    // [99] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy 
    jmp __b1
    // mul16u::@1
  __b1:
    // [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 
    lda.z a
    bne __b2
    lda.z a+1
    bne __b2
    jmp __breturn
    // mul16u::@return
  __breturn:
    // [101] return 
    rts
    // mul16u::@2
  __b2:
    // [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 
    lda #1
    and.z a
    // [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b3_from___b2
    jmp __b4
    // mul16u::@4
  __b4:
    // [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 
    lda.z res
    clc
    adc.z mb
    sta.z res
    lda.z res+1
    adc.z mb+1
    sta.z res+1
    lda.z res+2
    adc.z mb+2
    sta.z res+2
    lda.z res+3
    adc.z mb+3
    sta.z res+3
    // [105] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3]
  __b3_from___b2:
  __b3_from___b4:
    // [105] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy 
    jmp __b3
    // mul16u::@3
  __b3:
    // [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 
    lsr.z a+1
    ror.z a
    // [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 
    asl.z mb
    rol.z mb+1
    rol.z mb+2
    rol.z mb+3
    // [99] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1]
  __b1_from___b3:
    // [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy 
    // [99] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy 
    // [99] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy 
    jmp __b1
}
  // sin16s
// Calculate signed word sinus sin(x)
// x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28
// result: signed word sin(x) s[0.15] - using the full range  -$7fff - $7fff
// sin16s(dword zp(8) x)
sin16s: {
    .label __4 = $1a
    .label x = 8
    .label return = $c
    .label x1 = $1e
    .label x2 = $e
    .label x3 = $e
    .label x3_6 = $20
    .label usinx = $c
    .label x4 = $e
    .label x5 = $20
    .label x5_128 = $20
    .label sinx = $c
    // [108] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 
    lda.z x+3
    cmp #>PI_u4f28>>$10
    bcc __b1_from_sin16s
    bne !+
    lda.z x+2
    cmp #<PI_u4f28>>$10
    bcc __b1_from_sin16s
    bne !+
    lda.z x+1
    cmp #>PI_u4f28
    bcc __b1_from_sin16s
    bne !+
    lda.z x
    cmp #<PI_u4f28
    bcc __b1_from_sin16s
  !:
    jmp __b4
    // sin16s::@4
  __b4:
    // [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28 -- vduz1=vduz1_minus_vduc1 
    lda.z x
    sec
    sbc #<PI_u4f28
    sta.z x
    lda.z x+1
    sbc #>PI_u4f28
    sta.z x+1
    lda.z x+2
    sbc #<PI_u4f28>>$10
    sta.z x+2
    lda.z x+3
    sbc #>PI_u4f28>>$10
    sta.z x+3
    // [110] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1]
  __b1_from___b4:
    // [110] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuyy=vbuc1 
    ldy #1
    // [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy 
    jmp __b1
    // [110] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1]
  __b1_from_sin16s:
    // [110] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuyy=vbuc1 
    ldy #0
    // [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy 
    jmp __b1
    // sin16s::@1
  __b1:
    // [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 
    lda.z x+3
    cmp #>PI_HALF_u4f28>>$10
    bcc __b2_from___b1
    bne !+
    lda.z x+2
    cmp #<PI_HALF_u4f28>>$10
    bcc __b2_from___b1
    bne !+
    lda.z x+1
    cmp #>PI_HALF_u4f28
    bcc __b2_from___b1
    bne !+
    lda.z x
    cmp #<PI_HALF_u4f28
    bcc __b2_from___b1
  !:
    jmp __b5
    // sin16s::@5
  __b5:
    // [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 
    lda #<PI_u4f28
    sec
    sbc.z x
    sta.z x
    lda #>PI_u4f28
    sbc.z x+1
    sta.z x+1
    lda #<PI_u4f28>>$10
    sbc.z x+2
    sta.z x+2
    lda #>PI_u4f28>>$10
    sbc.z x+3
    sta.z x+3
    // [113] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2]
  __b2_from___b1:
  __b2_from___b5:
    // [113] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy 
    jmp __b2
    // sin16s::@2
  __b2:
    // [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 
    lda.z x
    asl
    sta.z __4
    lda.z x+1
    rol
    sta.z __4+1
    lda.z x+2
    rol
    sta.z __4+2
    lda.z x+3
    rol
    sta.z __4+3
    asl.z __4
    rol.z __4+1
    rol.z __4+2
    rol.z __4+3
    asl.z __4
    rol.z __4+1
    rol.z __4+2
    rol.z __4+3
    // [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 
    lda.z __4+2
    sta.z x1
    lda.z __4+3
    sta.z x1+1
    // [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v1
    lda.z x1+1
    sta.z mulu16_sel.v1+1
    // [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [118] call mulu16_sel 
    // [148] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel]
  mulu16_sel_from___b2:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #0
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12
    jmp __b7
    // sin16s::@7
  __b7:
    // [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return
    sta.z x2
    lda.z mulu16_sel.return+1
    sta.z x2+1
    // [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0
    // [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [123] call mulu16_sel 
    // [148] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel]
  mulu16_sel_from___b7:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #1
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return
    sta.z mulu16_sel.return_1
    lda.z mulu16_sel.return+1
    sta.z mulu16_sel.return_1+1
    jmp __b8
    // sin16s::@8
  __b8:
    // [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1
    // [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0
    // [127] call mulu16_sel 
    // [148] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel]
  mulu16_sel_from___b8:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #1
    // [148] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 
    lda #<$10000/6
    sta.z mulu16_sel.v2
    lda #>$10000/6
    sta.z mulu16_sel.v2+1
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12
    jmp __b9
    // sin16s::@9
  __b9:
    // [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2
    // [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 
    lda.z x1
    sec
    sbc.z x3_6
    sta.z usinx
    lda.z x1+1
    sbc.z x3_6+1
    sta.z usinx+1
    // [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0
    // [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [133] call mulu16_sel 
    // [148] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel]
  mulu16_sel_from___b9:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #0
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return
    sta.z mulu16_sel.return_1
    lda.z mulu16_sel.return+1
    sta.z mulu16_sel.return_1+1
    jmp __b10
    // sin16s::@10
  __b10:
    // [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10
    // [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0
    // [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [138] call mulu16_sel 
    // [148] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel]
  mulu16_sel_from___b10:
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #0
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12
    jmp __b11
    // sin16s::@11
  __b11:
    // [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11
    // [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    // [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 
    lda.z usinx
    clc
    adc.z x5_128
    sta.z usinx
    lda.z usinx+1
    adc.z x5_128+1
    sta.z usinx+1
    // [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuyy_eq_0_then_la1 
    cpy #0
    beq __b12
    jmp __b6
    // sin16s::@6
  __b6:
    // [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 
    sec
    lda #0
    sbc.z sinx
    sta.z sinx
    lda #0
    sbc.z sinx+1
    sta.z sinx+1
    // [145] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3]
  __b3_from___b12:
  __b3_from___b6:
    // [145] phi (signed word) sin16s::return#1 = (signed word) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy 
    jmp __b3
    // sin16s::@3
  __b3:
    jmp __breturn
    // sin16s::@return
  __breturn:
    // [146] return 
    rts
    // sin16s::@12
  __b12:
    // [147] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1
    jmp __b3_from___b12
}
  // mulu16_sel
// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result.
// The select parameter indicates how many of the highest bits of the 32-bit result to skip
// mulu16_sel(word zp($e) v1, word zp($12) v2, byte register(X) select)
mulu16_sel: {
    .label __0 = 8
    .label __1 = 8
    .label v1 = $e
    .label v2 = $12
    .label return = $20
    .label return_1 = $e
    // [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 
    lda.z v1
    sta.z mul16u.a
    lda.z v1+1
    sta.z mul16u.a+1
    // [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5
    // [151] call mul16u 
    // [97] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u]
  mul16u_from_mulu16_sel:
    // [97] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy 
    // [97] phi (word) mul16u::b#2 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- register_copy 
    jsr mul16u
    // [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2
    jmp __b1
    // mulu16_sel::@1
  __b1:
    // [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3
    // [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx 
    cpx #0
    beq !e+
  !:
    asl.z __1
    rol.z __1+1
    rol.z __1+2
    rol.z __1+3
    dex
    bne !-
  !e:
    // [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 
    lda.z __1+2
    sta.z return
    lda.z __1+3
    sta.z return+1
    jmp __breturn
    // mulu16_sel::@return
  __breturn:
    // [156] return 
    rts
}
  // div32u16u
// Divide unsigned 32-bit dword dividend with a 16-bit word divisor
// The 16-bit word remainder can be found in rem16u after the division
div32u16u: {
    .label quotient_hi = $20
    .label quotient_lo = $e
    .label return = $14
    // [158] call divr16u 
    // [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u]
  divr16u_from_div32u16u:
    // [167] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 
    lda #<PI2_u4f28>>$10
    sta.z divr16u.dividend
    lda #>PI2_u4f28>>$10
    sta.z divr16u.dividend+1
    // [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z divr16u.rem
    lda #>0
    sta.z divr16u.rem+1
    jsr divr16u
    // [159] (word) divr16u::return#2 ← (word) divr16u::return#0
    jmp __b1
    // div32u16u::@1
  __b1:
    // [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 
    lda.z divr16u.return
    sta.z quotient_hi
    lda.z divr16u.return+1
    sta.z quotient_hi+1
    // [161] (word) divr16u::rem#4 ← (word) rem16u#1
    // [162] call divr16u 
    // [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u]
  divr16u_from___b1:
    // [167] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 
    lda #<PI2_u4f28&$ffff
    sta.z divr16u.dividend
    lda #>PI2_u4f28&$ffff
    sta.z divr16u.dividend+1
    // [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy 
    jsr divr16u
    // [163] (word) divr16u::return#3 ← (word) divr16u::return#0
    jmp __b2
    // div32u16u::@2
  __b2:
    // [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3
    // [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 
    lda.z quotient_hi
    sta.z return+2
    lda.z quotient_hi+1
    sta.z return+3
    lda.z quotient_lo
    sta.z return
    lda.z quotient_lo+1
    sta.z return+1
    jmp __breturn
    // div32u16u::@return
  __breturn:
    // [166] return 
    rts
}
  // divr16u
// Performs division on two 16 bit unsigned words and an initial remainder
// Returns the quotient dividend/divisor.
// The final remainder will be set into the global variable rem16u
// Implemented using simple binary division
// divr16u(word zp($c) dividend, word zp($18) rem)
divr16u: {
    .label rem = $18
    .label dividend = $c
    .label quotient = $e
    .label return = $e
    // [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1]
  __b1_from_divr16u:
    // [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [168] phi (word) divr16u::quotient#3 = (word) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z quotient
    lda #>0
    sta.z quotient+1
    // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy 
    // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy 
    jmp __b1
    // [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1]
  __b1_from___b3:
    // [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy 
    // [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy 
    // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy 
    // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy 
    jmp __b1
    // divr16u::@1
  __b1:
    // [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z rem
    rol.z rem+1
    // [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 
    lda.z dividend+1
    // [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 
    and #$80
    // [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b2_from___b1
    jmp __b4
    // divr16u::@4
  __b4:
    // [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 
    lda #1
    ora.z rem
    sta.z rem
    // [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2]
  __b2_from___b1:
  __b2_from___b4:
    // [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy 
    jmp __b2
    // divr16u::@2
  __b2:
    // [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z dividend
    rol.z dividend+1
    // [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z quotient
    rol.z quotient+1
    // [177] if((word) divr16u::rem#6<(const word) SIN_SIZE) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 
    lda.z rem+1
    cmp #>SIN_SIZE
    bcc __b3_from___b2
    bne !+
    lda.z rem
    cmp #<SIN_SIZE
    bcc __b3_from___b2
  !:
    jmp __b5
    // divr16u::@5
  __b5:
    // [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 
    inc.z quotient
    bne !+
    inc.z quotient+1
  !:
    // [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE -- vwuz1=vwuz1_minus_vwuc1 
    lda.z rem
    sec
    sbc #<SIN_SIZE
    sta.z rem
    lda.z rem+1
    sbc #>SIN_SIZE
    sta.z rem+1
    // [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3]
  __b3_from___b2:
  __b3_from___b5:
    // [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy 
    // [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy 
    jmp __b3
    // divr16u::@3
  __b3:
    // [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$10
    bne __b1_from___b3
    jmp __b6
    // divr16u::@6
  __b6:
    // [183] (word) rem16u#1 ← (word) divr16u::rem#11
    jmp __breturn
    // divr16u::@return
  __breturn:
    // [184] return 
    rts
}
  // bitmap_clear
// Clear all graphics on the bitmap
// bgcol - the background color to fill the screen with
// fgcol - the foreground color to fill the screen with
bitmap_clear: {
    .const col = WHITE*$10
    // [186] call memset 
    // [190] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
  memset_from_bitmap_clear:
    // [190] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 
    ldx #col
    // [190] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 
    lda #<SCREEN
    sta.z memset.str
    lda #>SCREEN
    sta.z memset.str+1
    // [190] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 
    lda #<$3e8
    sta.z memset.num
    lda #>$3e8
    sta.z memset.num+1
    jsr memset
    // [187] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1]
  __b1_from_bitmap_clear:
    jmp __b1
    // bitmap_clear::@1
  __b1:
    // [188] call memset 
    // [190] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
  memset_from___b1:
    // [190] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 
    ldx #0
    // [190] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 
    lda #<BITMAP
    sta.z memset.str
    lda #>BITMAP
    sta.z memset.str+1
    // [190] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 
    lda #<$1f40
    sta.z memset.num
    lda #>$1f40
    sta.z memset.num+1
    jsr memset
    jmp __breturn
    // bitmap_clear::@return
  __breturn:
    // [189] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp($12) str, byte register(X) c, word zp($10) num)
memset: {
    .label end = $10
    .label dst = $12
    .label num = $10
    .label str = $12
    // [191] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 
    lda.z num
    bne !+
    lda.z num+1
    beq __breturn
  !:
    jmp __b1
    // memset::@1
  __b1:
    // [192] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 
    lda.z end
    clc
    adc.z str
    sta.z end
    lda.z end+1
    adc.z str+1
    sta.z end+1
    // [193] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
    // [194] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
  __b2_from___b1:
  __b2_from___b3:
    // [194] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy 
    jmp __b2
    // memset::@2
  __b2:
    // [195] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 
    lda.z dst+1
    cmp.z end+1
    bne __b3
    lda.z dst
    cmp.z end
    bne __b3
    jmp __breturn
    // memset::@return
  __breturn:
    // [196] return 
    rts
    // memset::@3
  __b3:
    // [197] *((byte*) memset::dst#2) ← (byte) memset::c#4 -- _deref_pbuz1=vbuxx 
    txa
    ldy #0
    sta (dst),y
    // [198] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    jmp __b2_from___b3
}
  // bitmap_init
// Initialize bitmap plotting tables
bitmap_init: {
    .label __7 = $22
    .label yoffs = $10
    // [200] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1]
  __b1_from_bitmap_init:
    // [200] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [200] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 
    lda #$80
    jmp __b1
    // [200] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1]
  __b1_from___b2:
    // [200] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy 
    // [200] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy 
    jmp __b1
    // bitmap_init::@1
  __b1:
    // [201] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_bit,x
    // [202] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 
    lsr
    // [203] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b6_from___b1
    // [205] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2]
  __b2_from___b1:
    // [205] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 
    lda #$80
    jmp __b2
    // [204] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6]
  __b6_from___b1:
    jmp __b6
    // bitmap_init::@6
  __b6:
    // [205] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2]
  __b2_from___b6:
    // [205] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy 
    jmp __b2
    // bitmap_init::@2
  __b2:
    // [206] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [207] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b1_from___b2
    // [208] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
  __b3_from___b2:
    // [208] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta.z yoffs
    lda #>BITMAP
    sta.z yoffs+1
    // [208] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 
    ldx #0
    jmp __b3
    // [208] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3]
  __b3_from___b4:
    // [208] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy 
    // [208] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy 
    jmp __b3
    // bitmap_init::@3
  __b3:
    // [209] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 
    lda #7
    sax.z __7
    // [210] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda.z yoffs
    // [211] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z __7
    // [212] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_ylo,x
    // [213] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda.z yoffs+1
    // [214] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_yhi,x
    // [215] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp.z __7
    bne __b4_from___b3
    jmp __b5
    // bitmap_init::@5
  __b5:
    // [216] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z yoffs
    adc #<$28*8
    sta.z yoffs
    lda.z yoffs+1
    adc #>$28*8
    sta.z yoffs+1
    // [217] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4]
  __b4_from___b3:
  __b4_from___b5:
    // [217] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy 
    jmp __b4
    // bitmap_init::@4
  __b4:
    // [218] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [219] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b3_from___b4
    jmp __breturn
    // bitmap_init::@return
  __breturn:
    // [220] return 
    rts
}
  // File Data
  // Tables for the plotter - initialized by calling bitmap_init();
  bitmap_plot_ylo: .fill $100, 0
  bitmap_plot_yhi: .fill $100, 0
  bitmap_plot_bit: .fill $100, 0
  .align $100
  sin: .fill 2*$200, 0
sin2:
.for(var i=0; i<512; i++) {
  	  .word sin(toRadians([i*360]/512))*320
    }


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp vicSelectGfxBank1
Removing instruction jmp vicSelectGfxBank1_toDd001
Removing instruction jmp vicSelectGfxBank1___b1
Removing instruction jmp __b2
Removing instruction jmp toD0181
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b6
Removing instruction jmp __b1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b6
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b3
Removing instruction jmp __b5
Removing instruction jmp __breturn
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b4
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b4
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b1
Removing instruction jmp __b5
Removing instruction jmp __b2
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __b9
Removing instruction jmp __b10
Removing instruction jmp __b11
Removing instruction jmp __b6
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b4
Removing instruction jmp __b2
Removing instruction jmp __b5
Removing instruction jmp __b3
Removing instruction jmp __b6
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b6
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b5
Removing instruction jmp __b4
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction lda #<0
Removing instruction lda #>0
Removing instruction lda #>0
Removing instruction ldy #0
Removing instruction lda #>0
Removing instruction lda #>0
Removing instruction lda #>0
Removing instruction lda #>0
Replacing instruction lda #<0 with TXA
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __bbegin with __b1
Replacing label __b8_from___b7 with __b3
Replacing label __b8_from___b7 with __b3
Replacing label __b3_from___b4 with __b3
Replacing label __b1_from___b2 with __b1
Replacing label __b1_from___b4 with __b2
Replacing label __b3_from___b2 with __b3
Replacing label __b2_from___b1 with __b2
Replacing label __b2_from___b1 with __b2
Replacing label __b2_from___b1 with __b2
Replacing label __b2_from___b1 with __b2
Replacing label __b3_from___b12 with __b3
Replacing label __b2_from___b1 with __b2
Replacing label __b3_from___b2 with __b3
Replacing label __b3_from___b2 with __b3
Replacing label __b1_from___b3 with __b1
Replacing label __b2_from___b3 with __b2
Replacing label __b6_from___b1 with __b2
Replacing label __b1_from___b2 with __b1
Replacing label __b4_from___b3 with __b4
Replacing label __b3_from___b4 with __b3
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction __bend_from___b1:
Removing instruction vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1:
Removing instruction vicSelectGfxBank1_toDd001:
Removing instruction toD0181_from___b2:
Removing instruction toD0181:
Removing instruction __b4_from___b3:
Removing instruction bitmap_clear_from___b4:
Removing instruction __b5_from___b4:
Removing instruction sin16s_gen2_from___b5:
Removing instruction __b6_from___b5:
Removing instruction render_sine_from___b6:
Removing instruction __b8_from___b7:
Removing instruction __b8:
Removing instruction __b3_from___b8:
Removing instruction __b1_from_wrap_y:
Removing instruction __b1_from___b2:
Removing instruction __b3_from___b1:
Removing instruction __b3_from___b4:
Removing instruction __b1_from___b3:
Removing instruction __b1_from___b3:
Removing instruction __b1_from___b4:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __b3_from___b2:
Removing instruction __b3_from___b4:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b5:
Removing instruction mulu16_sel_from___b8:
Removing instruction __b3_from___b12:
Removing instruction __b3_from___b6:
Removing instruction __breturn:
Removing instruction __b1_from___b3:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b4:
Removing instruction __b3_from___b2:
Removing instruction __b3_from___b5:
Removing instruction __breturn:
Removing instruction __b1_from_bitmap_clear:
Removing instruction memset_from___b1:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b3:
Removing instruction __b1_from___b2:
Removing instruction __b6_from___b1:
Removing instruction __b6:
Removing instruction __b2_from___b6:
Removing instruction __b3_from___b4:
Removing instruction __b4_from___b3:
Removing instruction __b4_from___b5:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction vicSelectGfxBank1:
Removing instruction vicSelectGfxBank1___b1:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction bitmap_init_from___b3:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __b1_from_render_sine:
Removing instruction __breturn:
Removing instruction wrap_y_from___b2:
Removing instruction __b4:
Removing instruction bitmap_plot_from___b4:
Removing instruction __b5:
Removing instruction wrap_y_from___b5:
Removing instruction __b6:
Removing instruction bitmap_plot_from___b6:
Removing instruction __b7:
Removing instruction __b3_from___b7:
Removing instruction __b1_from___b3:
Removing instruction __breturn:
Removing instruction __b5:
Removing instruction __breturn:
Removing instruction div32u16u_from_sin16s_gen2:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b1_from___b5:
Removing instruction mul16u_from_mul16s:
Removing instruction __b4:
Removing instruction __b3:
Removing instruction __b1_from_mul16u:
Removing instruction __breturn:
Removing instruction __b4:
Removing instruction __b1_from___b3:
Removing instruction __b4:
Removing instruction __b1_from___b4:
Removing instruction __b5:
Removing instruction mulu16_sel_from___b2:
Removing instruction __b7:
Removing instruction mulu16_sel_from___b7:
Removing instruction __b8:
Removing instruction __b9:
Removing instruction mulu16_sel_from___b9:
Removing instruction __b10:
Removing instruction mulu16_sel_from___b10:
Removing instruction __b11:
Removing instruction __b6:
Removing instruction mul16u_from_mulu16_sel:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction divr16u_from_div32u16u:
Removing instruction __b1:
Removing instruction divr16u_from___b1:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction __b1_from_divr16u:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction memset_from_bitmap_clear:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __b1:
Removing instruction __b1_from_bitmap_init:
Removing instruction __b2_from___b1:
Removing instruction __b3_from___b2:
Removing instruction __b5:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Skipping double jump to __b3 in beq __b12
Replacing jump to rts with rts in jmp __b3
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label __b1_from_sin16s to b1
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #<0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __b1:
Removing instruction __b12:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction rts
Succesful ASM optimization Pass5UnreachableCodeElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte*) BGCOL = (byte*) 53281
(const byte*) BITMAP = (byte*) 8192
(const byte*) CIA2_PORT_A = (byte*) 56576
(const byte*) CIA2_PORT_A_DDR = (byte*) 56578
(const byte*) D011 = (byte*) 53265
(const byte*) D016 = (byte*) 53270
(const byte*) D018 = (byte*) 53272
(const dword) PI2_u4f28 = (dword) $6487ed51
(const dword) PI_HALF_u4f28 = (dword) $1921fb54
(const dword) PI_u4f28 = (dword) $3243f6a9
(const byte*) PROCPORT = (byte*) 1
(const byte*) PROCPORT_DDR = (byte*) 0
(const byte) PROCPORT_DDR_MEMORY_MASK = (byte) 7
(const byte) PROCPORT_RAM_IO = (byte) 5
(const byte*) SCREEN = (byte*) 1024
(const word) SIN_SIZE = (word) $200
(const byte) SIZEOF_SIGNED_WORD = (byte) 2
(const byte) VIC_BMM = (byte) $20
(const byte) VIC_CSEL = (byte) 8
(const byte) VIC_DEN = (byte) $10
(const byte) VIC_RSEL = (byte) 8
(const byte) WHITE = (byte) 1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
(const byte) bitmap_clear::col#0 col = (const byte) WHITE*(byte) $10
(byte) bitmap_clear::fgcol
(byte*) bitmap_gfx
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
(byte~) bitmap_init::$4 reg byte a 22.0
(byte~) bitmap_init::$5 reg byte a 22.0
(byte~) bitmap_init::$6 reg byte a 22.0
(byte~) bitmap_init::$7 zp[1]:34 5.5
(label) bitmap_init::@1
(label) bitmap_init::@2
(label) bitmap_init::@3
(label) bitmap_init::@4
(label) bitmap_init::@5
(label) bitmap_init::@6
(label) bitmap_init::@return
(byte) bitmap_init::bits
(byte) bitmap_init::bits#1 reg byte a 11.0
(byte) bitmap_init::bits#3 reg byte a 16.5
(byte) bitmap_init::bits#4 reg byte a 7.333333333333333
(byte*) bitmap_init::gfx
(byte*) bitmap_init::screen
(byte) bitmap_init::x
(byte) bitmap_init::x#1 reg byte x 16.5
(byte) bitmap_init::x#2 reg byte x 5.5
(byte) bitmap_init::y
(byte) bitmap_init::y#1 reg byte x 16.5
(byte) bitmap_init::y#2 reg byte x 5.5
(byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#1 yoffs zp[2]:16 22.0
(byte*) bitmap_init::yoffs#2 yoffs zp[2]:16 6.875
(byte*) bitmap_init::yoffs#4 yoffs zp[2]:16 11.0
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(word~) bitmap_plot::$1 zp[2]:24 4.0
(byte~) bitmap_plot::$2 reg byte a 4.0
(label) bitmap_plot::@return
(byte*) bitmap_plot::plotter
(word) bitmap_plot::plotter#0 plotter zp[2]:18 1.0
(byte*) bitmap_plot::plotter#1 plotter zp[2]:18 3.0
(word) bitmap_plot::x
(word) bitmap_plot::x#0 x zp[2]:6 11.0
(word) bitmap_plot::x#1 x zp[2]:6 11.0
(word) bitmap_plot::x#2 x zp[2]:6 6.5
(byte) bitmap_plot::y
(byte) bitmap_plot::y#0 reg byte x 22.0
(byte) bitmap_plot::y#1 reg byte x 22.0
(byte) bitmap_plot::y#2 reg byte x 26.0
(const byte*) bitmap_plot_bit[(number) $100]  = { fill( $100, 0) }
(const byte*) bitmap_plot_yhi[(number) $100]  = { fill( $100, 0) }
(const byte*) bitmap_plot_ylo[(number) $100]  = { fill( $100, 0) }
(byte*) bitmap_screen
(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor)
(label) div32u16u::@1
(label) div32u16u::@2
(label) div32u16u::@return
(dword) div32u16u::dividend
(word) div32u16u::divisor
(dword) div32u16u::quotient
(word) div32u16u::quotient_hi
(word) div32u16u::quotient_hi#0 quotient_hi zp[2]:32 0.8
(word) div32u16u::quotient_lo
(word) div32u16u::quotient_lo#0 quotient_lo zp[2]:14 4.0
(dword) div32u16u::return
(dword) div32u16u::return#0 return zp[4]:20 1.3333333333333333
(dword) div32u16u::return#2 return zp[4]:20 4.0
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
(byte~) divr16u::$1 reg byte a 22.0
(byte~) divr16u::$2 reg byte a 22.0
(label) divr16u::@1
(label) divr16u::@2
(label) divr16u::@3
(label) divr16u::@4
(label) divr16u::@5
(label) divr16u::@6
(label) divr16u::@return
(word) divr16u::dividend
(word) divr16u::dividend#0 dividend zp[2]:12 2.75
(word) divr16u::dividend#3 dividend zp[2]:12 5.0
(word) divr16u::dividend#5 dividend zp[2]:12 2.0
(word) divr16u::divisor
(byte) divr16u::i
(byte) divr16u::i#1 reg byte x 16.5
(byte) divr16u::i#2 reg byte x 1.6923076923076923
(word) divr16u::quotient
(word) divr16u::quotient#1 quotient zp[2]:14 16.5
(word) divr16u::quotient#2 quotient zp[2]:14 11.0
(word) divr16u::quotient#3 quotient zp[2]:14 2.75
(word) divr16u::rem
(word) divr16u::rem#0 rem zp[2]:24 8.25
(word) divr16u::rem#1 rem zp[2]:24 22.0
(word) divr16u::rem#10 rem zp[2]:24 4.0
(word) divr16u::rem#11 rem zp[2]:24 11.666666666666666
(word) divr16u::rem#2 rem zp[2]:24 22.0
(word) divr16u::rem#4 rem zp[2]:24 4.0
(word) divr16u::rem#5 rem zp[2]:24 24.0
(word) divr16u::rem#6 rem zp[2]:24 11.0
(word) divr16u::return
(word) divr16u::return#0 return zp[2]:14 5.285714285714286
(word) divr16u::return#2 return zp[2]:14 4.0
(word) divr16u::return#3 return zp[2]:14 4.0
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(label) main::vicSelectGfxBank1
(label) main::vicSelectGfxBank1_@1
(byte*) main::vicSelectGfxBank1_gfx
(label) main::vicSelectGfxBank1_toDd001
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte) main::vicSelectGfxBank1_toDd001_return
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte x 1.375
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:18 22.0
(byte*) memset::dst#2 dst zp[2]:18 15.333333333333332
(byte*) memset::dst#4 dst zp[2]:18 4.0
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:16 2.1666666666666665
(word) memset::num
(word) memset::num#2 num zp[2]:16 2.0
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:18
(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b)
(word~) mul16s::$16 zp[2]:30 4.0
(word~) mul16s::$9 zp[2]:30 4.0
(label) mul16s::@1
(label) mul16s::@2
(label) mul16s::@3
(label) mul16s::@4
(label) mul16s::@return
(signed word) mul16s::a
(signed word) mul16s::a#0 a zp[2]:12 2.6
(signed word) mul16s::b
(dword) mul16s::m
(dword) mul16s::m#0 m zp[4]:8 2.0
(dword) mul16s::m#1 m zp[4]:8 4.0
(dword) mul16s::m#4 m zp[4]:8 4.0
(signed dword) mul16s::return
(signed dword) mul16s::return#0 return zp[4]:8 4.333333333333333
(signed dword) mul16s::return#2 return zp[4]:8 22.0
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(byte~) mul16u::$1 reg byte a 202.0
(label) mul16u::@1
(label) mul16u::@2
(label) mul16u::@3
(label) mul16u::@4
(label) mul16u::@return
(word) mul16u::a
(word) mul16u::a#0 a zp[2]:24 101.0
(word) mul16u::a#1 a zp[2]:24 4.0
(word) mul16u::a#2 a zp[2]:24 2.0
(word) mul16u::a#3 a zp[2]:24 67.66666666666666
(word) mul16u::a#6 a zp[2]:24 3.0
(word) mul16u::b
(word) mul16u::b#1 b zp[2]:18 4.0
(word) mul16u::b#2 b zp[2]:18 2.0
(dword) mul16u::mb
(dword) mul16u::mb#0 mb zp[4]:26 4.0
(dword) mul16u::mb#1 mb zp[4]:26 202.0
(dword) mul16u::mb#2 mb zp[4]:26 43.57142857142858
(dword) mul16u::res
(dword) mul16u::res#1 res zp[4]:8 202.0
(dword) mul16u::res#2 res zp[4]:8 43.85714285714286
(dword) mul16u::res#6 res zp[4]:8 101.0
(dword) mul16u::return
(dword) mul16u::return#2 return zp[4]:8 4.0
(dword) mul16u::return#3 return zp[4]:8 4.0
(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
(dword~) mulu16_sel::$0 zp[4]:8 4.0
(dword~) mulu16_sel::$1 zp[4]:8 4.0
(label) mulu16_sel::@1
(label) mulu16_sel::@return
(word) mulu16_sel::return
(word) mulu16_sel::return#0 return zp[2]:32 4.0
(word) mulu16_sel::return#1 return_1 zp[2]:14 4.0
(word) mulu16_sel::return#10 return_1 zp[2]:14 4.0
(word) mulu16_sel::return#11 return zp[2]:32 4.0
(word) mulu16_sel::return#12 return zp[2]:32 1.714285714285714
(word) mulu16_sel::return#2 return zp[2]:32 4.0
(byte) mulu16_sel::select
(byte) mulu16_sel::select#5 reg byte x 0.3333333333333333
(word) mulu16_sel::v1
(word) mulu16_sel::v1#0 v1 zp[2]:14 2.0
(word) mulu16_sel::v1#1 v1 zp[2]:14 2.0
(word) mulu16_sel::v1#2 v1 zp[2]:14 4.0
(word) mulu16_sel::v1#3 v1 zp[2]:14 2.0
(word) mulu16_sel::v1#4 v1 zp[2]:14 2.0
(word) mulu16_sel::v1#5 v1 zp[2]:14 12.0
(word) mulu16_sel::v2
(word) mulu16_sel::v2#0 v2 zp[2]:18 4.0
(word) mulu16_sel::v2#1 v2 zp[2]:18 4.0
(word) mulu16_sel::v2#3 v2 zp[2]:18 4.0
(word) mulu16_sel::v2#4 v2 zp[2]:18 4.0
(word) mulu16_sel::v2#5 v2 zp[2]:18 5.0
(word) rem16u
(word) rem16u#1 rem16u zp[2]:24 0.8
(void()) render_sine()
(signed word*~) render_sine::$1 zp[2]:18 22.0
(word~) render_sine::$10 zp[2]:18 22.0
(word~) render_sine::$11 zp[2]:18 22.0
(signed word*~) render_sine::$4 zp[2]:18 22.0
(label) render_sine::@1
(label) render_sine::@2
(label) render_sine::@3
(label) render_sine::@4
(label) render_sine::@5
(label) render_sine::@6
(label) render_sine::@7
(label) render_sine::@8
(label) render_sine::@return
(signed word) render_sine::sin2_val
(signed word) render_sine::sin2_val#0 sin2_val zp[2]:18 22.0
(word) render_sine::sin_idx
(word) render_sine::sin_idx#1 sin_idx zp[2]:16 22.0
(word) render_sine::sin_idx#2 sin_idx zp[2]:16 2.1153846153846154
(signed word) render_sine::sin_val
(signed word) render_sine::sin_val#0 sin_val zp[2]:18 22.0
(word) render_sine::xpos
(word) render_sine::xpos#1 xpos zp[2]:6 11.0
(word) render_sine::xpos#3 xpos zp[2]:6 2.0
(word) render_sine::xpos#9 xpos zp[2]:6 11.0
(byte) render_sine::ypos
(byte) render_sine::ypos#0 reg byte x 11.0
(byte) render_sine::ypos2
(byte) render_sine::ypos2#0 reg byte x 11.0
(const signed word*) sin[(number) $200]  = { fill( $200, 0) }
(signed word()) sin16s((dword) sin16s::x)
(dword~) sin16s::$4 zp[4]:26 4.0
(label) sin16s::@1
(label) sin16s::@10
(label) sin16s::@11
(label) sin16s::@12
(label) sin16s::@2
(label) sin16s::@3
(label) sin16s::@4
(label) sin16s::@5
(label) sin16s::@6
(label) sin16s::@7
(label) sin16s::@8
(label) sin16s::@9
(label) sin16s::@return
(byte) sin16s::isUpper
(byte) sin16s::isUpper#2 reg byte y 0.06060606060606061
(signed word) sin16s::return
(signed word) sin16s::return#0 return zp[2]:12 22.0
(signed word) sin16s::return#1 return zp[2]:12 5.0
(signed word) sin16s::return#5 return zp[2]:12 4.0
(signed word) sin16s::sinx
(signed word) sin16s::sinx#1 sinx zp[2]:12 4.0
(word) sin16s::usinx
(word) sin16s::usinx#0 usinx zp[2]:12 0.3333333333333333
(word) sin16s::usinx#1 usinx zp[2]:12 1.0
(dword) sin16s::x
(dword) sin16s::x#0 x zp[4]:8 8.5
(dword) sin16s::x#1 x zp[4]:8 4.0
(dword) sin16s::x#2 x zp[4]:8 4.0
(dword) sin16s::x#4 x zp[4]:8 5.0
(dword) sin16s::x#6 x zp[4]:8 6.0
(word) sin16s::x1
(word) sin16s::x1#0 x1 zp[2]:30 0.6363636363636365
(word) sin16s::x2
(word) sin16s::x2#0 x2 zp[2]:14 4.0
(word) sin16s::x3
(word) sin16s::x3#0 x3 zp[2]:14 1.0
(word) sin16s::x3_6
(word) sin16s::x3_6#0 x3_6 zp[2]:32 4.0
(word) sin16s::x4
(word) sin16s::x4#0 x4 zp[2]:14 4.0
(word) sin16s::x5
(word) sin16s::x5#0 x5 zp[2]:32 4.0
(word) sin16s::x5_128
(word) sin16s::x5_128#0 x5_128 zp[2]:32 4.0
(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max)
(signed dword~) sin16s_gen2::$6 zp[4]:8 22.0
(word~) sin16s_gen2::$9 zp[2]:24 11.0
(label) sin16s_gen2::@1
(label) sin16s_gen2::@2
(label) sin16s_gen2::@3
(label) sin16s_gen2::@4
(label) sin16s_gen2::@5
(label) sin16s_gen2::@return
(signed word) sin16s_gen2::ampl
(const signed word) sin16s_gen2::ampl#0 ampl = (const signed word) sin16s_gen2::max#0-(const signed word) sin16s_gen2::min#0
(word) sin16s_gen2::i
(word) sin16s_gen2::i#1 i zp[2]:16 22.0
(word) sin16s_gen2::i#2 i zp[2]:16 2.5384615384615383
(signed word) sin16s_gen2::max
(const signed word) sin16s_gen2::max#0 max = (signed word) $140
(signed word) sin16s_gen2::min
(const signed word) sin16s_gen2::min#0 min = (signed word) -$140
(signed word) sin16s_gen2::offs
(signed word*) sin16s_gen2::sintab
(signed word*) sin16s_gen2::sintab#0 sintab zp[2]:6 7.333333333333333
(signed word*) sin16s_gen2::sintab#2 sintab zp[2]:6 3.0
(dword) sin16s_gen2::step
(dword) sin16s_gen2::step#0 step zp[4]:20 0.8666666666666666
(word) sin16s_gen2::wavelength
(dword) sin16s_gen2::x
(dword) sin16s_gen2::x#1 x zp[4]:2 11.0
(dword) sin16s_gen2::x#2 x zp[4]:2 2.75
(const signed word*) sin2[(number) $200]  = kickasm {{ .for(var i=0; i<512; i++) {
  	  .word sin(toRadians([i*360]/512))*320
    }
 }}
(byte()) wrap_y((signed word) wrap_y::y)
(label) wrap_y::@1
(label) wrap_y::@2
(label) wrap_y::@3
(label) wrap_y::@4
(label) wrap_y::@5
(label) wrap_y::@return
(byte) wrap_y::return
(byte) wrap_y::return#0 reg byte a 22.0
(byte) wrap_y::return#1 reg byte a 22.0
(byte) wrap_y::return#2 reg byte a 6.0
(signed word) wrap_y::y
(signed word) wrap_y::y#0 y zp[2]:18 22.0
(signed word) wrap_y::y#1 y zp[2]:18 22.0
(signed word) wrap_y::y#2 y zp[2]:18 202.0
(signed word) wrap_y::y#3 y zp[2]:18 202.0
(signed word) wrap_y::y#4 y zp[2]:18 203.0
(signed word) wrap_y::y#6 y zp[2]:18 202.0
(signed word) wrap_y::y#9 y zp[2]:18 24.0

reg byte x [ bitmap_plot::y#2 bitmap_plot::y#1 bitmap_plot::y#0 ]
zp[4]:2 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ]
zp[2]:6 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 render_sine::xpos#3 render_sine::xpos#9 render_sine::xpos#1 bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#0 ]
reg byte y [ sin16s::isUpper#2 ]
zp[4]:8 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$6 mulu16_sel::$0 mulu16_sel::$1 ]
reg byte x [ mulu16_sel::select#5 ]
zp[2]:12 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 sin16s::usinx#0 ]
zp[2]:14 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ]
reg byte x [ divr16u::i#2 divr16u::i#1 ]
reg byte x [ memset::c#4 ]
reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ]
reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ]
zp[2]:16 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 memset::num#2 memset::end#0 sin16s_gen2::i#2 sin16s_gen2::i#1 render_sine::sin_idx#2 render_sine::sin_idx#1 ]
reg byte a [ wrap_y::return#0 ]
reg byte x [ render_sine::ypos#0 ]
reg byte a [ wrap_y::return#1 ]
reg byte x [ render_sine::ypos2#0 ]
zp[2]:18 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 mul16u::b#2 mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#1 wrap_y::y#0 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$1 render_sine::$11 render_sine::$4 ]
reg byte a [ bitmap_plot::$2 ]
reg byte a [ wrap_y::return#2 ]
zp[4]:20 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ]
zp[2]:24 [ sin16s_gen2::$9 bitmap_plot::$1 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ]
reg byte a [ mul16u::$1 ]
zp[4]:26 [ sin16s::$4 mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
zp[2]:30 [ sin16s::x1#0 mul16s::$9 mul16s::$16 ]
zp[2]:32 [ div32u16u::quotient_hi#0 mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ]
reg byte a [ divr16u::$1 ]
reg byte a [ divr16u::$2 ]
zp[1]:34 [ bitmap_init::$7 ]
reg byte a [ bitmap_init::$4 ]
reg byte a [ bitmap_init::$5 ]
reg byte a [ bitmap_init::$6 ]


FINAL ASSEMBLER
Score: 25036

  // File Comments
// Generate a big sinus and plot it on a bitmap
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.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
  .label BGCOL = $d021
  .label D011 = $d011
  .const VIC_BMM = $20
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label D016 = $d016
  .const VIC_CSEL = 8
  .label D018 = $d018
  // 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
  .const WHITE = 1
  // PI*2 in u[4.28] format
  .const PI2_u4f28 = $6487ed51
  // PI in u[4.28] format
  .const PI_u4f28 = $3243f6a9
  // PI/2 in u[4.28] format
  .const PI_HALF_u4f28 = $1921fb54
  .const SIN_SIZE = $200
  .const SIZEOF_SIGNED_WORD = 2
  .label SCREEN = $400
  .label BITMAP = $2000
  // Remainder after unsigned 16-bit division
  .label rem16u = $18
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .const vicSelectGfxBank1_toDd001_return = 3
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
    // asm
    // asm { sei  }
    sei
    // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
    // [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 
    // Disable normal interrupt
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // *PROCPORT = PROCPORT_RAM_IO
    // [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3
    // [7] *((const byte*) D011) ← (const byte) VIC_BMM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_BMM|VIC_DEN|VIC_RSEL|3
    sta D011
    // main::vicSelectGfxBank1
    // *CIA2_PORT_A_DDR = %00000011
    // [8] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    lda #3
    sta CIA2_PORT_A_DDR
    // [9] 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)
    // [10] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 
    lda #vicSelectGfxBank1_toDd001_return
    sta CIA2_PORT_A
    // main::@2
    // *D016 = VIC_CSEL
    // [11] *((const byte*) D016) ← (const byte) VIC_CSEL -- _deref_pbuc1=vbuc2 
    lda #VIC_CSEL
    sta D016
    // [12] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181]
    // main::toD0181
    // main::@3
    // *D018 = toD018(SCREEN, BITMAP)
    // [13] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // bitmap_init(BITMAP, SCREEN)
    // [14] call bitmap_init 
    // [199] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init]
    jsr bitmap_init
    // [15] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
    // main::@4
    // bitmap_clear(BLACK, WHITE)
    // [16] call bitmap_clear 
    // [185] phi from main::@4 to bitmap_clear [phi:main::@4->bitmap_clear]
    jsr bitmap_clear
    // [17] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
    // main::@5
    // sin16s_gen2(sin, SIN_SIZE, -320, 320)
    // [18] call sin16s_gen2 
    // [67] phi from main::@5 to sin16s_gen2 [phi:main::@5->sin16s_gen2]
    jsr sin16s_gen2
    // [19] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
    // main::@6
    // render_sine()
    // [20] call render_sine 
    // [22] phi from main::@6 to render_sine [phi:main::@6->render_sine]
    jsr render_sine
    // main::@1
  __b1:
    // (*BGCOL)++;
    // [21] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
    jmp __b1
}
  // render_sine
render_sine: {
    .label __1 = $12
    .label __4 = $12
    .label __10 = $12
    .label __11 = $12
    .label sin_val = $12
    .label sin2_val = $12
    .label xpos = 6
    .label sin_idx = $10
    // [23] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1]
    // [23] phi (word) render_sine::xpos#3 = (word) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z xpos
    sta.z xpos+1
    // [23] phi (word) render_sine::sin_idx#2 = (word) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vwuc1 
    sta.z sin_idx
    sta.z sin_idx+1
    // render_sine::@1
  __b1:
    // for(word sin_idx=0; sin_idx<SIN_SIZE; sin_idx++)
    // [24] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2 -- vwuz1_lt_vwuc1_then_la1 
    lda.z sin_idx+1
    cmp #>SIN_SIZE
    bcc __b2
    bne !+
    lda.z sin_idx
    cmp #<SIN_SIZE
    bcc __b2
  !:
    // render_sine::@return
    // }
    // [25] return 
    rts
    // render_sine::@2
  __b2:
    // sin+sin_idx
    // [26] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 
    lda.z sin_idx
    asl
    sta.z __10
    lda.z sin_idx+1
    rol
    sta.z __10+1
    // [27] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz1 
    clc
    lda.z __1
    adc #<sin
    sta.z __1
    lda.z __1+1
    adc #>sin
    sta.z __1+1
    // sin_val = *(sin+sin_idx)
    // [28] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1) -- vwsz1=_deref_pwsz1 
    ldy #0
    lda (sin_val),y
    pha
    iny
    lda (sin_val),y
    sta.z sin_val+1
    pla
    sta.z sin_val
    // wrap_y(sin_val)
    // [29] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0
    // [30] call wrap_y 
    // [58] phi from render_sine::@2 to wrap_y [phi:render_sine::@2->wrap_y]
    // [58] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@2->wrap_y#0] -- register_copy 
    jsr wrap_y
    // wrap_y(sin_val)
    // [31] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2
    // render_sine::@4
    // ypos = wrap_y(sin_val)
    // [32] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuxx=vbuaa 
    tax
    // bitmap_plot(xpos,ypos)
    // [33] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3
    // [34] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0
    // [35] call bitmap_plot 
    // [51] phi from render_sine::@4 to bitmap_plot [phi:render_sine::@4->bitmap_plot]
    // [51] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@4->bitmap_plot#0] -- register_copy 
    // [51] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@4->bitmap_plot#1] -- register_copy 
    jsr bitmap_plot
    // render_sine::@5
    // sin2+sin_idx
    // [36] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 
    lda.z sin_idx
    asl
    sta.z __11
    lda.z sin_idx+1
    rol
    sta.z __11+1
    // [37] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz1 
    clc
    lda.z __4
    adc #<sin2
    sta.z __4
    lda.z __4+1
    adc #>sin2
    sta.z __4+1
    // sin2_val = *(sin2+sin_idx)
    // [38] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4) -- vwsz1=_deref_pwsz1 
    ldy #0
    lda (sin2_val),y
    pha
    iny
    lda (sin2_val),y
    sta.z sin2_val+1
    pla
    sta.z sin2_val
    // wrap_y(sin2_val+10)
    // [39] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1 
    lda.z wrap_y.y
    clc
    adc #<$a
    sta.z wrap_y.y
    lda.z wrap_y.y+1
    adc #>$a
    sta.z wrap_y.y+1
    // [40] call wrap_y 
    // [58] phi from render_sine::@5 to wrap_y [phi:render_sine::@5->wrap_y]
    // [58] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@5->wrap_y#0] -- register_copy 
    jsr wrap_y
    // wrap_y(sin2_val+10)
    // [41] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2
    // render_sine::@6
    // ypos2 = wrap_y(sin2_val+10)
    // [42] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuxx=vbuaa 
    tax
    // bitmap_plot(xpos,ypos2)
    // [43] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3
    // [44] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0
    // [45] call bitmap_plot 
    // [51] phi from render_sine::@6 to bitmap_plot [phi:render_sine::@6->bitmap_plot]
    // [51] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@6->bitmap_plot#0] -- register_copy 
    // [51] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@6->bitmap_plot#1] -- register_copy 
    jsr bitmap_plot
    // render_sine::@7
    // xpos++;
    // [46] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 
    inc.z xpos
    bne !+
    inc.z xpos+1
  !:
    // if(xpos==320)
    // [47] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8 -- vwuz1_neq_vwuc1_then_la1 
    lda.z xpos+1
    cmp #>$140
    bne __b3
    lda.z xpos
    cmp #<$140
    bne __b3
    // [49] phi from render_sine::@7 to render_sine::@3 [phi:render_sine::@7->render_sine::@3]
    // [49] phi (word) render_sine::xpos#9 = (byte) 0 [phi:render_sine::@7->render_sine::@3#0] -- vwuz1=vbuc1 
    lda #<0
    sta.z xpos
    sta.z xpos+1
    // [48] phi from render_sine::@7 to render_sine::@8 [phi:render_sine::@7->render_sine::@8]
    // render_sine::@8
    // [49] phi from render_sine::@8 to render_sine::@3 [phi:render_sine::@8->render_sine::@3]
    // [49] phi (word) render_sine::xpos#9 = (word) render_sine::xpos#1 [phi:render_sine::@8->render_sine::@3#0] -- register_copy 
    // render_sine::@3
  __b3:
    // for(word sin_idx=0; sin_idx<SIN_SIZE; sin_idx++)
    // [50] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 
    inc.z sin_idx
    bne !+
    inc.z sin_idx+1
  !:
    // [23] phi from render_sine::@3 to render_sine::@1 [phi:render_sine::@3->render_sine::@1]
    // [23] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#9 [phi:render_sine::@3->render_sine::@1#0] -- register_copy 
    // [23] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@3->render_sine::@1#1] -- register_copy 
    jmp __b1
}
  // bitmap_plot
// Plot a single dot in the bitmap
// bitmap_plot(word zp(6) x, byte register(X) y)
bitmap_plot: {
    .label __1 = $18
    .label plotter = $12
    .label x = 6
    // (byte*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] }
    // [52] (word) bitmap_plot::plotter#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx 
    lda bitmap_plot_yhi,x
    sta.z plotter+1
    lda bitmap_plot_ylo,x
    sta.z plotter
    // x & $fff8
    // [53] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 
    lda.z x
    and #<$fff8
    sta.z __1
    lda.z x+1
    and #>$fff8
    sta.z __1+1
    // plotter += ( x & $fff8 )
    // [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 
    lda.z plotter
    clc
    adc.z __1
    sta.z plotter
    lda.z plotter+1
    adc.z __1+1
    sta.z plotter+1
    // <x
    // [55] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuaa=_lo_vwuz1 
    lda.z x
    // *plotter |= bitmap_plot_bit[<x]
    // [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte*) bitmap_plot_bit + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa 
    tay
    lda bitmap_plot_bit,y
    ldy #0
    ora (plotter),y
    sta (plotter),y
    // bitmap_plot::@return
    // }
    // [57] return 
    rts
}
  // wrap_y
// wrap_y(signed word zp($12) y)
wrap_y: {
    .label y = $12
    // [59] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1]
    // [59] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy 
    // wrap_y::@1
  __b1:
    // while(y>=200)
    // [60] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 
    lda.z y
    cmp #<$c8
    lda.z y+1
    sbc #>$c8
    bvc !+
    eor #$80
  !:
    bpl __b2
    // [61] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3]
    // [61] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy 
    // wrap_y::@3
  __b3:
    // while(y<0)
    // [62] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 
    lda.z y+1
    bmi __b4
    // wrap_y::@5
    // (byte)y
    // [63] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuaa=_byte_vwsz1 
    lda.z y
    // wrap_y::@return
    // }
    // [64] return 
    rts
    // wrap_y::@4
  __b4:
    // y += 200
    // [65] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 
    clc
    lda.z y
    adc #<$c8
    sta.z y
    lda.z y+1
    adc #>$c8
    sta.z y+1
    jmp __b3
    // wrap_y::@2
  __b2:
    // y -= 200
    // [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 
    lda.z y
    sec
    sbc #<$c8
    sta.z y
    lda.z y+1
    sbc #>$c8
    sta.z y+1
    jmp __b1
}
  // sin16s_gen2
// Generate signed word sinus table - with values in the range min-max.
// sintab - the table to generate into
// wavelength - the number of sinus points in a total sinus wavelength (the size of the table)
// sin16s_gen2(signed word* zp(6) sintab)
sin16s_gen2: {
    .const min = -$140
    .const max = $140
    .label ampl = max-min
    .label __6 = 8
    .label __9 = $18
    .label step = $14
    .label sintab = 6
    // u[4.28]
    // Iterate over the table
    .label x = 2
    .label i = $10
    // div32u16u(PI2_u4f28, wavelength)
    // [68] call div32u16u 
    // [157] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u]
    jsr div32u16u
    // div32u16u(PI2_u4f28, wavelength)
    // [69] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0
    // sin16s_gen2::@3
    // step = div32u16u(PI2_u4f28, wavelength)
    // [70] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2
    // [71] phi from sin16s_gen2::@3 to sin16s_gen2::@1 [phi:sin16s_gen2::@3->sin16s_gen2::@1]
    // [71] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word*) sin [phi:sin16s_gen2::@3->sin16s_gen2::@1#0] -- pwsz1=pwsc1 
    lda #<sin
    sta.z sintab
    lda #>sin
    sta.z sintab+1
    // [71] phi (dword) sin16s_gen2::x#2 = (dword) 0 [phi:sin16s_gen2::@3->sin16s_gen2::@1#1] -- vduz1=vduc1 
    lda #<0
    sta.z x
    sta.z x+1
    lda #<0>>$10
    sta.z x+2
    lda #>0>>$10
    sta.z x+3
    // [71] phi (word) sin16s_gen2::i#2 = (word) 0 [phi:sin16s_gen2::@3->sin16s_gen2::@1#2] -- vwuz1=vwuc1 
    lda #<0
    sta.z i
    sta.z i+1
  // u[4.28]
    // sin16s_gen2::@1
  __b1:
    // for( word i=0; i<wavelength; i++)
    // [72] if((word) sin16s_gen2::i#2<(const word) SIN_SIZE) goto sin16s_gen2::@2 -- vwuz1_lt_vwuc1_then_la1 
    lda.z i+1
    cmp #>SIN_SIZE
    bcc __b2
    bne !+
    lda.z i
    cmp #<SIN_SIZE
    bcc __b2
  !:
    // sin16s_gen2::@return
    // }
    // [73] return 
    rts
    // sin16s_gen2::@2
  __b2:
    // sin16s(x)
    // [74] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 
    lda.z x
    sta.z sin16s.x
    lda.z x+1
    sta.z sin16s.x+1
    lda.z x+2
    sta.z sin16s.x+2
    lda.z x+3
    sta.z sin16s.x+3
    // [75] call sin16s 
    jsr sin16s
    // [76] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1
    // sin16s_gen2::@4
    // mul16s(sin16s(x), ampl)
    // [77] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0
    // [78] call mul16s 
    jsr mul16s
    // [79] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0
    // sin16s_gen2::@5
    // [80] (signed dword~) sin16s_gen2::$6 ← (signed dword) mul16s::return#2
    // >mul16s(sin16s(x), ampl)
    // [81] (word~) sin16s_gen2::$9 ← > (signed dword~) sin16s_gen2::$6 -- vwuz1=_hi_vdsz2 
    lda.z __6+2
    sta.z __9
    lda.z __6+3
    sta.z __9+1
    // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl)
    // [82] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$9 -- _deref_pwsz1=vwsz2 
    ldy #0
    lda.z __9
    sta (sintab),y
    iny
    lda.z __9+1
    sta (sintab),y
    // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl);
    // [83] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 
    lda #SIZEOF_SIGNED_WORD
    clc
    adc.z sintab
    sta.z sintab
    bcc !+
    inc.z sintab+1
  !:
    // x = x + step
    // [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 
    lda.z x
    clc
    adc.z step
    sta.z x
    lda.z x+1
    adc.z step+1
    sta.z x+1
    lda.z x+2
    adc.z step+2
    sta.z x+2
    lda.z x+3
    adc.z step+3
    sta.z x+3
    // for( word i=0; i<wavelength; i++)
    // [85] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [71] phi from sin16s_gen2::@5 to sin16s_gen2::@1 [phi:sin16s_gen2::@5->sin16s_gen2::@1]
    // [71] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@5->sin16s_gen2::@1#0] -- register_copy 
    // [71] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@5->sin16s_gen2::@1#1] -- register_copy 
    // [71] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@5->sin16s_gen2::@1#2] -- register_copy 
    jmp __b1
}
  // mul16s
// Multiply of two signed words to a signed double word
// Fixes offsets introduced by using unsigned multiplication
// mul16s(signed word zp($c) a)
mul16s: {
    .label __9 = $1e
    .label __16 = $1e
    .label m = 8
    .label return = 8
    .label a = $c
    // mul16u((word)a, (word) b)
    // [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 -- vwuz1=vwuz2 
    lda.z a
    sta.z mul16u.a
    lda.z a+1
    sta.z mul16u.a+1
    // [87] call mul16u 
    // [97] phi from mul16s to mul16u [phi:mul16s->mul16u]
    // [97] phi (word) mul16u::a#6 = (word) mul16u::a#1 [phi:mul16s->mul16u#0] -- register_copy 
    // [97] phi (word) mul16u::b#2 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vwuz1=vwuc1 
    lda #<sin16s_gen2.ampl
    sta.z mul16u.b
    lda #>sin16s_gen2.ampl
    sta.z mul16u.b+1
    jsr mul16u
    // mul16u((word)a, (word) b)
    // [88] (dword) mul16u::return#2 ← (dword) mul16u::res#2
    // mul16s::@4
    // m = mul16u((word)a, (word) b)
    // [89] (dword) mul16s::m#0 ← (dword) mul16u::return#2
    // if(a<0)
    // [90] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 
    lda.z a+1
    bpl __b2
    // mul16s::@3
    // >m
    // [91] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 
    lda.z m+2
    sta.z __9
    lda.z m+3
    sta.z __9+1
    // >m = (>m)-(word)b
    // [92] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz1_minus_vwuc1 
    lda.z __16
    sec
    sbc #<sin16s_gen2.ampl
    sta.z __16
    lda.z __16+1
    sbc #>sin16s_gen2.ampl
    sta.z __16+1
    // [93] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 
    lda.z __16
    sta.z m+2
    lda.z __16+1
    sta.z m+3
    // [94] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1]
    // [94] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy 
    // mul16s::@1
    // mul16s::@2
  __b2:
    // (signed dword)m
    // [95] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
    // mul16s::@return
    // }
    // [96] return 
    rts
}
  // mul16u
// Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word
// mul16u(word zp($18) a, word zp($12) b)
mul16u: {
    .label mb = $1a
    .label a = $18
    .label res = 8
    .label return = 8
    .label b = $12
    // mb = b
    // [98] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2 -- vduz1=_dword_vwuz2 
    lda.z b
    sta.z mb
    lda.z b+1
    sta.z mb+1
    lda #0
    sta.z mb+2
    sta.z mb+3
    // [99] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1]
    // [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy 
    // [99] phi (dword) mul16u::res#2 = (dword) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vduc1 
    sta.z res
    sta.z res+1
    lda #<0>>$10
    sta.z res+2
    lda #>0>>$10
    sta.z res+3
    // [99] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy 
    // mul16u::@1
  __b1:
    // while(a!=0)
    // [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 
    lda.z a
    bne __b2
    lda.z a+1
    bne __b2
    // mul16u::@return
    // }
    // [101] return 
    rts
    // mul16u::@2
  __b2:
    // a&1
    // [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 
    lda #1
    and.z a
    // if( (a&1) != 0)
    // [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b3
    // mul16u::@4
    // res = res + mb
    // [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 
    lda.z res
    clc
    adc.z mb
    sta.z res
    lda.z res+1
    adc.z mb+1
    sta.z res+1
    lda.z res+2
    adc.z mb+2
    sta.z res+2
    lda.z res+3
    adc.z mb+3
    sta.z res+3
    // [105] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3]
    // [105] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy 
    // mul16u::@3
  __b3:
    // a = a>>1
    // [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 
    lsr.z a+1
    ror.z a
    // mb = mb<<1
    // [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 
    asl.z mb
    rol.z mb+1
    rol.z mb+2
    rol.z mb+3
    // [99] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1]
    // [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy 
    // [99] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy 
    // [99] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy 
    jmp __b1
}
  // sin16s
// Calculate signed word sinus sin(x)
// x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28
// result: signed word sin(x) s[0.15] - using the full range  -$7fff - $7fff
// sin16s(dword zp(8) x)
sin16s: {
    .label __4 = $1a
    .label x = 8
    .label return = $c
    .label x1 = $1e
    .label x2 = $e
    .label x3 = $e
    .label x3_6 = $20
    .label usinx = $c
    .label x4 = $e
    .label x5 = $20
    .label x5_128 = $20
    .label sinx = $c
    // if(x >= PI_u4f28 )
    // [108] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 
    lda.z x+3
    cmp #>PI_u4f28>>$10
    bcc b1
    bne !+
    lda.z x+2
    cmp #<PI_u4f28>>$10
    bcc b1
    bne !+
    lda.z x+1
    cmp #>PI_u4f28
    bcc b1
    bne !+
    lda.z x
    cmp #<PI_u4f28
    bcc b1
  !:
    // sin16s::@4
    // x = x - PI_u4f28
    // [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28 -- vduz1=vduz1_minus_vduc1 
    lda.z x
    sec
    sbc #<PI_u4f28
    sta.z x
    lda.z x+1
    sbc #>PI_u4f28
    sta.z x+1
    lda.z x+2
    sbc #<PI_u4f28>>$10
    sta.z x+2
    lda.z x+3
    sbc #>PI_u4f28>>$10
    sta.z x+3
    // [110] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1]
    // [110] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuyy=vbuc1 
    ldy #1
    // [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy 
    jmp __b1
    // [110] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1]
  b1:
    // [110] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuyy=vbuc1 
    ldy #0
    // [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy 
    // sin16s::@1
  __b1:
    // if(x >= PI_HALF_u4f28 )
    // [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 
    lda.z x+3
    cmp #>PI_HALF_u4f28>>$10
    bcc __b2
    bne !+
    lda.z x+2
    cmp #<PI_HALF_u4f28>>$10
    bcc __b2
    bne !+
    lda.z x+1
    cmp #>PI_HALF_u4f28
    bcc __b2
    bne !+
    lda.z x
    cmp #<PI_HALF_u4f28
    bcc __b2
  !:
    // sin16s::@5
    // x = PI_u4f28 - x
    // [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 
    lda #<PI_u4f28
    sec
    sbc.z x
    sta.z x
    lda #>PI_u4f28
    sbc.z x+1
    sta.z x+1
    lda #<PI_u4f28>>$10
    sbc.z x+2
    sta.z x+2
    lda #>PI_u4f28>>$10
    sbc.z x+3
    sta.z x+3
    // [113] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2]
    // [113] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy 
    // sin16s::@2
  __b2:
    // x<<3
    // [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 
    lda.z x
    asl
    sta.z __4
    lda.z x+1
    rol
    sta.z __4+1
    lda.z x+2
    rol
    sta.z __4+2
    lda.z x+3
    rol
    sta.z __4+3
    asl.z __4
    rol.z __4+1
    rol.z __4+2
    rol.z __4+3
    asl.z __4
    rol.z __4+1
    rol.z __4+2
    rol.z __4+3
    // x1 = >x<<3
    // [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 
    lda.z __4+2
    sta.z x1
    lda.z __4+3
    sta.z x1+1
    // mulu16_sel(x1, x1, 0)
    // [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v1
    lda.z x1+1
    sta.z mulu16_sel.v1+1
    // [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [118] call mulu16_sel 
    // [148] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel]
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #0
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // mulu16_sel(x1, x1, 0)
    // [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12
    // sin16s::@7
    // x2 = mulu16_sel(x1, x1, 0)
    // [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return
    sta.z x2
    lda.z mulu16_sel.return+1
    sta.z x2+1
    // mulu16_sel(x2, x1, 1)
    // [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0
    // [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [123] call mulu16_sel 
    // [148] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel]
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #1
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // mulu16_sel(x2, x1, 1)
    // [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return
    sta.z mulu16_sel.return_1
    lda.z mulu16_sel.return+1
    sta.z mulu16_sel.return_1+1
    // sin16s::@8
    // x3 = mulu16_sel(x2, x1, 1)
    // [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1
    // mulu16_sel(x3, $10000/6, 1)
    // [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0
    // [127] call mulu16_sel 
    // [148] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel]
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #1
    // [148] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 
    lda #<$10000/6
    sta.z mulu16_sel.v2
    lda #>$10000/6
    sta.z mulu16_sel.v2+1
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // mulu16_sel(x3, $10000/6, 1)
    // [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12
    // sin16s::@9
    // x3_6 = mulu16_sel(x3, $10000/6, 1)
    // [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2
    // usinx = x1 - x3_6
    // [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 
    lda.z x1
    sec
    sbc.z x3_6
    sta.z usinx
    lda.z x1+1
    sbc.z x3_6+1
    sta.z usinx+1
    // mulu16_sel(x3, x1, 0)
    // [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0
    // [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [133] call mulu16_sel 
    // [148] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel]
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #0
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // mulu16_sel(x3, x1, 0)
    // [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 
    lda.z mulu16_sel.return
    sta.z mulu16_sel.return_1
    lda.z mulu16_sel.return+1
    sta.z mulu16_sel.return_1+1
    // sin16s::@10
    // x4 = mulu16_sel(x3, x1, 0)
    // [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10
    // mulu16_sel(x4, x1, 0)
    // [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0
    // [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 
    lda.z x1
    sta.z mulu16_sel.v2
    lda.z x1+1
    sta.z mulu16_sel.v2+1
    // [138] call mulu16_sel 
    // [148] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel]
    // [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 
    ldx #0
    // [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy 
    // [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy 
    jsr mulu16_sel
    // mulu16_sel(x4, x1, 0)
    // [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12
    // sin16s::@11
    // x5 = mulu16_sel(x4, x1, 0)
    // [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11
    // x5_128 = x5>>4
    // [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    lsr.z x5_128+1
    ror.z x5_128
    // usinx = usinx + x5_128
    // [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 
    lda.z usinx
    clc
    adc.z x5_128
    sta.z usinx
    lda.z usinx+1
    adc.z x5_128+1
    sta.z usinx+1
    // if(isUpper!=0)
    // [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuyy_eq_0_then_la1 
    cpy #0
    beq __b3
    // sin16s::@6
    // sinx = -(signed word)usinx
    // [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 
    sec
    lda #0
    sbc.z sinx
    sta.z sinx
    lda #0
    sbc.z sinx+1
    sta.z sinx+1
    // [145] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3]
    // [145] phi (signed word) sin16s::return#1 = (signed word) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy 
    // sin16s::@3
  __b3:
    // sin16s::@return
    // }
    // [146] return 
    rts
    // sin16s::@12
    // [147] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1
}
  // mulu16_sel
// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result.
// The select parameter indicates how many of the highest bits of the 32-bit result to skip
// mulu16_sel(word zp($e) v1, word zp($12) v2, byte register(X) select)
mulu16_sel: {
    .label __0 = 8
    .label __1 = 8
    .label v1 = $e
    .label v2 = $12
    .label return = $20
    .label return_1 = $e
    // mul16u(v1, v2)
    // [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 
    lda.z v1
    sta.z mul16u.a
    lda.z v1+1
    sta.z mul16u.a+1
    // [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5
    // [151] call mul16u 
    // [97] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u]
    // [97] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy 
    // [97] phi (word) mul16u::b#2 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- register_copy 
    jsr mul16u
    // mul16u(v1, v2)
    // [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2
    // mulu16_sel::@1
    // [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3
    // mul16u(v1, v2)<<select
    // [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx 
    cpx #0
    beq !e+
  !:
    asl.z __1
    rol.z __1+1
    rol.z __1+2
    rol.z __1+3
    dex
    bne !-
  !e:
    // >mul16u(v1, v2)<<select
    // [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 
    lda.z __1+2
    sta.z return
    lda.z __1+3
    sta.z return+1
    // mulu16_sel::@return
    // }
    // [156] return 
    rts
}
  // div32u16u
// Divide unsigned 32-bit dword dividend with a 16-bit word divisor
// The 16-bit word remainder can be found in rem16u after the division
div32u16u: {
    .label quotient_hi = $20
    .label quotient_lo = $e
    .label return = $14
    // divr16u(>dividend, divisor, 0)
    // [158] call divr16u 
    // [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u]
    // [167] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 
    lda #<PI2_u4f28>>$10
    sta.z divr16u.dividend
    lda #>PI2_u4f28>>$10
    sta.z divr16u.dividend+1
    // [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z divr16u.rem
    sta.z divr16u.rem+1
    jsr divr16u
    // divr16u(>dividend, divisor, 0)
    // [159] (word) divr16u::return#2 ← (word) divr16u::return#0
    // div32u16u::@1
    // quotient_hi = divr16u(>dividend, divisor, 0)
    // [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 
    lda.z divr16u.return
    sta.z quotient_hi
    lda.z divr16u.return+1
    sta.z quotient_hi+1
    // divr16u(<dividend, divisor, rem16u)
    // [161] (word) divr16u::rem#4 ← (word) rem16u#1
    // [162] call divr16u 
    // [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u]
    // [167] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 
    lda #<PI2_u4f28&$ffff
    sta.z divr16u.dividend
    lda #>PI2_u4f28&$ffff
    sta.z divr16u.dividend+1
    // [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy 
    jsr divr16u
    // divr16u(<dividend, divisor, rem16u)
    // [163] (word) divr16u::return#3 ← (word) divr16u::return#0
    // div32u16u::@2
    // quotient_lo = divr16u(<dividend, divisor, rem16u)
    // [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3
    // quotient = { quotient_hi, quotient_lo}
    // [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 
    lda.z quotient_hi
    sta.z return+2
    lda.z quotient_hi+1
    sta.z return+3
    lda.z quotient_lo
    sta.z return
    lda.z quotient_lo+1
    sta.z return+1
    // div32u16u::@return
    // }
    // [166] return 
    rts
}
  // divr16u
// Performs division on two 16 bit unsigned words and an initial remainder
// Returns the quotient dividend/divisor.
// The final remainder will be set into the global variable rem16u
// Implemented using simple binary division
// divr16u(word zp($c) dividend, word zp($18) rem)
divr16u: {
    .label rem = $18
    .label dividend = $c
    .label quotient = $e
    .label return = $e
    // [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1]
    // [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [168] phi (word) divr16u::quotient#3 = (word) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vwuc1 
    txa
    sta.z quotient
    sta.z quotient+1
    // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy 
    // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy 
    // [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1]
    // [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy 
    // [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy 
    // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy 
    // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy 
    // divr16u::@1
  __b1:
    // rem = rem << 1
    // [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z rem
    rol.z rem+1
    // >dividend
    // [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 
    lda.z dividend+1
    // >dividend & $80
    // [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 
    and #$80
    // if( (>dividend & $80) != 0 )
    // [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq __b2
    // divr16u::@4
    // rem = rem | 1
    // [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 
    lda #1
    ora.z rem
    sta.z rem
    // [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2]
    // [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy 
    // divr16u::@2
  __b2:
    // dividend = dividend << 1
    // [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z dividend
    rol.z dividend+1
    // quotient = quotient << 1
    // [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 
    asl.z quotient
    rol.z quotient+1
    // if(rem>=divisor)
    // [177] if((word) divr16u::rem#6<(const word) SIN_SIZE) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 
    lda.z rem+1
    cmp #>SIN_SIZE
    bcc __b3
    bne !+
    lda.z rem
    cmp #<SIN_SIZE
    bcc __b3
  !:
    // divr16u::@5
    // quotient++;
    // [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 
    inc.z quotient
    bne !+
    inc.z quotient+1
  !:
    // rem = rem - divisor
    // [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE -- vwuz1=vwuz1_minus_vwuc1 
    lda.z rem
    sec
    sbc #<SIN_SIZE
    sta.z rem
    lda.z rem+1
    sbc #>SIN_SIZE
    sta.z rem+1
    // [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3]
    // [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy 
    // [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy 
    // divr16u::@3
  __b3:
    // for( byte i : 0..15)
    // [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$10
    bne __b1
    // divr16u::@6
    // rem16u = rem
    // [183] (word) rem16u#1 ← (word) divr16u::rem#11
    // divr16u::@return
    // }
    // [184] return 
    rts
}
  // bitmap_clear
// Clear all graphics on the bitmap
// bgcol - the background color to fill the screen with
// fgcol - the foreground color to fill the screen with
bitmap_clear: {
    .const col = WHITE*$10
    // memset(bitmap_screen, col, 1000uw)
    // [186] call memset 
    // [190] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
    // [190] phi (byte) memset::c#4 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 
    ldx #col
    // [190] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 
    lda #<SCREEN
    sta.z memset.str
    lda #>SCREEN
    sta.z memset.str+1
    // [190] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 
    lda #<$3e8
    sta.z memset.num
    lda #>$3e8
    sta.z memset.num+1
    jsr memset
    // [187] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1]
    // bitmap_clear::@1
    // memset(bitmap_gfx, 0, 8000uw)
    // [188] call memset 
    // [190] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
    // [190] phi (byte) memset::c#4 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 
    ldx #0
    // [190] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 
    lda #<BITMAP
    sta.z memset.str
    lda #>BITMAP
    sta.z memset.str+1
    // [190] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 
    lda #<$1f40
    sta.z memset.num
    lda #>$1f40
    sta.z memset.num+1
    jsr memset
    // bitmap_clear::@return
    // }
    // [189] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp($12) str, byte register(X) c, word zp($10) num)
memset: {
    .label end = $10
    .label dst = $12
    .label num = $10
    .label str = $12
    // if(num>0)
    // [191] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 
    lda.z num
    bne !+
    lda.z num+1
    beq __breturn
  !:
    // memset::@1
    // end = (char*)str + num
    // [192] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 
    lda.z end
    clc
    adc.z str
    sta.z end
    lda.z end+1
    adc.z str+1
    sta.z end+1
    // [193] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
    // [194] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2]
    // [194] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy 
    // memset::@2
  __b2:
    // for(char* dst = str; dst!=end; dst++)
    // [195] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 
    lda.z dst+1
    cmp.z end+1
    bne __b3
    lda.z dst
    cmp.z end
    bne __b3
    // memset::@return
  __breturn:
    // }
    // [196] return 
    rts
    // memset::@3
  __b3:
    // *dst = c
    // [197] *((byte*) memset::dst#2) ← (byte) memset::c#4 -- _deref_pbuz1=vbuxx 
    txa
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [198] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    jmp __b2
}
  // bitmap_init
// Initialize bitmap plotting tables
bitmap_init: {
    .label __7 = $22
    .label yoffs = $10
    // [200] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1]
    // [200] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [200] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 
    lda #$80
    // [200] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1]
    // [200] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy 
    // [200] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy 
    // bitmap_init::@1
  __b1:
    // bitmap_plot_bit[x] = bits
    // [201] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_bit,x
    // bits >>= 1
    // [202] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 
    lsr
    // if(bits==0)
    // [203] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b2
    // [205] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2]
    // [205] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 
    lda #$80
    // [204] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6]
    // bitmap_init::@6
    // [205] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2]
    // [205] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy 
    // bitmap_init::@2
  __b2:
    // for(byte x : 0..255)
    // [206] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [207] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b1
    // [208] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
    // [208] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta.z yoffs
    lda #>BITMAP
    sta.z yoffs+1
    // [208] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 
    ldx #0
    // [208] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3]
    // [208] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy 
    // [208] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy 
    // bitmap_init::@3
  __b3:
    // y&$7
    // [209] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 
    lda #7
    sax.z __7
    // <yoffs
    // [210] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda.z yoffs
    // y&$7 | <yoffs
    // [211] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z __7
    // bitmap_plot_ylo[y] = y&$7 | <yoffs
    // [212] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_ylo,x
    // >yoffs
    // [213] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda.z yoffs+1
    // bitmap_plot_yhi[y] = >yoffs
    // [214] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_yhi,x
    // if((y&$7)==7)
    // [215] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp.z __7
    bne __b4
    // bitmap_init::@5
    // yoffs = yoffs + 40*8
    // [216] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z yoffs
    adc #<$28*8
    sta.z yoffs
    lda.z yoffs+1
    adc #>$28*8
    sta.z yoffs+1
    // [217] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4]
    // [217] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy 
    // bitmap_init::@4
  __b4:
    // for(byte y : 0..255)
    // [218] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [219] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b3
    // bitmap_init::@return
    // }
    // [220] return 
    rts
}
  // File Data
  // Tables for the plotter - initialized by calling bitmap_init();
  bitmap_plot_ylo: .fill $100, 0
  bitmap_plot_yhi: .fill $100, 0
  bitmap_plot_bit: .fill $100, 0
  .align $100
  sin: .fill 2*$200, 0
sin2:
.for(var i=0; i<512; i++) {
  	  .word sin(toRadians([i*360]/512))*320
    }


