PARSING src/test/java/dk/camelot64/kickc/test/kc/modglobal.kc
byte cnt = 0;
byte cnt2 = 0;
byte cnt3 = 0;
byte[256] SCREEN=$0400;

void main() {
  SCREEN[0]=inccnt();
  cnt++;
  SCREEN[1]=inccnt();
}

byte inccnt() {
    ++cnt;
    ++cnt2;
    ++cnt3;
    return cnt;
}




Adding pre/post-modifier (byte) cnt ← ++ (byte) cnt
Adding pre/post-modifier (byte) cnt ← ++ (byte) cnt
Adding pre/post-modifier (byte) cnt2 ← ++ (byte) cnt2
Adding pre/post-modifier (byte) cnt3 ← ++ (byte) cnt3

STATEMENTS
  (byte) cnt ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) cnt2 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) cnt3 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte[256]) SCREEN ← (word/signed word/dword/signed dword) 1024
proc (void()) main()
  (byte~) main::$0 ← call inccnt 
  *((byte[256]) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0
  (byte) cnt ← ++ (byte) cnt
  (byte~) main::$1 ← call inccnt 
  *((byte[256]) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$1
main::@return:
  return 
endproc // main()
proc (byte()) inccnt()
  (byte) cnt ← ++ (byte) cnt
  (byte) cnt2 ← ++ (byte) cnt2
  (byte) cnt3 ← ++ (byte) cnt3
  (byte) inccnt::return ← (byte) cnt
  goto inccnt::@return
inccnt::@return:
  (byte) inccnt::return ← (byte) inccnt::return
  return (byte) inccnt::return
endproc // inccnt()
  call main 

SYMBOLS
(byte[256]) SCREEN
(byte) cnt
(byte) cnt2
(byte) cnt3
(byte()) inccnt()
(label) inccnt::@return
(byte) inccnt::return
(void()) main()
(byte~) main::$0
(byte~) main::$1
(label) main::@return

Promoting word/signed word/dword/signed dword to byte[256] in SCREEN ← ((byte*)) 1024
INITIAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  (byte) cnt ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) cnt2 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) cnt3 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte[256]) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
  to:@1
main: scope:[main]  from
  (byte~) main::$0 ← call inccnt 
  *((byte[256]) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0
  (byte) cnt ← ++ (byte) cnt
  (byte~) main::$1 ← call inccnt 
  *((byte[256]) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$1
  to:main::@return
main::@return: scope:[main]  from main
  return 
  to:@return
@1: scope:[]  from @begin
  to:@2
inccnt: scope:[inccnt]  from
  (byte) cnt ← ++ (byte) cnt
  (byte) cnt2 ← ++ (byte) cnt2
  (byte) cnt3 ← ++ (byte) cnt3
  (byte) inccnt::return ← (byte) cnt
  to:inccnt::@return
inccnt::@return: scope:[inccnt]  from inccnt inccnt::@1
  (byte) inccnt::return ← (byte) inccnt::return
  return (byte) inccnt::return
  to:@return
inccnt::@1: scope:[inccnt]  from
  to:inccnt::@return
@2: scope:[]  from @1
  call main 
  to:@end
@end: scope:[]  from @2

Removing empty block @1
Removing empty block inccnt::@1
PROCEDURE MODIFY VARIABLE ANALYSIS
main modifies cnt
main modifies cnt2
main modifies cnt3
inccnt modifies cnt
inccnt modifies cnt2
inccnt modifies cnt3

Completing Phi functions...
Completing Phi functions...

CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
@begin: scope:[]  from
  (byte) cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) cnt2#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) cnt3#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte[256]) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  to:@2
main: scope:[main]  from @2
  (byte) cnt3#13 ← phi( @2/(byte) cnt3#14 )
  (byte) cnt2#13 ← phi( @2/(byte) cnt2#14 )
  (byte) cnt#14 ← phi( @2/(byte) cnt#15 )
  call inccnt param-assignment
  (byte) inccnt::return#0 ← (byte) inccnt::return#3
  to:main::@1
main::@1: scope:[main]  from main
  (byte) cnt3#7 ← phi( main/(byte) cnt3#5 )
  (byte) cnt2#7 ← phi( main/(byte) cnt2#5 )
  (byte) cnt#8 ← phi( main/(byte) cnt#6 )
  (byte) inccnt::return#4 ← phi( main/(byte) inccnt::return#0 )
  (byte~) main::$0 ← (byte) inccnt::return#4
  (byte) cnt#1 ← (byte) cnt#8
  (byte) cnt2#1 ← (byte) cnt2#7
  (byte) cnt3#1 ← (byte) cnt3#7
  *((byte[256]) SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0
  (byte) cnt#2 ← ++ (byte) cnt#1
  call inccnt param-assignment
  (byte) inccnt::return#1 ← (byte) inccnt::return#3
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte) cnt3#8 ← phi( main::@1/(byte) cnt3#5 )
  (byte) cnt2#8 ← phi( main::@1/(byte) cnt2#5 )
  (byte) cnt#9 ← phi( main::@1/(byte) cnt#6 )
  (byte) inccnt::return#5 ← phi( main::@1/(byte) inccnt::return#1 )
  (byte~) main::$1 ← (byte) inccnt::return#5
  (byte) cnt#3 ← (byte) cnt#9
  (byte) cnt2#2 ← (byte) cnt2#8
  (byte) cnt3#2 ← (byte) cnt3#8
  *((byte[256]) SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$1
  to:main::@return
main::@return: scope:[main]  from main::@2
  (byte) cnt3#9 ← phi( main::@2/(byte) cnt3#2 )
  (byte) cnt2#9 ← phi( main::@2/(byte) cnt2#2 )
  (byte) cnt#10 ← phi( main::@2/(byte) cnt#3 )
  (byte) cnt#4 ← (byte) cnt#10
  (byte) cnt2#3 ← (byte) cnt2#9
  (byte) cnt3#3 ← (byte) cnt3#9
  return 
  to:@return
inccnt: scope:[inccnt]  from main main::@1
  (byte) cnt3#10 ← phi( main/(byte) cnt3#13 main::@1/(byte) cnt3#1 )
  (byte) cnt2#10 ← phi( main/(byte) cnt2#13 main::@1/(byte) cnt2#1 )
  (byte) cnt#11 ← phi( main/(byte) cnt#14 main::@1/(byte) cnt#2 )
  (byte) cnt#5 ← ++ (byte) cnt#11
  (byte) cnt2#4 ← ++ (byte) cnt2#10
  (byte) cnt3#4 ← ++ (byte) cnt3#10
  (byte) inccnt::return#2 ← (byte) cnt#5
  to:inccnt::@return
inccnt::@return: scope:[inccnt]  from inccnt
  (byte) cnt3#11 ← phi( inccnt/(byte) cnt3#4 )
  (byte) cnt2#11 ← phi( inccnt/(byte) cnt2#4 )
  (byte) cnt#12 ← phi( inccnt/(byte) cnt#5 )
  (byte) inccnt::return#6 ← phi( inccnt/(byte) inccnt::return#2 )
  (byte) inccnt::return#3 ← (byte) inccnt::return#6
  (byte) cnt#6 ← (byte) cnt#12
  (byte) cnt2#5 ← (byte) cnt2#11
  (byte) cnt3#5 ← (byte) cnt3#11
  return 
  to:@return
@2: scope:[]  from @begin
  (byte) cnt3#14 ← phi( @begin/(byte) cnt3#0 )
  (byte) cnt2#14 ← phi( @begin/(byte) cnt2#0 )
  (byte) cnt#15 ← phi( @begin/(byte) cnt#0 )
  call main param-assignment
  to:@3
@3: scope:[]  from @2
  (byte) cnt3#12 ← phi( @2/(byte) cnt3#3 )
  (byte) cnt2#12 ← phi( @2/(byte) cnt2#3 )
  (byte) cnt#13 ← phi( @2/(byte) cnt#4 )
  (byte) cnt#7 ← (byte) cnt#13
  (byte) cnt2#6 ← (byte) cnt2#12
  (byte) cnt3#6 ← (byte) cnt3#12
  to:@end
@end: scope:[]  from @3

SYMBOL TABLE SSA
(label) @2
(label) @3
(label) @begin
(label) @end
(byte[256]) SCREEN
(byte[256]) SCREEN#0
(byte) cnt
(byte) cnt#0
(byte) cnt#1
(byte) cnt#10
(byte) cnt#11
(byte) cnt#12
(byte) cnt#13
(byte) cnt#14
(byte) cnt#15
(byte) cnt#2
(byte) cnt#3
(byte) cnt#4
(byte) cnt#5
(byte) cnt#6
(byte) cnt#7
(byte) cnt#8
(byte) cnt#9
(byte) cnt2
(byte) cnt2#0
(byte) cnt2#1
(byte) cnt2#10
(byte) cnt2#11
(byte) cnt2#12
(byte) cnt2#13
(byte) cnt2#14
(byte) cnt2#2
(byte) cnt2#3
(byte) cnt2#4
(byte) cnt2#5
(byte) cnt2#6
(byte) cnt2#7
(byte) cnt2#8
(byte) cnt2#9
(byte) cnt3
(byte) cnt3#0
(byte) cnt3#1
(byte) cnt3#10
(byte) cnt3#11
(byte) cnt3#12
(byte) cnt3#13
(byte) cnt3#14
(byte) cnt3#2
(byte) cnt3#3
(byte) cnt3#4
(byte) cnt3#5
(byte) cnt3#6
(byte) cnt3#7
(byte) cnt3#8
(byte) cnt3#9
(byte()) inccnt()
(label) inccnt::@return
(byte) inccnt::return
(byte) inccnt::return#0
(byte) inccnt::return#1
(byte) inccnt::return#2
(byte) inccnt::return#3
(byte) inccnt::return#4
(byte) inccnt::return#5
(byte) inccnt::return#6
(void()) main()
(byte~) main::$0
(byte~) main::$1
(label) main::@1
(label) main::@2
(label) main::@return

OPTIMIZING CONTROL FLOW GRAPH
Not aliassing across scopes: cnt#14 cnt#15
Not aliassing across scopes: cnt2#13 cnt2#14
Not aliassing across scopes: cnt3#13 cnt3#14
Not aliassing across scopes: inccnt::return#0 inccnt::return#3
Not aliassing across scopes: cnt#8 cnt#6
Not aliassing across scopes: cnt2#7 cnt2#5
Not aliassing across scopes: cnt3#7 cnt3#5
Not aliassing across scopes: main::$0 inccnt::return#4
Not aliassing across scopes: inccnt::return#1 inccnt::return#3
Not aliassing across scopes: cnt#9 cnt#6
Not aliassing across scopes: cnt2#8 cnt2#5
Not aliassing across scopes: cnt3#8 cnt3#5
Not aliassing across scopes: main::$1 inccnt::return#5
Not aliassing across scopes: cnt#11 cnt#14
Not aliassing across scopes: cnt2#10 cnt2#13
Not aliassing across scopes: cnt3#10 cnt3#13
Not aliassing across scopes: inccnt::return#2 cnt#5
Not aliassing across scopes: cnt#13 cnt#4
Not aliassing across scopes: cnt2#12 cnt2#3
Not aliassing across scopes: cnt3#12 cnt3#3
Alias (byte) inccnt::return#0 = (byte) inccnt::return#4 
Alias (byte) cnt#1 = (byte) cnt#8 
Alias (byte) cnt2#1 = (byte) cnt2#7 
Alias (byte) cnt3#1 = (byte) cnt3#7 
Alias (byte) inccnt::return#1 = (byte) inccnt::return#5 
Alias (byte) cnt#10 = (byte) cnt#3 (byte) cnt#9 (byte) cnt#4 
Alias (byte) cnt2#2 = (byte) cnt2#8 (byte) cnt2#9 (byte) cnt2#3 
Alias (byte) cnt3#2 = (byte) cnt3#8 (byte) cnt3#9 (byte) cnt3#3 
Alias (byte) inccnt::return#2 = (byte) inccnt::return#6 (byte) inccnt::return#3 
Alias (byte) cnt#12 = (byte) cnt#5 (byte) cnt#6 
Alias (byte) cnt2#11 = (byte) cnt2#4 (byte) cnt2#5 
Alias (byte) cnt3#11 = (byte) cnt3#4 (byte) cnt3#5 
Alias (byte) cnt#0 = (byte) cnt#15 
Alias (byte) cnt2#0 = (byte) cnt2#14 
Alias (byte) cnt3#0 = (byte) cnt3#14 
Alias (byte) cnt#13 = (byte) cnt#7 
Alias (byte) cnt2#12 = (byte) cnt2#6 
Alias (byte) cnt3#12 = (byte) cnt3#6 
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: cnt#14 cnt#0
Not aliassing across scopes: cnt2#13 cnt2#0
Not aliassing across scopes: cnt3#13 cnt3#0
Not aliassing across scopes: inccnt::return#0 inccnt::return#2
Not aliassing across scopes: cnt#1 cnt#12
Not aliassing across scopes: cnt2#1 cnt2#11
Not aliassing across scopes: cnt3#1 cnt3#11
Not aliassing across scopes: main::$0 inccnt::return#0
Not aliassing across scopes: inccnt::return#1 inccnt::return#2
Not aliassing across scopes: cnt#10 cnt#12
Not aliassing across scopes: cnt2#2 cnt2#11
Not aliassing across scopes: cnt3#2 cnt3#11
Not aliassing across scopes: main::$1 inccnt::return#1
Not aliassing across scopes: cnt#11 cnt#14
Not aliassing across scopes: cnt2#10 cnt2#13
Not aliassing across scopes: cnt3#10 cnt3#13
Not aliassing across scopes: inccnt::return#2 cnt#12
Not aliassing across scopes: cnt#13 cnt#10
Not aliassing across scopes: cnt2#12 cnt2#2
Not aliassing across scopes: cnt3#12 cnt3#2
Redundant Phi (byte) cnt#14 (byte) cnt#0
Redundant Phi (byte) cnt2#13 (byte) cnt2#0
Redundant Phi (byte) cnt3#13 (byte) cnt3#0
Redundant Phi (byte) cnt#1 (byte) cnt#12
Redundant Phi (byte) cnt2#1 (byte) cnt2#11
Redundant Phi (byte) cnt3#1 (byte) cnt3#11
Redundant Phi (byte) cnt#10 (byte) cnt#12
Redundant Phi (byte) cnt2#2 (byte) cnt2#11
Redundant Phi (byte) cnt3#2 (byte) cnt3#11
Redundant Phi (byte) cnt#13 (byte) cnt#10
Redundant Phi (byte) cnt2#12 (byte) cnt2#2
Redundant Phi (byte) cnt3#12 (byte) cnt3#2
Succesful SSA optimization Pass2RedundantPhiElimination
Constant (const byte) cnt#0 = 0
Constant (const byte) cnt2#0 = 0
Constant (const byte) cnt3#0 = 0
Constant (const byte*) SCREEN#0 = ((byte*))1024
Succesful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in *(SCREEN#0+0)
Consolidated array index constant in *(SCREEN#0+1)
Succesful SSA optimization Pass2ConstantAdditionElimination
Culled Empty Block (label) @3
Succesful SSA optimization Pass2CullEmptyBlocks
Not aliassing across scopes: inccnt::return#0 inccnt::return#2
Not aliassing across scopes: main::$0 inccnt::return#0
Not aliassing across scopes: inccnt::return#1 inccnt::return#2
Not aliassing across scopes: main::$1 inccnt::return#1
Not aliassing across scopes: inccnt::return#2 cnt#12
Not aliassing across scopes: inccnt::return#0 inccnt::return#2
Not aliassing across scopes: main::$0 inccnt::return#0
Not aliassing across scopes: inccnt::return#1 inccnt::return#2
Not aliassing across scopes: main::$1 inccnt::return#1
Not aliassing across scopes: inccnt::return#2 cnt#12
OPTIMIZING CONTROL FLOW GRAPH
Inlining constant with var siblings (const byte) cnt#0
Inlining constant with var siblings (const byte) cnt#0
Inlining constant with var siblings (const byte) cnt#0
Inlining constant with var siblings (const byte) cnt2#0
Inlining constant with var siblings (const byte) cnt2#0
Inlining constant with var siblings (const byte) cnt3#0
Inlining constant with var siblings (const byte) cnt3#0
Constant inlined cnt#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined cnt3#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined cnt2#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @2 @end main main::@1 main::@2 main::@return inccnt inccnt::@return 
Block Sequence Planned @begin @2 @end main main::@1 main::@2 main::@return inccnt inccnt::@return 
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
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to inccnt:5 inccnt:13 

Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Created 3 initial phi equivalence classes
Coalesced [10] cnt#16 ← cnt#2
Coalesced [11] cnt2#15 ← cnt2#11
Coalesced [12] cnt3#15 ← cnt3#11
Coalesced down to 3 phi equivalence classes
Block Sequence Planned @begin @2 @end main main::@1 main::@2 main::@return inccnt inccnt::@return 
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
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi() [ ] ( )
  to:@2
@2: scope:[]  from @begin
  [1] phi() [ ] ( )
  [2] call main param-assignment [ ] ( )
  to:@end
@end: scope:[]  from @2
  [3] phi() [ ] ( )
main: scope:[main]  from @2
  [4] phi() [ ] ( main:2 [ ] )
  [5] call inccnt param-assignment [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
  [6] (byte) inccnt::return#0 ← (byte) inccnt::return#2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] )
  to:main::@1
main::@1: scope:[main]  from main
  [7] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] )
  [8] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ cnt#12 cnt2#11 cnt3#11 ] )
  [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] )
  [10] call inccnt param-assignment [ inccnt::return#2 ] ( main:2 [ inccnt::return#2 ] )
  [11] (byte) inccnt::return#1 ← (byte) inccnt::return#2 [ inccnt::return#1 ] ( main:2 [ inccnt::return#1 ] )
  to:main::@2
main::@2: scope:[main]  from main::@1
  [12] (byte~) main::$1 ← (byte) inccnt::return#1 [ main::$1 ] ( main:2 [ main::$1 ] )
  [13] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$1 [ ] ( main:2 [ ] )
  to:main::@return
main::@return: scope:[main]  from main::@2
  [14] return  [ ] ( main:2 [ ] )
  to:@return
inccnt: scope:[inccnt]  from main main::@1
  [15] (byte) cnt3#10 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) cnt3#11 ) [ cnt#11 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#11 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#11 cnt2#10 cnt3#10 ] )
  [15] (byte) cnt2#10 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) cnt2#11 ) [ cnt#11 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#11 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#11 cnt2#10 cnt3#10 ] )
  [15] (byte) cnt#11 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) cnt#2 ) [ cnt#11 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#11 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#11 cnt2#10 cnt3#10 ] )
  [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] )
  [17] (byte) cnt2#11 ← ++ (byte) cnt2#10 [ cnt#12 cnt3#10 cnt2#11 ] ( main:2::inccnt:5 [ cnt#12 cnt3#10 cnt2#11 ] main:2::inccnt:10 [ cnt#12 cnt3#10 cnt2#11 ] )
  [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] )
  [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
  to:inccnt::@return
inccnt::@return: scope:[inccnt]  from inccnt
  [20] return  [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
  to:@return

DOMINATORS
@begin dominated by  @begin 
@2 dominated by  @2 @begin 
@end dominated by  @2 @begin @end 
main dominated by  @2 @begin main 
main::@1 dominated by  @2 @begin main::@1 main 
main::@2 dominated by  @2 @begin main::@1 main::@2 main 
main::@return dominated by  main::@return @2 @begin main::@1 main::@2 main 
inccnt dominated by  @2 inccnt @begin main 
inccnt::@return dominated by  @2 inccnt @begin main inccnt::@return 

NATURAL LOOPS

NATURAL LOOPS WITH DEPTH
Found 0 loops in scope []
Found 0 loops in scope [main]
Found 0 loops in scope [inccnt]


VARIABLE REGISTER WEIGHTS
(byte[256]) SCREEN
(byte) cnt
(byte) cnt#11 4.0
(byte) cnt#12 0.6666666666666666
(byte) cnt#2 4.0
(byte) cnt2
(byte) cnt2#10 2.0
(byte) cnt2#11 0.4444444444444444
(byte) cnt3
(byte) cnt3#10 1.3333333333333333
(byte) cnt3#11 0.5
(byte()) inccnt()
(byte) inccnt::return
(byte) inccnt::return#0 4.0
(byte) inccnt::return#1 4.0
(byte) inccnt::return#2 1.5
(void()) main()
(byte~) main::$0 4.0
(byte~) main::$1 4.0

Initial phi equivalence classes
[ cnt#11 cnt#2 ]
[ cnt2#10 cnt2#11 ]
[ cnt3#10 cnt3#11 ]
Added variable inccnt::return#0 to zero page equivalence class [ inccnt::return#0 ]
Added variable main::$0 to zero page equivalence class [ main::$0 ]
Added variable inccnt::return#1 to zero page equivalence class [ inccnt::return#1 ]
Added variable main::$1 to zero page equivalence class [ main::$1 ]
Added variable cnt#12 to zero page equivalence class [ cnt#12 ]
Added variable inccnt::return#2 to zero page equivalence class [ inccnt::return#2 ]
Complete equivalence classes
[ cnt#11 cnt#2 ]
[ cnt2#10 cnt2#11 ]
[ cnt3#10 cnt3#11 ]
[ inccnt::return#0 ]
[ main::$0 ]
[ inccnt::return#1 ]
[ main::$1 ]
[ cnt#12 ]
[ inccnt::return#2 ]
Allocated zp ZP_BYTE:2 [ cnt#11 cnt#2 ]
Allocated zp ZP_BYTE:3 [ cnt2#10 cnt2#11 ]
Allocated zp ZP_BYTE:4 [ cnt3#10 cnt3#11 ]
Allocated zp ZP_BYTE:5 [ inccnt::return#0 ]
Allocated zp ZP_BYTE:6 [ main::$0 ]
Allocated zp ZP_BYTE:7 [ inccnt::return#1 ]
Allocated zp ZP_BYTE:8 [ main::$1 ]
Allocated zp ZP_BYTE:9 [ cnt#12 ]
Allocated zp ZP_BYTE:10 [ inccnt::return#2 ]

INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
  .label cnt = 2
  .label cnt2 = 3
  .label cnt3 = 4
  .label cnt_12 = 9
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG4 @2
b2:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
    .label _0 = 6
    .label _1 = 8
  //SEG10 [5] call inccnt param-assignment [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
  //SEG11 [15] phi from main to inccnt [phi:main->inccnt]
  inccnt_from_main:
  //SEG12 [15] phi (byte) cnt3#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#0] -- vbuz1=vbuc1 
    lda #0
    sta cnt3
  //SEG13 [15] phi (byte) cnt2#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#1] -- vbuz1=vbuc1 
    lda #0
    sta cnt2
  //SEG14 [15] phi (byte) cnt#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#2] -- vbuz1=vbuc1 
    lda #0
    sta cnt
    jsr inccnt
  //SEG15 [6] (byte) inccnt::return#0 ← (byte) inccnt::return#2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=vbuz2 
    lda inccnt.return_2
    sta inccnt.return
    jmp b1
  //SEG16 main::@1
  b1:
  //SEG17 [7] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=vbuz2 
    lda inccnt.return
    sta _0
  //SEG18 [8] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ cnt#12 cnt2#11 cnt3#11 ] ) -- _deref_pbuc1=vbuz1 
    lda _0
    sta SCREEN+0
  //SEG19 [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] ) -- vbuz1=_inc_vbuz2 
    ldy cnt_12
    iny
    sty cnt
  //SEG20 [10] call inccnt param-assignment [ inccnt::return#2 ] ( main:2 [ inccnt::return#2 ] )
  //SEG21 [15] phi from main::@1 to inccnt [phi:main::@1->inccnt]
  inccnt_from_b1:
  //SEG22 [15] phi (byte) cnt3#10 = (byte) cnt3#11 [phi:main::@1->inccnt#0] -- register_copy 
  //SEG23 [15] phi (byte) cnt2#10 = (byte) cnt2#11 [phi:main::@1->inccnt#1] -- register_copy 
  //SEG24 [15] phi (byte) cnt#11 = (byte) cnt#2 [phi:main::@1->inccnt#2] -- register_copy 
    jsr inccnt
  //SEG25 [11] (byte) inccnt::return#1 ← (byte) inccnt::return#2 [ inccnt::return#1 ] ( main:2 [ inccnt::return#1 ] ) -- vbuz1=vbuz2 
    lda inccnt.return_2
    sta inccnt.return_1
    jmp b2
  //SEG26 main::@2
  b2:
  //SEG27 [12] (byte~) main::$1 ← (byte) inccnt::return#1 [ main::$1 ] ( main:2 [ main::$1 ] ) -- vbuz1=vbuz2 
    lda inccnt.return_1
    sta _1
  //SEG28 [13] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$1 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuz1 
    lda _1
    sta SCREEN+1
    jmp breturn
  //SEG29 main::@return
  breturn:
  //SEG30 [14] return  [ ] ( main:2 [ ] )
    rts
}
//SEG31 inccnt
inccnt: {
    .label return = 5
    .label return_1 = 7
    .label return_2 = $a
  //SEG32 [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] ) -- vbuz1=_inc_vbuz2 
    ldy cnt
    iny
    sty cnt_12
  //SEG33 [17] (byte) cnt2#11 ← ++ (byte) cnt2#10 [ cnt#12 cnt3#10 cnt2#11 ] ( main:2::inccnt:5 [ cnt#12 cnt3#10 cnt2#11 ] main:2::inccnt:10 [ cnt#12 cnt3#10 cnt2#11 ] ) -- vbuz1=_inc_vbuz1 
    inc cnt2
  //SEG34 [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=_inc_vbuz1 
    inc cnt3
  //SEG35 [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=vbuz2 
    lda cnt_12
    sta return_2
    jmp breturn
  //SEG36 inccnt::@return
  breturn:
  //SEG37 [20] return  [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
    rts
}

REGISTER UPLIFT POTENTIAL REGISTERS
Potential registers zp ZP_BYTE:2 [ cnt#11 cnt#2 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ cnt2#10 cnt2#11 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:4 [ cnt3#10 cnt3#11 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:5 [ inccnt::return#0 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:6 [ main::$0 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:7 [ inccnt::return#1 ] : 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 , 
Potential registers zp ZP_BYTE:9 [ cnt#12 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ inccnt::return#2 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [] 8: zp ZP_BYTE:2 [ cnt#11 cnt#2 ] 2.44: zp ZP_BYTE:3 [ cnt2#10 cnt2#11 ] 1.83: zp ZP_BYTE:4 [ cnt3#10 cnt3#11 ] 0.67: zp ZP_BYTE:9 [ cnt#12 ] 
Uplift Scope [inccnt] 4: zp ZP_BYTE:5 [ inccnt::return#0 ] 4: zp ZP_BYTE:7 [ inccnt::return#1 ] 1.5: zp ZP_BYTE:10 [ inccnt::return#2 ] 
Uplift Scope [main] 4: zp ZP_BYTE:6 [ main::$0 ] 4: zp ZP_BYTE:8 [ main::$1 ] 

Uplifting [] best 109 combination reg byte x [ cnt#11 cnt#2 ] reg byte y [ cnt2#10 cnt2#11 ] zp ZP_BYTE:4 [ cnt3#10 cnt3#11 ] reg byte x [ cnt#12 ] 
Uplifting [inccnt] best 90 combination reg byte a [ inccnt::return#0 ] reg byte a [ inccnt::return#1 ] reg byte a [ inccnt::return#2 ] 
Uplifting [main] best 78 combination reg byte a [ main::$0 ] reg byte a [ main::$1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ cnt3#10 cnt3#11 ]
Uplifting [] best 78 combination zp ZP_BYTE:4 [ cnt3#10 cnt3#11 ] 
Allocated (was zp ZP_BYTE:4) zp ZP_BYTE:2 [ cnt3#10 cnt3#11 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
  .label cnt3 = 2
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG4 @2
b2:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 [5] call inccnt param-assignment [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
  //SEG11 [15] phi from main to inccnt [phi:main->inccnt]
  inccnt_from_main:
  //SEG12 [15] phi (byte) cnt3#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#0] -- vbuz1=vbuc1 
    lda #0
    sta cnt3
  //SEG13 [15] phi (byte) cnt2#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#1] -- vbuyy=vbuc1 
    ldy #0
  //SEG14 [15] phi (byte) cnt#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#2] -- vbuxx=vbuc1 
    ldx #0
    jsr inccnt
  //SEG15 [6] (byte) inccnt::return#0 ← (byte) inccnt::return#2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] )
    // (byte) inccnt::return#0 = (byte) inccnt::return#2  // register copy reg byte a
    jmp b1
  //SEG16 main::@1
  b1:
  //SEG17 [7] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] )
    // (byte~) main::$0 = (byte) inccnt::return#0  // register copy reg byte a
  //SEG18 [8] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ cnt#12 cnt2#11 cnt3#11 ] ) -- _deref_pbuc1=vbuaa 
    sta SCREEN+0
  //SEG19 [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG20 [10] call inccnt param-assignment [ inccnt::return#2 ] ( main:2 [ inccnt::return#2 ] )
  //SEG21 [15] phi from main::@1 to inccnt [phi:main::@1->inccnt]
  inccnt_from_b1:
  //SEG22 [15] phi (byte) cnt3#10 = (byte) cnt3#11 [phi:main::@1->inccnt#0] -- register_copy 
  //SEG23 [15] phi (byte) cnt2#10 = (byte) cnt2#11 [phi:main::@1->inccnt#1] -- register_copy 
  //SEG24 [15] phi (byte) cnt#11 = (byte) cnt#2 [phi:main::@1->inccnt#2] -- register_copy 
    jsr inccnt
  //SEG25 [11] (byte) inccnt::return#1 ← (byte) inccnt::return#2 [ inccnt::return#1 ] ( main:2 [ inccnt::return#1 ] )
    // (byte) inccnt::return#1 = (byte) inccnt::return#2  // register copy reg byte a
    jmp b2
  //SEG26 main::@2
  b2:
  //SEG27 [12] (byte~) main::$1 ← (byte) inccnt::return#1 [ main::$1 ] ( main:2 [ main::$1 ] )
    // (byte~) main::$1 = (byte) inccnt::return#1  // register copy reg byte a
  //SEG28 [13] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$1 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuaa 
    sta SCREEN+1
    jmp breturn
  //SEG29 main::@return
  breturn:
  //SEG30 [14] return  [ ] ( main:2 [ ] )
    rts
}
//SEG31 inccnt
inccnt: {
  //SEG32 [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG33 [17] (byte) cnt2#11 ← ++ (byte) cnt2#10 [ cnt#12 cnt3#10 cnt2#11 ] ( main:2::inccnt:5 [ cnt#12 cnt3#10 cnt2#11 ] main:2::inccnt:10 [ cnt#12 cnt3#10 cnt2#11 ] ) -- vbuyy=_inc_vbuyy 
    iny
  //SEG34 [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=_inc_vbuz1 
    inc cnt3
  //SEG35 [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuaa=vbuxx 
    txa
    jmp breturn
  //SEG36 inccnt::@return
  breturn:
  //SEG37 [20] return  [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
    rts
}

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b2
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction ldy #0 with TAY
Replacing instruction ldx #0 with TAX
Removing instruction bbegin:
Removing instruction b2_from_bbegin:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction inccnt_from_main:
Removing instruction b1:
Removing instruction inccnt_from_b1:
Removing instruction b2:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @2
(label) @begin
(label) @end
(byte[256]) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte) cnt
(byte) cnt#11 reg byte x 4.0
(byte) cnt#12 reg byte x 0.6666666666666666
(byte) cnt#2 reg byte x 4.0
(byte) cnt2
(byte) cnt2#10 reg byte y 2.0
(byte) cnt2#11 reg byte y 0.4444444444444444
(byte) cnt3
(byte) cnt3#10 cnt3 zp ZP_BYTE:2 1.3333333333333333
(byte) cnt3#11 cnt3 zp ZP_BYTE:2 0.5
(byte()) inccnt()
(label) inccnt::@return
(byte) inccnt::return
(byte) inccnt::return#0 reg byte a 4.0
(byte) inccnt::return#1 reg byte a 4.0
(byte) inccnt::return#2 reg byte a 1.5
(void()) main()
(byte~) main::$0 reg byte a 4.0
(byte~) main::$1 reg byte a 4.0
(label) main::@1
(label) main::@2
(label) main::@return

reg byte x [ cnt#11 cnt#2 ]
reg byte y [ cnt2#10 cnt2#11 ]
zp ZP_BYTE:2 [ cnt3#10 cnt3#11 ]
reg byte a [ inccnt::return#0 ]
reg byte a [ main::$0 ]
reg byte a [ inccnt::return#1 ]
reg byte a [ main::$1 ]
reg byte x [ cnt#12 ]
reg byte a [ inccnt::return#2 ]


FINAL ASSEMBLER
Score: 60

//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
  .label cnt3 = 2
//SEG2 @begin
//SEG3 [1] phi from @begin to @2 [phi:@begin->@2]
//SEG4 @2
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @2 to main [phi:@2->main]
  jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
//SEG8 @end
//SEG9 main
main: {
  //SEG10 [5] call inccnt param-assignment [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
  //SEG11 [15] phi from main to inccnt [phi:main->inccnt]
  //SEG12 [15] phi (byte) cnt3#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#0] -- vbuz1=vbuc1 
    lda #0
    sta cnt3
  //SEG13 [15] phi (byte) cnt2#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#1] -- vbuyy=vbuc1 
    tay
  //SEG14 [15] phi (byte) cnt#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#2] -- vbuxx=vbuc1 
    tax
    jsr inccnt
  //SEG15 [6] (byte) inccnt::return#0 ← (byte) inccnt::return#2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] )
    // (byte) inccnt::return#0 = (byte) inccnt::return#2  // register copy reg byte a
  //SEG16 main::@1
  //SEG17 [7] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ main::$0 cnt#12 cnt2#11 cnt3#11 ] )
    // (byte~) main::$0 = (byte) inccnt::return#0  // register copy reg byte a
  //SEG18 [8] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ cnt#12 cnt2#11 cnt3#11 ] ) -- _deref_pbuc1=vbuaa 
    sta SCREEN+0
  //SEG19 [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG20 [10] call inccnt param-assignment [ inccnt::return#2 ] ( main:2 [ inccnt::return#2 ] )
  //SEG21 [15] phi from main::@1 to inccnt [phi:main::@1->inccnt]
  //SEG22 [15] phi (byte) cnt3#10 = (byte) cnt3#11 [phi:main::@1->inccnt#0] -- register_copy 
  //SEG23 [15] phi (byte) cnt2#10 = (byte) cnt2#11 [phi:main::@1->inccnt#1] -- register_copy 
  //SEG24 [15] phi (byte) cnt#11 = (byte) cnt#2 [phi:main::@1->inccnt#2] -- register_copy 
    jsr inccnt
  //SEG25 [11] (byte) inccnt::return#1 ← (byte) inccnt::return#2 [ inccnt::return#1 ] ( main:2 [ inccnt::return#1 ] )
    // (byte) inccnt::return#1 = (byte) inccnt::return#2  // register copy reg byte a
  //SEG26 main::@2
  //SEG27 [12] (byte~) main::$1 ← (byte) inccnt::return#1 [ main::$1 ] ( main:2 [ main::$1 ] )
    // (byte~) main::$1 = (byte) inccnt::return#1  // register copy reg byte a
  //SEG28 [13] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$1 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuaa 
    sta SCREEN+1
  //SEG29 main::@return
  //SEG30 [14] return  [ ] ( main:2 [ ] )
    rts
}
//SEG31 inccnt
inccnt: {
  //SEG32 [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG33 [17] (byte) cnt2#11 ← ++ (byte) cnt2#10 [ cnt#12 cnt3#10 cnt2#11 ] ( main:2::inccnt:5 [ cnt#12 cnt3#10 cnt2#11 ] main:2::inccnt:10 [ cnt#12 cnt3#10 cnt2#11 ] ) -- vbuyy=_inc_vbuyy 
    iny
  //SEG34 [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=_inc_vbuz1 
    inc cnt3
  //SEG35 [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuaa=vbuxx 
    txa
  //SEG36 inccnt::@return
  //SEG37 [20] return  [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] )
    rts
}

