Inlined call call __init
Eliminating unused variable with no statement main::$1
Eliminating unused variable with no statement main::$2
Eliminating unused variable with no statement w::$1
Eliminating unused variable with no statement __start::__init1_$0
Eliminating unused variable with no statement __start::__init1_$1
Eliminating unused variable with no statement __start::__init1_$2

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start::@1
  SCREEN4#9 = phi( __start::@1/SCREEN4#7 )
  SCREEN3#9 = phi( __start::@1/SCREEN3#7 )
  SCREEN2#4 = phi( __start::@1/SCREEN2#6 )
  main::b#0 = 0
  to:main::@1
main::@1: scope:[main]  from main main::@1
  SCREEN4#8 = phi( main/SCREEN4#9, main::@1/SCREEN4#8 )
  SCREEN3#8 = phi( main/SCREEN3#9, main::@1/SCREEN3#8 )
  SCREEN2#2 = phi( main/SCREEN2#4, main::@1/SCREEN2#2 )
  main::b#2 = phi( main/main::b#0, main::@1/main::b#1 )
  main::b2#0 = $c8 - main::b#2
  SCREEN[main::b#2] = main::b2#0
  main::sb#0 = - (signed char)main::b#2
  SCREEN2#2[main::b#2] = (char)main::sb#0
  main::b#1 = main::b#2 + rangenext(0,$64)
  main::$3 = main::b#1 != rangelast(0,$64)
  if(main::$3) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  SCREEN4#6 = phi( main::@1/SCREEN4#8 )
  SCREEN3#6 = phi( main::@1/SCREEN3#8 )
  call w
  to:main::@3
main::@3: scope:[main]  from main::@2
  to:main::@return
main::@return: scope:[main]  from main::@3
  return 
  to:@return

void w()
w: scope:[w]  from main::@2
  SCREEN4#4 = phi( main::@2/SCREEN4#6 )
  SCREEN3#4 = phi( main::@2/SCREEN3#6 )
  w::i#0 = 0
  to:w::@1
w::@1: scope:[w]  from w w::@1
  SCREEN4#2 = phi( w/SCREEN4#4, w::@1/SCREEN4#2 )
  SCREEN3#2 = phi( w/SCREEN3#4, w::@1/SCREEN3#2 )
  w::i#2 = phi( w/w::i#0, w::@1/w::i#1 )
  w::$0 = w::w1 - w::w2
  w::b#0 = (char)w::$0
  w::b2#0 = $578-$546 + w::i#2
  SCREEN3#2[w::i#2] = w::b#0
  SCREEN4#2[w::i#2] = w::b2#0
  w::i#1 = w::i#2 + rangenext(0,$a)
  w::$2 = w::i#1 != rangelast(0,$a)
  if(w::$2) goto w::@1
  to:w::@return
w::@return: scope:[w]  from w::@1
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  SCREEN2#0 = SCREEN + $28*3
  SCREEN3#0 = SCREEN + $28*6
  SCREEN4#0 = SCREEN + $28*9
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  SCREEN4#7 = phi( __start::__init1/SCREEN4#0 )
  SCREEN3#7 = phi( __start::__init1/SCREEN3#0 )
  SCREEN2#6 = phi( __start::__init1/SCREEN2#0 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  SCREEN4#5 = phi( __start::@1/SCREEN4#7 )
  SCREEN3#5 = phi( __start::@1/SCREEN3#7 )
  SCREEN2#5 = phi( __start::@1/SCREEN2#6 )
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  SCREEN4#3 = phi( __start::@2/SCREEN4#5 )
  SCREEN3#3 = phi( __start::@2/SCREEN3#5 )
  SCREEN2#3 = phi( __start::@2/SCREEN2#5 )
  SCREEN2#1 = SCREEN2#3
  SCREEN3#1 = SCREEN3#3
  SCREEN4#1 = SCREEN4#3
  return 
  to:@return

SYMBOL TABLE SSA
__constant char *SCREEN = (char *)$400
char *SCREEN2
char *SCREEN2#0
char *SCREEN2#1
char *SCREEN2#2
char *SCREEN2#3
char *SCREEN2#4
char *SCREEN2#5
char *SCREEN2#6
char *SCREEN3
char *SCREEN3#0
char *SCREEN3#1
char *SCREEN3#2
char *SCREEN3#3
char *SCREEN3#4
char *SCREEN3#5
char *SCREEN3#6
char *SCREEN3#7
char *SCREEN3#8
char *SCREEN3#9
char *SCREEN4
char *SCREEN4#0
char *SCREEN4#1
char *SCREEN4#2
char *SCREEN4#3
char *SCREEN4#4
char *SCREEN4#5
char *SCREEN4#6
char *SCREEN4#7
char *SCREEN4#8
char *SCREEN4#9
void __start()
void main()
bool main::$3
char main::b
char main::b#0
char main::b#1
char main::b#2
char main::b2
char main::b2#0
signed char main::sb
signed char main::sb#0
void w()
unsigned int w::$0
bool w::$2
char w::b
char w::b#0
char w::b2
char w::b2#0
char w::i
char w::i#0
char w::i#1
char w::i#2
__constant unsigned int w::w1 = $514
__constant unsigned int w::w2 = $4e2

Adding number conversion cast (unumber) $c8 in main::b2#0 = $c8 - main::b#2
Adding number conversion cast (unumber) $578-$546 in w::b2#0 = $578-$546 + w::i#2
Adding number conversion cast (unumber) $28*3 in SCREEN2#0 = SCREEN + $28*3
Adding number conversion cast (unumber) $28*6 in SCREEN3#0 = SCREEN + $28*6
Adding number conversion cast (unumber) $28*9 in SCREEN4#0 = SCREEN + $28*9
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (char *) 1024
Simplifying constant integer cast $c8
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $c8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias SCREEN3#6 = SCREEN3#8 
Alias SCREEN4#6 = SCREEN4#8 
Alias SCREEN2#0 = SCREEN2#6 SCREEN2#5 SCREEN2#3 SCREEN2#1 
Alias SCREEN3#0 = SCREEN3#7 SCREEN3#5 SCREEN3#3 SCREEN3#1 
Alias SCREEN4#0 = SCREEN4#7 SCREEN4#5 SCREEN4#3 SCREEN4#1 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values SCREEN2#4 SCREEN2#0
Identical Phi Values SCREEN3#9 SCREEN3#0
Identical Phi Values SCREEN4#9 SCREEN4#0
Identical Phi Values SCREEN2#2 SCREEN2#4
Identical Phi Values SCREEN3#6 SCREEN3#9
Identical Phi Values SCREEN4#6 SCREEN4#9
Identical Phi Values SCREEN3#4 SCREEN3#6
Identical Phi Values SCREEN4#4 SCREEN4#6
Identical Phi Values SCREEN3#2 SCREEN3#4
Identical Phi Values SCREEN4#2 SCREEN4#4
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition main::$3 [9] if(main::b#1!=rangelast(0,$64)) goto main::@1
Simple Condition w::$2 [22] if(w::i#1!=rangelast(0,$a)) goto w::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [15] w::$0 = w::w1 - w::w2
Constant right-side identified [24] SCREEN2#0 = SCREEN + (char)$28*3
Constant right-side identified [25] SCREEN3#0 = SCREEN + (char)$28*6
Constant right-side identified [26] SCREEN4#0 = SCREEN + (unsigned int)$28*9
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::b#0 = 0
Constant w::i#0 = 0
Constant w::$0 = w::w1-w::w2
Constant SCREEN2#0 = SCREEN+(char)$28*3
Constant SCREEN3#0 = SCREEN+(char)$28*6
Constant SCREEN4#0 = SCREEN+(unsigned int)$28*9
Successful SSA optimization Pass2ConstantIdentification
Constant w::b#0 = (char)w::$0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [7] main::b#1 = ++ main::b#2 to ++
Resolved ranged comparison value [9] if(main::b#1!=rangelast(0,$64)) goto main::@1 to $65
Resolved ranged next value [20] w::i#1 = ++ w::i#2 to ++
Resolved ranged comparison value [22] if(w::i#1!=rangelast(0,$a)) goto w::@1 to $b
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $65 in [6] if(main::b#1!=$65) goto main::@1
Adding number conversion cast (unumber) $b in [14] if(w::i#1!=$b) goto w::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $65
Simplifying constant integer cast $b
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $65
Finalized unsigned number type (char) $b
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inlining constant with var siblings main::b#0
Inlining constant with var siblings w::i#0
Constant inlined w::i#0 = 0
Constant inlined w::$0 = w::w1-w::w2
Constant inlined main::b#0 = 0
Successful SSA optimization Pass2ConstantInlining
Finalized unsigned number type (char) $28
Finalized unsigned number type (char) 3
Finalized unsigned number type (char) $28
Finalized unsigned number type (char) 6
Finalized unsigned number type (char) $28
Finalized unsigned number type (char) 9
Finalized unsigned number type (unsigned int) $578
Finalized unsigned number type (unsigned int) $546
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying constant integer cast $28*3
Simplifying constant integer cast $28*6
Successful SSA optimization PassNCastSimplification
Added new block during phi lifting main::@4(between main::@1 and main::@1)
Added new block during phi lifting w::@2(between w::@1 and w::@1)
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of w
CALL GRAPH
Calls in [main] to w:9 

Created 2 initial phi equivalence classes
Coalesced [12] main::b#3 = main::b#1
Coalesced [21] w::i#3 = w::i#1
Coalesced down to 2 phi equivalence classes
Culled Empty Block label main::@3
Culled Empty Block label main::@4
Culled Empty Block label w::@2
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of w

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [1] main::b#2 = phi( main/0, main::@1/main::b#1 )
  [2] main::b2#0 = $c8 - main::b#2
  [3] SCREEN[main::b#2] = main::b2#0
  [4] main::sb#0 = - (signed char)main::b#2
  [5] SCREEN2#0[main::b#2] = (char)main::sb#0
  [6] main::b#1 = ++ main::b#2
  [7] if(main::b#1!=$65) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  [8] phi()
  [9] call w
  to:main::@return
main::@return: scope:[main]  from main::@2
  [10] return 
  to:@return

void w()
w: scope:[w]  from main::@2
  [11] phi()
  to:w::@1
w::@1: scope:[w]  from w w::@1
  [12] w::i#2 = phi( w/0, w::@1/w::i#1 )
  [13] w::b2#0 = (char)$578-$546 + w::i#2
  [14] SCREEN3#0[w::i#2] = w::b#0
  [15] SCREEN4#0[w::i#2] = w::b2#0
  [16] w::i#1 = ++ w::i#2
  [17] if(w::i#1!=$b) goto w::@1
  to:w::@return
w::@return: scope:[w]  from w::@1
  [18] return 
  to:@return


VARIABLE REGISTER WEIGHTS
char *SCREEN2
char *SCREEN3
char *SCREEN4
void main()
char main::b
char main::b#1 // 16.5
char main::b#2 // 11.0
char main::b2
char main::b2#0 // 22.0
signed char main::sb
signed char main::sb#0 // 11.0
void w()
char w::b
char w::b2
char w::b2#0 // 101.0
char w::i
char w::i#1 // 151.5
char w::i#2 // 126.25

Initial phi equivalence classes
[ main::b#2 main::b#1 ]
[ w::i#2 w::i#1 ]
Added variable main::b2#0 to live range equivalence class [ main::b2#0 ]
Added variable main::sb#0 to live range equivalence class [ main::sb#0 ]
Added variable w::b2#0 to live range equivalence class [ w::b2#0 ]
Complete equivalence classes
[ main::b#2 main::b#1 ]
[ w::i#2 w::i#1 ]
[ main::b2#0 ]
[ main::sb#0 ]
[ w::b2#0 ]
Allocated zp[1]:2 [ w::i#2 w::i#1 ]
Allocated zp[1]:3 [ w::b2#0 ]
Allocated zp[1]:4 [ main::b#2 main::b#1 ]
Allocated zp[1]:5 [ main::b2#0 ]
Allocated zp[1]:6 [ main::sb#0 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [2] main::b2#0 = $c8 - main::b#2 [ main::b#2 main::b2#0 ] (  [ main::b#2 main::b2#0 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::b#2 main::b#1 ]
Statement [4] main::sb#0 = - (signed char)main::b#2 [ main::b#2 main::sb#0 ] (  [ main::b#2 main::sb#0 ] { }  ) always clobbers reg byte a 
Statement [14] SCREEN3#0[w::i#2] = w::b#0 [ w::i#2 w::b2#0 ] ( w:9 [ w::i#2 w::b2#0 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:2 [ w::i#2 w::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ w::b2#0 ]
Statement [15] SCREEN4#0[w::i#2] = w::b2#0 [ w::i#2 ] ( w:9 [ w::i#2 ] { }  ) always clobbers reg byte a 
Statement [2] main::b2#0 = $c8 - main::b#2 [ main::b#2 main::b2#0 ] (  [ main::b#2 main::b2#0 ] { }  ) always clobbers reg byte a 
Statement [4] main::sb#0 = - (signed char)main::b#2 [ main::b#2 main::sb#0 ] (  [ main::b#2 main::sb#0 ] { }  ) always clobbers reg byte a 
Statement [13] w::b2#0 = (char)$578-$546 + w::i#2 [ w::i#2 w::b2#0 ] ( w:9 [ w::i#2 w::b2#0 ] { }  ) always clobbers reg byte a 
Statement [14] SCREEN3#0[w::i#2] = w::b#0 [ w::i#2 w::b2#0 ] ( w:9 [ w::i#2 w::b2#0 ] { }  ) always clobbers reg byte a 
Statement [15] SCREEN4#0[w::i#2] = w::b2#0 [ w::i#2 ] ( w:9 [ w::i#2 ] { }  ) always clobbers reg byte a 
Potential registers zp[1]:4 [ main::b#2 main::b#1 ] : zp[1]:4 , reg byte x , reg byte y , 
Potential registers zp[1]:2 [ w::i#2 w::i#1 ] : zp[1]:2 , reg byte x , reg byte y , 
Potential registers zp[1]:5 [ main::b2#0 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:6 [ main::sb#0 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ w::b2#0 ] : zp[1]:3 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [w] 277.75: zp[1]:2 [ w::i#2 w::i#1 ] 101: zp[1]:3 [ w::b2#0 ] 
Uplift Scope [main] 27.5: zp[1]:4 [ main::b#2 main::b#1 ] 22: zp[1]:5 [ main::b2#0 ] 11: zp[1]:6 [ main::sb#0 ] 
Uplift Scope [] 

Uplifting [w] best 1074 combination reg byte y [ w::i#2 w::i#1 ] reg byte x [ w::b2#0 ] 
Uplifting [main] best 804 combination reg byte x [ main::b#2 main::b#1 ] reg byte a [ main::b2#0 ] reg byte a [ main::sb#0 ] 
Uplifting [] best 804 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
  // Commodore 64 PRG executable file
.file [name="casting.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
  .label SCREEN = $400
  .label SCREEN2 = SCREEN+$28*3
  .label SCREEN3 = SCREEN+$28*6
  .label SCREEN4 = SCREEN+$28*9
.segment Code
  // main
main: {
    // [1] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [1] phi main::b#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp __b1
    // [1] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  __b1_from___b1:
    // [1] phi main::b#2 = main::b#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [2] main::b2#0 = $c8 - main::b#2 -- vbuaa=vbuc1_minus_vbuxx 
    //Subtract unsigned byte from unsigned byte
    txa
    eor #$ff
    sec
    adc #$c8
    // [3] SCREEN[main::b#2] = main::b2#0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // [4] main::sb#0 = - (signed char)main::b#2 -- vbsaa=_neg_vbsxx 
    // Cast unsigned byte to signed byte & negate
    txa
    eor #$ff
    clc
    adc #1
    // [5] SCREEN2#0[main::b#2] = (char)main::sb#0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN2,x
    // [6] main::b#1 = ++ main::b#2 -- vbuxx=_inc_vbuxx 
    inx
    // [7] if(main::b#1!=$65) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$65
    bne __b1_from___b1
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [9] call w
    // [11] phi from main::@2 to w [phi:main::@2->w]
  w_from___b2:
    jsr w
    jmp __breturn
    // main::@return
  __breturn:
    // [10] return 
    rts
}
  // w
w: {
    .const w1 = $514
    .const w2 = $4e2
    .const b = w1-w2
    // [12] phi from w to w::@1 [phi:w->w::@1]
  __b1_from_w:
    // [12] phi w::i#2 = 0 [phi:w->w::@1#0] -- vbuyy=vbuc1 
    ldy #0
    jmp __b1
    // [12] phi from w::@1 to w::@1 [phi:w::@1->w::@1]
  __b1_from___b1:
    // [12] phi w::i#2 = w::i#1 [phi:w::@1->w::@1#0] -- register_copy 
    jmp __b1
    // w::@1
  __b1:
    // [13] w::b2#0 = (char)$578-$546 + w::i#2 -- vbuxx=vbuc1_plus_vbuyy 
    tya
    tax
    axs #-[$578-$546]
    // [14] SCREEN3#0[w::i#2] = w::b#0 -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #b
    sta SCREEN3,y
    // [15] SCREEN4#0[w::i#2] = w::b2#0 -- pbuc1_derefidx_vbuyy=vbuxx 
    txa
    sta SCREEN4,y
    // [16] w::i#1 = ++ w::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [17] if(w::i#1!=$b) goto w::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$b
    bne __b1_from___b1
    jmp __breturn
    // w::@return
  __breturn:
    // [18] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b1 with __b1
Removing instruction __b1_from___b1:
Removing instruction __b2_from___b1:
Removing instruction w_from___b2:
Removing instruction __b1_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __b1_from_main:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction __b1_from_w:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp __b1
Removing instruction jmp __b1
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
__constant char *SCREEN = (char *) 1024
char *SCREEN2
__constant char *SCREEN2#0 = SCREEN+$28*3 // SCREEN2
char *SCREEN3
__constant char *SCREEN3#0 = SCREEN+$28*6 // SCREEN3
char *SCREEN4
__constant char *SCREEN4#0 = SCREEN+(unsigned int)$28*9 // SCREEN4
void main()
char main::b
char main::b#1 // reg byte x 16.5
char main::b#2 // reg byte x 11.0
char main::b2
char main::b2#0 // reg byte a 22.0
signed char main::sb
signed char main::sb#0 // reg byte a 11.0
void w()
char w::b
__constant char w::b#0 = (char)w::w1-w::w2 // b
char w::b2
char w::b2#0 // reg byte x 101.0
char w::i
char w::i#1 // reg byte y 151.5
char w::i#2 // reg byte y 126.25
__constant unsigned int w::w1 = $514
__constant unsigned int w::w2 = $4e2

reg byte x [ main::b#2 main::b#1 ]
reg byte y [ w::i#2 w::i#1 ]
reg byte a [ main::b2#0 ]
reg byte a [ main::sb#0 ]
reg byte x [ w::b2#0 ]


FINAL ASSEMBLER
Score: 648

  // File Comments
  // Upstart
  // Commodore 64 PRG executable file
.file [name="casting.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
  .label SCREEN = $400
  .label SCREEN2 = SCREEN+$28*3
  .label SCREEN3 = SCREEN+$28*6
  .label SCREEN4 = SCREEN+$28*9
.segment Code
  // main
main: {
    // [1] phi from main to main::@1 [phi:main->main::@1]
    // [1] phi main::b#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [1] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
    // [1] phi main::b#2 = main::b#1 [phi:main::@1->main::@1#0] -- register_copy 
    // main::@1
  __b1:
    // byte b2 = 200-b
    // [2] main::b2#0 = $c8 - main::b#2 -- vbuaa=vbuc1_minus_vbuxx 
    //Subtract unsigned byte from unsigned byte
    txa
    eor #$ff
    sec
    adc #$c8
    // SCREEN[b] = b2
    // [3] SCREEN[main::b#2] = main::b2#0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // signed byte sb = - (signed byte)b
    // [4] main::sb#0 = - (signed char)main::b#2 -- vbsaa=_neg_vbsxx 
    // Cast unsigned byte to signed byte & negate
    txa
    eor #$ff
    clc
    adc #1
    // SCREEN2[b] = (byte)sb
    // [5] SCREEN2#0[main::b#2] = (char)main::sb#0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN2,x
    // for( byte b: 0..100)
    // [6] main::b#1 = ++ main::b#2 -- vbuxx=_inc_vbuxx 
    inx
    // [7] if(main::b#1!=$65) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$65
    bne __b1
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // w()
    // [9] call w
    // [11] phi from main::@2 to w [phi:main::@2->w]
    jsr w
    // main::@return
    // }
    // [10] return 
    rts
}
  // w
w: {
    .const w1 = $514
    .const w2 = $4e2
    .const b = w1-w2
    // [12] phi from w to w::@1 [phi:w->w::@1]
    // [12] phi w::i#2 = 0 [phi:w->w::@1#0] -- vbuyy=vbuc1 
    ldy #0
    // [12] phi from w::@1 to w::@1 [phi:w::@1->w::@1]
    // [12] phi w::i#2 = w::i#1 [phi:w::@1->w::@1#0] -- register_copy 
    // w::@1
  __b1:
    // byte b2 = 1400-1350+i
    // [13] w::b2#0 = (char)$578-$546 + w::i#2 -- vbuxx=vbuc1_plus_vbuyy 
    tya
    tax
    axs #-[$578-$546]
    // SCREEN3[i] = b
    // [14] SCREEN3#0[w::i#2] = w::b#0 -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #b
    sta SCREEN3,y
    // SCREEN4[i] = b2
    // [15] SCREEN4#0[w::i#2] = w::b2#0 -- pbuc1_derefidx_vbuyy=vbuxx 
    txa
    sta SCREEN4,y
    // for(byte i : 0..10)
    // [16] w::i#1 = ++ w::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [17] if(w::i#1!=$b) goto w::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$b
    bne __b1
    // w::@return
    // }
    // [18] return 
    rts
}
  // File Data

