Warning! Adding boolean cast to non-boolean sub-expression (number~) main::$0
Warning! Adding boolean cast to non-boolean sub-expression (number~) main::$3
Culled Empty Block (label) main::@10

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  to:@1
main: scope:[main]  from @1
  (byte) main::idx#0 ← (number) 0
  (byte) main::i#0 ← (byte) 0
  to:main::@1
main::@1: scope:[main]  from main main::@5
  (byte) main::idx#7 ← phi( main/(byte) main::idx#0 main::@5/(byte) main::idx#1 )
  (byte) main::i#2 ← phi( main/(byte) main::i#0 main::@5/(byte) main::i#1 )
  (number~) main::$0 ← (byte) main::i#2 & (number) 1
  (bool~) main::$17 ← (number) 0 != (number~) main::$0
  (bool~) main::$1 ← ! (bool~) main::$17
  if((bool~) main::$1) goto main::@2
  to:main::@6
main::@2: scope:[main]  from main::@1 main::@6
  (byte) main::idx#8 ← phi( main::@1/(byte) main::idx#7 main::@6/(byte) main::idx#2 )
  (byte) main::i#3 ← phi( main::@1/(byte) main::i#2 main::@6/(byte) main::i#7 )
  (number~) main::$3 ← (byte) main::i#3 & (number) 2
  (bool~) main::$18 ← (number) 0 != (number~) main::$3
  (bool~) main::$4 ← ! (bool~) main::$18
  if((bool~) main::$4) goto main::@3
  to:main::@7
main::@6: scope:[main]  from main::@1
  (byte) main::i#7 ← phi( main::@1/(byte) main::i#2 )
  (byte) main::idx#2 ← phi( main::@1/(byte) main::idx#7 )
  (byte*~) main::$2 ← (byte*) SCREEN#0 + (number) $28*(number) 0
  *((byte*~) main::$2 + (byte) main::idx#2) ← (byte) '+'
  to:main::@2
main::@3: scope:[main]  from main::@2 main::@7
  (byte) main::idx#9 ← phi( main::@2/(byte) main::idx#8 main::@7/(byte) main::idx#3 )
  (byte) main::i#4 ← phi( main::@2/(byte) main::i#3 main::@7/(byte) main::i#8 )
  (number~) main::$6 ← (byte) main::i#4 & (number) 1
  (number~) main::$7 ← (byte) main::i#4 & (number) 2
  (bool~) main::$8 ← (number~) main::$6 && (number~) main::$7
  (bool~) main::$9 ← ! (bool~) main::$8
  if((bool~) main::$9) goto main::@4
  to:main::@8
main::@7: scope:[main]  from main::@2
  (byte) main::i#8 ← phi( main::@2/(byte) main::i#3 )
  (byte) main::idx#3 ← phi( main::@2/(byte) main::idx#8 )
  (byte*~) main::$5 ← (byte*) SCREEN#0 + (number) $28*(number) 1
  *((byte*~) main::$5 + (byte) main::idx#3) ← (byte) '+'
  to:main::@3
main::@4: scope:[main]  from main::@3 main::@8
  (byte) main::idx#10 ← phi( main::@3/(byte) main::idx#9 main::@8/(byte) main::idx#4 )
  (byte) main::i#5 ← phi( main::@3/(byte) main::i#4 main::@8/(byte) main::i#9 )
  (number~) main::$11 ← (byte) main::i#5 & (number) 1
  (number~) main::$12 ← (byte) main::i#5 & (number) 2
  (bool~) main::$13 ← (number~) main::$11 || (number~) main::$12
  (bool~) main::$14 ← ! (bool~) main::$13
  if((bool~) main::$14) goto main::@5
  to:main::@9
main::@8: scope:[main]  from main::@3
  (byte) main::i#9 ← phi( main::@3/(byte) main::i#4 )
  (byte) main::idx#4 ← phi( main::@3/(byte) main::idx#9 )
  (byte*~) main::$10 ← (byte*) SCREEN#0 + (number) $28*(number) 2
  *((byte*~) main::$10 + (byte) main::idx#4) ← (byte) '+'
  to:main::@4
main::@5: scope:[main]  from main::@4 main::@9
  (byte) main::i#6 ← phi( main::@4/(byte) main::i#5 main::@9/(byte) main::i#10 )
  (byte) main::idx#5 ← phi( main::@4/(byte) main::idx#10 main::@9/(byte) main::idx#6 )
  (byte) main::idx#1 ← ++ (byte) main::idx#5
  (byte) main::i#1 ← (byte) main::i#6 + rangenext(0,7)
  (bool~) main::$16 ← (byte) main::i#1 != rangelast(0,7)
  if((bool~) main::$16) goto main::@1
  to:main::@return
main::@9: scope:[main]  from main::@4
  (byte) main::i#10 ← phi( main::@4/(byte) main::i#5 )
  (byte) main::idx#6 ← phi( main::@4/(byte) main::idx#10 )
  (byte*~) main::$15 ← (byte*) SCREEN#0 + (number) $28*(number) 3
  *((byte*~) main::$15 + (byte) main::idx#6) ← (byte) '+'
  to:main::@5
main::@return: scope:[main]  from main::@5
  return 
  to:@return
@1: scope:[]  from @begin
  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*) SCREEN
(byte*) SCREEN#0
(void()) main()
(number~) main::$0
(bool~) main::$1
(byte*~) main::$10
(number~) main::$11
(number~) main::$12
(bool~) main::$13
(bool~) main::$14
(byte*~) main::$15
(bool~) main::$16
(bool~) main::$17
(bool~) main::$18
(byte*~) main::$2
(number~) main::$3
(bool~) main::$4
(byte*~) main::$5
(number~) main::$6
(number~) main::$7
(bool~) main::$8
(bool~) main::$9
(label) main::@1
(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::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#10
(byte) main::i#2
(byte) main::i#3
(byte) main::i#4
(byte) main::i#5
(byte) main::i#6
(byte) main::i#7
(byte) main::i#8
(byte) main::i#9
(byte) main::idx
(byte) main::idx#0
(byte) main::idx#1
(byte) main::idx#10
(byte) main::idx#2
(byte) main::idx#3
(byte) main::idx#4
(byte) main::idx#5
(byte) main::idx#6
(byte) main::idx#7
(byte) main::idx#8
(byte) main::idx#9

Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) main::$0 ← (byte) main::i#2 & (number) 1
Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (byte) main::i#2 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) main::$17 ← (number) 0 != (unumber~) main::$0
Adding number conversion cast (unumber) 2 in (number~) main::$3 ← (byte) main::i#3 & (number) 2
Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (byte) main::i#3 & (unumber)(number) 2
Adding number conversion cast (unumber) 0 in (bool~) main::$18 ← (number) 0 != (unumber~) main::$3
Adding number conversion cast (unumber) $28*0 in (byte*~) main::$2 ← (byte*) SCREEN#0 + (number) $28*(number) 0
Adding number conversion cast (unumber) 1 in (number~) main::$6 ← (byte) main::i#4 & (number) 1
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (byte) main::i#4 & (unumber)(number) 1
Adding number conversion cast (unumber) 2 in (number~) main::$7 ← (byte) main::i#4 & (number) 2
Adding number conversion cast (unumber) main::$7 in (number~) main::$7 ← (byte) main::i#4 & (unumber)(number) 2
Adding number conversion cast (unumber) $28*1 in (byte*~) main::$5 ← (byte*) SCREEN#0 + (number) $28*(number) 1
Adding number conversion cast (unumber) 1 in (number~) main::$11 ← (byte) main::i#5 & (number) 1
Adding number conversion cast (unumber) main::$11 in (number~) main::$11 ← (byte) main::i#5 & (unumber)(number) 1
Adding number conversion cast (unumber) 2 in (number~) main::$12 ← (byte) main::i#5 & (number) 2
Adding number conversion cast (unumber) main::$12 in (number~) main::$12 ← (byte) main::i#5 & (unumber)(number) 2
Adding number conversion cast (unumber) $28*2 in (byte*~) main::$10 ← (byte*) SCREEN#0 + (number) $28*(number) 2
Adding number conversion cast (unumber) $28*3 in (byte*~) main::$15 ← (byte*) SCREEN#0 + (number) $28*(number) 3
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$0 ← (byte) main::i#2 & (byte) 1
Inferred type updated to byte in (unumber~) main::$3 ← (byte) main::i#3 & (byte) 2
Inferred type updated to byte in (unumber~) main::$6 ← (byte) main::i#4 & (byte) 1
Inferred type updated to byte in (unumber~) main::$7 ← (byte) main::i#4 & (byte) 2
Inferred type updated to byte in (unumber~) main::$11 ← (byte) main::i#5 & (byte) 1
Inferred type updated to byte in (unumber~) main::$12 ← (byte) main::i#5 & (byte) 2
Inversing boolean not [6] (bool~) main::$1 ← (byte) 0 == (byte~) main::$0 from [5] (bool~) main::$17 ← (byte) 0 != (byte~) main::$0
Inversing boolean not [11] (bool~) main::$4 ← (byte) 0 == (byte~) main::$3 from [10] (bool~) main::$18 ← (byte) 0 != (byte~) main::$3
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::idx#2 = (byte) main::idx#7 
Alias (byte) main::i#2 = (byte) main::i#7 
Alias (byte) main::idx#3 = (byte) main::idx#8 
Alias (byte) main::i#3 = (byte) main::i#8 
Alias (byte) main::idx#4 = (byte) main::idx#9 
Alias (byte) main::i#4 = (byte) main::i#9 
Alias (byte) main::idx#10 = (byte) main::idx#6 
Alias (byte) main::i#10 = (byte) main::i#5 
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::i#10 = (byte) main::i#3 (byte) main::i#2 (byte) main::i#4 (byte) main::i#6 
Alias (byte) main::idx#10 = (byte) main::idx#3 (byte) main::idx#2 (byte) main::idx#4 (byte) main::idx#5 
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$1 [7] if((byte) 0==(byte~) main::$0) goto main::@2
Simple Condition (bool~) main::$4 [12] if((byte) 0==(byte~) main::$3) goto main::@3
Simple Condition (bool~) main::$16 [38] if((byte) main::i#1!=rangelast(0,7)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [20] (bool~) main::$9 ← ! (bool~) main::$8
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting && if()-condition to two if()s [19] (bool~) main::$8 ← (byte~) main::$6 && (byte~) main::$7
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [29] (bool~) main::$14 ← ! (bool~) main::$13
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [28] (bool~) main::$13 ← (byte~) main::$11 || (byte~) main::$12
Successful SSA optimization Pass2ConditionalAndOrRewriting
Warning! Adding boolean cast to non-boolean condition (byte~) main::$6
Warning! Adding boolean cast to non-boolean condition (byte~) main::$11
Warning! Adding boolean cast to non-boolean condition (byte~) main::$7
Warning! Adding boolean cast to non-boolean condition (byte~) main::$12
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [36] main::i#1 ← ++ main::i#10 to ++
Resolved ranged comparison value [38] if(main::i#1!=rangelast(0,7)) goto main::@1 to (number) 8
Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [14] (byte*~) main::$2 ← (const byte*) SCREEN#0 + (byte)(number) $28*(number) 0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero SCREEN#0 in [14] (byte*~) main::$2 ← (const byte*) SCREEN#0 + (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Adding number conversion cast (unumber) 0 in (bool~) main::$19 ← (number) 0 != (byte~) main::$6
Adding number conversion cast (unumber) 0 in (bool~) main::$20 ← (number) 0 != (byte~) main::$11
Adding number conversion cast (unumber) 8 in if((byte) main::i#1!=(number) 8) goto main::@1
Adding number conversion cast (unumber) 0 in (bool~) main::$21 ← (number) 0 != (byte~) main::$7
Adding number conversion cast (unumber) 0 in (bool~) main::$22 ← (number) 0 != (byte~) main::$12
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$19 [10] if((byte) 0!=(byte~) main::$6) goto main::@11
Simple Condition (bool~) main::$20 [16] if((byte) 0!=(byte~) main::$11) goto main::@9
Simple Condition (bool~) main::$21 [27] if((byte) 0!=(byte~) main::$7) goto main::@8
Simple Condition (bool~) main::$22 [29] if((byte) 0!=(byte~) main::$12) goto main::@9
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [10] if((byte) 0==(byte~) main::$6) goto main::@4
Negating conditional jump and destination [27] if((byte) 0==(byte~) main::$7) goto main::@4
Negating conditional jump and destination [29] if((byte) 0==(byte~) main::$12) goto main::@5
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant right-side identified [11] (byte*~) main::$5 ← (const byte*) SCREEN#0 + (byte)(number) $28*(number) 1
Constant right-side identified [17] (byte*~) main::$10 ← (const byte*) SCREEN#0 + (byte)(number) $28*(number) 2
Constant right-side identified [22] (byte*~) main::$15 ← (const byte*) SCREEN#0 + (byte)(number) $28*(number) 3
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) main::$2 = SCREEN#0
Constant (const byte*) main::$5 = SCREEN#0+(byte)$28*1
Constant (const byte*) main::$10 = SCREEN#0+(byte)$28*2
Constant (const byte*) main::$15 = SCREEN#0+(byte)$28*3
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) main::idx#0
Inlining constant with var siblings (const byte) main::i#0
Constant inlined main::$5 = (const byte*) SCREEN#0+(byte)(number) $28*(number) 1
Constant inlined main::i#0 = (byte) 0
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::$15 = (const byte*) SCREEN#0+(byte)(number) $28*(number) 3
Constant inlined main::$2 = (const byte*) SCREEN#0
Constant inlined main::$10 = (const byte*) SCREEN#0+(byte)(number) $28*(number) 2
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@13(between main::@5 and main::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
CALL GRAPH
Calls in [] to main:2 

Created 2 initial phi equivalence classes
Coalesced [27] main::i#11 ← main::i#1
Coalesced [28] main::idx#11 ← main::idx#1
Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) main::@13
Renumbering block main::@11 to main::@10
Renumbering block main::@12 to main::@11
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

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
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@5
  [5] (byte) main::idx#10 ← phi( main/(byte) 0 main::@5/(byte) main::idx#1 )
  [5] (byte) main::i#10 ← phi( main/(byte) 0 main::@5/(byte) main::i#1 )
  [6] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1
  [7] if((byte) 0==(byte~) main::$0) goto main::@2
  to:main::@6
main::@6: scope:[main]  from main::@1
  [8] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+'
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@6
  [9] (byte~) main::$3 ← (byte) main::i#10 & (byte) 2
  [10] if((byte) 0==(byte~) main::$3) goto main::@3
  to:main::@7
main::@7: scope:[main]  from main::@2
  [11] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+'
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@7
  [12] (byte~) main::$6 ← (byte) main::i#10 & (byte) 1
  [13] (byte~) main::$7 ← (byte) main::i#10 & (byte) 2
  [14] if((byte) 0==(byte~) main::$6) goto main::@4
  to:main::@10
main::@10: scope:[main]  from main::@3
  [15] if((byte) 0==(byte~) main::$7) goto main::@4
  to:main::@8
main::@8: scope:[main]  from main::@10
  [16] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+'
  to:main::@4
main::@4: scope:[main]  from main::@10 main::@3 main::@8
  [17] (byte~) main::$11 ← (byte) main::i#10 & (byte) 1
  [18] (byte~) main::$12 ← (byte) main::i#10 & (byte) 2
  [19] if((byte) 0!=(byte~) main::$11) goto main::@9
  to:main::@11
main::@11: scope:[main]  from main::@4
  [20] if((byte) 0==(byte~) main::$12) goto main::@5
  to:main::@9
main::@9: scope:[main]  from main::@11 main::@4
  [21] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+'
  to:main::@5
main::@5: scope:[main]  from main::@11 main::@9
  [22] (byte) main::idx#1 ← ++ (byte) main::idx#10
  [23] (byte) main::i#1 ← ++ (byte) main::i#10
  [24] if((byte) main::i#1!=(byte) 8) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@5
  [25] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(byte~) main::$0 22.0
(byte~) main::$11 11.0
(byte~) main::$12 11.0
(byte~) main::$3 22.0
(byte~) main::$6 11.0
(byte~) main::$7 11.0
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#10 4.888888888888889
(byte) main::idx
(byte) main::idx#1 7.333333333333333
(byte) main::idx#10 3.8823529411764706

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

INITIAL ASM
  // File Comments
// Tests using integer conditions in && and || operator
// This should produce '01010101', '00110011', '00010001', '01110111' at the top of the screen
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .label _0 = 4
    .label _3 = 5
    .label _6 = 6
    .label _7 = 7
    .label _11 = 8
    .label _12 = 9
    .label idx = 3
    .label i = 2
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte) main::idx#10 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta idx
    // [5] phi (byte) main::i#10 = (byte) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
    // [5] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
    // [5] phi (byte) main::idx#10 = (byte) main::idx#1 [phi:main::@5->main::@1#0] -- register_copy 
    // [5] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@5->main::@1#1] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _0
    // [7] if((byte) 0==(byte~) main::$0) goto main::@2 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _0
    beq b2
    jmp b6
    // main::@6
  b6:
    // [8] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #'+'
    ldy idx
    sta SCREEN,y
    jmp b2
    // main::@2
  b2:
    // [9] (byte~) main::$3 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuz2_band_vbuc1 
    lda #2
    and i
    sta _3
    // [10] if((byte) 0==(byte~) main::$3) goto main::@3 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _3
    beq b3
    jmp b7
    // main::@7
  b7:
    // [11] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #'+'
    ldy idx
    sta SCREEN+$28*1,y
    jmp b3
    // main::@3
  b3:
    // [12] (byte~) main::$6 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _6
    // [13] (byte~) main::$7 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuz2_band_vbuc1 
    lda #2
    and i
    sta _7
    // [14] if((byte) 0==(byte~) main::$6) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _6
    beq b4
    jmp b10
    // main::@10
  b10:
    // [15] if((byte) 0==(byte~) main::$7) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _7
    beq b4
    jmp b8
    // main::@8
  b8:
    // [16] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #'+'
    ldy idx
    sta SCREEN+$28*2,y
    jmp b4
    // main::@4
  b4:
    // [17] (byte~) main::$11 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and i
    sta _11
    // [18] (byte~) main::$12 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuz2_band_vbuc1 
    lda #2
    and i
    sta _12
    // [19] if((byte) 0!=(byte~) main::$11) goto main::@9 -- vbuc1_neq_vbuz1_then_la1 
    lda #0
    cmp _11
    bne b9
    jmp b11
    // main::@11
  b11:
    // [20] if((byte) 0==(byte~) main::$12) goto main::@5 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _12
    beq b5
    jmp b9
    // main::@9
  b9:
    // [21] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #'+'
    ldy idx
    sta SCREEN+$28*3,y
    jmp b5
    // main::@5
  b5:
    // [22] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1 
    inc idx
    // [23] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 
    inc i
    // [24] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp i
    bne b1_from_b5
    jmp breturn
    // main::@return
  breturn:
    // [25] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [8] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::idx#10 main::idx#1 ]
Statement [9] (byte~) main::$3 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$3 ] ( main:2 [ main::i#10 main::idx#10 main::$3 ] ) always clobbers reg byte a 
Statement [11] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Statement [12] (byte~) main::$6 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$6 ] ( main:2 [ main::i#10 main::idx#10 main::$6 ] ) always clobbers reg byte a 
Statement [13] (byte~) main::$7 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$6 main::$7 ] ( main:2 [ main::i#10 main::idx#10 main::$6 main::$7 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::$6 ]
Statement [16] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Statement [17] (byte~) main::$11 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$11 ] ( main:2 [ main::i#10 main::idx#10 main::$11 ] ) always clobbers reg byte a 
Statement [18] (byte~) main::$12 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$11 main::$12 ] ( main:2 [ main::i#10 main::idx#10 main::$11 main::$12 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ main::$11 ]
Statement [21] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Statement [6] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$0 ] ( main:2 [ main::i#10 main::idx#10 main::$0 ] ) always clobbers reg byte a 
Statement [8] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Statement [9] (byte~) main::$3 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$3 ] ( main:2 [ main::i#10 main::idx#10 main::$3 ] ) always clobbers reg byte a 
Statement [11] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Statement [12] (byte~) main::$6 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$6 ] ( main:2 [ main::i#10 main::idx#10 main::$6 ] ) always clobbers reg byte a 
Statement [13] (byte~) main::$7 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$6 main::$7 ] ( main:2 [ main::i#10 main::idx#10 main::$6 main::$7 ] ) always clobbers reg byte a 
Statement [16] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Statement [17] (byte~) main::$11 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$11 ] ( main:2 [ main::i#10 main::idx#10 main::$11 ] ) always clobbers reg byte a 
Statement [18] (byte~) main::$12 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$11 main::$12 ] ( main:2 [ main::i#10 main::idx#10 main::$11 main::$12 ] ) always clobbers reg byte a 
Statement [21] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( main:2 [ main::i#10 main::idx#10 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::i#10 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ main::idx#10 main::idx#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:4 [ main::$0 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:5 [ main::$3 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:6 [ main::$6 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:7 [ main::$7 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:8 [ main::$11 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ main::$12 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp ZP_BYTE:4 [ main::$0 ] 22: zp ZP_BYTE:5 [ main::$3 ] 21.39: zp ZP_BYTE:2 [ main::i#10 main::i#1 ] 11.22: zp ZP_BYTE:3 [ main::idx#10 main::idx#1 ] 11: zp ZP_BYTE:6 [ main::$6 ] 11: zp ZP_BYTE:7 [ main::$7 ] 11: zp ZP_BYTE:8 [ main::$11 ] 11: zp ZP_BYTE:9 [ main::$12 ] 
Uplift Scope [] 

Uplifting [main] best 1563 combination reg byte a [ main::$0 ] reg byte a [ main::$3 ] reg byte y [ main::i#10 main::i#1 ] reg byte x [ main::idx#10 main::idx#1 ] zp ZP_BYTE:6 [ main::$6 ] zp ZP_BYTE:7 [ main::$7 ] zp ZP_BYTE:8 [ main::$11 ] zp ZP_BYTE:9 [ main::$12 ] 
Limited combination testing to 100 combinations of 20736 possible.
Uplifting [] best 1563 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ main::$6 ]
Uplifting [main] best 1563 combination zp ZP_BYTE:6 [ main::$6 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ main::$7 ]
Uplifting [main] best 1563 combination zp ZP_BYTE:7 [ main::$7 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ main::$11 ]
Uplifting [main] best 1563 combination zp ZP_BYTE:8 [ main::$11 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:9 [ main::$12 ]
Uplifting [main] best 1563 combination zp ZP_BYTE:9 [ main::$12 ] 
Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:2 [ main::$6 ]
Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:3 [ main::$7 ]
Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:4 [ main::$11 ]
Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:5 [ main::$12 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Tests using integer conditions in && and || operator
// This should produce '01010101', '00110011', '00010001', '01110111' at the top of the screen
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .label _6 = 2
    .label _7 = 3
    .label _11 = 4
    .label _12 = 5
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte) main::idx#10 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [5] phi (byte) main::i#10 = (byte) 0 [phi:main->main::@1#1] -- vbuyy=vbuc1 
    ldy #0
    jmp b1
    // [5] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
    // [5] phi (byte) main::idx#10 = (byte) main::idx#1 [phi:main::@5->main::@1#0] -- register_copy 
    // [5] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@5->main::@1#1] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 -- vbuaa=vbuyy_band_vbuc1 
    tya
    and #1
    // [7] if((byte) 0==(byte~) main::$0) goto main::@2 -- vbuc1_eq_vbuaa_then_la1 
    cmp #0
    beq b2
    jmp b6
    // main::@6
  b6:
    // [8] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN,x
    jmp b2
    // main::@2
  b2:
    // [9] (byte~) main::$3 ← (byte) main::i#10 & (byte) 2 -- vbuaa=vbuyy_band_vbuc1 
    tya
    and #2
    // [10] if((byte) 0==(byte~) main::$3) goto main::@3 -- vbuc1_eq_vbuaa_then_la1 
    cmp #0
    beq b3
    jmp b7
    // main::@7
  b7:
    // [11] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN+$28*1,x
    jmp b3
    // main::@3
  b3:
    // [12] (byte~) main::$6 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #1
    sta _6
    // [13] (byte~) main::$7 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #2
    sta _7
    // [14] if((byte) 0==(byte~) main::$6) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _6
    beq b4
    jmp b10
    // main::@10
  b10:
    // [15] if((byte) 0==(byte~) main::$7) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _7
    beq b4
    jmp b8
    // main::@8
  b8:
    // [16] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN+$28*2,x
    jmp b4
    // main::@4
  b4:
    // [17] (byte~) main::$11 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #1
    sta _11
    // [18] (byte~) main::$12 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #2
    sta _12
    // [19] if((byte) 0!=(byte~) main::$11) goto main::@9 -- vbuc1_neq_vbuz1_then_la1 
    lda #0
    cmp _11
    bne b9
    jmp b11
    // main::@11
  b11:
    // [20] if((byte) 0==(byte~) main::$12) goto main::@5 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _12
    beq b5
    jmp b9
    // main::@9
  b9:
    // [21] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN+$28*3,x
    jmp b5
    // main::@5
  b5:
    // [22] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx 
    inx
    // [23] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuyy=_inc_vbuyy 
    iny
    // [24] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #8
    bne b1_from_b5
    jmp breturn
    // main::@return
  breturn:
    // [25] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b6
Removing instruction jmp b2
Removing instruction jmp b7
Removing instruction jmp b3
Removing instruction jmp b10
Removing instruction jmp b8
Removing instruction jmp b4
Removing instruction jmp b11
Removing instruction jmp b9
Removing instruction jmp b5
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b5 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b5:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b6:
Removing instruction b7:
Removing instruction b10:
Removing instruction b8:
Removing instruction b11:
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
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(byte~) main::$0 reg byte a 22.0
(byte~) main::$11 $11 zp ZP_BYTE:4 11.0
(byte~) main::$12 $12 zp ZP_BYTE:5 11.0
(byte~) main::$3 reg byte a 22.0
(byte~) main::$6 $6 zp ZP_BYTE:2 11.0
(byte~) main::$7 $7 zp ZP_BYTE:3 11.0
(label) main::@1
(label) main::@10
(label) main::@11
(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::i
(byte) main::i#1 reg byte y 16.5
(byte) main::i#10 reg byte y 4.888888888888889
(byte) main::idx
(byte) main::idx#1 reg byte x 7.333333333333333
(byte) main::idx#10 reg byte x 3.8823529411764706

reg byte y [ main::i#10 main::i#1 ]
reg byte x [ main::idx#10 main::idx#1 ]
reg byte a [ main::$0 ]
reg byte a [ main::$3 ]
zp ZP_BYTE:2 [ main::$6 ]
zp ZP_BYTE:3 [ main::$7 ]
zp ZP_BYTE:4 [ main::$11 ]
zp ZP_BYTE:5 [ main::$12 ]


FINAL ASSEMBLER
Score: 1121

  // File Comments
// Tests using integer conditions in && and || operator
// This should produce '01010101', '00110011', '00010001', '01110111' at the top of the screen
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .label _6 = 2
    .label _7 = 3
    .label _11 = 4
    .label _12 = 5
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (byte) main::idx#10 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [5] phi (byte) main::i#10 = (byte) 0 [phi:main->main::@1#1] -- vbuyy=vbuc1 
    ldy #0
    // [5] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
    // [5] phi (byte) main::idx#10 = (byte) main::idx#1 [phi:main::@5->main::@1#0] -- register_copy 
    // [5] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@5->main::@1#1] -- register_copy 
    // main::@1
  b1:
    // i&1
    // [6] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 -- vbuaa=vbuyy_band_vbuc1 
    tya
    and #1
    // if(i&1)
    // [7] if((byte) 0==(byte~) main::$0) goto main::@2 -- vbuc1_eq_vbuaa_then_la1 
    cmp #0
    beq b2
    // main::@6
    // (SCREEN+40*0)[idx] = '+'
    // [8] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN,x
    // main::@2
  b2:
    // i&2
    // [9] (byte~) main::$3 ← (byte) main::i#10 & (byte) 2 -- vbuaa=vbuyy_band_vbuc1 
    tya
    and #2
    // if(i&2)
    // [10] if((byte) 0==(byte~) main::$3) goto main::@3 -- vbuc1_eq_vbuaa_then_la1 
    cmp #0
    beq b3
    // main::@7
    // (SCREEN+40*1)[idx] = '+'
    // [11] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN+$28*1,x
    // main::@3
  b3:
    // i&1
    // [12] (byte~) main::$6 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #1
    sta _6
    // i&2
    // [13] (byte~) main::$7 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #2
    sta _7
    // if(i&1 && i&2)
    // [14] if((byte) 0==(byte~) main::$6) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp _6
    beq b4
    // main::@10
    // [15] if((byte) 0==(byte~) main::$7) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 
    cmp _7
    beq b4
    // main::@8
    // (SCREEN+40*2)[idx] = '+'
    // [16] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN+$28*2,x
    // main::@4
  b4:
    // i&1
    // [17] (byte~) main::$11 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #1
    sta _11
    // i&2
    // [18] (byte~) main::$12 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1 
    tya
    and #2
    sta _12
    // if(i&1 || i&2)
    // [19] if((byte) 0!=(byte~) main::$11) goto main::@9 -- vbuc1_neq_vbuz1_then_la1 
    lda #0
    cmp _11
    bne b9
    // main::@11
    // [20] if((byte) 0==(byte~) main::$12) goto main::@5 -- vbuc1_eq_vbuz1_then_la1 
    cmp _12
    beq b5
    // main::@9
  b9:
    // (SCREEN+40*3)[idx] = '+'
    // [21] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'+'
    sta SCREEN+$28*3,x
    // main::@5
  b5:
    // idx++;
    // [22] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx 
    inx
    // for( byte i:0..7)
    // [23] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuyy=_inc_vbuyy 
    iny
    // [24] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #8
    bne b1
    // main::@return
    // }
    // [25] return 
    rts
}
  // File Data

