
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) 53248
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  to:@1
main: scope:[main]  from @1
  (byte*) SCREEN#1 ← phi( @1/(byte*) SCREEN#2 )
  (byte*) PROCPORT#1 ← phi( @1/(byte*) PROCPORT#3 )
  (byte*) CHARGEN#1 ← phi( @1/(byte*) CHARGEN#2 )
  asm { sei  }
  (byte*~) main::$0 ← (byte*) CHARGEN#1 + (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) main::CHAR_A#0 ← (byte*~) main::$0
  *((byte*) PROCPORT#1) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte*) main::sc#0 ← (byte*) SCREEN#1
  (byte) main::y#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@1
main::@1: scope:[main]  from main main::@5
  (byte*) PROCPORT#8 ← phi( main/(byte*) PROCPORT#1 main::@5/(byte*) PROCPORT#4 )
  (byte*) main::sc#7 ← phi( main/(byte*) main::sc#0 main::@5/(byte*) main::sc#2 )
  (byte) main::y#2 ← phi( main/(byte) main::y#0 main::@5/(byte) main::y#1 )
  (byte*) main::CHAR_A#1 ← phi( main/(byte*) main::CHAR_A#0 main::@5/(byte*) main::CHAR_A#2 )
  (byte) main::bits#0 ← *((byte*) main::CHAR_A#1 + (byte) main::y#2)
  (byte) main::x#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@3
  (byte*) PROCPORT#6 ← phi( main::@1/(byte*) PROCPORT#8 main::@3/(byte*) PROCPORT#5 )
  (byte*) main::CHAR_A#4 ← phi( main::@1/(byte*) main::CHAR_A#1 main::@3/(byte*) main::CHAR_A#3 )
  (byte) main::y#5 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#4 )
  (byte) main::x#3 ← phi( main::@1/(byte) main::x#0 main::@3/(byte) main::x#1 )
  (byte*) main::sc#5 ← phi( main::@1/(byte*) main::sc#7 main::@3/(byte*) main::sc#1 )
  (byte) main::bits#2 ← phi( main::@1/(byte) main::bits#0 main::@3/(byte) main::bits#1 )
  (byte) main::c#0 ← (byte) '.'
  (byte~) main::$1 ← (byte) main::bits#2 & (byte/word/signed word/dword/signed dword) 128
  (bool~) main::$2 ← (byte~) main::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) main::$3 ← ! (bool~) main::$2
  if((bool~) main::$3) goto main::@3
  to:main::@4
main::@3: scope:[main]  from main::@2 main::@4
  (byte*) PROCPORT#5 ← phi( main::@2/(byte*) PROCPORT#6 main::@4/(byte*) PROCPORT#7 )
  (byte*) main::CHAR_A#3 ← phi( main::@2/(byte*) main::CHAR_A#4 main::@4/(byte*) main::CHAR_A#5 )
  (byte) main::y#4 ← phi( main::@2/(byte) main::y#5 main::@4/(byte) main::y#6 )
  (byte) main::x#2 ← phi( main::@2/(byte) main::x#3 main::@4/(byte) main::x#4 )
  (byte) main::bits#3 ← phi( main::@2/(byte) main::bits#2 main::@4/(byte) main::bits#4 )
  (byte*) main::sc#3 ← phi( main::@2/(byte*) main::sc#5 main::@4/(byte*) main::sc#6 )
  (byte) main::c#2 ← phi( main::@2/(byte) main::c#0 main::@4/(byte) main::c#1 )
  *((byte*) main::sc#3) ← (byte) main::c#2
  (byte*) main::sc#1 ← ++ (byte*) main::sc#3
  (byte~) main::$4 ← (byte) main::bits#3 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits#1 ← (byte~) main::$4
  (byte) main::x#1 ← (byte) main::x#2 + rangenext(0,7)
  (bool~) main::$5 ← (byte) main::x#1 != rangelast(0,7)
  if((bool~) main::$5) goto main::@2
  to:main::@5
main::@4: scope:[main]  from main::@2
  (byte*) PROCPORT#7 ← phi( main::@2/(byte*) PROCPORT#6 )
  (byte*) main::CHAR_A#5 ← phi( main::@2/(byte*) main::CHAR_A#4 )
  (byte) main::y#6 ← phi( main::@2/(byte) main::y#5 )
  (byte) main::x#4 ← phi( main::@2/(byte) main::x#3 )
  (byte) main::bits#4 ← phi( main::@2/(byte) main::bits#2 )
  (byte*) main::sc#6 ← phi( main::@2/(byte*) main::sc#5 )
  (byte) main::c#1 ← (byte) '*'
  to:main::@3
main::@5: scope:[main]  from main::@3
  (byte*) PROCPORT#4 ← phi( main::@3/(byte*) PROCPORT#5 )
  (byte*) main::CHAR_A#2 ← phi( main::@3/(byte*) main::CHAR_A#3 )
  (byte) main::y#3 ← phi( main::@3/(byte) main::y#4 )
  (byte*) main::sc#4 ← phi( main::@3/(byte*) main::sc#1 )
  (byte*~) main::$6 ← (byte*) main::sc#4 + (byte/signed byte/word/signed word/dword/signed dword) 32
  (byte*) main::sc#2 ← (byte*~) main::$6
  (byte) main::y#1 ← (byte) main::y#3 + rangenext(0,7)
  (bool~) main::$7 ← (byte) main::y#1 != rangelast(0,7)
  if((bool~) main::$7) goto main::@1
  to:main::@6
main::@6: scope:[main]  from main::@5
  (byte*) PROCPORT#2 ← phi( main::@5/(byte*) PROCPORT#4 )
  *((byte*) PROCPORT#2) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  to:main::@return
main::@return: scope:[main]  from main::@6
  return 
  to:@return
@1: scope:[]  from @begin
  (byte*) SCREEN#2 ← phi( @begin/(byte*) SCREEN#0 )
  (byte*) PROCPORT#3 ← phi( @begin/(byte*) PROCPORT#0 )
  (byte*) CHARGEN#2 ← phi( @begin/(byte*) CHARGEN#0 )
  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
(byte*) CHARGEN
(byte*) CHARGEN#0
(byte*) CHARGEN#1
(byte*) CHARGEN#2
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte*) PROCPORT#1
(byte*) PROCPORT#2
(byte*) PROCPORT#3
(byte*) PROCPORT#4
(byte*) PROCPORT#5
(byte*) PROCPORT#6
(byte*) PROCPORT#7
(byte*) PROCPORT#8
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) SCREEN#1
(byte*) SCREEN#2
(void()) main()
(byte*~) main::$0
(byte~) main::$1
(bool~) main::$2
(bool~) main::$3
(byte~) main::$4
(bool~) main::$5
(byte*~) main::$6
(bool~) main::$7
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(byte*) main::CHAR_A
(byte*) main::CHAR_A#0
(byte*) main::CHAR_A#1
(byte*) main::CHAR_A#2
(byte*) main::CHAR_A#3
(byte*) main::CHAR_A#4
(byte*) main::CHAR_A#5
(byte) main::bits
(byte) main::bits#0
(byte) main::bits#1
(byte) main::bits#2
(byte) main::bits#3
(byte) main::bits#4
(byte) main::c
(byte) main::c#0
(byte) main::c#1
(byte) main::c#2
(byte*) main::sc
(byte*) main::sc#0
(byte*) main::sc#1
(byte*) main::sc#2
(byte*) main::sc#3
(byte*) main::sc#4
(byte*) main::sc#5
(byte*) main::sc#6
(byte*) main::sc#7
(byte) main::x
(byte) main::x#0
(byte) main::x#1
(byte) main::x#2
(byte) main::x#3
(byte) main::x#4
(byte) main::y
(byte) main::y#0
(byte) main::y#1
(byte) main::y#2
(byte) main::y#3
(byte) main::y#4
(byte) main::y#5
(byte) main::y#6

Culled Empty Block (label) @2
Successful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not [17] (bool~) main::$3 ← (byte~) main::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [16] (bool~) main::$2 ← (byte~) main::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) main::CHAR_A#0 = (byte*~) main::$0 
Alias (byte) main::bits#1 = (byte~) main::$4 
Alias (byte*) main::sc#5 = (byte*) main::sc#6 
Alias (byte) main::bits#2 = (byte) main::bits#4 
Alias (byte) main::x#3 = (byte) main::x#4 
Alias (byte) main::y#5 = (byte) main::y#6 
Alias (byte*) main::CHAR_A#4 = (byte*) main::CHAR_A#5 
Alias (byte*) PROCPORT#6 = (byte*) PROCPORT#7 
Alias (byte*) main::sc#1 = (byte*) main::sc#4 
Alias (byte) main::y#3 = (byte) main::y#4 
Alias (byte*) main::CHAR_A#2 = (byte*) main::CHAR_A#3 
Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#4 (byte*) PROCPORT#5 
Alias (byte*) main::sc#2 = (byte*~) main::$6 
Alias (byte*) CHARGEN#0 = (byte*) CHARGEN#2 
Alias (byte*) PROCPORT#0 = (byte*) PROCPORT#3 
Alias (byte*) SCREEN#0 = (byte*) SCREEN#2 
Successful SSA optimization Pass2AliasElimination
Alias (byte*) main::sc#3 = (byte*) main::sc#5 
Alias (byte) main::bits#2 = (byte) main::bits#3 
Alias (byte) main::x#2 = (byte) main::x#3 
Alias (byte) main::y#3 = (byte) main::y#5 
Alias (byte*) main::CHAR_A#2 = (byte*) main::CHAR_A#4 
Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#6 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::y#3
Self Phi Eliminated (byte*) main::CHAR_A#2
Self Phi Eliminated (byte*) PROCPORT#2
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) CHARGEN#1 (byte*) CHARGEN#0
Redundant Phi (byte*) PROCPORT#1 (byte*) PROCPORT#0
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
Redundant Phi (byte) main::y#3 (byte) main::y#2
Redundant Phi (byte*) main::CHAR_A#2 (byte*) main::CHAR_A#1
Redundant Phi (byte*) PROCPORT#2 (byte*) PROCPORT#8
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) main::$3 [18] if((byte~) main::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3
Simple Condition (bool~) main::$5 [26] if((byte) main::x#1!=rangelast(0,7)) goto main::@2
Simple Condition (bool~) main::$7 [34] if((byte) main::y#1!=rangelast(0,7)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) PROCPORT#0 = ((byte*))1
Constant (const byte*) CHARGEN#0 = ((byte*))53248
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte) main::y#0 = 0
Constant (const byte) main::x#0 = 0
Constant (const byte) main::c#0 = '.'
Constant (const byte) main::c#1 = '*'
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) main::CHAR_A#0 = CHARGEN#0+8
Constant (const byte*) main::sc#0 = SCREEN#0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value if(main::x#1!=rangelast(0,7)) goto main::@2 to (byte/signed byte/word/signed word/dword/signed dword) 8
Resolved ranged next value main::y#1 ← ++ main::y#2 to ++
Resolved ranged comparison value if(main::y#1!=rangelast(0,7)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 8
Self Phi Eliminated (byte*) main::CHAR_A#1
Self Phi Eliminated (byte*) PROCPORT#8
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) main::CHAR_A#1 (const byte*) main::CHAR_A#0
Redundant Phi (byte*) PROCPORT#8 (const byte*) PROCPORT#0
Successful SSA optimization Pass2RedundantPhiElimination
Inlining constant with var siblings (const byte) main::y#0
Inlining constant with var siblings (const byte) main::x#0
Inlining constant with var siblings (const byte) main::c#0
Inlining constant with var siblings (const byte) main::c#1
Inlining constant with var siblings (const byte*) main::sc#0
Constant inlined main::sc#0 = (const byte*) SCREEN#0
Constant inlined main::c#0 = (byte) '.'
Constant inlined main::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::y#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::c#1 = (byte) '*'
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@7(between main::@5 and main::@1)
Added new block during phi lifting main::@8(between main::@3 and 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::@4
CALL GRAPH
Calls in [] to main:2 

Created 6 initial phi equivalence classes
Coalesced [8] main::bits#5 ← main::bits#0
Coalesced [9] main::sc#9 ← main::sc#7
Coalesced [26] main::y#7 ← main::y#1
Coalesced [27] main::sc#8 ← main::sc#2
Coalesced [28] main::bits#6 ← main::bits#1
Coalesced [29] main::sc#10 ← main::sc#1
Coalesced [30] main::x#5 ← main::x#1
Coalesced down to 5 phi equivalence classes
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@8
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::@4

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()
main: scope:[main]  from @1
  asm { sei  }
  [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  to:main::@1
main::@1: scope:[main]  from main main::@5
  [6] (byte*) main::sc#7 ← phi( main/(const byte*) SCREEN#0 main::@5/(byte*) main::sc#2 )
  [6] (byte) main::y#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@5/(byte) main::y#1 )
  [7] (byte) main::bits#0 ← *((const byte*) main::CHAR_A#0 + (byte) main::y#2)
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@3
  [8] (byte) main::x#2 ← phi( main::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::x#1 )
  [8] (byte*) main::sc#3 ← phi( main::@1/(byte*) main::sc#7 main::@3/(byte*) main::sc#1 )
  [8] (byte) main::bits#2 ← phi( main::@1/(byte) main::bits#0 main::@3/(byte) main::bits#1 )
  [9] (byte~) main::$1 ← (byte) main::bits#2 & (byte/word/signed word/dword/signed dword) 128
  [10] if((byte~) main::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3
  to:main::@4
main::@4: scope:[main]  from main::@2
  [11] phi()
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@4
  [12] (byte) main::c#2 ← phi( main::@2/(byte) '.' main::@4/(byte) '*' )
  [13] *((byte*) main::sc#3) ← (byte) main::c#2
  [14] (byte*) main::sc#1 ← ++ (byte*) main::sc#3
  [15] (byte) main::bits#1 ← (byte) main::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [16] (byte) main::x#1 ← ++ (byte) main::x#2
  [17] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2
  to:main::@5
main::@5: scope:[main]  from main::@3
  [18] (byte*) main::sc#2 ← (byte*) main::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32
  [19] (byte) main::y#1 ← ++ (byte) main::y#2
  [20] if((byte) main::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1
  to:main::@6
main::@6: scope:[main]  from main::@5
  [21] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  to:main::@return
main::@return: scope:[main]  from main::@6
  [23] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) CHARGEN
(byte*) PROCPORT
(byte*) SCREEN
(void()) main()
(byte~) main::$1 202.0
(byte*) main::CHAR_A
(byte) main::bits
(byte) main::bits#0 22.0
(byte) main::bits#1 67.33333333333333
(byte) main::bits#2 44.85714285714286
(byte) main::c
(byte) main::c#2 101.0
(byte*) main::sc
(byte*) main::sc#1 53.25
(byte*) main::sc#2 7.333333333333333
(byte*) main::sc#3 52.33333333333333
(byte*) main::sc#7 11.0
(byte) main::x
(byte) main::x#1 151.5
(byte) main::x#2 25.25
(byte) main::y
(byte) main::y#1 16.5
(byte) main::y#2 2.5384615384615383

Initial phi equivalence classes
[ main::y#2 main::y#1 ]
[ main::bits#2 main::bits#0 main::bits#1 ]
[ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ]
[ main::x#2 main::x#1 ]
[ main::c#2 ]
Added variable main::$1 to zero page equivalence class [ main::$1 ]
Complete equivalence classes
[ main::y#2 main::y#1 ]
[ main::bits#2 main::bits#0 main::bits#1 ]
[ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ]
[ main::x#2 main::x#1 ]
[ main::c#2 ]
[ main::$1 ]
Allocated zp ZP_BYTE:2 [ main::y#2 main::y#1 ]
Allocated zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ]
Allocated zp ZP_WORD:4 [ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ]
Allocated zp ZP_BYTE:6 [ main::x#2 main::x#1 ]
Allocated zp ZP_BYTE:7 [ main::c#2 ]
Allocated zp ZP_BYTE:8 [ main::$1 ]

INITIAL ASM
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label PROCPORT = 1
  .label CHARGEN = $d000
  .label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
    .label CHAR_A = CHARGEN+8
    .label _1 = 8
    .label bits = 3
    .label sc = 4
    .label x = 6
    .label y = 2
    .label c = 7
  //SEG10 asm { sei  }
    sei
  //SEG11 [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG12 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG13 [6] phi (byte*) main::sc#7 = (const byte*) SCREEN#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta sc
    lda #>SCREEN
    sta sc+1
  //SEG14 [6] phi (byte) main::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b1
  //SEG15 [6] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
  //SEG16 [6] phi (byte*) main::sc#7 = (byte*) main::sc#2 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG17 [6] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@5->main::@1#1] -- register_copy 
    jmp b1
  //SEG18 main::@1
  b1:
  //SEG19 [7] (byte) main::bits#0 ← *((const byte*) main::CHAR_A#0 + (byte) main::y#2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy y
    lda CHAR_A,y
    sta bits
  //SEG20 [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
  //SEG21 [8] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta x
  //SEG22 [8] phi (byte*) main::sc#3 = (byte*) main::sc#7 [phi:main::@1->main::@2#1] -- register_copy 
  //SEG23 [8] phi (byte) main::bits#2 = (byte) main::bits#0 [phi:main::@1->main::@2#2] -- register_copy 
    jmp b2
  //SEG24 [8] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
  b2_from_b3:
  //SEG25 [8] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@3->main::@2#0] -- register_copy 
  //SEG26 [8] phi (byte*) main::sc#3 = (byte*) main::sc#1 [phi:main::@3->main::@2#1] -- register_copy 
  //SEG27 [8] phi (byte) main::bits#2 = (byte) main::bits#1 [phi:main::@3->main::@2#2] -- register_copy 
    jmp b2
  //SEG28 main::@2
  b2:
  //SEG29 [9] (byte~) main::$1 ← (byte) main::bits#2 & (byte/word/signed word/dword/signed dword) 128 -- vbuz1=vbuz2_band_vbuc1 
    lda #$80
    and bits
    sta _1
  //SEG30 [10] if((byte~) main::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuz1_eq_0_then_la1 
    lda _1
    cmp #0
    beq b3_from_b2
  //SEG31 [11] phi from main::@2 to main::@4 [phi:main::@2->main::@4]
  b4_from_b2:
    jmp b4
  //SEG32 main::@4
  b4:
  //SEG33 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
  b3_from_b4:
  //SEG34 [12] phi (byte) main::c#2 = (byte) '*' [phi:main::@4->main::@3#0] -- vbuz1=vbuc1 
    lda #'*'
    sta c
    jmp b3
  //SEG35 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
  //SEG36 [12] phi (byte) main::c#2 = (byte) '.' [phi:main::@2->main::@3#0] -- vbuz1=vbuc1 
    lda #'.'
    sta c
    jmp b3
  //SEG37 main::@3
  b3:
  //SEG38 [13] *((byte*) main::sc#3) ← (byte) main::c#2 -- _deref_pbuz1=vbuz2 
    lda c
    ldy #0
    sta (sc),y
  //SEG39 [14] (byte*) main::sc#1 ← ++ (byte*) main::sc#3 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG40 [15] (byte) main::bits#1 ← (byte) main::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1 
    asl bits
  //SEG41 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 
    inc x
  //SEG42 [17] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda x
    cmp #8
    bne b2_from_b3
    jmp b5
  //SEG43 main::@5
  b5:
  //SEG44 [18] (byte*) main::sc#2 ← (byte*) main::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$20
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG45 [19] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG46 [20] if((byte) main::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #8
    bne b1_from_b5
    jmp b6
  //SEG47 main::@6
  b6:
  //SEG48 [21] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG49 asm { cli  }
    cli
    jmp breturn
  //SEG50 main::@return
  breturn:
  //SEG51 [23] return 
    rts
}

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [9] (byte~) main::$1 ← (byte) main::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ main::y#2 main::bits#2 main::sc#3 main::x#2 main::$1 ] ( main:2 [ main::y#2 main::bits#2 main::sc#3 main::x#2 main::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::y#2 main::y#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::x#2 main::x#1 ]
Statement [13] *((byte*) main::sc#3) ← (byte) main::c#2 [ main::y#2 main::bits#2 main::sc#3 main::x#2 ] ( main:2 [ main::y#2 main::bits#2 main::sc#3 main::x#2 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::y#2 main::y#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ main::x#2 main::x#1 ]
Statement [18] (byte*) main::sc#2 ← (byte*) main::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 [ main::y#2 main::sc#2 ] ( main:2 [ main::y#2 main::sc#2 ] ) always clobbers reg byte a 
Statement [21] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] (byte) main::bits#0 ← *((const byte*) main::CHAR_A#0 + (byte) main::y#2) [ main::y#2 main::sc#7 main::bits#0 ] ( main:2 [ main::y#2 main::sc#7 main::bits#0 ] ) always clobbers reg byte a 
Statement [9] (byte~) main::$1 ← (byte) main::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ main::y#2 main::bits#2 main::sc#3 main::x#2 main::$1 ] ( main:2 [ main::y#2 main::bits#2 main::sc#3 main::x#2 main::$1 ] ) always clobbers reg byte a 
Statement [13] *((byte*) main::sc#3) ← (byte) main::c#2 [ main::y#2 main::bits#2 main::sc#3 main::x#2 ] ( main:2 [ main::y#2 main::bits#2 main::sc#3 main::x#2 ] ) always clobbers reg byte y 
Statement [18] (byte*) main::sc#2 ← (byte*) main::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 [ main::y#2 main::sc#2 ] ( main:2 [ main::y#2 main::sc#2 ] ) always clobbers reg byte a 
Statement [21] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::y#2 main::y#1 ] : zp ZP_BYTE:2 , reg byte x , 
Potential registers zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ] : zp ZP_BYTE:3 , reg byte x , 
Potential registers zp ZP_WORD:4 [ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_BYTE:6 [ main::x#2 main::x#1 ] : zp ZP_BYTE:6 , reg byte x , 
Potential registers zp ZP_BYTE:7 [ main::c#2 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:8 [ main::$1 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 202: zp ZP_BYTE:8 [ main::$1 ] 176.75: zp ZP_BYTE:6 [ main::x#2 main::x#1 ] 134.19: zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ] 123.92: zp ZP_WORD:4 [ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ] 101: zp ZP_BYTE:7 [ main::c#2 ] 19.04: zp ZP_BYTE:2 [ main::y#2 main::y#1 ] 
Uplift Scope [] 

Uplifting [main] best 7232 combination reg byte a [ main::$1 ] reg byte x [ main::x#2 main::x#1 ] zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ] zp ZP_WORD:4 [ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ] reg byte a [ main::c#2 ] zp ZP_BYTE:2 [ main::y#2 main::y#1 ] 
Limited combination testing to 100 combinations of 128 possible.
Uplifting [] best 7232 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ]
Uplifting [main] best 7232 combination zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::y#2 main::y#1 ]
Uplifting [main] best 7232 combination zp ZP_BYTE:2 [ main::y#2 main::y#1 ] 

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label PROCPORT = 1
  .label CHARGEN = $d000
  .label SCREEN = $400
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
//SEG5 @1
b1:
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
    .label CHAR_A = CHARGEN+8
    .label bits = 3
    .label sc = 4
    .label y = 2
  //SEG10 asm { sei  }
    sei
  //SEG11 [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG12 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG13 [6] phi (byte*) main::sc#7 = (const byte*) SCREEN#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta sc
    lda #>SCREEN
    sta sc+1
  //SEG14 [6] phi (byte) main::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b1
  //SEG15 [6] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
  //SEG16 [6] phi (byte*) main::sc#7 = (byte*) main::sc#2 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG17 [6] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@5->main::@1#1] -- register_copy 
    jmp b1
  //SEG18 main::@1
  b1:
  //SEG19 [7] (byte) main::bits#0 ← *((const byte*) main::CHAR_A#0 + (byte) main::y#2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy y
    lda CHAR_A,y
    sta bits
  //SEG20 [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
  //SEG21 [8] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG22 [8] phi (byte*) main::sc#3 = (byte*) main::sc#7 [phi:main::@1->main::@2#1] -- register_copy 
  //SEG23 [8] phi (byte) main::bits#2 = (byte) main::bits#0 [phi:main::@1->main::@2#2] -- register_copy 
    jmp b2
  //SEG24 [8] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
  b2_from_b3:
  //SEG25 [8] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@3->main::@2#0] -- register_copy 
  //SEG26 [8] phi (byte*) main::sc#3 = (byte*) main::sc#1 [phi:main::@3->main::@2#1] -- register_copy 
  //SEG27 [8] phi (byte) main::bits#2 = (byte) main::bits#1 [phi:main::@3->main::@2#2] -- register_copy 
    jmp b2
  //SEG28 main::@2
  b2:
  //SEG29 [9] (byte~) main::$1 ← (byte) main::bits#2 & (byte/word/signed word/dword/signed dword) 128 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and bits
  //SEG30 [10] if((byte~) main::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b3_from_b2
  //SEG31 [11] phi from main::@2 to main::@4 [phi:main::@2->main::@4]
  b4_from_b2:
    jmp b4
  //SEG32 main::@4
  b4:
  //SEG33 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
  b3_from_b4:
  //SEG34 [12] phi (byte) main::c#2 = (byte) '*' [phi:main::@4->main::@3#0] -- vbuaa=vbuc1 
    lda #'*'
    jmp b3
  //SEG35 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
  //SEG36 [12] phi (byte) main::c#2 = (byte) '.' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 
    lda #'.'
    jmp b3
  //SEG37 main::@3
  b3:
  //SEG38 [13] *((byte*) main::sc#3) ← (byte) main::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
  //SEG39 [14] (byte*) main::sc#1 ← ++ (byte*) main::sc#3 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG40 [15] (byte) main::bits#1 ← (byte) main::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1 
    asl bits
  //SEG41 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG42 [17] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b2_from_b3
    jmp b5
  //SEG43 main::@5
  b5:
  //SEG44 [18] (byte*) main::sc#2 ← (byte*) main::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$20
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG45 [19] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG46 [20] if((byte) main::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #8
    bne b1_from_b5
    jmp b6
  //SEG47 main::@6
  b6:
  //SEG48 [21] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG49 asm { cli  }
    cli
    jmp breturn
  //SEG50 main::@return
  breturn:
  //SEG51 [23] return 
    rts
}

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b4
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b6
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b3 with b2
Replacing label b1_from_b5 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b5:
Removing instruction b2_from_b3:
Removing instruction b4_from_b2:
Removing instruction b3_from_b4:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b2_from_b1:
Removing instruction b4:
Removing instruction b5:
Removing instruction b6:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Relabelling long label b3_from_b2 to b4
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) CHARGEN
(const byte*) CHARGEN#0 CHARGEN = ((byte*))(word/dword/signed dword) 53248
(byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 1
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(void()) main()
(byte~) main::$1 reg byte a 202.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(byte*) main::CHAR_A
(const byte*) main::CHAR_A#0 CHAR_A = (const byte*) CHARGEN#0+(byte/signed byte/word/signed word/dword/signed dword) 8
(byte) main::bits
(byte) main::bits#0 bits zp ZP_BYTE:3 22.0
(byte) main::bits#1 bits zp ZP_BYTE:3 67.33333333333333
(byte) main::bits#2 bits zp ZP_BYTE:3 44.85714285714286
(byte) main::c
(byte) main::c#2 reg byte a 101.0
(byte*) main::sc
(byte*) main::sc#1 sc zp ZP_WORD:4 53.25
(byte*) main::sc#2 sc zp ZP_WORD:4 7.333333333333333
(byte*) main::sc#3 sc zp ZP_WORD:4 52.33333333333333
(byte*) main::sc#7 sc zp ZP_WORD:4 11.0
(byte) main::x
(byte) main::x#1 reg byte x 151.5
(byte) main::x#2 reg byte x 25.25
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:2 16.5
(byte) main::y#2 y zp ZP_BYTE:2 2.5384615384615383

zp ZP_BYTE:2 [ main::y#2 main::y#1 ]
zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ]
zp ZP_WORD:4 [ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ]
reg byte x [ main::x#2 main::x#1 ]
reg byte a [ main::c#2 ]
reg byte a [ main::$1 ]


FINAL ASSEMBLER
Score: 5627

//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label PROCPORT = 1
  .label CHARGEN = $d000
  .label SCREEN = $400
//SEG3 @begin
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG5 @1
//SEG6 [2] call main 
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main
main: {
    .label CHAR_A = CHARGEN+8
    .label bits = 3
    .label sc = 4
    .label y = 2
  //SEG10 asm { sei  }
    sei
  //SEG11 [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG12 [6] phi from main to main::@1 [phi:main->main::@1]
  //SEG13 [6] phi (byte*) main::sc#7 = (const byte*) SCREEN#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta sc
    lda #>SCREEN
    sta sc+1
  //SEG14 [6] phi (byte) main::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta y
  //SEG15 [6] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  //SEG16 [6] phi (byte*) main::sc#7 = (byte*) main::sc#2 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG17 [6] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@5->main::@1#1] -- register_copy 
  //SEG18 main::@1
  b1:
  //SEG19 [7] (byte) main::bits#0 ← *((const byte*) main::CHAR_A#0 + (byte) main::y#2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy y
    lda CHAR_A,y
    sta bits
  //SEG20 [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  //SEG21 [8] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG22 [8] phi (byte*) main::sc#3 = (byte*) main::sc#7 [phi:main::@1->main::@2#1] -- register_copy 
  //SEG23 [8] phi (byte) main::bits#2 = (byte) main::bits#0 [phi:main::@1->main::@2#2] -- register_copy 
  //SEG24 [8] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
  //SEG25 [8] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@3->main::@2#0] -- register_copy 
  //SEG26 [8] phi (byte*) main::sc#3 = (byte*) main::sc#1 [phi:main::@3->main::@2#1] -- register_copy 
  //SEG27 [8] phi (byte) main::bits#2 = (byte) main::bits#1 [phi:main::@3->main::@2#2] -- register_copy 
  //SEG28 main::@2
  b2:
  //SEG29 [9] (byte~) main::$1 ← (byte) main::bits#2 & (byte/word/signed word/dword/signed dword) 128 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and bits
  //SEG30 [10] if((byte~) main::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
  //SEG31 [11] phi from main::@2 to main::@4 [phi:main::@2->main::@4]
  //SEG32 main::@4
  //SEG33 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
  //SEG34 [12] phi (byte) main::c#2 = (byte) '*' [phi:main::@4->main::@3#0] -- vbuaa=vbuc1 
    lda #'*'
    jmp b3
  //SEG35 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b4:
  //SEG36 [12] phi (byte) main::c#2 = (byte) '.' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 
    lda #'.'
  //SEG37 main::@3
  b3:
  //SEG38 [13] *((byte*) main::sc#3) ← (byte) main::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
  //SEG39 [14] (byte*) main::sc#1 ← ++ (byte*) main::sc#3 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG40 [15] (byte) main::bits#1 ← (byte) main::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1 
    asl bits
  //SEG41 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG42 [17] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b2
  //SEG43 main::@5
  //SEG44 [18] (byte*) main::sc#2 ← (byte*) main::sc#1 + (byte/signed byte/word/signed word/dword/signed dword) 32 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$20
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG45 [19] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG46 [20] if((byte) main::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda y
    cmp #8
    bne b1
  //SEG47 main::@6
  //SEG48 [21] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG49 asm { cli  }
    cli
  //SEG50 main::@return
  //SEG51 [23] return 
    rts
}

