PARSING src/test/java/dk/camelot64/kickc/test/kc/halfscii.kc
byte* SCREEN = $0400;
byte* CHARSET = $2000;
byte* CHARGEN = $D000;
byte* PROCPORT = $01;
byte* D018 = $d018;
byte* CHARSET4 = $2800;

byte[] bits_count = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 };

void main() {
    asm { sei }
    *PROCPORT = $32;
    byte* chargen = CHARGEN;
    byte* charset4 = CHARSET4;
    do {
        byte bits_gen = 0;
        byte* chargen1 = chargen+1;
        byte bits = bits_count[((*chargen & %01100000) | (*chargen1 & %01100000)>>2)>>1>>2];
        if(bits>=2) { bits_gen = bits_gen + 1; }
        bits_gen = bits_gen<<1;
        bits = bits_count[((*chargen & %00011000) | (*chargen1 & %00011000)>>2)>>1];
        if(bits>=2) { bits_gen = bits_gen + 1; }
        bits_gen = bits_gen<<1;
        bits = bits_count[((*chargen & %00000110)<<1 | (*chargen1 & %00000110)>>1)];
        if(bits>=2) { bits_gen = bits_gen + 1; }
        bits_gen = bits_gen<<1;
        bits = bits_count[((*chargen & %00000001)<<2 | (*chargen1 & %00000001))];
        if(bits>=2) { bits_gen = bits_gen + 1; }
        bits_gen = bits_gen<<1;
        *charset4 = bits_gen;
        charset4++;
        chargen = chargen+2;
    } while (chargen<CHARGEN+$800);
    *PROCPORT = $37;
    asm { cli }
    for(byte i : 0..255) {
        SCREEN[i] = i;
    }
    *D018 = $19;
}



Adding pre/post-modifier (byte*) main::charset4 ← ++ (byte*) main::charset4

STATEMENTS
  (byte*) SCREEN ← (word/signed word/dword/signed dword) 1024
  (byte*) CHARSET ← (word/signed word/dword/signed dword) 8192
  (byte*) CHARGEN ← (word/dword/signed dword) 53248
  (byte*) PROCPORT ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) D018 ← (word/dword/signed dword) 53272
  (byte*) CHARSET4 ← (word/signed word/dword/signed dword) 10240
  (byte[]) bits_count ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4 }
proc (void()) main()
  asm { sei  }
  *((byte*) PROCPORT) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte*) main::chargen ← (byte*) CHARGEN
  (byte*) main::charset4 ← (byte*) CHARSET4
main::@1:
  (byte) main::bits_gen ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte*~) main::$0 ← (byte*) main::chargen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) main::chargen1 ← (byte*~) main::$0
  (byte~) main::$1 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 96
  (byte~) main::$2 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 96
  (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3
  (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$6)
  (boolean~) main::$7 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$8 ← ! (boolean~) main::$7
  if((boolean~) main::$8) goto main::@2
  (byte/word~) main::$9 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$9
main::@2:
  (byte~) main::$10 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$10
  (byte~) main::$11 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte~) main::$12 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13
  (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$15)
  (boolean~) main::$16 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$17 ← ! (boolean~) main::$16
  if((boolean~) main::$17) goto main::@3
  (byte/word~) main::$18 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$18
main::@3:
  (byte~) main::$19 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$19
  (byte~) main::$20 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$22 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$24)
  (boolean~) main::$25 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$26 ← ! (boolean~) main::$25
  if((boolean~) main::$26) goto main::@4
  (byte/word~) main::$27 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$27
main::@4:
  (byte~) main::$28 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$28
  (byte~) main::$29 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$31 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$32)
  (boolean~) main::$33 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$34 ← ! (boolean~) main::$33
  if((boolean~) main::$34) goto main::@5
  (byte/word~) main::$35 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$35
main::@5:
  (byte~) main::$36 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$36
  *((byte*) main::charset4) ← (byte) main::bits_gen
  (byte*) main::charset4 ← ++ (byte*) main::charset4
  (byte*~) main::$37 ← (byte*) main::chargen + (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte*) main::chargen ← (byte*~) main::$37
  (byte*~) main::$38 ← (byte*) CHARGEN + (word/signed word/dword/signed dword) 2048
  (boolean~) main::$39 ← (byte*) main::chargen < (byte*~) main::$38
  if((boolean~) main::$39) goto main::@1
  *((byte*) PROCPORT) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  (byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@6:
  *((byte*) SCREEN + (byte) main::i) ← (byte) main::i
  (byte) main::i ← ++ (byte) main::i
  (boolean~) main::$40 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 0
  if((boolean~) main::$40) goto main::@6
  *((byte*) D018) ← (byte/signed byte/word/signed word/dword/signed dword) 25
main::@return:
  return 
endproc // main()
  call main 

SYMBOLS
(byte*) CHARGEN
(byte*) CHARSET
(byte*) CHARSET4
(byte*) D018
(byte*) PROCPORT
(byte*) SCREEN
(byte[]) bits_count
(void()) main()
(byte*~) main::$0
(byte~) main::$1
(byte~) main::$10
(byte~) main::$11
(byte~) main::$12
(byte~) main::$13
(byte~) main::$14
(byte~) main::$15
(boolean~) main::$16
(boolean~) main::$17
(byte/word~) main::$18
(byte~) main::$19
(byte~) main::$2
(byte~) main::$20
(byte~) main::$21
(byte~) main::$22
(byte~) main::$23
(byte~) main::$24
(boolean~) main::$25
(boolean~) main::$26
(byte/word~) main::$27
(byte~) main::$28
(byte~) main::$29
(byte~) main::$3
(byte~) main::$30
(byte~) main::$31
(byte~) main::$32
(boolean~) main::$33
(boolean~) main::$34
(byte/word~) main::$35
(byte~) main::$36
(byte*~) main::$37
(byte*~) main::$38
(boolean~) main::$39
(byte~) main::$4
(boolean~) main::$40
(byte~) main::$5
(byte~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(byte/word~) main::$9
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(byte) main::bits
(byte) main::bits_gen
(byte*) main::chargen
(byte*) main::chargen1
(byte*) main::charset4
(byte) main::i

Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024
Promoting word/signed word/dword/signed dword to byte* in CHARSET ← ((byte*)) 8192
Promoting word/dword/signed dword to byte* in CHARGEN ← ((byte*)) 53248
Promoting byte/signed byte/word/signed word/dword/signed dword to byte* in PROCPORT ← ((byte*)) 1
Promoting word/dword/signed dword to byte* in D018 ← ((byte*)) 53272
Promoting word/signed word/dword/signed dword to byte* in CHARSET4 ← ((byte*)) 10240
INITIAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  (byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) CHARSET ← ((byte*)) (word/signed word/dword/signed dword) 8192
  (byte*) CHARGEN ← ((byte*)) (word/dword/signed dword) 53248
  (byte*) PROCPORT ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) D018 ← ((byte*)) (word/dword/signed dword) 53272
  (byte*) CHARSET4 ← ((byte*)) (word/signed word/dword/signed dword) 10240
  (byte[]) bits_count ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4 }
  to:@1
main: scope:[main]  from
  asm { sei  }
  *((byte*) PROCPORT) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte*) main::chargen ← (byte*) CHARGEN
  (byte*) main::charset4 ← (byte*) CHARSET4
  to:main::@1
main::@1: scope:[main]  from main main::@5
  (byte) main::bits_gen ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte*~) main::$0 ← (byte*) main::chargen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) main::chargen1 ← (byte*~) main::$0
  (byte~) main::$1 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 96
  (byte~) main::$2 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 96
  (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3
  (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$6)
  (boolean~) main::$7 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$8 ← ! (boolean~) main::$7
  if((boolean~) main::$8) goto main::@2
  to:main::@7
main::@2: scope:[main]  from main::@1 main::@7
  (byte~) main::$10 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$10
  (byte~) main::$11 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte~) main::$12 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13
  (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$15)
  (boolean~) main::$16 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$17 ← ! (boolean~) main::$16
  if((boolean~) main::$17) goto main::@3
  to:main::@8
main::@7: scope:[main]  from main::@1
  (byte/word~) main::$9 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$9
  to:main::@2
main::@3: scope:[main]  from main::@2 main::@8
  (byte~) main::$19 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$19
  (byte~) main::$20 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$22 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$24)
  (boolean~) main::$25 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$26 ← ! (boolean~) main::$25
  if((boolean~) main::$26) goto main::@4
  to:main::@9
main::@8: scope:[main]  from main::@2
  (byte/word~) main::$18 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$18
  to:main::@3
main::@4: scope:[main]  from main::@3 main::@9
  (byte~) main::$28 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$28
  (byte~) main::$29 ← *((byte*) main::chargen) & (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$31 ← *((byte*) main::chargen1) & (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31
  (byte) main::bits ← *((byte[]) bits_count + (byte~) main::$32)
  (boolean~) main::$33 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$34 ← ! (boolean~) main::$33
  if((boolean~) main::$34) goto main::@5
  to:main::@10
main::@9: scope:[main]  from main::@3
  (byte/word~) main::$27 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$27
  to:main::@4
main::@5: scope:[main]  from main::@10 main::@4
  (byte~) main::$36 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte~) main::$36
  *((byte*) main::charset4) ← (byte) main::bits_gen
  (byte*) main::charset4 ← ++ (byte*) main::charset4
  (byte*~) main::$37 ← (byte*) main::chargen + (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte*) main::chargen ← (byte*~) main::$37
  (byte*~) main::$38 ← (byte*) CHARGEN + (word/signed word/dword/signed dword) 2048
  (boolean~) main::$39 ← (byte*) main::chargen < (byte*~) main::$38
  if((boolean~) main::$39) goto main::@1
  to:main::@11
main::@10: scope:[main]  from main::@4
  (byte/word~) main::$35 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen ← (byte/word~) main::$35
  to:main::@5
main::@11: scope:[main]  from main::@5
  *((byte*) PROCPORT) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  (byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@6
main::@6: scope:[main]  from main::@11 main::@6
  *((byte*) SCREEN + (byte) main::i) ← (byte) main::i
  (byte) main::i ← ++ (byte) main::i
  (boolean~) main::$40 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 0
  if((boolean~) main::$40) goto main::@6
  to:main::@12
main::@12: scope:[main]  from main::@6
  *((byte*) D018) ← (byte/signed byte/word/signed word/dword/signed dword) 25
  to:main::@return
main::@return: scope:[main]  from main::@12
  return 
  to:@return
@1: scope:[]  from @begin
  call main 
  to:@end
@end: scope:[]  from @1

Eliminating unused variable (byte*) CHARSET and assignment [1] (byte*) CHARSET ← ((byte*)) (word/signed word/dword/signed dword) 8192
PROCEDURE MODIFY VARIABLE ANALYSIS

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

CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) 53248
  (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) D018#0 ← ((byte*)) (word/dword/signed dword) 53272
  (byte*) CHARSET4#0 ← ((byte*)) (word/signed word/dword/signed dword) 10240
  (byte[]) bits_count#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4 }
  to:@1
main: scope:[main]  from @1
  (byte*) D018#13 ← phi( @1/(byte*) D018#14 )
  (byte*) SCREEN#12 ← phi( @1/(byte*) SCREEN#13 )
  (byte*) CHARSET4#1 ← phi( @1/(byte*) CHARSET4#2 )
  (byte*) CHARGEN#1 ← phi( @1/(byte*) CHARGEN#3 )
  (byte*) PROCPORT#1 ← phi( @1/(byte*) PROCPORT#3 )
  asm { sei  }
  *((byte*) PROCPORT#1) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte*) main::chargen#0 ← (byte*) CHARGEN#1
  (byte*) main::charset4#0 ← (byte*) CHARSET4#1
  to:main::@1
main::@1: scope:[main]  from main main::@5
  (byte*) D018#11 ← phi( main/(byte*) D018#13 main::@5/(byte*) D018#4 )
  (byte*) SCREEN#10 ← phi( main/(byte*) SCREEN#12 main::@5/(byte*) SCREEN#3 )
  (byte*) PROCPORT#11 ← phi( main/(byte*) PROCPORT#1 main::@5/(byte*) PROCPORT#4 )
  (byte*) CHARGEN#10 ← phi( main/(byte*) CHARGEN#1 main::@5/(byte*) CHARGEN#2 )
  (byte*) main::charset4#9 ← phi( main/(byte*) main::charset4#0 main::@5/(byte*) main::charset4#1 )
  (byte*) main::chargen#2 ← phi( main/(byte*) main::chargen#0 main::@5/(byte*) main::chargen#1 )
  (byte) main::bits_gen#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte*~) main::$0 ← (byte*) main::chargen#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) main::chargen1#0 ← (byte*~) main::$0
  (byte~) main::$1 ← *((byte*) main::chargen#2) & (byte/signed byte/word/signed word/dword/signed dword) 96
  (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96
  (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3
  (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) main::bits#0 ← *((byte[]) bits_count#0 + (byte~) main::$6)
  (boolean~) main::$7 ← (byte) main::bits#0 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$8 ← ! (boolean~) main::$7
  if((boolean~) main::$8) goto main::@2
  to:main::@7
main::@2: scope:[main]  from main::@1 main::@7
  (byte*) D018#9 ← phi( main::@1/(byte*) D018#11 main::@7/(byte*) D018#12 )
  (byte*) SCREEN#8 ← phi( main::@1/(byte*) SCREEN#10 main::@7/(byte*) SCREEN#11 )
  (byte*) PROCPORT#9 ← phi( main::@1/(byte*) PROCPORT#11 main::@7/(byte*) PROCPORT#12 )
  (byte*) CHARGEN#8 ← phi( main::@1/(byte*) CHARGEN#10 main::@7/(byte*) CHARGEN#11 )
  (byte*) main::charset4#7 ← phi( main::@1/(byte*) main::charset4#9 main::@7/(byte*) main::charset4#10 )
  (byte*) main::chargen1#1 ← phi( main::@1/(byte*) main::chargen1#0 main::@7/(byte*) main::chargen1#4 )
  (byte*) main::chargen#3 ← phi( main::@1/(byte*) main::chargen#2 main::@7/(byte*) main::chargen#7 )
  (byte) main::bits_gen#9 ← phi( main::@1/(byte) main::bits_gen#0 main::@7/(byte) main::bits_gen#2 )
  (byte~) main::$10 ← (byte) main::bits_gen#9 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#1 ← (byte~) main::$10
  (byte~) main::$11 ← *((byte*) main::chargen#3) & (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte~) main::$12 ← *((byte*) main::chargen1#1) & (byte/signed byte/word/signed word/dword/signed dword) 24
  (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13
  (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits#1 ← *((byte[]) bits_count#0 + (byte~) main::$15)
  (boolean~) main::$16 ← (byte) main::bits#1 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$17 ← ! (boolean~) main::$16
  if((boolean~) main::$17) goto main::@3
  to:main::@8
main::@7: scope:[main]  from main::@1
  (byte*) D018#12 ← phi( main::@1/(byte*) D018#11 )
  (byte*) SCREEN#11 ← phi( main::@1/(byte*) SCREEN#10 )
  (byte*) PROCPORT#12 ← phi( main::@1/(byte*) PROCPORT#11 )
  (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#10 )
  (byte*) main::charset4#10 ← phi( main::@1/(byte*) main::charset4#9 )
  (byte*) main::chargen1#4 ← phi( main::@1/(byte*) main::chargen1#0 )
  (byte*) main::chargen#7 ← phi( main::@1/(byte*) main::chargen#2 )
  (byte) main::bits_gen#10 ← phi( main::@1/(byte) main::bits_gen#0 )
  (byte/word~) main::$9 ← (byte) main::bits_gen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#2 ← (byte/word~) main::$9
  to:main::@2
main::@3: scope:[main]  from main::@2 main::@8
  (byte*) D018#7 ← phi( main::@2/(byte*) D018#9 main::@8/(byte*) D018#10 )
  (byte*) SCREEN#6 ← phi( main::@2/(byte*) SCREEN#8 main::@8/(byte*) SCREEN#9 )
  (byte*) PROCPORT#7 ← phi( main::@2/(byte*) PROCPORT#9 main::@8/(byte*) PROCPORT#10 )
  (byte*) CHARGEN#6 ← phi( main::@2/(byte*) CHARGEN#8 main::@8/(byte*) CHARGEN#9 )
  (byte*) main::charset4#5 ← phi( main::@2/(byte*) main::charset4#7 main::@8/(byte*) main::charset4#8 )
  (byte*) main::chargen1#2 ← phi( main::@2/(byte*) main::chargen1#1 main::@8/(byte*) main::chargen1#5 )
  (byte*) main::chargen#4 ← phi( main::@2/(byte*) main::chargen#3 main::@8/(byte*) main::chargen#8 )
  (byte) main::bits_gen#11 ← phi( main::@2/(byte) main::bits_gen#1 main::@8/(byte) main::bits_gen#4 )
  (byte~) main::$19 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#3 ← (byte~) main::$19
  (byte~) main::$20 ← *((byte*) main::chargen#4) & (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$22 ← *((byte*) main::chargen1#2) & (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23
  (byte) main::bits#2 ← *((byte[]) bits_count#0 + (byte~) main::$24)
  (boolean~) main::$25 ← (byte) main::bits#2 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$26 ← ! (boolean~) main::$25
  if((boolean~) main::$26) goto main::@4
  to:main::@9
main::@8: scope:[main]  from main::@2
  (byte*) D018#10 ← phi( main::@2/(byte*) D018#9 )
  (byte*) SCREEN#9 ← phi( main::@2/(byte*) SCREEN#8 )
  (byte*) PROCPORT#10 ← phi( main::@2/(byte*) PROCPORT#9 )
  (byte*) CHARGEN#9 ← phi( main::@2/(byte*) CHARGEN#8 )
  (byte*) main::charset4#8 ← phi( main::@2/(byte*) main::charset4#7 )
  (byte*) main::chargen1#5 ← phi( main::@2/(byte*) main::chargen1#1 )
  (byte*) main::chargen#8 ← phi( main::@2/(byte*) main::chargen#3 )
  (byte) main::bits_gen#12 ← phi( main::@2/(byte) main::bits_gen#1 )
  (byte/word~) main::$18 ← (byte) main::bits_gen#12 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#4 ← (byte/word~) main::$18
  to:main::@3
main::@4: scope:[main]  from main::@3 main::@9
  (byte*) D018#6 ← phi( main::@3/(byte*) D018#7 main::@9/(byte*) D018#8 )
  (byte*) SCREEN#5 ← phi( main::@3/(byte*) SCREEN#6 main::@9/(byte*) SCREEN#7 )
  (byte*) PROCPORT#6 ← phi( main::@3/(byte*) PROCPORT#7 main::@9/(byte*) PROCPORT#8 )
  (byte*) CHARGEN#5 ← phi( main::@3/(byte*) CHARGEN#6 main::@9/(byte*) CHARGEN#7 )
  (byte*) main::charset4#4 ← phi( main::@3/(byte*) main::charset4#5 main::@9/(byte*) main::charset4#6 )
  (byte*) main::chargen1#3 ← phi( main::@3/(byte*) main::chargen1#2 main::@9/(byte*) main::chargen1#6 )
  (byte*) main::chargen#5 ← phi( main::@3/(byte*) main::chargen#4 main::@9/(byte*) main::chargen#9 )
  (byte) main::bits_gen#13 ← phi( main::@3/(byte) main::bits_gen#3 main::@9/(byte) main::bits_gen#6 )
  (byte~) main::$28 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#5 ← (byte~) main::$28
  (byte~) main::$29 ← *((byte*) main::chargen#5) & (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte~) main::$31 ← *((byte*) main::chargen1#3) & (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31
  (byte) main::bits#3 ← *((byte[]) bits_count#0 + (byte~) main::$32)
  (boolean~) main::$33 ← (byte) main::bits#3 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (boolean~) main::$34 ← ! (boolean~) main::$33
  if((boolean~) main::$34) goto main::@5
  to:main::@10
main::@9: scope:[main]  from main::@3
  (byte*) D018#8 ← phi( main::@3/(byte*) D018#7 )
  (byte*) SCREEN#7 ← phi( main::@3/(byte*) SCREEN#6 )
  (byte*) PROCPORT#8 ← phi( main::@3/(byte*) PROCPORT#7 )
  (byte*) CHARGEN#7 ← phi( main::@3/(byte*) CHARGEN#6 )
  (byte*) main::charset4#6 ← phi( main::@3/(byte*) main::charset4#5 )
  (byte*) main::chargen1#6 ← phi( main::@3/(byte*) main::chargen1#2 )
  (byte*) main::chargen#9 ← phi( main::@3/(byte*) main::chargen#4 )
  (byte) main::bits_gen#14 ← phi( main::@3/(byte) main::bits_gen#3 )
  (byte/word~) main::$27 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#6 ← (byte/word~) main::$27
  to:main::@4
main::@5: scope:[main]  from main::@10 main::@4
  (byte*) D018#4 ← phi( main::@10/(byte*) D018#5 main::@4/(byte*) D018#6 )
  (byte*) SCREEN#3 ← phi( main::@10/(byte*) SCREEN#4 main::@4/(byte*) SCREEN#5 )
  (byte*) PROCPORT#4 ← phi( main::@10/(byte*) PROCPORT#5 main::@4/(byte*) PROCPORT#6 )
  (byte*) CHARGEN#2 ← phi( main::@10/(byte*) CHARGEN#4 main::@4/(byte*) CHARGEN#5 )
  (byte*) main::chargen#6 ← phi( main::@10/(byte*) main::chargen#10 main::@4/(byte*) main::chargen#5 )
  (byte*) main::charset4#2 ← phi( main::@10/(byte*) main::charset4#3 main::@4/(byte*) main::charset4#4 )
  (byte) main::bits_gen#15 ← phi( main::@10/(byte) main::bits_gen#8 main::@4/(byte) main::bits_gen#5 )
  (byte~) main::$36 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#7 ← (byte~) main::$36
  *((byte*) main::charset4#2) ← (byte) main::bits_gen#7
  (byte*) main::charset4#1 ← ++ (byte*) main::charset4#2
  (byte*~) main::$37 ← (byte*) main::chargen#6 + (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte*) main::chargen#1 ← (byte*~) main::$37
  (byte*~) main::$38 ← (byte*) CHARGEN#2 + (word/signed word/dword/signed dword) 2048
  (boolean~) main::$39 ← (byte*) main::chargen#1 < (byte*~) main::$38
  if((boolean~) main::$39) goto main::@1
  to:main::@11
main::@10: scope:[main]  from main::@4
  (byte*) D018#5 ← phi( main::@4/(byte*) D018#6 )
  (byte*) SCREEN#4 ← phi( main::@4/(byte*) SCREEN#5 )
  (byte*) PROCPORT#5 ← phi( main::@4/(byte*) PROCPORT#6 )
  (byte*) CHARGEN#4 ← phi( main::@4/(byte*) CHARGEN#5 )
  (byte*) main::chargen#10 ← phi( main::@4/(byte*) main::chargen#5 )
  (byte*) main::charset4#3 ← phi( main::@4/(byte*) main::charset4#4 )
  (byte) main::bits_gen#16 ← phi( main::@4/(byte) main::bits_gen#5 )
  (byte/word~) main::$35 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#8 ← (byte/word~) main::$35
  to:main::@5
main::@11: scope:[main]  from main::@5
  (byte*) D018#3 ← phi( main::@5/(byte*) D018#4 )
  (byte*) SCREEN#2 ← phi( main::@5/(byte*) SCREEN#3 )
  (byte*) PROCPORT#2 ← phi( main::@5/(byte*) PROCPORT#4 )
  *((byte*) PROCPORT#2) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  (byte) main::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@6
main::@6: scope:[main]  from main::@11 main::@6
  (byte*) D018#2 ← phi( main::@11/(byte*) D018#3 main::@6/(byte*) D018#2 )
  (byte*) SCREEN#1 ← phi( main::@11/(byte*) SCREEN#2 main::@6/(byte*) SCREEN#1 )
  (byte) main::i#2 ← phi( main::@11/(byte) main::i#0 main::@6/(byte) main::i#1 )
  *((byte*) SCREEN#1 + (byte) main::i#2) ← (byte) main::i#2
  (byte) main::i#1 ← ++ (byte) main::i#2
  (boolean~) main::$40 ← (byte) main::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 0
  if((boolean~) main::$40) goto main::@6
  to:main::@12
main::@12: scope:[main]  from main::@6
  (byte*) D018#1 ← phi( main::@6/(byte*) D018#2 )
  *((byte*) D018#1) ← (byte/signed byte/word/signed word/dword/signed dword) 25
  to:main::@return
main::@return: scope:[main]  from main::@12
  return 
  to:@return
@1: scope:[]  from @begin
  (byte*) D018#14 ← phi( @begin/(byte*) D018#0 )
  (byte*) SCREEN#13 ← phi( @begin/(byte*) SCREEN#0 )
  (byte*) CHARSET4#2 ← phi( @begin/(byte*) CHARSET4#0 )
  (byte*) CHARGEN#3 ← phi( @begin/(byte*) CHARGEN#0 )
  (byte*) PROCPORT#3 ← phi( @begin/(byte*) PROCPORT#0 )
  call main param-assignment
  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#10
(byte*) CHARGEN#11
(byte*) CHARGEN#2
(byte*) CHARGEN#3
(byte*) CHARGEN#4
(byte*) CHARGEN#5
(byte*) CHARGEN#6
(byte*) CHARGEN#7
(byte*) CHARGEN#8
(byte*) CHARGEN#9
(byte*) CHARSET4
(byte*) CHARSET4#0
(byte*) CHARSET4#1
(byte*) CHARSET4#2
(byte*) D018
(byte*) D018#0
(byte*) D018#1
(byte*) D018#10
(byte*) D018#11
(byte*) D018#12
(byte*) D018#13
(byte*) D018#14
(byte*) D018#2
(byte*) D018#3
(byte*) D018#4
(byte*) D018#5
(byte*) D018#6
(byte*) D018#7
(byte*) D018#8
(byte*) D018#9
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte*) PROCPORT#1
(byte*) PROCPORT#10
(byte*) PROCPORT#11
(byte*) PROCPORT#12
(byte*) PROCPORT#2
(byte*) PROCPORT#3
(byte*) PROCPORT#4
(byte*) PROCPORT#5
(byte*) PROCPORT#6
(byte*) PROCPORT#7
(byte*) PROCPORT#8
(byte*) PROCPORT#9
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) SCREEN#1
(byte*) SCREEN#10
(byte*) SCREEN#11
(byte*) SCREEN#12
(byte*) SCREEN#13
(byte*) SCREEN#2
(byte*) SCREEN#3
(byte*) SCREEN#4
(byte*) SCREEN#5
(byte*) SCREEN#6
(byte*) SCREEN#7
(byte*) SCREEN#8
(byte*) SCREEN#9
(byte[]) bits_count
(byte[]) bits_count#0
(void()) main()
(byte*~) main::$0
(byte~) main::$1
(byte~) main::$10
(byte~) main::$11
(byte~) main::$12
(byte~) main::$13
(byte~) main::$14
(byte~) main::$15
(boolean~) main::$16
(boolean~) main::$17
(byte/word~) main::$18
(byte~) main::$19
(byte~) main::$2
(byte~) main::$20
(byte~) main::$21
(byte~) main::$22
(byte~) main::$23
(byte~) main::$24
(boolean~) main::$25
(boolean~) main::$26
(byte/word~) main::$27
(byte~) main::$28
(byte~) main::$29
(byte~) main::$3
(byte~) main::$30
(byte~) main::$31
(byte~) main::$32
(boolean~) main::$33
(boolean~) main::$34
(byte/word~) main::$35
(byte~) main::$36
(byte*~) main::$37
(byte*~) main::$38
(boolean~) main::$39
(byte~) main::$4
(boolean~) main::$40
(byte~) main::$5
(byte~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(byte/word~) main::$9
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::bits
(byte) main::bits#0
(byte) main::bits#1
(byte) main::bits#2
(byte) main::bits#3
(byte) main::bits_gen
(byte) main::bits_gen#0
(byte) main::bits_gen#1
(byte) main::bits_gen#10
(byte) main::bits_gen#11
(byte) main::bits_gen#12
(byte) main::bits_gen#13
(byte) main::bits_gen#14
(byte) main::bits_gen#15
(byte) main::bits_gen#16
(byte) main::bits_gen#2
(byte) main::bits_gen#3
(byte) main::bits_gen#4
(byte) main::bits_gen#5
(byte) main::bits_gen#6
(byte) main::bits_gen#7
(byte) main::bits_gen#8
(byte) main::bits_gen#9
(byte*) main::chargen
(byte*) main::chargen#0
(byte*) main::chargen#1
(byte*) main::chargen#10
(byte*) main::chargen#2
(byte*) main::chargen#3
(byte*) main::chargen#4
(byte*) main::chargen#5
(byte*) main::chargen#6
(byte*) main::chargen#7
(byte*) main::chargen#8
(byte*) main::chargen#9
(byte*) main::chargen1
(byte*) main::chargen1#0
(byte*) main::chargen1#1
(byte*) main::chargen1#2
(byte*) main::chargen1#3
(byte*) main::chargen1#4
(byte*) main::chargen1#5
(byte*) main::chargen1#6
(byte*) main::charset4
(byte*) main::charset4#0
(byte*) main::charset4#1
(byte*) main::charset4#10
(byte*) main::charset4#2
(byte*) main::charset4#3
(byte*) main::charset4#4
(byte*) main::charset4#5
(byte*) main::charset4#6
(byte*) main::charset4#7
(byte*) main::charset4#8
(byte*) main::charset4#9
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2

OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) @2
Succesful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (boolean~) main::$8 ← (byte) main::bits#0 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (boolean~) main::$7 ← (byte) main::bits#0 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Inversing boolean not (boolean~) main::$17 ← (byte) main::bits#1 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (boolean~) main::$16 ← (byte) main::bits#1 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Inversing boolean not (boolean~) main::$26 ← (byte) main::bits#2 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (boolean~) main::$25 ← (byte) main::bits#2 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Inversing boolean not (boolean~) main::$34 ← (byte) main::bits#3 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (boolean~) main::$33 ← (byte) main::bits#3 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Succesful SSA optimization Pass2UnaryNotSimplification
Not aliassing across scopes: PROCPORT#1 PROCPORT#3
Not aliassing across scopes: CHARGEN#1 CHARGEN#3
Not aliassing across scopes: CHARSET4#1 CHARSET4#2
Not aliassing across scopes: SCREEN#12 SCREEN#13
Not aliassing across scopes: D018#13 D018#14
Not aliassing across scopes: main::chargen#0 CHARGEN#1
Not aliassing across scopes: main::charset4#0 CHARSET4#1
Alias (byte*) main::chargen1#0 = (byte*~) main::$0 (byte*) main::chargen1#4 
Alias (byte) main::bits_gen#1 = (byte~) main::$10 (byte) main::bits_gen#12 
Alias (byte) main::bits_gen#0 = (byte) main::bits_gen#10 
Alias (byte*) main::chargen#2 = (byte*) main::chargen#7 
Alias (byte*) main::charset4#10 = (byte*) main::charset4#9 
Alias (byte*) CHARGEN#10 = (byte*) CHARGEN#11 
Alias (byte*) PROCPORT#11 = (byte*) PROCPORT#12 
Alias (byte*) SCREEN#10 = (byte*) SCREEN#11 
Alias (byte*) D018#11 = (byte*) D018#12 
Alias (byte) main::bits_gen#2 = (byte/word~) main::$9 
Alias (byte) main::bits_gen#14 = (byte) main::bits_gen#3 (byte~) main::$19 
Alias (byte*) main::chargen#3 = (byte*) main::chargen#8 
Alias (byte*) main::chargen1#1 = (byte*) main::chargen1#5 
Alias (byte*) main::charset4#7 = (byte*) main::charset4#8 
Alias (byte*) CHARGEN#8 = (byte*) CHARGEN#9 
Alias (byte*) PROCPORT#10 = (byte*) PROCPORT#9 
Alias (byte*) SCREEN#8 = (byte*) SCREEN#9 
Alias (byte*) D018#10 = (byte*) D018#9 
Alias (byte) main::bits_gen#4 = (byte/word~) main::$18 
Alias (byte) main::bits_gen#16 = (byte) main::bits_gen#5 (byte~) main::$28 
Alias (byte*) main::chargen#4 = (byte*) main::chargen#9 
Alias (byte*) main::chargen1#2 = (byte*) main::chargen1#6 
Alias (byte*) main::charset4#5 = (byte*) main::charset4#6 
Alias (byte*) CHARGEN#6 = (byte*) CHARGEN#7 
Alias (byte*) PROCPORT#7 = (byte*) PROCPORT#8 
Alias (byte*) SCREEN#6 = (byte*) SCREEN#7 
Alias (byte*) D018#7 = (byte*) D018#8 
Alias (byte) main::bits_gen#6 = (byte/word~) main::$27 
Alias (byte) main::bits_gen#7 = (byte~) main::$36 
Alias (byte*) main::chargen#1 = (byte*~) main::$37 
Alias (byte*) main::charset4#3 = (byte*) main::charset4#4 
Alias (byte*) main::chargen#10 = (byte*) main::chargen#5 
Alias (byte*) CHARGEN#4 = (byte*) CHARGEN#5 
Alias (byte*) PROCPORT#5 = (byte*) PROCPORT#6 
Alias (byte*) SCREEN#4 = (byte*) SCREEN#5 
Alias (byte*) D018#5 = (byte*) D018#6 
Alias (byte) main::bits_gen#8 = (byte/word~) main::$35 
Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#4 
Alias (byte*) SCREEN#2 = (byte*) SCREEN#3 
Alias (byte*) D018#3 = (byte*) D018#4 
Alias (byte*) D018#1 = (byte*) D018#2 
Alias (byte*) PROCPORT#0 = (byte*) PROCPORT#3 
Alias (byte*) CHARGEN#0 = (byte*) CHARGEN#3 
Alias (byte*) CHARSET4#0 = (byte*) CHARSET4#2 
Alias (byte*) SCREEN#0 = (byte*) SCREEN#13 
Alias (byte*) D018#0 = (byte*) D018#14 
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: PROCPORT#1 PROCPORT#0
Not aliassing across scopes: CHARGEN#1 CHARGEN#0
Not aliassing across scopes: CHARSET4#1 CHARSET4#0
Not aliassing across scopes: SCREEN#12 SCREEN#0
Not aliassing across scopes: D018#13 D018#0
Not aliassing across scopes: main::chargen#0 CHARGEN#1
Not aliassing across scopes: main::charset4#0 CHARSET4#1
Alias (byte*) main::chargen#10 = (byte*) main::chargen#3 (byte*) main::chargen#2 (byte*) main::chargen#4 (byte*) main::chargen#6 
Alias (byte*) main::chargen1#0 = (byte*) main::chargen1#1 (byte*) main::chargen1#2 (byte*) main::chargen1#3 
Alias (byte*) main::charset4#10 = (byte*) main::charset4#7 (byte*) main::charset4#5 (byte*) main::charset4#3 (byte*) main::charset4#2 
Alias (byte*) CHARGEN#10 = (byte*) CHARGEN#8 (byte*) CHARGEN#6 (byte*) CHARGEN#4 (byte*) CHARGEN#2 
Alias (byte*) PROCPORT#10 = (byte*) PROCPORT#11 (byte*) PROCPORT#7 (byte*) PROCPORT#5 (byte*) PROCPORT#2 
Alias (byte*) SCREEN#10 = (byte*) SCREEN#8 (byte*) SCREEN#6 (byte*) SCREEN#4 (byte*) SCREEN#2 
Alias (byte*) D018#10 = (byte*) D018#11 (byte*) D018#7 (byte*) D018#5 (byte*) D018#3 
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: PROCPORT#1 PROCPORT#0
Not aliassing across scopes: CHARGEN#1 CHARGEN#0
Not aliassing across scopes: CHARSET4#1 CHARSET4#0
Not aliassing across scopes: SCREEN#12 SCREEN#0
Not aliassing across scopes: D018#13 D018#0
Not aliassing across scopes: main::chargen#0 CHARGEN#1
Not aliassing across scopes: main::charset4#0 CHARSET4#1
Self Phi Eliminated (byte*) CHARGEN#10
Self Phi Eliminated (byte*) PROCPORT#10
Self Phi Eliminated (byte*) SCREEN#10
Self Phi Eliminated (byte*) D018#10
Self Phi Eliminated (byte*) SCREEN#1
Self Phi Eliminated (byte*) D018#1
Succesful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) PROCPORT#1 (byte*) PROCPORT#0
Redundant Phi (byte*) CHARGEN#1 (byte*) CHARGEN#0
Redundant Phi (byte*) CHARSET4#1 (byte*) CHARSET4#0
Redundant Phi (byte*) SCREEN#12 (byte*) SCREEN#0
Redundant Phi (byte*) D018#13 (byte*) D018#0
Redundant Phi (byte*) CHARGEN#10 (byte*) CHARGEN#1
Redundant Phi (byte*) PROCPORT#10 (byte*) PROCPORT#1
Redundant Phi (byte*) SCREEN#10 (byte*) SCREEN#12
Redundant Phi (byte*) D018#10 (byte*) D018#13
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#10
Redundant Phi (byte*) D018#1 (byte*) D018#10
Succesful SSA optimization Pass2RedundantPhiElimination
Simple Condition (boolean~) main::$8 if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2
Simple Condition (boolean~) main::$17 if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3
Simple Condition (boolean~) main::$26 if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4
Simple Condition (boolean~) main::$34 if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5
Simple Condition (boolean~) main::$39 if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1
Simple Condition (boolean~) main::$40 if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6
Succesful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte*) CHARGEN#0 = ((byte*))53248
Constant (const byte*) PROCPORT#0 = ((byte*))1
Constant (const byte*) D018#0 = ((byte*))53272
Constant (const byte*) CHARSET4#0 = ((byte*))10240
Constant (const byte[]) bits_count#0 = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }
Constant (const byte) main::bits_gen#0 = 0
Constant (const byte) main::i#0 = 0
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte*) main::chargen#0 = CHARGEN#0
Constant (const byte*) main::charset4#0 = CHARSET4#0
Constant (const byte) main::bits_gen#2 = main::bits_gen#0+1
Constant (const byte*) main::$38 = CHARGEN#0+2048
Succesful SSA optimization Pass2ConstantIdentification
Multiple usages for variable. Not optimizing sub-constant (byte*) main::chargen#10
Multiple usages for variable. Not optimizing sub-constant (byte) main::bits_gen#1
Multiple usages for variable. Not optimizing sub-constant (byte) main::bits_gen#14
Multiple usages for variable. Not optimizing sub-constant (byte*) main::chargen#10
Multiple usages for variable. Not optimizing sub-constant (byte) main::bits_gen#16
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Not culling empty block because it shares successor with its predecessor. (label) main::@7
Multiple usages for variable. Not optimizing sub-constant (byte*) main::chargen#10
Multiple usages for variable. Not optimizing sub-constant (byte) main::bits_gen#1
Multiple usages for variable. Not optimizing sub-constant (byte) main::bits_gen#14
Multiple usages for variable. Not optimizing sub-constant (byte*) main::chargen#10
Multiple usages for variable. Not optimizing sub-constant (byte) main::bits_gen#16
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
OPTIMIZING CONTROL FLOW GRAPH
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::bits_gen#0
Inlining constant with different constant siblings (const byte) main::bits_gen#0
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte*) main::chargen#0
Inlining constant with var siblings (const byte*) main::chargen#0
Inlining constant with var siblings (const byte*) main::charset4#0
Inlining constant with var siblings (const byte*) main::charset4#0
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with var siblings (const byte) main::bits_gen#2
Inlining constant with different constant siblings (const byte) main::bits_gen#2
Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::bits_gen#2 = (byte/signed byte/word/signed word/dword/signed dword) 0+(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::chargen#0 = (const byte*) CHARGEN#0
Constant inlined main::bits_gen#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::$38 = (const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048
Constant inlined main::charset4#0 = (const byte*) CHARSET4#0
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @1 @end main main::@1 main::@7 main::@2 main::@8 main::@3 main::@9 main::@4 main::@10 main::@5 main::@11 main::@6 main::@12 main::@return 
Added new block during phi lifting main::@13(between main::@5 and main::@1)
Added new block during phi lifting main::@14(between main::@2 and main::@3)
Added new block during phi lifting main::@15(between main::@3 and main::@4)
Added new block during phi lifting main::@16(between main::@4 and main::@5)
Added new block during phi lifting main::@17(between main::@6 and main::@6)
Block Sequence Planned @begin @1 @end main main::@1 main::@7 main::@2 main::@8 main::@3 main::@9 main::@4 main::@10 main::@5 main::@11 main::@6 main::@12 main::@return main::@17 main::@13 main::@16 main::@15 main::@14 
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::@7
CALL GRAPH
Calls in [] to main:2 

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...
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...
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...
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 7 initial phi equivalence classes
Coalesced [27] main::bits_gen#18 ← main::bits_gen#4
Coalesced [38] main::bits_gen#20 ← main::bits_gen#6
Coalesced [48] main::bits_gen#21 ← main::bits_gen#8
Coalesced [63] main::i#3 ← main::i#1
Coalesced [64] main::chargen#11 ← main::chargen#1
Coalesced [65] main::charset4#11 ← main::charset4#1
Coalesced [66] main::bits_gen#22 ← main::bits_gen#16
Coalesced [67] main::bits_gen#19 ← main::bits_gen#14
Coalesced [68] main::bits_gen#17 ← main::bits_gen#1
Coalesced down to 7 phi equivalence classes
Not culling empty block because it shares successor with its predecessor. (label) main::@7
Culled Empty Block (label) main::@17
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@16
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@14
Block Sequence Planned @begin @1 @end main main::@1 main::@7 main::@2 main::@8 main::@3 main::@9 main::@4 main::@10 main::@5 main::@11 main::@6 main::@12 main::@return 
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::@7
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...
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...
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...
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:@1
@1: scope:[]  from @begin
  [1] phi() [ ] ( )
  [2] call main param-assignment [ ] ( )
  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 [ ] ( main:2 [ ] )
  to:main::@1
main::@1: scope:[main]  from main main::@5
  [6] (byte*) main::charset4#10 ← phi( main/(const byte*) CHARSET4#0 main::@5/(byte*) main::charset4#1 ) [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] )
  [6] (byte*) main::chargen#10 ← phi( main/(const byte*) CHARGEN#0 main::@5/(byte*) main::chargen#1 ) [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] )
  [7] (byte*) main::chargen1#0 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] )
  [8] (byte~) main::$1 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] )
  [9] (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] )
  [10] (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] )
  [11] (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] )
  [12] (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] )
  [13] (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] )
  [14] (byte) main::bits#0 ← *((const byte[]) bits_count#0 + (byte~) main::$6) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] )
  [15] if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] )
  to:main::@7
main::@7: scope:[main]  from main::@1
  [16] phi() [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@7
  [17] (byte) main::bits_gen#9 ← phi( main::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@7/(byte/signed byte/word/signed word/dword/signed dword) 0+(byte/signed byte/word/signed word/dword/signed dword) 1 ) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#9 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#9 ] )
  [18] (byte) main::bits_gen#1 ← (byte) main::bits_gen#9 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] )
  [19] (byte~) main::$11 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] )
  [20] (byte~) main::$12 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] )
  [21] (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] )
  [22] (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] )
  [23] (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] )
  [24] (byte) main::bits#1 ← *((const byte[]) bits_count#0 + (byte~) main::$15) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] )
  [25] if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] )
  to:main::@8
main::@8: scope:[main]  from main::@2
  [26] (byte) main::bits_gen#4 ← (byte) main::bits_gen#1 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] )
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@8
  [27] (byte) main::bits_gen#11 ← phi( main::@2/(byte) main::bits_gen#1 main::@8/(byte) main::bits_gen#4 ) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#11 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#11 ] )
  [28] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] )
  [29] (byte~) main::$20 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] )
  [30] (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] )
  [31] (byte~) main::$22 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] )
  [32] (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] )
  [33] (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] )
  [34] (byte) main::bits#2 ← *((const byte[]) bits_count#0 + (byte~) main::$24) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] )
  [35] if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] )
  to:main::@9
main::@9: scope:[main]  from main::@3
  [36] (byte) main::bits_gen#6 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] )
  to:main::@4
main::@4: scope:[main]  from main::@3 main::@9
  [37] (byte) main::bits_gen#13 ← phi( main::@3/(byte) main::bits_gen#14 main::@9/(byte) main::bits_gen#6 ) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#13 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#13 ] )
  [38] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] )
  [39] (byte~) main::$29 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] )
  [40] (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] )
  [41] (byte~) main::$31 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] )
  [42] (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] )
  [43] (byte) main::bits#3 ← *((const byte[]) bits_count#0 + (byte~) main::$32) [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] )
  [44] if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] )
  to:main::@10
main::@10: scope:[main]  from main::@4
  [45] (byte) main::bits_gen#8 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] )
  to:main::@5
main::@5: scope:[main]  from main::@10 main::@4
  [46] (byte) main::bits_gen#15 ← phi( main::@10/(byte) main::bits_gen#8 main::@4/(byte) main::bits_gen#16 ) [ main::chargen#10 main::charset4#10 main::bits_gen#15 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#15 ] )
  [47] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] )
  [48] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] )
  [49] (byte*) main::charset4#1 ← ++ (byte*) main::charset4#10 [ main::chargen#10 main::charset4#1 ] ( main:2 [ main::chargen#10 main::charset4#1 ] )
  [50] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] )
  [51] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048) goto main::@1 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] )
  to:main::@11
main::@11: scope:[main]  from main::@5
  [52] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] )
  asm { cli  }
  to:main::@6
main::@6: scope:[main]  from main::@11 main::@6
  [54] (byte) main::i#2 ← phi( main::@11/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(byte) main::i#1 ) [ main::i#2 ] ( main:2 [ main::i#2 ] )
  [55] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] )
  [56] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] )
  [57] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6 [ main::i#1 ] ( main:2 [ main::i#1 ] )
  to:main::@12
main::@12: scope:[main]  from main::@6
  [58] *((const byte*) D018#0) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( main:2 [ ] )
  to:main::@return
main::@return: scope:[main]  from main::@12
  [59] return  [ ] ( main:2 [ ] )
  to:@return

DOMINATORS
@begin dominated by  @begin 
@1 dominated by  @begin @1 
@end dominated by  @begin @end @1 
main dominated by  @begin main @1 
main::@1 dominated by  @begin main @1 main::@1 
main::@7 dominated by  main::@7 @begin main @1 main::@1 
main::@2 dominated by  @begin main @1 main::@1 main::@2 
main::@8 dominated by  @begin main::@8 main @1 main::@1 main::@2 
main::@3 dominated by  @begin main @1 main::@1 main::@2 main::@3 
main::@9 dominated by  main::@9 @begin main @1 main::@1 main::@2 main::@3 
main::@4 dominated by  @begin main @1 main::@1 main::@2 main::@3 main::@4 
main::@10 dominated by  @begin main::@10 main @1 main::@1 main::@2 main::@3 main::@4 
main::@5 dominated by  @begin main @1 main::@1 main::@2 main::@5 main::@3 main::@4 
main::@11 dominated by  main::@11 @begin main @1 main::@1 main::@2 main::@5 main::@3 main::@4 
main::@6 dominated by  main::@11 @begin main @1 main::@1 main::@2 main::@5 main::@6 main::@3 main::@4 
main::@12 dominated by  main::@11 @begin main main::@12 @1 main::@1 main::@2 main::@5 main::@6 main::@3 main::@4 
main::@return dominated by  main::@return main::@11 @begin main main::@12 @1 main::@1 main::@2 main::@5 main::@6 main::@3 main::@4 

NATURAL LOOPS
Found back edge: Loop head: main::@1 tails: main::@5 blocks: null
Found back edge: Loop head: main::@6 tails: main::@6 blocks: null
Populated: Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7 
Populated: Loop head: main::@6 tails: main::@6 blocks: main::@6 
Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7 
Loop head: main::@6 tails: main::@6 blocks: main::@6 

NATURAL LOOPS WITH DEPTH
Found 0 loops in scope []
Found 2 loops in scope [main]
  Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7 
  Loop head: main::@6 tails: main::@6 blocks: main::@6 
Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7  depth: 1
Loop head: main::@6 tails: main::@6 blocks: main::@6  depth: 1


VARIABLE REGISTER WEIGHTS
(byte*) CHARGEN
(byte*) CHARSET4
(byte*) D018
(byte*) PROCPORT
(byte*) SCREEN
(byte[]) bits_count
(void()) main()
(byte~) main::$1 7.333333333333333
(byte~) main::$11 7.333333333333333
(byte~) main::$12 22.0
(byte~) main::$13 22.0
(byte~) main::$14 22.0
(byte~) main::$15 22.0
(byte~) main::$2 22.0
(byte~) main::$20 22.0
(byte~) main::$21 7.333333333333333
(byte~) main::$22 22.0
(byte~) main::$23 22.0
(byte~) main::$24 22.0
(byte~) main::$29 22.0
(byte~) main::$3 22.0
(byte~) main::$30 11.0
(byte~) main::$31 22.0
(byte~) main::$32 22.0
(byte~) main::$4 22.0
(byte~) main::$5 22.0
(byte~) main::$6 22.0
(byte) main::bits
(byte) main::bits#0 22.0
(byte) main::bits#1 22.0
(byte) main::bits#2 22.0
(byte) main::bits#3 22.0
(byte) main::bits_gen
(byte) main::bits_gen#1 4.125
(byte) main::bits_gen#11 33.0
(byte) main::bits_gen#13 33.0
(byte) main::bits_gen#14 4.125
(byte) main::bits_gen#15 33.0
(byte) main::bits_gen#16 4.714285714285714
(byte) main::bits_gen#4 22.0
(byte) main::bits_gen#6 22.0
(byte) main::bits_gen#7 22.0
(byte) main::bits_gen#8 22.0
(byte) main::bits_gen#9 11.0
(byte*) main::chargen
(byte*) main::chargen#1 16.5
(byte*) main::chargen#10 1.75
(byte*) main::chargen1
(byte*) main::chargen1#0 1.6176470588235294
(byte*) main::charset4
(byte*) main::charset4#1 7.333333333333333
(byte*) main::charset4#10 0.7674418604651163
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 22.0

Initial phi equivalence classes
[ main::chargen#10 main::chargen#1 ]
[ main::charset4#10 main::charset4#1 ]
[ main::bits_gen#9 ]
[ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ]
[ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ]
[ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ]
[ main::i#2 main::i#1 ]
Added variable main::chargen1#0 to zero page equivalence class [ main::chargen1#0 ]
Added variable main::$1 to zero page equivalence class [ main::$1 ]
Added variable main::$2 to zero page equivalence class [ main::$2 ]
Added variable main::$3 to zero page equivalence class [ main::$3 ]
Added variable main::$4 to zero page equivalence class [ main::$4 ]
Added variable main::$5 to zero page equivalence class [ main::$5 ]
Added variable main::$6 to zero page equivalence class [ main::$6 ]
Added variable main::bits#0 to zero page equivalence class [ main::bits#0 ]
Added variable main::$11 to zero page equivalence class [ main::$11 ]
Added variable main::$12 to zero page equivalence class [ main::$12 ]
Added variable main::$13 to zero page equivalence class [ main::$13 ]
Added variable main::$14 to zero page equivalence class [ main::$14 ]
Added variable main::$15 to zero page equivalence class [ main::$15 ]
Added variable main::bits#1 to zero page equivalence class [ main::bits#1 ]
Added variable main::$20 to zero page equivalence class [ main::$20 ]
Added variable main::$21 to zero page equivalence class [ main::$21 ]
Added variable main::$22 to zero page equivalence class [ main::$22 ]
Added variable main::$23 to zero page equivalence class [ main::$23 ]
Added variable main::$24 to zero page equivalence class [ main::$24 ]
Added variable main::bits#2 to zero page equivalence class [ main::bits#2 ]
Added variable main::$29 to zero page equivalence class [ main::$29 ]
Added variable main::$30 to zero page equivalence class [ main::$30 ]
Added variable main::$31 to zero page equivalence class [ main::$31 ]
Added variable main::$32 to zero page equivalence class [ main::$32 ]
Added variable main::bits#3 to zero page equivalence class [ main::bits#3 ]
Added variable main::bits_gen#7 to zero page equivalence class [ main::bits_gen#7 ]
Complete equivalence classes
[ main::chargen#10 main::chargen#1 ]
[ main::charset4#10 main::charset4#1 ]
[ main::bits_gen#9 ]
[ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ]
[ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ]
[ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ]
[ main::i#2 main::i#1 ]
[ main::chargen1#0 ]
[ main::$1 ]
[ main::$2 ]
[ main::$3 ]
[ main::$4 ]
[ main::$5 ]
[ main::$6 ]
[ main::bits#0 ]
[ main::$11 ]
[ main::$12 ]
[ main::$13 ]
[ main::$14 ]
[ main::$15 ]
[ main::bits#1 ]
[ main::$20 ]
[ main::$21 ]
[ main::$22 ]
[ main::$23 ]
[ main::$24 ]
[ main::bits#2 ]
[ main::$29 ]
[ main::$30 ]
[ main::$31 ]
[ main::$32 ]
[ main::bits#3 ]
[ main::bits_gen#7 ]
Allocated zp ZP_WORD:2 [ main::chargen#10 main::chargen#1 ]
Allocated zp ZP_WORD:4 [ main::charset4#10 main::charset4#1 ]
Allocated zp ZP_BYTE:6 [ main::bits_gen#9 ]
Allocated zp ZP_BYTE:7 [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ]
Allocated zp ZP_BYTE:8 [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ]
Allocated zp ZP_BYTE:9 [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ]
Allocated zp ZP_BYTE:10 [ main::i#2 main::i#1 ]
Allocated zp ZP_WORD:11 [ main::chargen1#0 ]
Allocated zp ZP_BYTE:13 [ main::$1 ]
Allocated zp ZP_BYTE:14 [ main::$2 ]
Allocated zp ZP_BYTE:15 [ main::$3 ]
Allocated zp ZP_BYTE:16 [ main::$4 ]
Allocated zp ZP_BYTE:17 [ main::$5 ]
Allocated zp ZP_BYTE:18 [ main::$6 ]
Allocated zp ZP_BYTE:19 [ main::bits#0 ]
Allocated zp ZP_BYTE:20 [ main::$11 ]
Allocated zp ZP_BYTE:21 [ main::$12 ]
Allocated zp ZP_BYTE:22 [ main::$13 ]
Allocated zp ZP_BYTE:23 [ main::$14 ]
Allocated zp ZP_BYTE:24 [ main::$15 ]
Allocated zp ZP_BYTE:25 [ main::bits#1 ]
Allocated zp ZP_BYTE:26 [ main::$20 ]
Allocated zp ZP_BYTE:27 [ main::$21 ]
Allocated zp ZP_BYTE:28 [ main::$22 ]
Allocated zp ZP_BYTE:29 [ main::$23 ]
Allocated zp ZP_BYTE:30 [ main::$24 ]
Allocated zp ZP_BYTE:31 [ main::bits#2 ]
Allocated zp ZP_BYTE:32 [ main::$29 ]
Allocated zp ZP_BYTE:33 [ main::$30 ]
Allocated zp ZP_BYTE:34 [ main::$31 ]
Allocated zp ZP_BYTE:35 [ main::$32 ]
Allocated zp ZP_BYTE:36 [ main::bits#3 ]
Allocated zp ZP_BYTE:37 [ main::bits_gen#7 ]

INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
  .label CHARGEN = $d000
  .label PROCPORT = 1
  .label D018 = $d018
  .label CHARSET4 = $2800
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
//SEG4 @1
b1:
//SEG5 [2] call main param-assignment [ ] ( )
  jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
//SEG7 @end
bend:
//SEG8 main
main: {
    .label _1 = $d
    .label _2 = $e
    .label _3 = $f
    .label _4 = $10
    .label _5 = $11
    .label _6 = $12
    .label _11 = $14
    .label _12 = $15
    .label _13 = $16
    .label _14 = $17
    .label _15 = $18
    .label _20 = $1a
    .label _21 = $1b
    .label _22 = $1c
    .label _23 = $1d
    .label _24 = $1e
    .label _29 = $20
    .label _30 = $21
    .label _31 = $22
    .label _32 = $23
    .label chargen1 = $b
    .label bits = $13
    .label bits_gen = 7
    .label bits_1 = $19
    .label bits_2 = $1f
    .label bits_3 = $24
    .label bits_gen_6 = 8
    .label bits_gen_7 = $25
    .label charset4 = 4
    .label chargen = 2
    .label bits_gen_8 = 9
    .label i = $a
    .label bits_gen_9 = 6
    .label bits_gen_13 = 8
    .label bits_gen_14 = 8
    .label bits_gen_15 = 9
    .label bits_gen_16 = 9
  //SEG9 asm { sei  }
    sei
  //SEG10 [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG11 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG12 [6] phi (byte*) main::charset4#10 = (const byte*) CHARSET4#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<CHARSET4
    sta charset4
    lda #>CHARSET4
    sta charset4+1
  //SEG13 [6] phi (byte*) main::chargen#10 = (const byte*) CHARGEN#0 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<CHARGEN
    sta chargen
    lda #>CHARGEN
    sta chargen+1
    jmp b1
  //SEG14 [6] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
  //SEG15 [6] phi (byte*) main::charset4#10 = (byte*) main::charset4#1 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG16 [6] phi (byte*) main::chargen#10 = (byte*) main::chargen#1 [phi:main::@5->main::@1#1] -- register_copy 
    jmp b1
  //SEG17 main::@1
  b1:
  //SEG18 [7] (byte*) main::chargen1#0 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) -- pbuz1=pbuz2_plus_1 
    lda chargen
    clc
    adc #1
    sta chargen1
    lda chargen+1
    adc #0
    sta chargen1+1
  //SEG19 [8] (byte~) main::$1 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$60
    ldy #0
    and (chargen),y
    sta _1
  //SEG20 [9] (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$60
    ldy #0
    and (chargen1),y
    sta _2
  //SEG21 [10] (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] ) -- vbuz1=vbuz2_ror_2 
    lda _2
    lsr
    lsr
    sta _3
  //SEG22 [11] (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] ) -- vbuz1=vbuz2_bor_vbuz3 
    lda _1
    ora _3
    sta _4
  //SEG23 [12] (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] ) -- vbuz1=vbuz2_ror_1 
    lda _4
    lsr
    sta _5
  //SEG24 [13] (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] ) -- vbuz1=vbuz2_ror_2 
    lda _5
    lsr
    lsr
    sta _6
  //SEG25 [14] (byte) main::bits#0 ← *((const byte[]) bits_count#0 + (byte~) main::$6) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] ) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _6
    lda bits_count,y
    sta bits
  //SEG26 [15] if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) -- vbuz1_lt_vbuc1_then_la1 
    lda bits
    cmp #2
    bcc b2_from_b1
  //SEG27 [16] phi from main::@1 to main::@7 [phi:main::@1->main::@7]
  b7_from_b1:
    jmp b7
  //SEG28 main::@7
  b7:
  //SEG29 [17] phi from main::@7 to main::@2 [phi:main::@7->main::@2]
  b2_from_b7:
  //SEG30 [17] phi (byte) main::bits_gen#9 = (byte/signed byte/word/signed word/dword/signed dword) 0+(byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@7->main::@2#0] -- vbuz1=vbuc1 
    lda #0+1
    sta bits_gen_9
    jmp b2
  //SEG31 [17] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
  //SEG32 [17] phi (byte) main::bits_gen#9 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta bits_gen_9
    jmp b2
  //SEG33 main::@2
  b2:
  //SEG34 [18] (byte) main::bits_gen#1 ← (byte) main::bits_gen#9 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ) -- vbuz1=vbuz2_rol_1 
    lda bits_gen_9
    asl
    sta bits_gen
  //SEG35 [19] (byte~) main::$11 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$18
    ldy #0
    and (chargen),y
    sta _11
  //SEG36 [20] (byte~) main::$12 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$18
    ldy #0
    and (chargen1),y
    sta _12
  //SEG37 [21] (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] ) -- vbuz1=vbuz2_ror_2 
    lda _12
    lsr
    lsr
    sta _13
  //SEG38 [22] (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] ) -- vbuz1=vbuz2_bor_vbuz3 
    lda _11
    ora _13
    sta _14
  //SEG39 [23] (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] ) -- vbuz1=vbuz2_ror_1 
    lda _14
    lsr
    sta _15
  //SEG40 [24] (byte) main::bits#1 ← *((const byte[]) bits_count#0 + (byte~) main::$15) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] ) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _15
    lda bits_count,y
    sta bits_1
  //SEG41 [25] if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ) -- vbuz1_lt_vbuc1_then_la1 
    lda bits_1
    cmp #2
    bcc b3_from_b2
    jmp b8
  //SEG42 main::@8
  b8:
  //SEG43 [26] (byte) main::bits_gen#4 ← (byte) main::bits_gen#1 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] ) -- vbuz1=vbuz1_plus_1 
    inc bits_gen
  //SEG44 [27] phi from main::@2 main::@8 to main::@3 [phi:main::@2/main::@8->main::@3]
  b3_from_b2:
  b3_from_b8:
  //SEG45 [27] phi (byte) main::bits_gen#11 = (byte) main::bits_gen#1 [phi:main::@2/main::@8->main::@3#0] -- register_copy 
    jmp b3
  //SEG46 main::@3
  b3:
  //SEG47 [28] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) -- vbuz1=vbuz2_rol_1 
    lda bits_gen
    asl
    sta bits_gen_14
  //SEG48 [29] (byte~) main::$20 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #6
    ldy #0
    and (chargen),y
    sta _20
  //SEG49 [30] (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] ) -- vbuz1=vbuz2_rol_1 
    lda _20
    asl
    sta _21
  //SEG50 [31] (byte~) main::$22 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #6
    ldy #0
    and (chargen1),y
    sta _22
  //SEG51 [32] (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] ) -- vbuz1=vbuz2_ror_1 
    lda _22
    lsr
    sta _23
  //SEG52 [33] (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] ) -- vbuz1=vbuz2_bor_vbuz3 
    lda _21
    ora _23
    sta _24
  //SEG53 [34] (byte) main::bits#2 ← *((const byte[]) bits_count#0 + (byte~) main::$24) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] ) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _24
    lda bits_count,y
    sta bits_2
  //SEG54 [35] if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) -- vbuz1_lt_vbuc1_then_la1 
    lda bits_2
    cmp #2
    bcc b4_from_b3
    jmp b9
  //SEG55 main::@9
  b9:
  //SEG56 [36] (byte) main::bits_gen#6 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] ) -- vbuz1=vbuz1_plus_1 
    inc bits_gen_6
  //SEG57 [37] phi from main::@3 main::@9 to main::@4 [phi:main::@3/main::@9->main::@4]
  b4_from_b3:
  b4_from_b9:
  //SEG58 [37] phi (byte) main::bits_gen#13 = (byte) main::bits_gen#14 [phi:main::@3/main::@9->main::@4#0] -- register_copy 
    jmp b4
  //SEG59 main::@4
  b4:
  //SEG60 [38] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ) -- vbuz1=vbuz2_rol_1 
    lda bits_gen_13
    asl
    sta bits_gen_16
  //SEG61 [39] (byte~) main::$29 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #1
    ldy #0
    and (chargen),y
    sta _29
  //SEG62 [40] (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] ) -- vbuz1=vbuz2_rol_2 
    lda _29
    asl
    asl
    sta _30
  //SEG63 [41] (byte~) main::$31 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #1
    ldy #0
    and (chargen1),y
    sta _31
  //SEG64 [42] (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] ) -- vbuz1=vbuz2_bor_vbuz3 
    lda _30
    ora _31
    sta _32
  //SEG65 [43] (byte) main::bits#3 ← *((const byte[]) bits_count#0 + (byte~) main::$32) [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] ) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _32
    lda bits_count,y
    sta bits_3
  //SEG66 [44] if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] ) -- vbuz1_lt_vbuc1_then_la1 
    lda bits_3
    cmp #2
    bcc b5_from_b4
    jmp b10
  //SEG67 main::@10
  b10:
  //SEG68 [45] (byte) main::bits_gen#8 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] ) -- vbuz1=vbuz1_plus_1 
    inc bits_gen_8
  //SEG69 [46] phi from main::@10 main::@4 to main::@5 [phi:main::@10/main::@4->main::@5]
  b5_from_b10:
  b5_from_b4:
  //SEG70 [46] phi (byte) main::bits_gen#15 = (byte) main::bits_gen#8 [phi:main::@10/main::@4->main::@5#0] -- register_copy 
    jmp b5
  //SEG71 main::@5
  b5:
  //SEG72 [47] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ) -- vbuz1=vbuz2_rol_1 
    lda bits_gen_15
    asl
    sta bits_gen_7
  //SEG73 [48] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] ) -- _deref_pbuz1=vbuz2 
    lda bits_gen_7
    ldy #0
    sta (charset4),y
  //SEG74 [49] (byte*) main::charset4#1 ← ++ (byte*) main::charset4#10 [ main::chargen#10 main::charset4#1 ] ( main:2 [ main::chargen#10 main::charset4#1 ] ) -- pbuz1=_inc_pbuz1 
    inc charset4
    bne !+
    inc charset4+1
  !:
  //SEG75 [50] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) -- pbuz1=pbuz1_plus_vbuc1 
    lda chargen
    clc
    adc #2
    sta chargen
    bcc !+
    inc chargen+1
  !:
  //SEG76 [51] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048) goto main::@1 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) -- pbuz1_lt_pbuc1_then_la1 
    lda chargen+1
    cmp #>CHARGEN+$800
    bcc b1_from_b5
    bne !+
    lda chargen
    cmp #<CHARGEN+$800
    bcc b1_from_b5
  !:
    jmp b11
  //SEG77 main::@11
  b11:
  //SEG78 [52] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG79 asm { cli  }
    cli
  //SEG80 [54] phi from main::@11 to main::@6 [phi:main::@11->main::@6]
  b6_from_b11:
  //SEG81 [54] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@11->main::@6#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b6
  //SEG82 [54] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
  b6_from_b6:
  //SEG83 [54] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@6->main::@6#0] -- register_copy 
    jmp b6
  //SEG84 main::@6
  b6:
  //SEG85 [55] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuz1=vbuz1 
    ldy i
    tya
    sta SCREEN,y
  //SEG86 [56] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuz1=_inc_vbuz1 
    inc i
  //SEG87 [57] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuz1_neq_0_then_la1 
    lda i
    bne b6_from_b6
    jmp b12
  //SEG88 main::@12
  b12:
  //SEG89 [58] *((const byte*) D018#0) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$19
    sta D018
    jmp breturn
  //SEG90 main::@return
  breturn:
  //SEG91 [59] return  [ ] ( main:2 [ ] )
    rts
}
  bits_count: .byte 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4

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 [7] (byte*) main::chargen1#0 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) always clobbers reg byte a 
Statement [8] (byte~) main::$1 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ) always clobbers reg byte a reg byte y 
Statement [9] (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ main::$1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ main::$1 ]
Statement [19] (byte~) main::$11 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:7 [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ]
Statement [20] (byte~) main::$12 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ main::$11 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:20 [ main::$11 ]
Statement [28] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) always clobbers reg byte a 
Statement [29] (byte~) main::$20 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:8 [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ]
Statement [31] (byte~) main::$22 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ main::$21 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ main::$21 ]
Statement [38] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ) always clobbers reg byte a 
Statement [39] (byte~) main::$29 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:9 [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ]
Statement [41] (byte~) main::$31 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ main::$30 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:33 [ main::$30 ]
Statement [47] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ) always clobbers reg byte a 
Statement [48] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] ) always clobbers reg byte y 
Statement [50] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) always clobbers reg byte a 
Statement [51] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048) goto main::@1 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) always clobbers reg byte a 
Statement [52] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [58] *((const byte*) D018#0) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( 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::chargen1#0 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) always clobbers reg byte a 
Statement [8] (byte~) main::$1 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ) always clobbers reg byte a reg byte y 
Statement [9] (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ) always clobbers reg byte a reg byte y 
Statement [19] (byte~) main::$11 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ) always clobbers reg byte a reg byte y 
Statement [20] (byte~) main::$12 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ) always clobbers reg byte a reg byte y 
Statement [28] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) always clobbers reg byte a 
Statement [29] (byte~) main::$20 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ) always clobbers reg byte a reg byte y 
Statement [31] (byte~) main::$22 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ) always clobbers reg byte a reg byte y 
Statement [38] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ) always clobbers reg byte a 
Statement [39] (byte~) main::$29 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ) always clobbers reg byte a reg byte y 
Statement [41] (byte~) main::$31 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ) always clobbers reg byte a reg byte y 
Statement [47] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ) always clobbers reg byte a 
Statement [48] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] ) always clobbers reg byte y 
Statement [50] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) always clobbers reg byte a 
Statement [51] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048) goto main::@1 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) always clobbers reg byte a 
Statement [52] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [58] *((const byte*) D018#0) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Potential registers zp ZP_WORD:2 [ main::chargen#10 main::chargen#1 ] : zp ZP_WORD:2 , 
Potential registers zp ZP_WORD:4 [ main::charset4#10 main::charset4#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_BYTE:6 [ main::bits_gen#9 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:7 [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ] : zp ZP_BYTE:7 , reg byte x , 
Potential registers zp ZP_BYTE:8 [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ] : zp ZP_BYTE:8 , reg byte x , 
Potential registers zp ZP_BYTE:9 [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ] : zp ZP_BYTE:9 , reg byte x , 
Potential registers zp ZP_BYTE:10 [ main::i#2 main::i#1 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:11 [ main::chargen1#0 ] : zp ZP_WORD:11 , 
Potential registers zp ZP_BYTE:13 [ main::$1 ] : zp ZP_BYTE:13 , reg byte x , 
Potential registers zp ZP_BYTE:14 [ main::$2 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:15 [ main::$3 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:16 [ main::$4 ] : zp ZP_BYTE:16 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:17 [ main::$5 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:18 [ main::$6 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:19 [ main::bits#0 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ main::$11 ] : zp ZP_BYTE:20 , reg byte x , 
Potential registers zp ZP_BYTE:21 [ main::$12 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:22 [ main::$13 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:23 [ main::$14 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:24 [ main::$15 ] : zp ZP_BYTE:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:25 [ main::bits#1 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:26 [ main::$20 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:27 [ main::$21 ] : zp ZP_BYTE:27 , reg byte x , 
Potential registers zp ZP_BYTE:28 [ main::$22 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:29 [ main::$23 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:30 [ main::$24 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:31 [ main::bits#2 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:32 [ main::$29 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:33 [ main::$30 ] : zp ZP_BYTE:33 , reg byte x , 
Potential registers zp ZP_BYTE:34 [ main::$31 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:35 [ main::$32 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:36 [ main::bits#3 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:37 [ main::bits_gen#7 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 59.71: zp ZP_BYTE:9 [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ] 59.12: zp ZP_BYTE:7 [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ] 59.12: zp ZP_BYTE:8 [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ] 38.5: zp ZP_BYTE:10 [ main::i#2 main::i#1 ] 22: zp ZP_BYTE:14 [ main::$2 ] 22: zp ZP_BYTE:15 [ main::$3 ] 22: zp ZP_BYTE:16 [ main::$4 ] 22: zp ZP_BYTE:17 [ main::$5 ] 22: zp ZP_BYTE:18 [ main::$6 ] 22: zp ZP_BYTE:19 [ main::bits#0 ] 22: zp ZP_BYTE:21 [ main::$12 ] 22: zp ZP_BYTE:22 [ main::$13 ] 22: zp ZP_BYTE:23 [ main::$14 ] 22: zp ZP_BYTE:24 [ main::$15 ] 22: zp ZP_BYTE:25 [ main::bits#1 ] 22: zp ZP_BYTE:26 [ main::$20 ] 22: zp ZP_BYTE:28 [ main::$22 ] 22: zp ZP_BYTE:29 [ main::$23 ] 22: zp ZP_BYTE:30 [ main::$24 ] 22: zp ZP_BYTE:31 [ main::bits#2 ] 22: zp ZP_BYTE:32 [ main::$29 ] 22: zp ZP_BYTE:34 [ main::$31 ] 22: zp ZP_BYTE:35 [ main::$32 ] 22: zp ZP_BYTE:36 [ main::bits#3 ] 22: zp ZP_BYTE:37 [ main::bits_gen#7 ] 18.25: zp ZP_WORD:2 [ main::chargen#10 main::chargen#1 ] 11: zp ZP_BYTE:6 [ main::bits_gen#9 ] 11: zp ZP_BYTE:33 [ main::$30 ] 8.1: zp ZP_WORD:4 [ main::charset4#10 main::charset4#1 ] 7.33: zp ZP_BYTE:13 [ main::$1 ] 7.33: zp ZP_BYTE:20 [ main::$11 ] 7.33: zp ZP_BYTE:27 [ main::$21 ] 1.62: zp ZP_WORD:11 [ main::chargen1#0 ] 
Uplift Scope [] 

Uplifting [] best 5083 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:9 [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ]
Uplifting [main] best 5033 combination reg byte x [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ]
Uplifting [main] best 4983 combination reg byte x [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ]
Uplifting [main] best 4933 combination reg byte x [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:10 [ main::i#2 main::i#1 ]
Uplifting [main] best 4833 combination reg byte x [ main::i#2 main::i#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ main::$2 ]
Uplifting [main] best 4773 combination reg byte a [ main::$2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:15 [ main::$3 ]
Uplifting [main] best 4713 combination reg byte a [ main::$3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:16 [ main::$4 ]
Uplifting [main] best 4653 combination reg byte a [ main::$4 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:17 [ main::$5 ]
Uplifting [main] best 4593 combination reg byte a [ main::$5 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ main::$6 ]
Uplifting [main] best 4553 combination reg byte a [ main::$6 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:19 [ main::bits#0 ]
Uplifting [main] best 4493 combination reg byte a [ main::bits#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ main::$12 ]
Uplifting [main] best 4433 combination reg byte a [ main::$12 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:22 [ main::$13 ]
Uplifting [main] best 4373 combination reg byte a [ main::$13 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:23 [ main::$14 ]
Uplifting [main] best 4313 combination reg byte a [ main::$14 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:24 [ main::$15 ]
Uplifting [main] best 4273 combination reg byte a [ main::$15 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ main::bits#1 ]
Uplifting [main] best 4213 combination reg byte a [ main::bits#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ main::$20 ]
Uplifting [main] best 4153 combination reg byte a [ main::$20 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:28 [ main::$22 ]
Uplifting [main] best 4093 combination reg byte a [ main::$22 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:29 [ main::$23 ]
Uplifting [main] best 4033 combination reg byte a [ main::$23 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:30 [ main::$24 ]
Uplifting [main] best 3993 combination reg byte a [ main::$24 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ main::bits#2 ]
Uplifting [main] best 3933 combination reg byte a [ main::bits#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:32 [ main::$29 ]
Uplifting [main] best 3873 combination reg byte a [ main::$29 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:34 [ main::$31 ]
Uplifting [main] best 3813 combination reg byte a [ main::$31 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:35 [ main::$32 ]
Uplifting [main] best 3773 combination reg byte a [ main::$32 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:36 [ main::bits#3 ]
Uplifting [main] best 3713 combination reg byte a [ main::bits#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:37 [ main::bits_gen#7 ]
Uplifting [main] best 3653 combination reg byte a [ main::bits_gen#7 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ main::bits_gen#9 ]
Uplifting [main] best 3563 combination reg byte a [ main::bits_gen#9 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:33 [ main::$30 ]
Uplifting [main] best 3563 combination zp ZP_BYTE:33 [ main::$30 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ main::$1 ]
Uplifting [main] best 3563 combination zp ZP_BYTE:13 [ main::$1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ main::$11 ]
Uplifting [main] best 3563 combination zp ZP_BYTE:20 [ main::$11 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ main::$21 ]
Uplifting [main] best 3563 combination zp ZP_BYTE:27 [ main::$21 ] 
Allocated (was zp ZP_WORD:11) zp ZP_WORD:6 [ main::chargen1#0 ]
Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:8 [ main::$1 ]
Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:9 [ main::$11 ]
Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:10 [ main::$21 ]
Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:11 [ main::$30 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
  .label CHARGEN = $d000
  .label PROCPORT = 1
  .label D018 = $d018
  .label CHARSET4 = $2800
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
//SEG4 @1
b1:
//SEG5 [2] call main param-assignment [ ] ( )
  jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
//SEG7 @end
bend:
//SEG8 main
main: {
    .label _1 = 8
    .label _11 = 9
    .label _21 = $a
    .label _30 = $b
    .label chargen1 = 6
    .label charset4 = 4
    .label chargen = 2
  //SEG9 asm { sei  }
    sei
  //SEG10 [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG11 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG12 [6] phi (byte*) main::charset4#10 = (const byte*) CHARSET4#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<CHARSET4
    sta charset4
    lda #>CHARSET4
    sta charset4+1
  //SEG13 [6] phi (byte*) main::chargen#10 = (const byte*) CHARGEN#0 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<CHARGEN
    sta chargen
    lda #>CHARGEN
    sta chargen+1
    jmp b1
  //SEG14 [6] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
  //SEG15 [6] phi (byte*) main::charset4#10 = (byte*) main::charset4#1 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG16 [6] phi (byte*) main::chargen#10 = (byte*) main::chargen#1 [phi:main::@5->main::@1#1] -- register_copy 
    jmp b1
  //SEG17 main::@1
  b1:
  //SEG18 [7] (byte*) main::chargen1#0 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) -- pbuz1=pbuz2_plus_1 
    lda chargen
    clc
    adc #1
    sta chargen1
    lda chargen+1
    adc #0
    sta chargen1+1
  //SEG19 [8] (byte~) main::$1 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$60
    ldy #0
    and (chargen),y
    sta _1
  //SEG20 [9] (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #$60
    ldy #0
    and (chargen1),y
  //SEG21 [10] (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] ) -- vbuaa=vbuaa_ror_2 
    lsr
    lsr
  //SEG22 [11] (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _1
  //SEG23 [12] (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] ) -- vbuaa=vbuaa_ror_1 
    lsr
  //SEG24 [13] (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] ) -- vbuaa=vbuaa_ror_2 
    lsr
    lsr
  //SEG25 [14] (byte) main::bits#0 ← *((const byte[]) bits_count#0 + (byte~) main::$6) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG26 [15] if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b2_from_b1
  //SEG27 [16] phi from main::@1 to main::@7 [phi:main::@1->main::@7]
  b7_from_b1:
    jmp b7
  //SEG28 main::@7
  b7:
  //SEG29 [17] phi from main::@7 to main::@2 [phi:main::@7->main::@2]
  b2_from_b7:
  //SEG30 [17] phi (byte) main::bits_gen#9 = (byte/signed byte/word/signed word/dword/signed dword) 0+(byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@7->main::@2#0] -- vbuaa=vbuc1 
    lda #0+1
    jmp b2
  //SEG31 [17] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
  //SEG32 [17] phi (byte) main::bits_gen#9 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#0] -- vbuaa=vbuc1 
    lda #0
    jmp b2
  //SEG33 main::@2
  b2:
  //SEG34 [18] (byte) main::bits_gen#1 ← (byte) main::bits_gen#9 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ) -- vbuxx=vbuaa_rol_1 
    asl
    tax
  //SEG35 [19] (byte~) main::$11 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$18
    ldy #0
    and (chargen),y
    sta _11
  //SEG36 [20] (byte~) main::$12 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #$18
    ldy #0
    and (chargen1),y
  //SEG37 [21] (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] ) -- vbuaa=vbuaa_ror_2 
    lsr
    lsr
  //SEG38 [22] (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _11
  //SEG39 [23] (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] ) -- vbuaa=vbuaa_ror_1 
    lsr
  //SEG40 [24] (byte) main::bits#1 ← *((const byte[]) bits_count#0 + (byte~) main::$15) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG41 [25] if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b3_from_b2
    jmp b8
  //SEG42 main::@8
  b8:
  //SEG43 [26] (byte) main::bits_gen#4 ← (byte) main::bits_gen#1 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] ) -- vbuxx=vbuxx_plus_1 
    inx
  //SEG44 [27] phi from main::@2 main::@8 to main::@3 [phi:main::@2/main::@8->main::@3]
  b3_from_b2:
  b3_from_b8:
  //SEG45 [27] phi (byte) main::bits_gen#11 = (byte) main::bits_gen#1 [phi:main::@2/main::@8->main::@3#0] -- register_copy 
    jmp b3
  //SEG46 main::@3
  b3:
  //SEG47 [28] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) -- vbuxx=vbuxx_rol_1 
    txa
    asl
    tax
  //SEG48 [29] (byte~) main::$20 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #6
    ldy #0
    and (chargen),y
  //SEG49 [30] (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] ) -- vbuz1=vbuaa_rol_1 
    asl
    sta _21
  //SEG50 [31] (byte~) main::$22 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #6
    ldy #0
    and (chargen1),y
  //SEG51 [32] (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] ) -- vbuaa=vbuaa_ror_1 
    lsr
  //SEG52 [33] (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _21
  //SEG53 [34] (byte) main::bits#2 ← *((const byte[]) bits_count#0 + (byte~) main::$24) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG54 [35] if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b4_from_b3
    jmp b9
  //SEG55 main::@9
  b9:
  //SEG56 [36] (byte) main::bits_gen#6 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] ) -- vbuxx=vbuxx_plus_1 
    inx
  //SEG57 [37] phi from main::@3 main::@9 to main::@4 [phi:main::@3/main::@9->main::@4]
  b4_from_b3:
  b4_from_b9:
  //SEG58 [37] phi (byte) main::bits_gen#13 = (byte) main::bits_gen#14 [phi:main::@3/main::@9->main::@4#0] -- register_copy 
    jmp b4
  //SEG59 main::@4
  b4:
  //SEG60 [38] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ) -- vbuxx=vbuxx_rol_1 
    txa
    asl
    tax
  //SEG61 [39] (byte~) main::$29 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #1
    ldy #0
    and (chargen),y
  //SEG62 [40] (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] ) -- vbuz1=vbuaa_rol_2 
    asl
    asl
    sta _30
  //SEG63 [41] (byte~) main::$31 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #1
    ldy #0
    and (chargen1),y
  //SEG64 [42] (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _30
  //SEG65 [43] (byte) main::bits#3 ← *((const byte[]) bits_count#0 + (byte~) main::$32) [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG66 [44] if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b5_from_b4
    jmp b10
  //SEG67 main::@10
  b10:
  //SEG68 [45] (byte) main::bits_gen#8 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] ) -- vbuxx=vbuxx_plus_1 
    inx
  //SEG69 [46] phi from main::@10 main::@4 to main::@5 [phi:main::@10/main::@4->main::@5]
  b5_from_b10:
  b5_from_b4:
  //SEG70 [46] phi (byte) main::bits_gen#15 = (byte) main::bits_gen#8 [phi:main::@10/main::@4->main::@5#0] -- register_copy 
    jmp b5
  //SEG71 main::@5
  b5:
  //SEG72 [47] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ) -- vbuaa=vbuxx_rol_1 
    txa
    asl
  //SEG73 [48] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] ) -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (charset4),y
  //SEG74 [49] (byte*) main::charset4#1 ← ++ (byte*) main::charset4#10 [ main::chargen#10 main::charset4#1 ] ( main:2 [ main::chargen#10 main::charset4#1 ] ) -- pbuz1=_inc_pbuz1 
    inc charset4
    bne !+
    inc charset4+1
  !:
  //SEG75 [50] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) -- pbuz1=pbuz1_plus_vbuc1 
    lda chargen
    clc
    adc #2
    sta chargen
    bcc !+
    inc chargen+1
  !:
  //SEG76 [51] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048) goto main::@1 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) -- pbuz1_lt_pbuc1_then_la1 
    lda chargen+1
    cmp #>CHARGEN+$800
    bcc b1_from_b5
    bne !+
    lda chargen
    cmp #<CHARGEN+$800
    bcc b1_from_b5
  !:
    jmp b11
  //SEG77 main::@11
  b11:
  //SEG78 [52] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG79 asm { cli  }
    cli
  //SEG80 [54] phi from main::@11 to main::@6 [phi:main::@11->main::@6]
  b6_from_b11:
  //SEG81 [54] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@11->main::@6#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b6
  //SEG82 [54] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
  b6_from_b6:
  //SEG83 [54] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@6->main::@6#0] -- register_copy 
    jmp b6
  //SEG84 main::@6
  b6:
  //SEG85 [55] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN,x
  //SEG86 [56] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG87 [57] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b6_from_b6
    jmp b12
  //SEG88 main::@12
  b12:
  //SEG89 [58] *((const byte*) D018#0) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$19
    sta D018
    jmp breturn
  //SEG90 main::@return
  breturn:
  //SEG91 [59] return  [ ] ( main:2 [ ] )
    rts
}
  bits_count: .byte 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b7
Removing instruction jmp b2
Removing instruction jmp b8
Removing instruction jmp b3
Removing instruction jmp b9
Removing instruction jmp b4
Removing instruction jmp b10
Removing instruction jmp b5
Removing instruction jmp b11
Removing instruction jmp b6
Removing instruction jmp b12
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction ldy #0
Removing instruction ldy #0
Removing instruction ldy #0
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b3_from_b2 with b3
Replacing label b4_from_b3 with b4
Replacing label b5_from_b4 with b5
Replacing label b1_from_b5 with b1
Replacing label b1_from_b5 with b1
Replacing label b6_from_b6 with b6
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction bend_from_b1:
Removing instruction b1_from_b5:
Removing instruction b7_from_b1:
Removing instruction b2_from_b7:
Removing instruction b3_from_b2:
Removing instruction b3_from_b8:
Removing instruction b4_from_b3:
Removing instruction b4_from_b9:
Removing instruction b5_from_b10:
Removing instruction b5_from_b4:
Removing instruction b6_from_b6:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b7:
Removing instruction b8:
Removing instruction b9:
Removing instruction b10:
Removing instruction b11:
Removing instruction b6_from_b11:
Removing instruction b12:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Relabelling long label b2_from_b1 to b7
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Removing instruction jmp b6
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) CHARGEN
(const byte*) CHARGEN#0 CHARGEN = ((byte*))(word/dword/signed dword) 53248
(byte*) CHARSET4
(const byte*) CHARSET4#0 CHARSET4 = ((byte*))(word/signed word/dword/signed dword) 10240
(byte*) D018
(const byte*) D018#0 D018 = ((byte*))(word/dword/signed dword) 53272
(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
(byte[]) bits_count
(const byte[]) bits_count#0 bits_count = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4 }
(void()) main()
(byte~) main::$1 $1 zp ZP_BYTE:8 7.333333333333333
(byte~) main::$11 $11 zp ZP_BYTE:9 7.333333333333333
(byte~) main::$12 reg byte a 22.0
(byte~) main::$13 reg byte a 22.0
(byte~) main::$14 reg byte a 22.0
(byte~) main::$15 reg byte a 22.0
(byte~) main::$2 reg byte a 22.0
(byte~) main::$20 reg byte a 22.0
(byte~) main::$21 $21 zp ZP_BYTE:10 7.333333333333333
(byte~) main::$22 reg byte a 22.0
(byte~) main::$23 reg byte a 22.0
(byte~) main::$24 reg byte a 22.0
(byte~) main::$29 reg byte a 22.0
(byte~) main::$3 reg byte a 22.0
(byte~) main::$30 $30 zp ZP_BYTE:11 11.0
(byte~) main::$31 reg byte a 22.0
(byte~) main::$32 reg byte a 22.0
(byte~) main::$4 reg byte a 22.0
(byte~) main::$5 reg byte a 22.0
(byte~) main::$6 reg byte a 22.0
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::bits
(byte) main::bits#0 reg byte a 22.0
(byte) main::bits#1 reg byte a 22.0
(byte) main::bits#2 reg byte a 22.0
(byte) main::bits#3 reg byte a 22.0
(byte) main::bits_gen
(byte) main::bits_gen#1 reg byte x 4.125
(byte) main::bits_gen#11 reg byte x 33.0
(byte) main::bits_gen#13 reg byte x 33.0
(byte) main::bits_gen#14 reg byte x 4.125
(byte) main::bits_gen#15 reg byte x 33.0
(byte) main::bits_gen#16 reg byte x 4.714285714285714
(byte) main::bits_gen#4 reg byte x 22.0
(byte) main::bits_gen#6 reg byte x 22.0
(byte) main::bits_gen#7 reg byte a 22.0
(byte) main::bits_gen#8 reg byte x 22.0
(byte) main::bits_gen#9 reg byte a 11.0
(byte*) main::chargen
(byte*) main::chargen#1 chargen zp ZP_WORD:2 16.5
(byte*) main::chargen#10 chargen zp ZP_WORD:2 1.75
(byte*) main::chargen1
(byte*) main::chargen1#0 chargen1 zp ZP_WORD:6 1.6176470588235294
(byte*) main::charset4
(byte*) main::charset4#1 charset4 zp ZP_WORD:4 7.333333333333333
(byte*) main::charset4#10 charset4 zp ZP_WORD:4 0.7674418604651163
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 22.0

zp ZP_WORD:2 [ main::chargen#10 main::chargen#1 ]
zp ZP_WORD:4 [ main::charset4#10 main::charset4#1 ]
reg byte a [ main::bits_gen#9 ]
reg byte x [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 ]
reg byte x [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ]
reg byte x [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ]
reg byte x [ main::i#2 main::i#1 ]
zp ZP_WORD:6 [ main::chargen1#0 ]
zp ZP_BYTE:8 [ main::$1 ]
reg byte a [ main::$2 ]
reg byte a [ main::$3 ]
reg byte a [ main::$4 ]
reg byte a [ main::$5 ]
reg byte a [ main::$6 ]
reg byte a [ main::bits#0 ]
zp ZP_BYTE:9 [ main::$11 ]
reg byte a [ main::$12 ]
reg byte a [ main::$13 ]
reg byte a [ main::$14 ]
reg byte a [ main::$15 ]
reg byte a [ main::bits#1 ]
reg byte a [ main::$20 ]
zp ZP_BYTE:10 [ main::$21 ]
reg byte a [ main::$22 ]
reg byte a [ main::$23 ]
reg byte a [ main::$24 ]
reg byte a [ main::bits#2 ]
reg byte a [ main::$29 ]
zp ZP_BYTE:11 [ main::$30 ]
reg byte a [ main::$31 ]
reg byte a [ main::$32 ]
reg byte a [ main::bits#3 ]
reg byte a [ main::bits_gen#7 ]


FINAL ASSEMBLER
Score: 3054

//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
  .label CHARGEN = $d000
  .label PROCPORT = 1
  .label D018 = $d018
  .label CHARSET4 = $2800
//SEG2 @begin
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main param-assignment [ ] ( )
  jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main
main: {
    .label _1 = 8
    .label _11 = 9
    .label _21 = $a
    .label _30 = $b
    .label chargen1 = 6
    .label charset4 = 4
    .label chargen = 2
  //SEG9 asm { sei  }
    sei
  //SEG10 [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG11 [6] phi from main to main::@1 [phi:main->main::@1]
  //SEG12 [6] phi (byte*) main::charset4#10 = (const byte*) CHARSET4#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<CHARSET4
    sta charset4
    lda #>CHARSET4
    sta charset4+1
  //SEG13 [6] phi (byte*) main::chargen#10 = (const byte*) CHARGEN#0 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<CHARGEN
    sta chargen
    lda #>CHARGEN
    sta chargen+1
  //SEG14 [6] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  //SEG15 [6] phi (byte*) main::charset4#10 = (byte*) main::charset4#1 [phi:main::@5->main::@1#0] -- register_copy 
  //SEG16 [6] phi (byte*) main::chargen#10 = (byte*) main::chargen#1 [phi:main::@5->main::@1#1] -- register_copy 
  //SEG17 main::@1
  b1:
  //SEG18 [7] (byte*) main::chargen1#0 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) -- pbuz1=pbuz2_plus_1 
    lda chargen
    clc
    adc #1
    sta chargen1
    lda chargen+1
    adc #0
    sta chargen1+1
  //SEG19 [8] (byte~) main::$1 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$60
    ldy #0
    and (chargen),y
    sta _1
  //SEG20 [9] (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$2 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #$60
    and (chargen1),y
  //SEG21 [10] (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 main::$3 ] ) -- vbuaa=vbuaa_ror_2 
    lsr
    lsr
  //SEG22 [11] (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$4 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _1
  //SEG23 [12] (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$5 ] ) -- vbuaa=vbuaa_ror_1 
    lsr
  //SEG24 [13] (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ] ) -- vbuaa=vbuaa_ror_2 
    lsr
    lsr
  //SEG25 [14] (byte) main::bits#0 ← *((const byte[]) bits_count#0 + (byte~) main::$6) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG26 [15] if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b7
  //SEG27 [16] phi from main::@1 to main::@7 [phi:main::@1->main::@7]
  //SEG28 main::@7
  //SEG29 [17] phi from main::@7 to main::@2 [phi:main::@7->main::@2]
  //SEG30 [17] phi (byte) main::bits_gen#9 = (byte/signed byte/word/signed word/dword/signed dword) 0+(byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@7->main::@2#0] -- vbuaa=vbuc1 
    lda #0+1
    jmp b2
  //SEG31 [17] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b7:
  //SEG32 [17] phi (byte) main::bits_gen#9 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#0] -- vbuaa=vbuc1 
    lda #0
  //SEG33 main::@2
  b2:
  //SEG34 [18] (byte) main::bits_gen#1 ← (byte) main::bits_gen#9 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ) -- vbuxx=vbuaa_rol_1 
    asl
    tax
  //SEG35 [19] (byte~) main::$11 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 ] ) -- vbuz1=_deref_pbuz2_band_vbuc1 
    lda #$18
    ldy #0
    and (chargen),y
    sta _11
  //SEG36 [20] (byte~) main::$12 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$12 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #$18
    and (chargen1),y
  //SEG37 [21] (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$11 main::$13 ] ) -- vbuaa=vbuaa_ror_2 
    lsr
    lsr
  //SEG38 [22] (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _11
  //SEG39 [23] (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ] ) -- vbuaa=vbuaa_ror_1 
    lsr
  //SEG40 [24] (byte) main::bits#1 ← *((const byte[]) bits_count#0 + (byte~) main::$15) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG41 [25] if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b3
  //SEG42 main::@8
  //SEG43 [26] (byte) main::bits_gen#4 ← (byte) main::bits_gen#1 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ] ) -- vbuxx=vbuxx_plus_1 
    inx
  //SEG44 [27] phi from main::@2 main::@8 to main::@3 [phi:main::@2/main::@8->main::@3]
  //SEG45 [27] phi (byte) main::bits_gen#11 = (byte) main::bits_gen#1 [phi:main::@2/main::@8->main::@3#0] -- register_copy 
  //SEG46 main::@3
  b3:
  //SEG47 [28] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) -- vbuxx=vbuxx_rol_1 
    txa
    asl
    tax
  //SEG48 [29] (byte~) main::$20 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$20 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #6
    ldy #0
    and (chargen),y
  //SEG49 [30] (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 ] ) -- vbuz1=vbuaa_rol_1 
    asl
    sta _21
  //SEG50 [31] (byte~) main::$22 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$22 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #6
    and (chargen1),y
  //SEG51 [32] (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$21 main::$23 ] ) -- vbuaa=vbuaa_ror_1 
    lsr
  //SEG52 [33] (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$24 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _21
  //SEG53 [34] (byte) main::bits#2 ← *((const byte[]) bits_count#0 + (byte~) main::$24) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG54 [35] if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b4
  //SEG55 main::@9
  //SEG56 [36] (byte) main::bits_gen#6 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ] ) -- vbuxx=vbuxx_plus_1 
    inx
  //SEG57 [37] phi from main::@3 main::@9 to main::@4 [phi:main::@3/main::@9->main::@4]
  //SEG58 [37] phi (byte) main::bits_gen#13 = (byte) main::bits_gen#14 [phi:main::@3/main::@9->main::@4#0] -- register_copy 
  //SEG59 main::@4
  b4:
  //SEG60 [38] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ] ) -- vbuxx=vbuxx_rol_1 
    txa
    asl
    tax
  //SEG61 [39] (byte~) main::$29 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$29 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #1
    ldy #0
    and (chargen),y
  //SEG62 [40] (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] ( main:2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$30 ] ) -- vbuz1=vbuaa_rol_2 
    asl
    asl
    sta _30
  //SEG63 [41] (byte~) main::$31 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$30 main::$31 ] ) -- vbuaa=_deref_pbuz1_band_vbuc1 
    lda #1
    and (chargen1),y
  //SEG64 [42] (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$32 ] ) -- vbuaa=vbuz1_bor_vbuaa 
    ora _30
  //SEG65 [43] (byte) main::bits#3 ← *((const byte[]) bits_count#0 + (byte~) main::$32) [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ] ) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda bits_count,y
  //SEG66 [44] if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ] ) -- vbuaa_lt_vbuc1_then_la1 
    cmp #2
    bcc b5
  //SEG67 main::@10
  //SEG68 [45] (byte) main::bits_gen#8 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ] ) -- vbuxx=vbuxx_plus_1 
    inx
  //SEG69 [46] phi from main::@10 main::@4 to main::@5 [phi:main::@10/main::@4->main::@5]
  //SEG70 [46] phi (byte) main::bits_gen#15 = (byte) main::bits_gen#8 [phi:main::@10/main::@4->main::@5#0] -- register_copy 
  //SEG71 main::@5
  b5:
  //SEG72 [47] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ( main:2 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ] ) -- vbuaa=vbuxx_rol_1 
    txa
    asl
  //SEG73 [48] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#10 main::charset4#10 ] ( main:2 [ main::chargen#10 main::charset4#10 ] ) -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (charset4),y
  //SEG74 [49] (byte*) main::charset4#1 ← ++ (byte*) main::charset4#10 [ main::chargen#10 main::charset4#1 ] ( main:2 [ main::chargen#10 main::charset4#1 ] ) -- pbuz1=_inc_pbuz1 
    inc charset4
    bne !+
    inc charset4+1
  !:
  //SEG75 [50] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) -- pbuz1=pbuz1_plus_vbuc1 
    lda chargen
    clc
    adc #2
    sta chargen
    bcc !+
    inc chargen+1
  !:
  //SEG76 [51] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048) goto main::@1 [ main::chargen#1 main::charset4#1 ] ( main:2 [ main::chargen#1 main::charset4#1 ] ) -- pbuz1_lt_pbuc1_then_la1 
    lda chargen+1
    cmp #>CHARGEN+$800
    bcc b1
    bne !+
    lda chargen
    cmp #<CHARGEN+$800
    bcc b1
  !:
  //SEG77 main::@11
  //SEG78 [52] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG79 asm { cli  }
    cli
  //SEG80 [54] phi from main::@11 to main::@6 [phi:main::@11->main::@6]
  //SEG81 [54] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@11->main::@6#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG82 [54] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
  //SEG83 [54] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@6->main::@6#0] -- register_copy 
  //SEG84 main::@6
  b6:
  //SEG85 [55] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN,x
  //SEG86 [56] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG87 [57] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b6
  //SEG88 main::@12
  //SEG89 [58] *((const byte*) D018#0) ← (byte/signed byte/word/signed word/dword/signed dword) 25 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 
    lda #$19
    sta D018
  //SEG90 main::@return
  //SEG91 [59] return  [ ] ( main:2 [ ] )
    rts
}
  bits_count: .byte 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4

