
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte/signed byte/word/signed word/dword/signed dword~) $0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) b#0 ← (byte/signed byte/word/signed word/dword/signed dword~) $0
  (byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) 53281
  (byte[]) msg#0 ← (const string) $1
  (byte[]) arr#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 9 }
  (byte) c#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) c2#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (word) d#0 ← (word/signed word/dword/signed dword) 1000
  to:@2
main: scope:[main]  from @2
  (word) d#2 ← phi( @2/(word) d#3 )
  (byte) b#13 ← phi( @2/(byte) b#14 )
  (byte) main::col#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte*) main::COLS#0 ← ((byte*)) (word/dword/signed dword) 55296
  (byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte/signed word/word/dword/signed dword/signed byte~) main::$1 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0 + (byte/signed byte/word/signed word/dword/signed dword) 3
  call s 
  (byte) s::return#0 ← (byte) s::return#2
  to:main::@3
main::@3: scope:[main]  from main
  (byte*) main::COLS#2 ← phi( main/(byte*) main::COLS#0 )
  (byte) main::col#2 ← phi( main/(byte) main::col#0 )
  (word) d#1 ← phi( main/(word) d#2 )
  (byte) b#7 ← phi( main/(byte) b#5 )
  (byte) s::return#3 ← phi( main/(byte) s::return#0 )
  (byte~) main::$2 ← (byte) s::return#3
  (byte) b#1 ← (byte) b#7
  (byte/signed word/word/dword/signed dword~) main::$3 ← (byte/signed word/word/dword/signed dword/signed byte~) main::$1 + (byte~) main::$2
  (byte) main::e#0 ← (byte/signed word/word/dword/signed dword~) main::$3
  (word/signed word/dword/signed dword~) main::$4 ← (word/signed word/dword/signed dword) 2000 + (word/signed word/dword/signed dword) 2000
  (word/signed dword/dword~) main::$5 ← (word/signed word/dword/signed dword~) main::$4 + (word) d#1
  (word/signed dword/dword~) main::$6 ← (word/signed dword/dword~) main::$5 + (byte) b#1
  (word) main::f#0 ← (word/signed dword/dword~) main::$6
  (byte) b#2 ← ++ (byte) b#1
  (byte[]) main::g#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 6 }
  (byte[]) main::h#0 ← (const string) main::$9
  (byte) main::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@1
main::@1: scope:[main]  from main::@1 main::@3
  (byte) b#8 ← phi( main::@1/(byte) b#8 main::@3/(byte) b#2 )
  (byte) main::i#2 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#0 )
  (byte*) main::COLS#1 ← phi( main::@1/(byte*) main::COLS#1 main::@3/(byte*) main::COLS#2 )
  (byte) main::col#1 ← phi( main::@1/(byte) main::col#1 main::@3/(byte) main::col#2 )
  (signed byte/signed word/signed dword~) main::$7 ← - (byte/signed byte/word/signed word/dword/signed dword) 13
  (signed byte) main::x#0 ← (signed byte/signed word/signed dword~) main::$7
  *((byte*) main::COLS#1 + (byte) main::i#2) ← (byte) main::col#1
  *((byte*) SCREEN#0 + (byte) main::i#2) ← (byte) b#8
  (byte) main::i#1 ← (byte) main::i#2 + rangenext(0,100)
  (bool~) main::$8 ← (byte) main::i#1 != rangelast(0,100)
  if((bool~) main::$8) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@1
  (byte) b#9 ← phi( main::@1/(byte) b#8 )
  (byte) b#3 ← (byte) b#9
  return 
  to:@return
s: scope:[s]  from main
  (byte) b#10 ← phi( main/(byte) b#13 )
  (byte) b#4 ← ++ (byte) b#10
  (byte) s::return#1 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  to:s::@return
s::@return: scope:[s]  from s
  (byte) b#11 ← phi( s/(byte) b#4 )
  (byte) s::return#4 ← phi( s/(byte) s::return#1 )
  (byte) s::return#2 ← (byte) s::return#4
  (byte) b#5 ← (byte) b#11
  return 
  to:@return
@2: scope:[]  from @begin
  (word) d#3 ← phi( @begin/(word) d#0 )
  (byte) b#14 ← phi( @begin/(byte) b#0 )
  call main 
  to:@3
@3: scope:[]  from @2
  (byte) b#12 ← phi( @2/(byte) b#3 )
  (byte) b#6 ← (byte) b#12
  to:@end
@end: scope:[]  from @3

SYMBOL TABLE SSA
(byte/signed byte/word/signed word/dword/signed dword~) $0
(const string) $1 = (string) "hello world@"
(label) @2
(label) @3
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte[]) arr
(byte[]) arr#0
(byte) b
(byte) b#0
(byte) b#1
(byte) b#10
(byte) b#11
(byte) b#12
(byte) b#13
(byte) b#14
(byte) b#2
(byte) b#3
(byte) b#4
(byte) b#5
(byte) b#6
(byte) b#7
(byte) b#8
(byte) b#9
(byte) c
(byte) c#0
(byte) c2
(byte) c2#0
(word) d
(word) d#0
(word) d#1
(word) d#2
(word) d#3
(void()) main()
(byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed word/word/dword/signed dword/signed byte~) main::$1
(byte~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3
(word/signed word/dword/signed dword~) main::$4
(word/signed dword/dword~) main::$5
(word/signed dword/dword~) main::$6
(signed byte/signed word/signed dword~) main::$7
(bool~) main::$8
(const string) main::$9 = (string) "goodbye sky "
(label) main::@1
(label) main::@3
(label) main::@return
(byte*) main::COLS
(byte*) main::COLS#0
(byte*) main::COLS#1
(byte*) main::COLS#2
(byte) main::col
(byte) main::col#0
(byte) main::col#1
(byte) main::col#2
(byte) main::e
(byte) main::e#0
(word) main::f
(word) main::f#0
(byte[]) main::g
(byte[]) main::g#0
(byte[]) main::h
(byte[]) main::h#0
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(signed byte) main::x
(signed byte) main::x#0
(byte[]) msg
(byte[]) msg#0
(byte()) s()
(label) s::@return
(byte) s::return
(byte) s::return#0
(byte) s::return#1
(byte) s::return#2
(byte) s::return#3
(byte) s::return#4

Alias (byte) b#0 = (byte/signed byte/word/signed word/dword/signed dword~) $0 (byte) b#14 
Alias (byte) s::return#0 = (byte) s::return#3 
Alias (word) d#1 = (word) d#2 
Alias (byte) main::col#0 = (byte) main::col#2 
Alias (byte*) main::COLS#0 = (byte*) main::COLS#2 
Alias (byte) b#1 = (byte) b#7 
Alias (byte) main::e#0 = (byte/signed word/word/dword/signed dword~) main::$3 
Alias (word) main::f#0 = (word/signed dword/dword~) main::$6 
Alias (signed byte) main::x#0 = (signed byte/signed word/signed dword~) main::$7 
Alias (byte) b#3 = (byte) b#9 (byte) b#8 
Alias (byte) s::return#1 = (byte) s::return#4 (byte) s::return#2 
Alias (byte) b#11 = (byte) b#4 (byte) b#5 
Alias (word) d#0 = (word) d#3 
Alias (byte) b#12 = (byte) b#6 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::col#1
Self Phi Eliminated (byte*) main::COLS#1
Self Phi Eliminated (byte) b#3
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte) b#13 (byte) b#0
Redundant Phi (word) d#1 (word) d#0
Redundant Phi (byte) b#1 (byte) b#11
Redundant Phi (byte) main::col#1 (byte) main::col#0
Redundant Phi (byte*) main::COLS#1 (byte*) main::COLS#0
Redundant Phi (byte) b#3 (byte) b#2
Redundant Phi (byte) b#10 (byte) b#13
Redundant Phi (byte) b#12 (byte) b#3
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) main::$8 [36] if((byte) main::i#1!=rangelast(0,100)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte) b#0 = 2>>1
Constant (const byte*) BGCOL#0 = ((byte*))53281
Constant (const byte[]) msg#0 = $1
Constant (const byte[]) arr#0 = { 7, 8, 9 }
Constant (const byte) c#0 = 1
Constant (const byte) c2#0 = 1
Constant (const word) d#0 = 1000
Constant (const byte) main::col#0 = 2
Constant (const byte*) main::COLS#0 = ((byte*))55296
Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$0 = 3+3
Constant (const word/signed word/dword/signed dword) main::$4 = 2000+2000
Constant (const byte[]) main::g#0 = { 4, 5, 6 }
Constant (const byte[]) main::h#0 = main::$9
Constant (const byte) main::i#0 = 0
Constant (const signed byte) main::x#0 = -13
Constant (const byte) s::return#1 = 2
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte/signed word/word/dword/signed dword/signed byte) main::$1 = main::$0+3
Constant (const byte) s::return#0 = s::return#1
Constant (const word/signed dword/dword) main::$5 = main::$4+d#0
Constant (const byte) b#11 = ++b#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$2 = s::return#0
Constant (const word) main::f#0 = main::$5+b#11
Constant (const byte) b#2 = ++b#11
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::e#0 = main::$1+main::$2
Successful SSA optimization Pass2ConstantIdentification
Successful SSA optimization PassNEliminateUnusedVars
Successful SSA optimization PassNEliminateUnusedVars
Successful SSA optimization PassNEliminateUnusedVars
Successful SSA optimization PassNEliminateUnusedVars
Resolved ranged next value main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value if(main::i#1!=rangelast(0,100)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 101
Culled Empty Block (label) main::@3
Culled Empty Block (label) @3
Successful SSA optimization Pass2CullEmptyBlocks
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with different constant siblings (const byte) b#0
Inlining constant with different constant siblings (const byte) b#11
Inlining constant with different constant siblings (const byte) b#2
Constant inlined b#2 = ++++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined b#11 = ++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined b#0 = (byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@4(between main::@1 and main::@1)
Adding NOP phi() at start of @begin
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 s
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to s:5 

Created 1 initial phi equivalence classes
Coalesced [12] main::i#3 ← main::i#1
Coalesced down to 1 phi equivalence classes
Culled Empty Block (label) main::@4
Adding NOP phi() at start of @begin
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 s

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@2
@2: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @2
  [3] phi()
main: scope:[main]  from @2
  [4] phi()
  [5] call s 
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [6] (byte) main::i#2 ← phi( main::@1/(byte) main::i#1 main/(byte/signed byte/word/signed word/dword/signed dword) 0 )
  [7] *((const byte*) main::COLS#0 + (byte) main::i#2) ← (const byte) main::col#0
  [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← ++++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1
  [9] (byte) main::i#1 ← ++ (byte) main::i#2
  [10] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 101) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@1
  [11] return 
  to:@return
s: scope:[s]  from main
  [12] phi()
  to:s::@return
s::@return: scope:[s]  from s
  [13] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) BGCOL
(byte*) SCREEN
(byte[]) arr
(byte) b
(byte) c
(byte) c2
(word) d
(void()) main()
(byte*) main::COLS
(byte) main::col
(byte) main::e
(word) main::f
(byte[]) main::g
(byte[]) main::h
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 14.666666666666666
(signed byte) main::x
(byte[]) msg
(byte()) s()
(byte) s::return

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]

INITIAL ASM
//SEG0 File Comments
// used vars
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG5 @2
b2:
//SEG6 [2] call main 
//SEG7 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
    // used vars
    .const col = 2
    .label COLS = $d800
    .label i = 2
  //SEG11 [5] call s 
  //SEG12 [12] phi from main to s [phi:main->s]
  s_from_main:
    jsr s
  //SEG13 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG14 [6] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG15 [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
  //SEG16 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
  //SEG17 main::@1
  b1:
  //SEG18 [7] *((const byte*) main::COLS#0 + (byte) main::i#2) ← (const byte) main::col#0 -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #col
    sta COLS,y
  //SEG19 [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← ++++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1 -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #(2>>1)+1+1
    sta SCREEN,y
  //SEG20 [9] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG21 [10] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 101) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$65
    bne b1_from_b1
    jmp breturn
  //SEG22 main::@return
  breturn:
  //SEG23 [11] return 
    rts
}
//SEG24 s
s: {
    jmp breturn
  //SEG25 s::@return
  breturn:
  //SEG26 [13] return 
    rts
}

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] *((const byte*) main::COLS#0 + (byte) main::i#2) ← (const byte) main::col#0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Statement [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← ++++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a 
Statement [7] *((const byte*) main::COLS#0 + (byte) main::i#2) ← (const byte) main::col#0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a 
Statement [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← ++++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 31.17: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 
Uplift Scope [s] 
Uplift Scope [] 

Uplifting [main] best 375 combination reg byte x [ main::i#2 main::i#1 ] 
Uplifting [s] best 375 combination 
Uplifting [] best 375 combination 

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// used vars
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG5 @2
b2:
//SEG6 [2] call main 
//SEG7 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
    // used vars
    .const col = 2
    .label COLS = $d800
  //SEG11 [5] call s 
  //SEG12 [12] phi from main to s [phi:main->s]
  s_from_main:
    jsr s
  //SEG13 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG14 [6] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG15 [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
  //SEG16 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
  //SEG17 main::@1
  b1:
  //SEG18 [7] *((const byte*) main::COLS#0 + (byte) main::i#2) ← (const byte) main::col#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #col
    sta COLS,x
  //SEG19 [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← ++++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #(2>>1)+1+1
    sta SCREEN,x
  //SEG20 [9] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG21 [10] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 101) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$65
    bne b1_from_b1
    jmp breturn
  //SEG22 main::@return
  breturn:
  //SEG23 [11] return 
    rts
}
//SEG24 s
s: {
    jmp breturn
  //SEG25 s::@return
  breturn:
  //SEG26 [13] return 
    rts
}

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b2
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction b2_from_bbegin:
Removing instruction b2:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction s_from_main:
Removing instruction b1_from_main:
Removing instruction breturn:
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
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @2
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte[]) arr
(byte) b
(byte) c
(byte) c2
(word) d
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::COLS
(const byte*) main::COLS#0 COLS = ((byte*))(word/dword/signed dword) 55296
(byte) main::col
(const byte) main::col#0 col = (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e
(word) main::f
(byte[]) main::g
(byte[]) main::h
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 14.666666666666666
(signed byte) main::x
(byte[]) msg
(byte()) s()
(label) s::@return
(byte) s::return

reg byte x [ main::i#2 main::i#1 ]


FINAL ASSEMBLER
Score: 243

//SEG0 File Comments
// used vars
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label SCREEN = $400
//SEG3 @begin
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
//SEG5 @2
//SEG6 [2] call main 
//SEG7 [4] phi from @2 to main [phi:@2->main]
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
//SEG9 @end
//SEG10 main
main: {
    // used vars
    .const col = 2
    .label COLS = $d800
  //SEG11 [5] call s 
  //SEG12 [12] phi from main to s [phi:main->s]
    jsr s
  //SEG13 [6] phi from main to main::@1 [phi:main->main::@1]
  //SEG14 [6] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG15 [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  //SEG16 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy 
  //SEG17 main::@1
  b1:
  //SEG18 [7] *((const byte*) main::COLS#0 + (byte) main::i#2) ← (const byte) main::col#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #col
    sta COLS,x
  //SEG19 [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← ++++(byte/signed byte/word/signed word/dword/signed dword) 2>>(byte/signed byte/word/signed word/dword/signed dword) 1 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #(2>>1)+1+1
    sta SCREEN,x
  //SEG20 [9] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG21 [10] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 101) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$65
    bne b1
  //SEG22 main::@return
  //SEG23 [11] return 
    rts
}
//SEG24 s
s: {
  //SEG25 s::@return
  //SEG26 [13] return 
    rts
}

