Identified constant variable (byte*) main::SCREEN
Culled Empty Block (label) main::@4

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@1

(void()) main()
main: scope:[main]  from @1
  (word) main::w#0 ← (word) 0
  to:main::@1
main::@1: scope:[main]  from main main::@1
  (word) main::w#2 ← phi( main/(word) main::w#0 main::@1/(word) main::w#1 )
  (byte~) main::$0 ← < (word) main::w#2
  *((const byte*) main::SCREEN + (number) 0) ← (byte~) main::$0
  (byte~) main::$1 ← > (word) main::w#2
  *((const byte*) main::SCREEN + (number) 1) ← (byte~) main::$1
  (word) main::w#1 ← (word) main::w#2 + rangenext(0,$ffff)
  (bool~) main::$2 ← (word) main::w#1 != rangelast(0,$ffff)
  if((bool~) main::$2) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  (signed word) main::sw#0 ← (signed word) -$7fff
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  (signed word) main::sw#2 ← phi( main::@2/(signed word) main::sw#0 main::@3/(signed word) main::sw#1 )
  (byte~) main::$3 ← < (signed word) main::sw#2
  *((const byte*) main::SCREEN + (number) 3) ← (byte~) main::$3
  (byte~) main::$4 ← > (signed word) main::sw#2
  *((const byte*) main::SCREEN + (number) 4) ← (byte~) main::$4
  (signed word) main::sw#1 ← (signed word) main::sw#2 + rangenext(-$7fff,$7ffe)
  (bool~) main::$5 ← (signed word) main::sw#1 != rangelast(-$7fff,$7ffe)
  if((bool~) main::$5) goto main::@3
  to:main::@return
main::@return: scope:[main]  from main::@3
  return 
  to:@return
@1: scope:[]  from @begin
  call main 
  to:@2
@2: scope:[]  from @1
  to:@end
@end: scope:[]  from @2

SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(void()) main()
(byte~) main::$0
(byte~) main::$1
(bool~) main::$2
(byte~) main::$3
(byte~) main::$4
(bool~) main::$5
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(const byte*) main::SCREEN = (byte*)(number) $400
(signed word) main::sw
(signed word) main::sw#0
(signed word) main::sw#1
(signed word) main::sw#2
(word) main::w
(word) main::w#0
(word) main::w#1
(word) main::w#2

Adding number conversion cast (unumber) 0 in *((const byte*) main::SCREEN + (number) 0) ← (byte~) main::$0
Adding number conversion cast (unumber) 1 in *((const byte*) main::SCREEN + (number) 1) ← (byte~) main::$1
Adding number conversion cast (unumber) 3 in *((const byte*) main::SCREEN + (number) 3) ← (byte~) main::$3
Adding number conversion cast (unumber) 4 in *((const byte*) main::SCREEN + (number) 4) ← (byte~) main::$4
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$2 [8] if((word) main::w#1!=rangelast(0,$ffff)) goto main::@1
Simple Condition (bool~) main::$5 [17] if((signed word) main::sw#1!=rangelast(-$7fff,$7ffe)) goto main::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const word) main::w#0 = 0
Constant (const signed word) main::sw#0 = -$7fff
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [6] main::w#1 ← ++ main::w#2 to ++
Resolved ranged comparison value [8] if(main::w#1!=rangelast(0,$ffff)) goto main::@1 to (number) 0
Resolved ranged next value [15] main::sw#1 ← ++ main::sw#2 to ++
Resolved ranged comparison value [17] if(main::sw#1!=rangelast(-$7fff,$7ffe)) goto main::@3 to (number) $7fff
Simplifying expression containing zero main::SCREEN in [3] *((const byte*) main::SCREEN + (byte) 0) ← (byte~) main::$0
Successful SSA optimization PassNSimplifyExpressionWithZero
Adding number conversion cast (unumber) 0 in if((word) main::w#1!=(number) 0) goto main::@1
Adding number conversion cast (snumber) $7fff in if((signed word) main::sw#1!=(number) $7fff) goto main::@3
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 0
Simplifying constant integer cast $7fff
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized signed number type (signed word) $7fff
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inlining constant with var siblings (const word) main::w#0
Inlining constant with var siblings (const signed word) main::sw#0
Constant inlined main::w#0 = (word) 0
Constant inlined main::sw#0 = (signed word) -$7fff
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(main::SCREEN+1)
Consolidated array index constant in *(main::SCREEN+3)
Consolidated array index constant in *(main::SCREEN+4)
Successful SSA optimization Pass2ConstantAdditionElimination
Added new block during phi lifting main::@5(between main::@1 and main::@1)
Added new block during phi lifting main::@6(between main::@3 and main::@3)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
CALL GRAPH
Calls in [] to main:2 

Created 2 initial phi equivalence classes
Coalesced [22] main::sw#3 ← main::sw#1
Coalesced [23] main::w#3 ← main::w#1
Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) main::@2
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@5
Renumbering block main::@3 to main::@2
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

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
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [5] (word) main::w#2 ← phi( main/(word) 0 main::@1/(word) main::w#1 )
  [6] (byte~) main::$0 ← < (word) main::w#2
  [7] *((const byte*) main::SCREEN) ← (byte~) main::$0
  [8] (byte~) main::$1 ← > (word) main::w#2
  [9] *((const byte*) main::SCREEN+(byte) 1) ← (byte~) main::$1
  [10] (word) main::w#1 ← ++ (word) main::w#2
  [11] if((word) main::w#1!=(byte) 0) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@2
  [12] (signed word) main::sw#2 ← phi( main::@1/(signed word) -$7fff main::@2/(signed word) main::sw#1 )
  [13] (byte~) main::$3 ← < (signed word) main::sw#2
  [14] *((const byte*) main::SCREEN+(byte) 3) ← (byte~) main::$3
  [15] (byte~) main::$4 ← > (signed word) main::sw#2
  [16] *((const byte*) main::SCREEN+(byte) 4) ← (byte~) main::$4
  [17] (signed word) main::sw#1 ← ++ (signed word) main::sw#2
  [18] if((signed word) main::sw#1!=(signed word) $7fff) goto main::@2
  to:main::@return
main::@return: scope:[main]  from main::@2
  [19] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) main()
(byte~) main::$0 22.0
(byte~) main::$1 22.0
(byte~) main::$3 22.0
(byte~) main::$4 22.0
(signed word) main::sw
(signed word) main::sw#1 16.5
(signed word) main::sw#2 8.8
(word) main::w
(word) main::w#1 16.5
(word) main::w#2 8.8

Initial phi equivalence classes
[ main::w#2 main::w#1 ]
[ main::sw#2 main::sw#1 ]
Added variable main::$0 to live range equivalence class [ main::$0 ]
Added variable main::$1 to live range equivalence class [ main::$1 ]
Added variable main::$3 to live range equivalence class [ main::$3 ]
Added variable main::$4 to live range equivalence class [ main::$4 ]
Complete equivalence classes
[ main::w#2 main::w#1 ]
[ main::sw#2 main::sw#1 ]
[ main::$0 ]
[ main::$1 ]
[ main::$3 ]
[ main::$4 ]
Allocated zp[2]:2 [ main::w#2 main::w#1 ]
Allocated zp[2]:4 [ main::sw#2 main::sw#1 ]
Allocated zp[1]:6 [ main::$0 ]
Allocated zp[1]:7 [ main::$1 ]
Allocated zp[1]:8 [ main::$3 ]
Allocated zp[1]:9 [ main::$4 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label SCREEN = $400
    .label __0 = 6
    .label __1 = 7
    .label __3 = 8
    .label __4 = 9
    .label w = 2
    .label sw = 4
    // [5] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [5] phi (word) main::w#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z w
    lda #>0
    sta.z w+1
    jmp __b1
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  __b1_from___b1:
    // [5] phi (word) main::w#2 = (word) main::w#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [6] (byte~) main::$0 ← < (word) main::w#2 -- vbuz1=_lo_vwuz2 
    lda.z w
    sta.z __0
    // [7] *((const byte*) main::SCREEN) ← (byte~) main::$0 -- _deref_pbuc1=vbuz1 
    lda.z __0
    sta SCREEN
    // [8] (byte~) main::$1 ← > (word) main::w#2 -- vbuz1=_hi_vwuz2 
    lda.z w+1
    sta.z __1
    // [9] *((const byte*) main::SCREEN+(byte) 1) ← (byte~) main::$1 -- _deref_pbuc1=vbuz1 
    lda.z __1
    sta SCREEN+1
    // [10] (word) main::w#1 ← ++ (word) main::w#2 -- vwuz1=_inc_vwuz1 
    inc.z w
    bne !+
    inc.z w+1
  !:
    // [11] if((word) main::w#1!=(byte) 0) goto main::@1 -- vwuz1_neq_0_then_la1 
    lda.z w
    bne __b1_from___b1
    lda.z w+1
    bne __b1_from___b1
    // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    // [12] phi (signed word) main::sw#2 = (signed word) -$7fff [phi:main::@1->main::@2#0] -- vwsz1=vwsc1 
    lda #<-$7fff
    sta.z sw
    lda #>-$7fff
    sta.z sw+1
    jmp __b2
    // [12] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
  __b2_from___b2:
    // [12] phi (signed word) main::sw#2 = (signed word) main::sw#1 [phi:main::@2->main::@2#0] -- register_copy 
    jmp __b2
    // main::@2
  __b2:
    // [13] (byte~) main::$3 ← < (signed word) main::sw#2 -- vbuz1=_lo_vwsz2 
    lda.z sw
    sta.z __3
    // [14] *((const byte*) main::SCREEN+(byte) 3) ← (byte~) main::$3 -- _deref_pbuc1=vbuz1 
    lda.z __3
    sta SCREEN+3
    // [15] (byte~) main::$4 ← > (signed word) main::sw#2 -- vbuz1=_hi_vwsz2 
    lda.z sw+1
    sta.z __4
    // [16] *((const byte*) main::SCREEN+(byte) 4) ← (byte~) main::$4 -- _deref_pbuc1=vbuz1 
    lda.z __4
    sta SCREEN+4
    // [17] (signed word) main::sw#1 ← ++ (signed word) main::sw#2 -- vwsz1=_inc_vwsz1 
    inc.z sw
    bne !+
    inc.z sw+1
  !:
    // [18] if((signed word) main::sw#1!=(signed word) $7fff) goto main::@2 -- vwsz1_neq_vwsc1_then_la1 
    lda.z sw+1
    cmp #>$7fff
    bne __b2_from___b2
    lda.z sw
    cmp #<$7fff
    bne __b2_from___b2
    jmp __breturn
    // main::@return
  __breturn:
    // [19] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] (byte~) main::$0 ← < (word) main::w#2 [ main::w#2 main::$0 ] ( main:2 [ main::w#2 main::$0 ] ) always clobbers reg byte a 
Statement [8] (byte~) main::$1 ← > (word) main::w#2 [ main::w#2 main::$1 ] ( main:2 [ main::w#2 main::$1 ] ) always clobbers reg byte a 
Statement [11] if((word) main::w#1!=(byte) 0) goto main::@1 [ main::w#1 ] ( main:2 [ main::w#1 ] ) always clobbers reg byte a 
Statement [13] (byte~) main::$3 ← < (signed word) main::sw#2 [ main::sw#2 main::$3 ] ( main:2 [ main::sw#2 main::$3 ] ) always clobbers reg byte a 
Statement [15] (byte~) main::$4 ← > (signed word) main::sw#2 [ main::sw#2 main::$4 ] ( main:2 [ main::sw#2 main::$4 ] ) always clobbers reg byte a 
Statement [18] if((signed word) main::sw#1!=(signed word) $7fff) goto main::@2 [ main::sw#1 ] ( main:2 [ main::sw#1 ] ) always clobbers reg byte a 
Potential registers zp[2]:2 [ main::w#2 main::w#1 ] : zp[2]:2 , 
Potential registers zp[2]:4 [ main::sw#2 main::sw#1 ] : zp[2]:4 , 
Potential registers zp[1]:6 [ main::$0 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ main::$1 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:8 [ main::$3 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:9 [ main::$4 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 25.3: zp[2]:2 [ main::w#2 main::w#1 ] 25.3: zp[2]:4 [ main::sw#2 main::sw#1 ] 22: zp[1]:6 [ main::$0 ] 22: zp[1]:7 [ main::$1 ] 22: zp[1]:8 [ main::$3 ] 22: zp[1]:9 [ main::$4 ] 
Uplift Scope [] 

Uplifting [main] best 1158 combination zp[2]:2 [ main::w#2 main::w#1 ] zp[2]:4 [ main::sw#2 main::sw#1 ] reg byte a [ main::$0 ] reg byte a [ main::$1 ] reg byte a [ main::$3 ] reg byte a [ main::$4 ] 
Limited combination testing to 100 combinations of 256 possible.
Uplifting [] best 1158 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label SCREEN = $400
    .label w = 2
    .label sw = 4
    // [5] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [5] phi (word) main::w#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z w
    lda #>0
    sta.z w+1
    jmp __b1
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  __b1_from___b1:
    // [5] phi (word) main::w#2 = (word) main::w#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [6] (byte~) main::$0 ← < (word) main::w#2 -- vbuaa=_lo_vwuz1 
    lda.z w
    // [7] *((const byte*) main::SCREEN) ← (byte~) main::$0 -- _deref_pbuc1=vbuaa 
    sta SCREEN
    // [8] (byte~) main::$1 ← > (word) main::w#2 -- vbuaa=_hi_vwuz1 
    lda.z w+1
    // [9] *((const byte*) main::SCREEN+(byte) 1) ← (byte~) main::$1 -- _deref_pbuc1=vbuaa 
    sta SCREEN+1
    // [10] (word) main::w#1 ← ++ (word) main::w#2 -- vwuz1=_inc_vwuz1 
    inc.z w
    bne !+
    inc.z w+1
  !:
    // [11] if((word) main::w#1!=(byte) 0) goto main::@1 -- vwuz1_neq_0_then_la1 
    lda.z w
    bne __b1_from___b1
    lda.z w+1
    bne __b1_from___b1
    // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    // [12] phi (signed word) main::sw#2 = (signed word) -$7fff [phi:main::@1->main::@2#0] -- vwsz1=vwsc1 
    lda #<-$7fff
    sta.z sw
    lda #>-$7fff
    sta.z sw+1
    jmp __b2
    // [12] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
  __b2_from___b2:
    // [12] phi (signed word) main::sw#2 = (signed word) main::sw#1 [phi:main::@2->main::@2#0] -- register_copy 
    jmp __b2
    // main::@2
  __b2:
    // [13] (byte~) main::$3 ← < (signed word) main::sw#2 -- vbuaa=_lo_vwsz1 
    lda.z sw
    // [14] *((const byte*) main::SCREEN+(byte) 3) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa 
    sta SCREEN+3
    // [15] (byte~) main::$4 ← > (signed word) main::sw#2 -- vbuaa=_hi_vwsz1 
    lda.z sw+1
    // [16] *((const byte*) main::SCREEN+(byte) 4) ← (byte~) main::$4 -- _deref_pbuc1=vbuaa 
    sta SCREEN+4
    // [17] (signed word) main::sw#1 ← ++ (signed word) main::sw#2 -- vwsz1=_inc_vwsz1 
    inc.z sw
    bne !+
    inc.z sw+1
  !:
    // [18] if((signed word) main::sw#1!=(signed word) $7fff) goto main::@2 -- vwsz1_neq_vwsc1_then_la1 
    lda.z sw+1
    cmp #>$7fff
    bne __b2_from___b2
    lda.z sw
    cmp #<$7fff
    bne __b2_from___b2
    jmp __breturn
    // main::@return
  __breturn:
    // [19] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __bbegin with __b1
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b1 with __b1
Replacing label __b2_from___b2 with __b2
Replacing label __b2_from___b2 with __b2
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
Removing instruction __b1_from___b1:
Removing instruction __b2_from___b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction __b1_from_main:
Removing instruction __b2_from___b1:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp __b1
Removing instruction jmp __b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(void()) main()
(byte~) main::$0 reg byte a 22.0
(byte~) main::$1 reg byte a 22.0
(byte~) main::$3 reg byte a 22.0
(byte~) main::$4 reg byte a 22.0
(label) main::@1
(label) main::@2
(label) main::@return
(const byte*) main::SCREEN = (byte*) 1024
(signed word) main::sw
(signed word) main::sw#1 sw zp[2]:4 16.5
(signed word) main::sw#2 sw zp[2]:4 8.8
(word) main::w
(word) main::w#1 w zp[2]:2 16.5
(word) main::w#2 w zp[2]:2 8.8

zp[2]:2 [ main::w#2 main::w#1 ]
zp[2]:4 [ main::sw#2 main::sw#1 ]
reg byte a [ main::$0 ]
reg byte a [ main::$1 ]
reg byte a [ main::$3 ]
reg byte a [ main::$4 ]


FINAL ASSEMBLER
Score: 976

  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .label SCREEN = $400
    .label w = 2
    .label sw = 4
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (word) main::w#2 = (word) 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z w
    sta.z w+1
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
    // [5] phi (word) main::w#2 = (word) main::w#1 [phi:main::@1->main::@1#0] -- register_copy 
    // main::@1
  __b1:
    // <w
    // [6] (byte~) main::$0 ← < (word) main::w#2 -- vbuaa=_lo_vwuz1 
    lda.z w
    // SCREEN[0] = <w
    // [7] *((const byte*) main::SCREEN) ← (byte~) main::$0 -- _deref_pbuc1=vbuaa 
    sta SCREEN
    // >w
    // [8] (byte~) main::$1 ← > (word) main::w#2 -- vbuaa=_hi_vwuz1 
    lda.z w+1
    // SCREEN[1] = >w
    // [9] *((const byte*) main::SCREEN+(byte) 1) ← (byte~) main::$1 -- _deref_pbuc1=vbuaa 
    sta SCREEN+1
    // for( word w: 0..$ffff)
    // [10] (word) main::w#1 ← ++ (word) main::w#2 -- vwuz1=_inc_vwuz1 
    inc.z w
    bne !+
    inc.z w+1
  !:
    // [11] if((word) main::w#1!=(byte) 0) goto main::@1 -- vwuz1_neq_0_then_la1 
    lda.z w
    bne __b1
    lda.z w+1
    bne __b1
    // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // [12] phi (signed word) main::sw#2 = (signed word) -$7fff [phi:main::@1->main::@2#0] -- vwsz1=vwsc1 
    lda #<-$7fff
    sta.z sw
    lda #>-$7fff
    sta.z sw+1
    // [12] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
    // [12] phi (signed word) main::sw#2 = (signed word) main::sw#1 [phi:main::@2->main::@2#0] -- register_copy 
    // main::@2
  __b2:
    // <sw
    // [13] (byte~) main::$3 ← < (signed word) main::sw#2 -- vbuaa=_lo_vwsz1 
    lda.z sw
    // SCREEN[3] = <sw
    // [14] *((const byte*) main::SCREEN+(byte) 3) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa 
    sta SCREEN+3
    // >sw
    // [15] (byte~) main::$4 ← > (signed word) main::sw#2 -- vbuaa=_hi_vwsz1 
    lda.z sw+1
    // SCREEN[4] = >sw
    // [16] *((const byte*) main::SCREEN+(byte) 4) ← (byte~) main::$4 -- _deref_pbuc1=vbuaa 
    sta SCREEN+4
    // for( signed word sw: -$7fff..$7ffe)
    // [17] (signed word) main::sw#1 ← ++ (signed word) main::sw#2 -- vwsz1=_inc_vwsz1 
    inc.z sw
    bne !+
    inc.z sw+1
  !:
    // [18] if((signed word) main::sw#1!=(signed word) $7fff) goto main::@2 -- vwsz1_neq_vwsc1_then_la1 
    lda.z sw+1
    cmp #>$7fff
    bne __b2
    lda.z sw
    cmp #<$7fff
    bne __b2
    // main::@return
    // }
    // [19] return 
    rts
}
  // File Data

