
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@5
main: scope:[main]  from @5
  call bool_and 
  to:main::@1
main::@1: scope:[main]  from main
  call bool_or 
  to:main::@2
main::@2: scope:[main]  from main::@1
  call bool_not 
  to:main::@3
main::@3: scope:[main]  from main::@2
  call bool_complex 
  to:main::@4
main::@4: scope:[main]  from main::@3
  to:main::@return
main::@return: scope:[main]  from main::@4
  return 
  to:@return
bool_and: scope:[bool_and]  from main
  (byte*) bool_and::screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte) bool_and::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:bool_and::@1
bool_and::@1: scope:[bool_and]  from bool_and bool_and::@3
  (byte) bool_and::i#2 ← phi( bool_and/(byte) bool_and::i#0 bool_and::@3/(byte) bool_and::i#1 )
  (bool~) bool_and::$0 ← (byte) bool_and::i#2 < (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  (bool~) bool_and::$2 ← (byte~) bool_and::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) bool_and::$3 ← (bool~) bool_and::$0 && (bool~) bool_and::$2
  if((bool~) bool_and::$3) goto bool_and::@2
  to:bool_and::@4
bool_and::@2: scope:[bool_and]  from bool_and::@1
  (byte) bool_and::i#3 ← phi( bool_and::@1/(byte) bool_and::i#2 )
  *((byte*) bool_and::screen#0 + (byte) bool_and::i#3) ← (byte) '*'
  to:bool_and::@3
bool_and::@4: scope:[bool_and]  from bool_and::@1
  (byte) bool_and::i#4 ← phi( bool_and::@1/(byte) bool_and::i#2 )
  *((byte*) bool_and::screen#0 + (byte) bool_and::i#4) ← (byte) ' '
  to:bool_and::@3
bool_and::@3: scope:[bool_and]  from bool_and::@2 bool_and::@4
  (byte) bool_and::i#5 ← phi( bool_and::@2/(byte) bool_and::i#3 bool_and::@4/(byte) bool_and::i#4 )
  (byte) bool_and::i#1 ← (byte) bool_and::i#5 + rangenext(0,20)
  (bool~) bool_and::$4 ← (byte) bool_and::i#1 != rangelast(0,20)
  if((bool~) bool_and::$4) goto bool_and::@1
  to:bool_and::@return
bool_and::@return: scope:[bool_and]  from bool_and::@3
  return 
  to:@return
bool_or: scope:[bool_or]  from main::@1
  (byte*) bool_or::screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1064
  (byte) bool_or::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:bool_or::@1
bool_or::@1: scope:[bool_or]  from bool_or bool_or::@3
  (byte) bool_or::i#2 ← phi( bool_or/(byte) bool_or::i#0 bool_or::@3/(byte) bool_or::i#1 )
  (bool~) bool_or::$0 ← (byte) bool_or::i#2 < (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  (bool~) bool_or::$2 ← (byte~) bool_or::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) bool_or::$3 ← (bool~) bool_or::$0 || (bool~) bool_or::$2
  if((bool~) bool_or::$3) goto bool_or::@2
  to:bool_or::@4
bool_or::@2: scope:[bool_or]  from bool_or::@1
  (byte) bool_or::i#3 ← phi( bool_or::@1/(byte) bool_or::i#2 )
  *((byte*) bool_or::screen#0 + (byte) bool_or::i#3) ← (byte) '*'
  to:bool_or::@3
bool_or::@4: scope:[bool_or]  from bool_or::@1
  (byte) bool_or::i#4 ← phi( bool_or::@1/(byte) bool_or::i#2 )
  *((byte*) bool_or::screen#0 + (byte) bool_or::i#4) ← (byte) ' '
  to:bool_or::@3
bool_or::@3: scope:[bool_or]  from bool_or::@2 bool_or::@4
  (byte) bool_or::i#5 ← phi( bool_or::@2/(byte) bool_or::i#3 bool_or::@4/(byte) bool_or::i#4 )
  (byte) bool_or::i#1 ← (byte) bool_or::i#5 + rangenext(0,20)
  (bool~) bool_or::$4 ← (byte) bool_or::i#1 != rangelast(0,20)
  if((bool~) bool_or::$4) goto bool_or::@1
  to:bool_or::@return
bool_or::@return: scope:[bool_or]  from bool_or::@3
  return 
  to:@return
bool_not: scope:[bool_not]  from main::@2
  (byte*) bool_not::screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1104
  (byte) bool_not::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:bool_not::@1
bool_not::@1: scope:[bool_not]  from bool_not bool_not::@3
  (byte) bool_not::i#2 ← phi( bool_not/(byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 )
  (bool~) bool_not::$0 ← (byte) bool_not::i#2 < (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  (bool~) bool_not::$2 ← (byte~) bool_not::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) bool_not::$3 ← (bool~) bool_not::$0 || (bool~) bool_not::$2
  (bool~) bool_not::$4 ← ! (bool~) bool_not::$3
  if((bool~) bool_not::$4) goto bool_not::@2
  to:bool_not::@4
bool_not::@2: scope:[bool_not]  from bool_not::@1
  (byte) bool_not::i#3 ← phi( bool_not::@1/(byte) bool_not::i#2 )
  *((byte*) bool_not::screen#0 + (byte) bool_not::i#3) ← (byte) '*'
  to:bool_not::@3
bool_not::@4: scope:[bool_not]  from bool_not::@1
  (byte) bool_not::i#4 ← phi( bool_not::@1/(byte) bool_not::i#2 )
  *((byte*) bool_not::screen#0 + (byte) bool_not::i#4) ← (byte) ' '
  to:bool_not::@3
bool_not::@3: scope:[bool_not]  from bool_not::@2 bool_not::@4
  (byte) bool_not::i#5 ← phi( bool_not::@2/(byte) bool_not::i#3 bool_not::@4/(byte) bool_not::i#4 )
  (byte) bool_not::i#1 ← (byte) bool_not::i#5 + rangenext(0,20)
  (bool~) bool_not::$5 ← (byte) bool_not::i#1 != rangelast(0,20)
  if((bool~) bool_not::$5) goto bool_not::@1
  to:bool_not::@return
bool_not::@return: scope:[bool_not]  from bool_not::@3
  return 
  to:@return
bool_complex: scope:[bool_complex]  from main::@3
  (byte*) bool_complex::screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1144
  (byte) bool_complex::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:bool_complex::@1
bool_complex::@1: scope:[bool_complex]  from bool_complex bool_complex::@3
  (byte) bool_complex::i#2 ← phi( bool_complex/(byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 )
  (bool~) bool_complex::$0 ← (byte) bool_complex::i#2 < (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  (bool~) bool_complex::$2 ← (byte~) bool_complex::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) bool_complex::$3 ← (bool~) bool_complex::$0 && (bool~) bool_complex::$2
  (bool~) bool_complex::$4 ← (byte) bool_complex::i#2 < (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  (bool~) bool_complex::$6 ← (byte~) bool_complex::$5 == (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) bool_complex::$7 ← (bool~) bool_complex::$4 || (bool~) bool_complex::$6
  (bool~) bool_complex::$8 ← ! (bool~) bool_complex::$7
  (bool~) bool_complex::$9 ← (bool~) bool_complex::$3 || (bool~) bool_complex::$8
  if((bool~) bool_complex::$9) goto bool_complex::@2
  to:bool_complex::@4
bool_complex::@2: scope:[bool_complex]  from bool_complex::@1
  (byte) bool_complex::i#3 ← phi( bool_complex::@1/(byte) bool_complex::i#2 )
  *((byte*) bool_complex::screen#0 + (byte) bool_complex::i#3) ← (byte) '*'
  to:bool_complex::@3
bool_complex::@4: scope:[bool_complex]  from bool_complex::@1
  (byte) bool_complex::i#4 ← phi( bool_complex::@1/(byte) bool_complex::i#2 )
  *((byte*) bool_complex::screen#0 + (byte) bool_complex::i#4) ← (byte) ' '
  to:bool_complex::@3
bool_complex::@3: scope:[bool_complex]  from bool_complex::@2 bool_complex::@4
  (byte) bool_complex::i#5 ← phi( bool_complex::@2/(byte) bool_complex::i#3 bool_complex::@4/(byte) bool_complex::i#4 )
  (byte) bool_complex::i#1 ← (byte) bool_complex::i#5 + rangenext(0,20)
  (bool~) bool_complex::$10 ← (byte) bool_complex::i#1 != rangelast(0,20)
  if((bool~) bool_complex::$10) goto bool_complex::@1
  to:bool_complex::@return
bool_complex::@return: scope:[bool_complex]  from bool_complex::@3
  return 
  to:@return
@5: scope:[]  from @begin
  call main 
  to:@6
@6: scope:[]  from @5
  to:@end
@end: scope:[]  from @6

SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @begin
(label) @end
(void()) bool_and()
(bool~) bool_and::$0
(byte~) bool_and::$1
(bool~) bool_and::$2
(bool~) bool_and::$3
(bool~) bool_and::$4
(label) bool_and::@1
(label) bool_and::@2
(label) bool_and::@3
(label) bool_and::@4
(label) bool_and::@return
(byte) bool_and::i
(byte) bool_and::i#0
(byte) bool_and::i#1
(byte) bool_and::i#2
(byte) bool_and::i#3
(byte) bool_and::i#4
(byte) bool_and::i#5
(byte*) bool_and::screen
(byte*) bool_and::screen#0
(void()) bool_complex()
(bool~) bool_complex::$0
(byte~) bool_complex::$1
(bool~) bool_complex::$10
(bool~) bool_complex::$2
(bool~) bool_complex::$3
(bool~) bool_complex::$4
(byte~) bool_complex::$5
(bool~) bool_complex::$6
(bool~) bool_complex::$7
(bool~) bool_complex::$8
(bool~) bool_complex::$9
(label) bool_complex::@1
(label) bool_complex::@2
(label) bool_complex::@3
(label) bool_complex::@4
(label) bool_complex::@return
(byte) bool_complex::i
(byte) bool_complex::i#0
(byte) bool_complex::i#1
(byte) bool_complex::i#2
(byte) bool_complex::i#3
(byte) bool_complex::i#4
(byte) bool_complex::i#5
(byte*) bool_complex::screen
(byte*) bool_complex::screen#0
(void()) bool_not()
(bool~) bool_not::$0
(byte~) bool_not::$1
(bool~) bool_not::$2
(bool~) bool_not::$3
(bool~) bool_not::$4
(bool~) bool_not::$5
(label) bool_not::@1
(label) bool_not::@2
(label) bool_not::@3
(label) bool_not::@4
(label) bool_not::@return
(byte) bool_not::i
(byte) bool_not::i#0
(byte) bool_not::i#1
(byte) bool_not::i#2
(byte) bool_not::i#3
(byte) bool_not::i#4
(byte) bool_not::i#5
(byte*) bool_not::screen
(byte*) bool_not::screen#0
(void()) bool_or()
(bool~) bool_or::$0
(byte~) bool_or::$1
(bool~) bool_or::$2
(bool~) bool_or::$3
(bool~) bool_or::$4
(label) bool_or::@1
(label) bool_or::@2
(label) bool_or::@3
(label) bool_or::@4
(label) bool_or::@return
(byte) bool_or::i
(byte) bool_or::i#0
(byte) bool_or::i#1
(byte) bool_or::i#2
(byte) bool_or::i#3
(byte) bool_or::i#4
(byte) bool_or::i#5
(byte*) bool_or::screen
(byte*) bool_or::screen#0
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@return

Culled Empty Block (label) main::@4
Culled Empty Block (label) @6
Successful SSA optimization Pass2CullEmptyBlocks
Alias (byte) bool_and::i#2 = (byte) bool_and::i#3 (byte) bool_and::i#4 
Alias (byte) bool_or::i#2 = (byte) bool_or::i#3 (byte) bool_or::i#4 
Alias (byte) bool_not::i#2 = (byte) bool_not::i#3 (byte) bool_not::i#4 
Alias (byte) bool_complex::i#2 = (byte) bool_complex::i#3 (byte) bool_complex::i#4 
Successful SSA optimization Pass2AliasElimination
Alias (byte) bool_and::i#2 = (byte) bool_and::i#5 
Alias (byte) bool_or::i#2 = (byte) bool_or::i#5 
Alias (byte) bool_not::i#2 = (byte) bool_not::i#5 
Alias (byte) bool_complex::i#2 = (byte) bool_complex::i#5 
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) bool_and::$4 [20] if((byte) bool_and::i#1!=rangelast(0,20)) goto bool_and::@1
Simple Condition (bool~) bool_or::$4 [37] if((byte) bool_or::i#1!=rangelast(0,20)) goto bool_or::@1
Simple Condition (bool~) bool_not::$5 [55] if((byte) bool_not::i#1!=rangelast(0,20)) goto bool_not::@1
Simple Condition (bool~) bool_complex::$10 [78] if((byte) bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting && if()-condition to two if()s [11] (bool~) bool_and::$3 ← (bool~) bool_and::$0 && (bool~) bool_and::$2
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [28] (bool~) bool_or::$3 ← (bool~) bool_or::$0 || (bool~) bool_or::$2
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [46] (bool~) bool_not::$4 ← ! (bool~) bool_not::$3
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [45] (bool~) bool_not::$3 ← (bool~) bool_not::$0 || (bool~) bool_not::$2
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [69] (bool~) bool_complex::$9 ← (bool~) bool_complex::$3 || (bool~) bool_complex::$8
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting && if()-condition to two if()s [63] (bool~) bool_complex::$3 ← (bool~) bool_complex::$0 && (bool~) bool_complex::$2
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [68] (bool~) bool_complex::$8 ← ! (bool~) bool_complex::$7
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [67] (bool~) bool_complex::$7 ← (bool~) bool_complex::$4 || (bool~) bool_complex::$6
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant (const byte*) bool_and::screen#0 = ((byte*))1024
Constant (const byte) bool_and::i#0 = 0
Constant (const byte*) bool_or::screen#0 = ((byte*))1064
Constant (const byte) bool_or::i#0 = 0
Constant (const byte*) bool_not::screen#0 = ((byte*))1104
Constant (const byte) bool_not::i#0 = 0
Constant (const byte*) bool_complex::screen#0 = ((byte*))1144
Constant (const byte) bool_complex::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value bool_and::i#1 ← ++ bool_and::i#2 to ++
Resolved ranged comparison value if(bool_and::i#1!=rangelast(0,20)) goto bool_and::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21
Resolved ranged next value bool_or::i#1 ← ++ bool_or::i#2 to ++
Resolved ranged comparison value if(bool_or::i#1!=rangelast(0,20)) goto bool_or::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21
Resolved ranged next value bool_not::i#1 ← ++ bool_not::i#2 to ++
Resolved ranged comparison value if(bool_not::i#1!=rangelast(0,20)) goto bool_not::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21
Resolved ranged next value bool_complex::i#1 ← ++ bool_complex::i#2 to ++
Resolved ranged comparison value if(bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21
Simple Condition (bool~) bool_and::$0 [9] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7
Simple Condition (bool~) bool_or::$0 [19] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2
Simple Condition (bool~) bool_not::$0 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4
Simple Condition (bool~) bool_complex::$0 [42] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@8
Simple Condition (bool~) bool_and::$2 [49] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2
Simple Condition (bool~) bool_or::$2 [50] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2
Simple Condition (bool~) bool_not::$2 [51] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4
Simple Condition (bool~) bool_complex::$4 [52] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@4
Simple Condition (bool~) bool_complex::$2 [53] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2
Simple Condition (bool~) bool_complex::$6 [54] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4
Successful SSA optimization Pass2ConditionalJumpSimplification
Inlining constant with var siblings (const byte) bool_and::i#0
Inlining constant with var siblings (const byte) bool_or::i#0
Inlining constant with var siblings (const byte) bool_not::i#0
Inlining constant with var siblings (const byte) bool_complex::i#0
Constant inlined bool_complex::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined bool_or::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined bool_not::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined bool_and::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting bool_complex::@10(between bool_complex::@3 and bool_complex::@1)
Added new block during phi lifting bool_not::@8(between bool_not::@3 and bool_not::@1)
Added new block during phi lifting bool_or::@8(between bool_or::@3 and bool_or::@1)
Added new block during phi lifting bool_and::@8(between bool_and::@3 and bool_and::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of bool_complex
Adding NOP phi() at start of bool_not
Adding NOP phi() at start of bool_or
Adding NOP phi() at start of bool_and
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to bool_and:5 bool_or:7 bool_not:9 bool_complex:11 

Created 4 initial phi equivalence classes
Coalesced [24] bool_complex::i#6 ← bool_complex::i#1
Coalesced [36] bool_not::i#6 ← bool_not::i#1
Coalesced [47] bool_or::i#6 ← bool_or::i#1
Coalesced [57] bool_and::i#6 ← bool_and::i#1
Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) bool_complex::@10
Culled Empty Block (label) bool_not::@8
Culled Empty Block (label) bool_or::@8
Culled Empty Block (label) bool_and::@8
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of bool_complex
Adding NOP phi() at start of bool_not
Adding NOP phi() at start of bool_or
Adding NOP phi() at start of bool_and

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@5
@5: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @5
  [3] phi()
main: scope:[main]  from @5
  [4] phi()
  [5] call bool_and 
  to:main::@1
main::@1: scope:[main]  from main
  [6] phi()
  [7] call bool_or 
  to:main::@2
main::@2: scope:[main]  from main::@1
  [8] phi()
  [9] call bool_not 
  to:main::@3
main::@3: scope:[main]  from main::@2
  [10] phi()
  [11] call bool_complex 
  to:main::@return
main::@return: scope:[main]  from main::@3
  [12] return 
  to:@return
bool_complex: scope:[bool_complex]  from main::@3
  [13] phi()
  to:bool_complex::@1
bool_complex::@1: scope:[bool_complex]  from bool_complex bool_complex::@3
  [14] (byte) bool_complex::i#2 ← phi( bool_complex/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_complex::@3/(byte) bool_complex::i#1 )
  [15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@8
  to:bool_complex::@7
bool_complex::@7: scope:[bool_complex]  from bool_complex::@1 bool_complex::@8
  [18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@4
  to:bool_complex::@9
bool_complex::@9: scope:[bool_complex]  from bool_complex::@7
  [19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4
  to:bool_complex::@2
bool_complex::@2: scope:[bool_complex]  from bool_complex::@8 bool_complex::@9
  [20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*'
  to:bool_complex::@3
bool_complex::@3: scope:[bool_complex]  from bool_complex::@2 bool_complex::@4
  [21] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2
  [22] if((byte) bool_complex::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_complex::@1
  to:bool_complex::@return
bool_complex::@return: scope:[bool_complex]  from bool_complex::@3
  [23] return 
  to:@return
bool_complex::@4: scope:[bool_complex]  from bool_complex::@7 bool_complex::@9
  [24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' '
  to:bool_complex::@3
bool_complex::@8: scope:[bool_complex]  from bool_complex::@1
  [25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2
  to:bool_complex::@7
bool_not: scope:[bool_not]  from main::@2
  [26] phi()
  to:bool_not::@1
bool_not::@1: scope:[bool_not]  from bool_not bool_not::@3
  [27] (byte) bool_not::i#2 ← phi( bool_not/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_not::@3/(byte) bool_not::i#1 )
  [28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4
  to:bool_not::@7
bool_not::@7: scope:[bool_not]  from bool_not::@1
  [30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4
  to:bool_not::@2
bool_not::@2: scope:[bool_not]  from bool_not::@7
  [31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*'
  to:bool_not::@3
bool_not::@3: scope:[bool_not]  from bool_not::@2 bool_not::@4
  [32] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2
  [33] if((byte) bool_not::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_not::@1
  to:bool_not::@return
bool_not::@return: scope:[bool_not]  from bool_not::@3
  [34] return 
  to:@return
bool_not::@4: scope:[bool_not]  from bool_not::@1 bool_not::@7
  [35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' '
  to:bool_not::@3
bool_or: scope:[bool_or]  from main::@1
  [36] phi()
  to:bool_or::@1
bool_or::@1: scope:[bool_or]  from bool_or bool_or::@3
  [37] (byte) bool_or::i#2 ← phi( bool_or/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_or::@3/(byte) bool_or::i#1 )
  [38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  [39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2
  to:bool_or::@7
bool_or::@7: scope:[bool_or]  from bool_or::@1
  [40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2
  to:bool_or::@4
bool_or::@4: scope:[bool_or]  from bool_or::@7
  [41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' '
  to:bool_or::@3
bool_or::@3: scope:[bool_or]  from bool_or::@2 bool_or::@4
  [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2
  [43] if((byte) bool_or::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_or::@1
  to:bool_or::@return
bool_or::@return: scope:[bool_or]  from bool_or::@3
  [44] return 
  to:@return
bool_or::@2: scope:[bool_or]  from bool_or::@1 bool_or::@7
  [45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*'
  to:bool_or::@3
bool_and: scope:[bool_and]  from main
  [46] phi()
  to:bool_and::@1
bool_and::@1: scope:[bool_and]  from bool_and bool_and::@3
  [47] (byte) bool_and::i#2 ← phi( bool_and/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_and::@3/(byte) bool_and::i#1 )
  [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
  [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7
  to:bool_and::@4
bool_and::@4: scope:[bool_and]  from bool_and::@1 bool_and::@7
  [50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' '
  to:bool_and::@3
bool_and::@3: scope:[bool_and]  from bool_and::@2 bool_and::@4
  [51] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2
  [52] if((byte) bool_and::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_and::@1
  to:bool_and::@return
bool_and::@return: scope:[bool_and]  from bool_and::@3
  [53] return 
  to:@return
bool_and::@7: scope:[bool_and]  from bool_and::@1
  [54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2
  to:bool_and::@4
bool_and::@2: scope:[bool_and]  from bool_and::@7
  [55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*'
  to:bool_and::@3


VARIABLE REGISTER WEIGHTS
(void()) bool_and()
(byte~) bool_and::$1 11.0
(byte) bool_and::i
(byte) bool_and::i#1 16.5
(byte) bool_and::i#2 11.0
(byte*) bool_and::screen
(void()) bool_complex()
(byte~) bool_complex::$1 7.333333333333333
(byte~) bool_complex::$5 5.5
(byte) bool_complex::i
(byte) bool_complex::i#1 16.5
(byte) bool_complex::i#2 9.777777777777779
(byte*) bool_complex::screen
(void()) bool_not()
(byte~) bool_not::$1 11.0
(byte) bool_not::i
(byte) bool_not::i#1 16.5
(byte) bool_not::i#2 11.0
(byte*) bool_not::screen
(void()) bool_or()
(byte~) bool_or::$1 11.0
(byte) bool_or::i
(byte) bool_or::i#1 16.5
(byte) bool_or::i#2 11.0
(byte*) bool_or::screen
(void()) main()

Initial phi equivalence classes
[ bool_complex::i#2 bool_complex::i#1 ]
[ bool_not::i#2 bool_not::i#1 ]
[ bool_or::i#2 bool_or::i#1 ]
[ bool_and::i#2 bool_and::i#1 ]
Added variable bool_complex::$1 to zero page equivalence class [ bool_complex::$1 ]
Added variable bool_complex::$5 to zero page equivalence class [ bool_complex::$5 ]
Added variable bool_not::$1 to zero page equivalence class [ bool_not::$1 ]
Added variable bool_or::$1 to zero page equivalence class [ bool_or::$1 ]
Added variable bool_and::$1 to zero page equivalence class [ bool_and::$1 ]
Complete equivalence classes
[ bool_complex::i#2 bool_complex::i#1 ]
[ bool_not::i#2 bool_not::i#1 ]
[ bool_or::i#2 bool_or::i#1 ]
[ bool_and::i#2 bool_and::i#1 ]
[ bool_complex::$1 ]
[ bool_complex::$5 ]
[ bool_not::$1 ]
[ bool_or::$1 ]
[ bool_and::$1 ]
Allocated zp ZP_BYTE:2 [ bool_complex::i#2 bool_complex::i#1 ]
Allocated zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ]
Allocated zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ]
Allocated zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ]
Allocated zp ZP_BYTE:6 [ bool_complex::$1 ]
Allocated zp ZP_BYTE:7 [ bool_complex::$5 ]
Allocated zp ZP_BYTE:8 [ bool_not::$1 ]
Allocated zp ZP_BYTE:9 [ bool_or::$1 ]
Allocated zp ZP_BYTE:10 [ bool_and::$1 ]

INITIAL ASM
//SEG0 File Comments
// A test of boolean conditions using && || and !
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
  jmp b5
//SEG5 @5
b5:
//SEG6 [2] call main 
//SEG7 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
  jsr main
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call bool_and 
  //SEG12 [46] phi from main to bool_and [phi:main->bool_and]
  bool_and_from_main:
    jsr bool_and
  //SEG13 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
  //SEG14 main::@1
  b1:
  //SEG15 [7] call bool_or 
  //SEG16 [36] phi from main::@1 to bool_or [phi:main::@1->bool_or]
  bool_or_from_b1:
    jsr bool_or
  //SEG17 [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
  //SEG18 main::@2
  b2:
  //SEG19 [9] call bool_not 
  //SEG20 [26] phi from main::@2 to bool_not [phi:main::@2->bool_not]
  bool_not_from_b2:
    jsr bool_not
  //SEG21 [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
    jmp b3
  //SEG22 main::@3
  b3:
  //SEG23 [11] call bool_complex 
  //SEG24 [13] phi from main::@3 to bool_complex [phi:main::@3->bool_complex]
  bool_complex_from_b3:
    jsr bool_complex
    jmp breturn
  //SEG25 main::@return
  breturn:
  //SEG26 [12] return 
    rts
}
//SEG27 bool_complex
bool_complex: {
    .label screen = $478
    .label _1 = 6
    .label _5 = 7
    .label i = 2
  //SEG28 [14] phi from bool_complex to bool_complex::@1 [phi:bool_complex->bool_complex::@1]
  b1_from_bool_complex:
  //SEG29 [14] phi (byte) bool_complex::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_complex->bool_complex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG30 [14] phi from bool_complex::@3 to bool_complex::@1 [phi:bool_complex::@3->bool_complex::@1]
  b1_from_b3:
  //SEG31 [14] phi (byte) bool_complex::i#2 = (byte) bool_complex::i#1 [phi:bool_complex::@3->bool_complex::@1#0] -- register_copy 
    jmp b1
  //SEG32 bool_complex::@1
  b1:
  //SEG33 [15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _1
  //SEG34 [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _5
  //SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@8 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #$a
    bcc b8
    jmp b7
  //SEG36 bool_complex::@7
  b7:
  //SEG37 [18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@4 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #$a
    bcc b4
    jmp b9
  //SEG38 bool_complex::@9
  b9:
  //SEG39 [19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 -- vbuz1_eq_0_then_la1 
    lda _5
    cmp #0
    beq b4
    jmp b2
  //SEG40 bool_complex::@2
  b2:
  //SEG41 [20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #'*'
    sta screen,y
    jmp b3
  //SEG42 bool_complex::@3
  b3:
  //SEG43 [21] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG44 [22] if((byte) bool_complex::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_complex::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$15
    bne b1_from_b3
    jmp breturn
  //SEG45 bool_complex::@return
  breturn:
  //SEG46 [23] return 
    rts
  //SEG47 bool_complex::@4
  b4:
  //SEG48 [24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #' '
    sta screen,y
    jmp b3
  //SEG49 bool_complex::@8
  b8:
  //SEG50 [25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 -- vbuz1_eq_0_then_la1 
    lda _1
    cmp #0
    beq b2
    jmp b7
}
//SEG51 bool_not
bool_not: {
    .label screen = $450
    .label _1 = 8
    .label i = 3
  //SEG52 [27] phi from bool_not to bool_not::@1 [phi:bool_not->bool_not::@1]
  b1_from_bool_not:
  //SEG53 [27] phi (byte) bool_not::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_not->bool_not::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG54 [27] phi from bool_not::@3 to bool_not::@1 [phi:bool_not::@3->bool_not::@1]
  b1_from_b3:
  //SEG55 [27] phi (byte) bool_not::i#2 = (byte) bool_not::i#1 [phi:bool_not::@3->bool_not::@1#0] -- register_copy 
    jmp b1
  //SEG56 bool_not::@1
  b1:
  //SEG57 [28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _1
  //SEG58 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #$a
    bcc b4
    jmp b7
  //SEG59 bool_not::@7
  b7:
  //SEG60 [30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuz1_eq_0_then_la1 
    lda _1
    cmp #0
    beq b4
    jmp b2
  //SEG61 bool_not::@2
  b2:
  //SEG62 [31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #'*'
    sta screen,y
    jmp b3
  //SEG63 bool_not::@3
  b3:
  //SEG64 [32] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG65 [33] if((byte) bool_not::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_not::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$15
    bne b1_from_b3
    jmp breturn
  //SEG66 bool_not::@return
  breturn:
  //SEG67 [34] return 
    rts
  //SEG68 bool_not::@4
  b4:
  //SEG69 [35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #' '
    sta screen,y
    jmp b3
}
//SEG70 bool_or
bool_or: {
    .label screen = $428
    .label _1 = 9
    .label i = 4
  //SEG71 [37] phi from bool_or to bool_or::@1 [phi:bool_or->bool_or::@1]
  b1_from_bool_or:
  //SEG72 [37] phi (byte) bool_or::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_or->bool_or::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG73 [37] phi from bool_or::@3 to bool_or::@1 [phi:bool_or::@3->bool_or::@1]
  b1_from_b3:
  //SEG74 [37] phi (byte) bool_or::i#2 = (byte) bool_or::i#1 [phi:bool_or::@3->bool_or::@1#0] -- register_copy 
    jmp b1
  //SEG75 bool_or::@1
  b1:
  //SEG76 [38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _1
  //SEG77 [39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #$a
    bcc b2
    jmp b7
  //SEG78 bool_or::@7
  b7:
  //SEG79 [40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuz1_eq_0_then_la1 
    lda _1
    cmp #0
    beq b2
    jmp b4
  //SEG80 bool_or::@4
  b4:
  //SEG81 [41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #' '
    sta screen,y
    jmp b3
  //SEG82 bool_or::@3
  b3:
  //SEG83 [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG84 [43] if((byte) bool_or::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_or::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$15
    bne b1_from_b3
    jmp breturn
  //SEG85 bool_or::@return
  breturn:
  //SEG86 [44] return 
    rts
  //SEG87 bool_or::@2
  b2:
  //SEG88 [45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #'*'
    sta screen,y
    jmp b3
}
//SEG89 bool_and
bool_and: {
    .label screen = $400
    .label _1 = $a
    .label i = 5
  //SEG90 [47] phi from bool_and to bool_and::@1 [phi:bool_and->bool_and::@1]
  b1_from_bool_and:
  //SEG91 [47] phi (byte) bool_and::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_and->bool_and::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG92 [47] phi from bool_and::@3 to bool_and::@1 [phi:bool_and::@3->bool_and::@1]
  b1_from_b3:
  //SEG93 [47] phi (byte) bool_and::i#2 = (byte) bool_and::i#1 [phi:bool_and::@3->bool_and::@1#0] -- register_copy 
    jmp b1
  //SEG94 bool_and::@1
  b1:
  //SEG95 [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _1
  //SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #$a
    bcc b7
    jmp b4
  //SEG97 bool_and::@4
  b4:
  //SEG98 [50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #' '
    sta screen,y
    jmp b3
  //SEG99 bool_and::@3
  b3:
  //SEG100 [51] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG101 [52] if((byte) bool_and::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_and::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$15
    bne b1_from_b3
    jmp breturn
  //SEG102 bool_and::@return
  breturn:
  //SEG103 [53] return 
    rts
  //SEG104 bool_and::@7
  b7:
  //SEG105 [54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuz1_eq_0_then_la1 
    lda _1
    cmp #0
    beq b2
    jmp b4
  //SEG106 bool_and::@2
  b2:
  //SEG107 [55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy i
    lda #'*'
    sta screen,y
    jmp b3
}

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_complex::i#2 bool_complex::$1 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ bool_complex::i#2 bool_complex::i#1 ]
Statement [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_complex::i#2 bool_complex::$1 bool_complex::$5 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::$1 bool_complex::$5 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ bool_complex::$1 ]
Statement [20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a 
Statement [24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a 
Statement [28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_not::i#2 bool_not::$1 ] ( main:2::bool_not:9 [ bool_not::i#2 bool_not::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ]
Statement [31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a 
Statement [35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a 
Statement [38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_or::i#2 bool_or::$1 ] ( main:2::bool_or:7 [ bool_or::i#2 bool_or::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ]
Statement [41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a 
Statement [45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a 
Statement [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_and::i#2 bool_and::$1 ] ( main:2::bool_and:5 [ bool_and::i#2 bool_and::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ]
Statement [50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a 
Statement [55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a 
Statement [15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_complex::i#2 bool_complex::$1 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::$1 ] ) always clobbers reg byte a 
Statement [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_complex::i#2 bool_complex::$1 bool_complex::$5 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::$1 bool_complex::$5 ] ) always clobbers reg byte a 
Statement [20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a 
Statement [24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a 
Statement [28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_not::i#2 bool_not::$1 ] ( main:2::bool_not:9 [ bool_not::i#2 bool_not::$1 ] ) always clobbers reg byte a 
Statement [31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a 
Statement [35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a 
Statement [38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_or::i#2 bool_or::$1 ] ( main:2::bool_or:7 [ bool_or::i#2 bool_or::$1 ] ) always clobbers reg byte a 
Statement [41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a 
Statement [45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a 
Statement [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_and::i#2 bool_and::$1 ] ( main:2::bool_and:5 [ bool_and::i#2 bool_and::$1 ] ) always clobbers reg byte a 
Statement [50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a 
Statement [55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ bool_complex::i#2 bool_complex::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:6 [ bool_complex::$1 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:7 [ bool_complex::$5 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:8 [ bool_not::$1 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ bool_or::$1 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ bool_and::$1 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [bool_complex] 26.28: zp ZP_BYTE:2 [ bool_complex::i#2 bool_complex::i#1 ] 7.33: zp ZP_BYTE:6 [ bool_complex::$1 ] 5.5: zp ZP_BYTE:7 [ bool_complex::$5 ] 
Uplift Scope [bool_and] 27.5: zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ] 11: zp ZP_BYTE:10 [ bool_and::$1 ] 
Uplift Scope [bool_or] 27.5: zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ] 11: zp ZP_BYTE:9 [ bool_or::$1 ] 
Uplift Scope [bool_not] 27.5: zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ] 11: zp ZP_BYTE:8 [ bool_not::$1 ] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [bool_complex] best 3298 combination reg byte y [ bool_complex::i#2 bool_complex::i#1 ] reg byte x [ bool_complex::$1 ] reg byte a [ bool_complex::$5 ] 
Uplifting [bool_and] best 3048 combination reg byte x [ bool_and::i#2 bool_and::i#1 ] reg byte a [ bool_and::$1 ] 
Uplifting [bool_or] best 2798 combination reg byte x [ bool_or::i#2 bool_or::i#1 ] reg byte a [ bool_or::$1 ] 
Uplifting [bool_not] best 2548 combination reg byte x [ bool_not::i#2 bool_not::i#1 ] reg byte a [ bool_not::$1 ] 
Uplifting [main] best 2548 combination 
Uplifting [] best 2548 combination 

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// A test of boolean conditions using && || and !
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
  jmp b5
//SEG5 @5
b5:
//SEG6 [2] call main 
//SEG7 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
  jsr main
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call bool_and 
  //SEG12 [46] phi from main to bool_and [phi:main->bool_and]
  bool_and_from_main:
    jsr bool_and
  //SEG13 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
  //SEG14 main::@1
  b1:
  //SEG15 [7] call bool_or 
  //SEG16 [36] phi from main::@1 to bool_or [phi:main::@1->bool_or]
  bool_or_from_b1:
    jsr bool_or
  //SEG17 [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
  //SEG18 main::@2
  b2:
  //SEG19 [9] call bool_not 
  //SEG20 [26] phi from main::@2 to bool_not [phi:main::@2->bool_not]
  bool_not_from_b2:
    jsr bool_not
  //SEG21 [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
    jmp b3
  //SEG22 main::@3
  b3:
  //SEG23 [11] call bool_complex 
  //SEG24 [13] phi from main::@3 to bool_complex [phi:main::@3->bool_complex]
  bool_complex_from_b3:
    jsr bool_complex
    jmp breturn
  //SEG25 main::@return
  breturn:
  //SEG26 [12] return 
    rts
}
//SEG27 bool_complex
bool_complex: {
    .label screen = $478
  //SEG28 [14] phi from bool_complex to bool_complex::@1 [phi:bool_complex->bool_complex::@1]
  b1_from_bool_complex:
  //SEG29 [14] phi (byte) bool_complex::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_complex->bool_complex::@1#0] -- vbuyy=vbuc1 
    ldy #0
    jmp b1
  //SEG30 [14] phi from bool_complex::@3 to bool_complex::@1 [phi:bool_complex::@3->bool_complex::@1]
  b1_from_b3:
  //SEG31 [14] phi (byte) bool_complex::i#2 = (byte) bool_complex::i#1 [phi:bool_complex::@3->bool_complex::@1#0] -- register_copy 
    jmp b1
  //SEG32 bool_complex::@1
  b1:
  //SEG33 [15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuyy_band_vbuc1 
    tya
    and #1
    tax
  //SEG34 [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuyy_band_vbuc1 
    tya
    and #1
  //SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@8 -- vbuyy_lt_vbuc1_then_la1 
    cpy #$a
    bcc b8
    jmp b7
  //SEG36 bool_complex::@7
  b7:
  //SEG37 [18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@4 -- vbuyy_lt_vbuc1_then_la1 
    cpy #$a
    bcc b4
    jmp b9
  //SEG38 bool_complex::@9
  b9:
  //SEG39 [19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
    jmp b2
  //SEG40 bool_complex::@2
  b2:
  //SEG41 [20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #'*'
    sta screen,y
    jmp b3
  //SEG42 bool_complex::@3
  b3:
  //SEG43 [21] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 -- vbuyy=_inc_vbuyy 
    iny
  //SEG44 [22] if((byte) bool_complex::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_complex::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$15
    bne b1_from_b3
    jmp breturn
  //SEG45 bool_complex::@return
  breturn:
  //SEG46 [23] return 
    rts
  //SEG47 bool_complex::@4
  b4:
  //SEG48 [24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #' '
    sta screen,y
    jmp b3
  //SEG49 bool_complex::@8
  b8:
  //SEG50 [25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 -- vbuxx_eq_0_then_la1 
    cpx #0
    beq b2
    jmp b7
}
//SEG51 bool_not
bool_not: {
    .label screen = $450
  //SEG52 [27] phi from bool_not to bool_not::@1 [phi:bool_not->bool_not::@1]
  b1_from_bool_not:
  //SEG53 [27] phi (byte) bool_not::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_not->bool_not::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG54 [27] phi from bool_not::@3 to bool_not::@1 [phi:bool_not::@3->bool_not::@1]
  b1_from_b3:
  //SEG55 [27] phi (byte) bool_not::i#2 = (byte) bool_not::i#1 [phi:bool_not::@3->bool_not::@1#0] -- register_copy 
    jmp b1
  //SEG56 bool_not::@1
  b1:
  //SEG57 [28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG58 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b4
    jmp b7
  //SEG59 bool_not::@7
  b7:
  //SEG60 [30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
    jmp b2
  //SEG61 bool_not::@2
  b2:
  //SEG62 [31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta screen,x
    jmp b3
  //SEG63 bool_not::@3
  b3:
  //SEG64 [32] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG65 [33] if((byte) bool_not::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_not::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$15
    bne b1_from_b3
    jmp breturn
  //SEG66 bool_not::@return
  breturn:
  //SEG67 [34] return 
    rts
  //SEG68 bool_not::@4
  b4:
  //SEG69 [35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta screen,x
    jmp b3
}
//SEG70 bool_or
bool_or: {
    .label screen = $428
  //SEG71 [37] phi from bool_or to bool_or::@1 [phi:bool_or->bool_or::@1]
  b1_from_bool_or:
  //SEG72 [37] phi (byte) bool_or::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_or->bool_or::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG73 [37] phi from bool_or::@3 to bool_or::@1 [phi:bool_or::@3->bool_or::@1]
  b1_from_b3:
  //SEG74 [37] phi (byte) bool_or::i#2 = (byte) bool_or::i#1 [phi:bool_or::@3->bool_or::@1#0] -- register_copy 
    jmp b1
  //SEG75 bool_or::@1
  b1:
  //SEG76 [38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG77 [39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2
    jmp b7
  //SEG78 bool_or::@7
  b7:
  //SEG79 [40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b2
    jmp b4
  //SEG80 bool_or::@4
  b4:
  //SEG81 [41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta screen,x
    jmp b3
  //SEG82 bool_or::@3
  b3:
  //SEG83 [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG84 [43] if((byte) bool_or::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_or::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$15
    bne b1_from_b3
    jmp breturn
  //SEG85 bool_or::@return
  breturn:
  //SEG86 [44] return 
    rts
  //SEG87 bool_or::@2
  b2:
  //SEG88 [45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta screen,x
    jmp b3
}
//SEG89 bool_and
bool_and: {
    .label screen = $400
  //SEG90 [47] phi from bool_and to bool_and::@1 [phi:bool_and->bool_and::@1]
  b1_from_bool_and:
  //SEG91 [47] phi (byte) bool_and::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_and->bool_and::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG92 [47] phi from bool_and::@3 to bool_and::@1 [phi:bool_and::@3->bool_and::@1]
  b1_from_b3:
  //SEG93 [47] phi (byte) bool_and::i#2 = (byte) bool_and::i#1 [phi:bool_and::@3->bool_and::@1#0] -- register_copy 
    jmp b1
  //SEG94 bool_and::@1
  b1:
  //SEG95 [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b7
    jmp b4
  //SEG97 bool_and::@4
  b4:
  //SEG98 [50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta screen,x
    jmp b3
  //SEG99 bool_and::@3
  b3:
  //SEG100 [51] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG101 [52] if((byte) bool_and::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_and::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$15
    bne b1_from_b3
    jmp breturn
  //SEG102 bool_and::@return
  breturn:
  //SEG103 [53] return 
    rts
  //SEG104 bool_and::@7
  b7:
  //SEG105 [54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b2
    jmp b4
  //SEG106 bool_and::@2
  b2:
  //SEG107 [55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta screen,x
    jmp b3
}

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b5
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b7
Removing instruction jmp b9
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b7
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b7
Removing instruction jmp b4
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b3 with b1
Replacing label b1_from_b3 with b1
Replacing label b1_from_b3 with b1
Replacing label b1_from_b3 with b1
Removing instruction b5_from_bbegin:
Removing instruction b5:
Removing instruction main_from_b5:
Removing instruction bend_from_b5:
Removing instruction b1_from_main:
Removing instruction bool_or_from_b1:
Removing instruction b2_from_b1:
Removing instruction bool_not_from_b2:
Removing instruction b3_from_b2:
Removing instruction bool_complex_from_b3:
Removing instruction b1_from_b3:
Removing instruction b1_from_b3:
Removing instruction b1_from_b3:
Removing instruction b1_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction bool_and_from_main:
Removing instruction b1:
Removing instruction b2:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b1_from_bool_complex:
Removing instruction b9:
Removing instruction breturn:
Removing instruction b1_from_bool_not:
Removing instruction b7:
Removing instruction b2:
Removing instruction breturn:
Removing instruction b1_from_bool_or:
Removing instruction b7:
Removing instruction b4:
Removing instruction breturn:
Removing instruction b1_from_bool_and:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @5
(label) @begin
(label) @end
(void()) bool_and()
(byte~) bool_and::$1 reg byte a 11.0
(label) bool_and::@1
(label) bool_and::@2
(label) bool_and::@3
(label) bool_and::@4
(label) bool_and::@7
(label) bool_and::@return
(byte) bool_and::i
(byte) bool_and::i#1 reg byte x 16.5
(byte) bool_and::i#2 reg byte x 11.0
(byte*) bool_and::screen
(const byte*) bool_and::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) 1024
(void()) bool_complex()
(byte~) bool_complex::$1 reg byte x 7.333333333333333
(byte~) bool_complex::$5 reg byte a 5.5
(label) bool_complex::@1
(label) bool_complex::@2
(label) bool_complex::@3
(label) bool_complex::@4
(label) bool_complex::@7
(label) bool_complex::@8
(label) bool_complex::@9
(label) bool_complex::@return
(byte) bool_complex::i
(byte) bool_complex::i#1 reg byte y 16.5
(byte) bool_complex::i#2 reg byte y 9.777777777777779
(byte*) bool_complex::screen
(const byte*) bool_complex::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) 1144
(void()) bool_not()
(byte~) bool_not::$1 reg byte a 11.0
(label) bool_not::@1
(label) bool_not::@2
(label) bool_not::@3
(label) bool_not::@4
(label) bool_not::@7
(label) bool_not::@return
(byte) bool_not::i
(byte) bool_not::i#1 reg byte x 16.5
(byte) bool_not::i#2 reg byte x 11.0
(byte*) bool_not::screen
(const byte*) bool_not::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) 1104
(void()) bool_or()
(byte~) bool_or::$1 reg byte a 11.0
(label) bool_or::@1
(label) bool_or::@2
(label) bool_or::@3
(label) bool_or::@4
(label) bool_or::@7
(label) bool_or::@return
(byte) bool_or::i
(byte) bool_or::i#1 reg byte x 16.5
(byte) bool_or::i#2 reg byte x 11.0
(byte*) bool_or::screen
(const byte*) bool_or::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) 1064
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return

reg byte y [ bool_complex::i#2 bool_complex::i#1 ]
reg byte x [ bool_not::i#2 bool_not::i#1 ]
reg byte x [ bool_or::i#2 bool_or::i#1 ]
reg byte x [ bool_and::i#2 bool_and::i#1 ]
reg byte x [ bool_complex::$1 ]
reg byte a [ bool_complex::$5 ]
reg byte a [ bool_not::$1 ]
reg byte a [ bool_or::$1 ]
reg byte a [ bool_and::$1 ]


FINAL ASSEMBLER
Score: 1804

//SEG0 File Comments
// A test of boolean conditions using && || and !
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
//SEG3 @begin
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
//SEG5 @5
//SEG6 [2] call main 
//SEG7 [4] phi from @5 to main [phi:@5->main]
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
//SEG9 @end
//SEG10 main
main: {
  //SEG11 [5] call bool_and 
  //SEG12 [46] phi from main to bool_and [phi:main->bool_and]
    jsr bool_and
  //SEG13 [6] phi from main to main::@1 [phi:main->main::@1]
  //SEG14 main::@1
  //SEG15 [7] call bool_or 
  //SEG16 [36] phi from main::@1 to bool_or [phi:main::@1->bool_or]
    jsr bool_or
  //SEG17 [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  //SEG18 main::@2
  //SEG19 [9] call bool_not 
  //SEG20 [26] phi from main::@2 to bool_not [phi:main::@2->bool_not]
    jsr bool_not
  //SEG21 [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  //SEG22 main::@3
  //SEG23 [11] call bool_complex 
  //SEG24 [13] phi from main::@3 to bool_complex [phi:main::@3->bool_complex]
    jsr bool_complex
  //SEG25 main::@return
  //SEG26 [12] return 
    rts
}
//SEG27 bool_complex
bool_complex: {
    .label screen = $478
  //SEG28 [14] phi from bool_complex to bool_complex::@1 [phi:bool_complex->bool_complex::@1]
  //SEG29 [14] phi (byte) bool_complex::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_complex->bool_complex::@1#0] -- vbuyy=vbuc1 
    ldy #0
  //SEG30 [14] phi from bool_complex::@3 to bool_complex::@1 [phi:bool_complex::@3->bool_complex::@1]
  //SEG31 [14] phi (byte) bool_complex::i#2 = (byte) bool_complex::i#1 [phi:bool_complex::@3->bool_complex::@1#0] -- register_copy 
  //SEG32 bool_complex::@1
  b1:
  //SEG33 [15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuyy_band_vbuc1 
    tya
    and #1
    tax
  //SEG34 [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuyy_band_vbuc1 
    tya
    and #1
  //SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@8 -- vbuyy_lt_vbuc1_then_la1 
    cpy #$a
    bcc b8
  //SEG36 bool_complex::@7
  b7:
  //SEG37 [18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@4 -- vbuyy_lt_vbuc1_then_la1 
    cpy #$a
    bcc b4
  //SEG38 bool_complex::@9
  //SEG39 [19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
  //SEG40 bool_complex::@2
  b2:
  //SEG41 [20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #'*'
    sta screen,y
  //SEG42 bool_complex::@3
  b3:
  //SEG43 [21] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 -- vbuyy=_inc_vbuyy 
    iny
  //SEG44 [22] if((byte) bool_complex::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_complex::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$15
    bne b1
  //SEG45 bool_complex::@return
  //SEG46 [23] return 
    rts
  //SEG47 bool_complex::@4
  b4:
  //SEG48 [24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2 
    lda #' '
    sta screen,y
    jmp b3
  //SEG49 bool_complex::@8
  b8:
  //SEG50 [25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 -- vbuxx_eq_0_then_la1 
    cpx #0
    beq b2
    jmp b7
}
//SEG51 bool_not
bool_not: {
    .label screen = $450
  //SEG52 [27] phi from bool_not to bool_not::@1 [phi:bool_not->bool_not::@1]
  //SEG53 [27] phi (byte) bool_not::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_not->bool_not::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG54 [27] phi from bool_not::@3 to bool_not::@1 [phi:bool_not::@3->bool_not::@1]
  //SEG55 [27] phi (byte) bool_not::i#2 = (byte) bool_not::i#1 [phi:bool_not::@3->bool_not::@1#0] -- register_copy 
  //SEG56 bool_not::@1
  b1:
  //SEG57 [28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG58 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b4
  //SEG59 bool_not::@7
  //SEG60 [30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
  //SEG61 bool_not::@2
  //SEG62 [31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta screen,x
  //SEG63 bool_not::@3
  b3:
  //SEG64 [32] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG65 [33] if((byte) bool_not::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_not::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$15
    bne b1
  //SEG66 bool_not::@return
  //SEG67 [34] return 
    rts
  //SEG68 bool_not::@4
  b4:
  //SEG69 [35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta screen,x
    jmp b3
}
//SEG70 bool_or
bool_or: {
    .label screen = $428
  //SEG71 [37] phi from bool_or to bool_or::@1 [phi:bool_or->bool_or::@1]
  //SEG72 [37] phi (byte) bool_or::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_or->bool_or::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG73 [37] phi from bool_or::@3 to bool_or::@1 [phi:bool_or::@3->bool_or::@1]
  //SEG74 [37] phi (byte) bool_or::i#2 = (byte) bool_or::i#1 [phi:bool_or::@3->bool_or::@1#0] -- register_copy 
  //SEG75 bool_or::@1
  b1:
  //SEG76 [38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG77 [39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2
  //SEG78 bool_or::@7
  //SEG79 [40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b2
  //SEG80 bool_or::@4
  //SEG81 [41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta screen,x
  //SEG82 bool_or::@3
  b3:
  //SEG83 [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG84 [43] if((byte) bool_or::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_or::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$15
    bne b1
  //SEG85 bool_or::@return
  //SEG86 [44] return 
    rts
  //SEG87 bool_or::@2
  b2:
  //SEG88 [45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta screen,x
    jmp b3
}
//SEG89 bool_and
bool_and: {
    .label screen = $400
  //SEG90 [47] phi from bool_and to bool_and::@1 [phi:bool_and->bool_and::@1]
  //SEG91 [47] phi (byte) bool_and::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:bool_and->bool_and::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG92 [47] phi from bool_and::@3 to bool_and::@1 [phi:bool_and::@3->bool_and::@1]
  //SEG93 [47] phi (byte) bool_and::i#2 = (byte) bool_and::i#1 [phi:bool_and::@3->bool_and::@1#0] -- register_copy 
  //SEG94 bool_and::@1
  b1:
  //SEG95 [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #1
  //SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b7
  //SEG97 bool_and::@4
  b4:
  //SEG98 [50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta screen,x
  //SEG99 bool_and::@3
  b3:
  //SEG100 [51] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG101 [52] if((byte) bool_and::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 21) goto bool_and::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$15
    bne b1
  //SEG102 bool_and::@return
  //SEG103 [53] return 
    rts
  //SEG104 bool_and::@7
  b7:
  //SEG105 [54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b2
    jmp b4
  //SEG106 bool_and::@2
  b2:
  //SEG107 [55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta screen,x
    jmp b3
}

