
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) CHARSET#0 ← ((byte*)) (word/signed word/dword/signed dword) 8192
  (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)
  (bool~) main::$7 ← (byte) main::bits#0 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (bool~) main::$8 ← ! (bool~) main::$7
  if((bool~) 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)
  (bool~) main::$16 ← (byte) main::bits#1 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (bool~) main::$17 ← ! (bool~) main::$16
  if((bool~) 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/signed word/word/dword/signed dword~) main::$9 ← (byte) main::bits_gen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#2 ← (byte/signed word/word/dword/signed dword~) 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)
  (bool~) main::$25 ← (byte) main::bits#2 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (bool~) main::$26 ← ! (bool~) main::$25
  if((bool~) 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/signed word/word/dword/signed dword~) main::$18 ← (byte) main::bits_gen#12 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#4 ← (byte/signed word/word/dword/signed dword~) 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)
  (bool~) main::$33 ← (byte) main::bits#3 >= (byte/signed byte/word/signed word/dword/signed dword) 2
  (bool~) main::$34 ← ! (bool~) main::$33
  if((bool~) 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/signed word/word/dword/signed dword~) main::$27 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#6 ← (byte/signed word/word/dword/signed dword~) 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
  (bool~) main::$39 ← (byte*) main::chargen#1 < (byte*~) main::$38
  if((bool~) 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/signed word/word/dword/signed dword~) main::$35 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) main::bits_gen#8 ← (byte/signed word/word/dword/signed dword~) 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 + rangenext(0,255)
  (bool~) main::$40 ← (byte) main::i#1 != rangelast(0,255)
  if((bool~) 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 
  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*) CHARSET
(byte*) CHARSET#0
(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
(bool~) main::$16
(bool~) main::$17
(byte/signed word/word/dword/signed dword~) main::$18
(byte~) main::$19
(byte~) main::$2
(byte~) main::$20
(byte~) main::$21
(byte~) main::$22
(byte~) main::$23
(byte~) main::$24
(bool~) main::$25
(bool~) main::$26
(byte/signed word/word/dword/signed dword~) main::$27
(byte~) main::$28
(byte~) main::$29
(byte~) main::$3
(byte~) main::$30
(byte~) main::$31
(byte~) main::$32
(bool~) main::$33
(bool~) main::$34
(byte/signed word/word/dword/signed dword~) main::$35
(byte~) main::$36
(byte*~) main::$37
(byte*~) main::$38
(bool~) main::$39
(byte~) main::$4
(bool~) main::$40
(byte~) main::$5
(byte~) main::$6
(bool~) main::$7
(bool~) main::$8
(byte/signed word/word/dword/signed dword~) 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

Culled Empty Block (label) @2
Successful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not [24] (bool~) main::$8 ← (byte) main::bits#0 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [23] (bool~) main::$7 ← (byte) main::bits#0 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Inversing boolean not [36] (bool~) main::$17 ← (byte) main::bits#1 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [35] (bool~) main::$16 ← (byte) main::bits#1 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Inversing boolean not [51] (bool~) main::$26 ← (byte) main::bits#2 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [50] (bool~) main::$25 ← (byte) main::bits#2 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Inversing boolean not [65] (bool~) main::$34 ← (byte) main::bits#3 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [64] (bool~) main::$33 ← (byte) main::bits#3 >= (byte/signed byte/word/signed word/dword/signed dword) 2
Successful SSA optimization Pass2UnaryNotSimplification
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/signed word/word/dword/signed dword~) 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/signed word/word/dword/signed dword~) 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/signed word/word/dword/signed dword~) 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/signed word/word/dword/signed dword~) 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 
Successful SSA optimization Pass2AliasElimination
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 
Successful SSA optimization Pass2AliasElimination
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
Successful 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
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) main::$8 [25] if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2
Simple Condition (bool~) main::$17 [37] if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3
Simple Condition (bool~) main::$26 [52] if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4
Simple Condition (bool~) main::$34 [66] if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5
Simple Condition (bool~) main::$39 [79] if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1
Simple Condition (bool~) main::$40 [91] if((byte) main::i#1!=rangelast(0,255)) goto main::@6
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte*) CHARSET#0 = ((byte*))8192
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
Successful 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
Successful SSA optimization Pass2ConstantIdentification
Successful SSA optimization PassNEliminateUnusedVars
Resolved ranged next value main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value if(main::i#1!=rangelast(0,255)) goto main::@6 to (byte/signed byte/word/signed word/dword/signed dword) 0
Inlining constant with var 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::chargen#0
Inlining constant with var siblings (const byte*) main::charset4#0
Inlining constant with var 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
Successful SSA optimization Pass2ConstantInlining
Simplifying constant plus zero 0+1
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)
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 

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
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
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

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()
main: scope:[main]  from @1
  asm { sei  }
  [5] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  to:main::@1
main::@1: scope:[main]  from main main::@5
  [6] (byte*) main::charset4#10 ← phi( main/(const byte*) CHARSET4#0 main::@5/(byte*) main::charset4#1 )
  [6] (byte*) main::chargen#10 ← phi( main/(const byte*) CHARGEN#0 main::@5/(byte*) main::chargen#1 )
  [7] (byte*) main::chargen1#0 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1
  [8] (byte~) main::$1 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 96
  [9] (byte~) main::$2 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 96
  [10] (byte~) main::$3 ← (byte~) main::$2 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  [11] (byte~) main::$4 ← (byte~) main::$1 | (byte~) main::$3
  [12] (byte~) main::$5 ← (byte~) main::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  [13] (byte~) main::$6 ← (byte~) main::$5 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  [14] (byte) main::bits#0 ← *((const byte[]) bits_count#0 + (byte~) main::$6)
  [15] if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2
  to:main::@7
main::@7: scope:[main]  from main::@1
  [16] phi()
  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) 1 )
  [18] (byte) main::bits_gen#1 ← (byte) main::bits_gen#9 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [19] (byte~) main::$11 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 24
  [20] (byte~) main::$12 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 24
  [21] (byte~) main::$13 ← (byte~) main::$12 >> (byte/signed byte/word/signed word/dword/signed dword) 2
  [22] (byte~) main::$14 ← (byte~) main::$11 | (byte~) main::$13
  [23] (byte~) main::$15 ← (byte~) main::$14 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  [24] (byte) main::bits#1 ← *((const byte[]) bits_count#0 + (byte~) main::$15)
  [25] if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3
  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
  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 )
  [28] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [29] (byte~) main::$20 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 6
  [30] (byte~) main::$21 ← (byte~) main::$20 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [31] (byte~) main::$22 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 6
  [32] (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  [33] (byte~) main::$24 ← (byte~) main::$21 | (byte~) main::$23
  [34] (byte) main::bits#2 ← *((const byte[]) bits_count#0 + (byte~) main::$24)
  [35] if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4
  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
  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 )
  [38] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [39] (byte~) main::$29 ← *((byte*) main::chargen#10) & (byte/signed byte/word/signed word/dword/signed dword) 1
  [40] (byte~) main::$30 ← (byte~) main::$29 << (byte/signed byte/word/signed word/dword/signed dword) 2
  [41] (byte~) main::$31 ← *((byte*) main::chargen1#0) & (byte/signed byte/word/signed word/dword/signed dword) 1
  [42] (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31
  [43] (byte) main::bits#3 ← *((const byte[]) bits_count#0 + (byte~) main::$32)
  [44] if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5
  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
  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 )
  [47] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte/signed byte/word/signed word/dword/signed dword) 1
  [48] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7
  [49] (byte*) main::charset4#1 ← ++ (byte*) main::charset4#10
  [50] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte/signed byte/word/signed word/dword/signed dword) 2
  [51] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word/signed word/dword/signed dword) 2048) goto main::@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
  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 )
  [55] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2
  [56] (byte) main::i#1 ← ++ (byte) main::i#2
  [57] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6
  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
  to:main::@return
main::@return: scope:[main]  from main::@12
  [59] return 
  to:@return


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

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

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) CHARGEN
(const byte*) CHARGEN#0 CHARGEN = ((byte*))(word/dword/signed dword) 53248
(byte*) CHARSET
(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:8 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:8 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:8 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 main::$11 main::$21 main::$30 ]
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 ]
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 ]
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 ]
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: 3108

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

