Identified constant variable (bool) bool_const_if::b
Identified constant variable (byte) bool_const_vars::a
Identified constant variable (byte) bool_const_inline::a
Culled Empty Block (label) @1
Culled Empty Block (label) bool_const_if::@2
Culled Empty Block (label) bool_const_if::@4
Culled Empty Block (label) @2
Culled Empty Block (label) bool_const_vars::@2
Culled Empty Block (label) bool_const_vars::@4
Culled Empty Block (label) @3
Culled Empty Block (label) bool_const_inline::@2
Culled Empty Block (label) bool_const_inline::@4

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  to:@4
main: scope:[main]  from @4
  call bool_const_if 
  to:main::@1
main::@1: scope:[main]  from main
  call bool_const_vars 
  to:main::@2
main::@2: scope:[main]  from main::@1
  call bool_const_inline 
  to:main::@3
main::@3: scope:[main]  from main::@2
  to:main::@return
main::@return: scope:[main]  from main::@3
  return 
  to:@return
bool_const_if: scope:[bool_const_if]  from main
  (bool) bool_const_if::b#0 ← true
  if((bool) bool_const_if::b#0) goto bool_const_if::@1
  to:bool_const_if::@3
bool_const_if::@1: scope:[bool_const_if]  from bool_const_if
  *((byte*) SCREEN#0 + (number) 0) ← (byte) 't'
  to:bool_const_if::@return
bool_const_if::@3: scope:[bool_const_if]  from bool_const_if
  *((byte*) SCREEN#0 + (number) 0) ← (byte) 'f'
  to:bool_const_if::@return
bool_const_if::@return: scope:[bool_const_if]  from bool_const_if::@1 bool_const_if::@3
  return 
  to:@return
bool_const_vars: scope:[bool_const_vars]  from main::@1
  (byte) bool_const_vars::a#0 ← (number) $e
  (bool~) bool_const_vars::$0 ← (byte) bool_const_vars::a#0 == (number) $f
  (bool~) bool_const_vars::$1 ← (number) $15 < (byte) bool_const_vars::a#0
  (bool~) bool_const_vars::$2 ← ! (bool~) bool_const_vars::$1
  (bool~) bool_const_vars::$3 ← (bool~) bool_const_vars::$0 || (bool~) bool_const_vars::$2
  (bool) bool_const_vars::b1#0 ← (bool~) bool_const_vars::$3
  (bool~) bool_const_vars::$4 ← (byte) bool_const_vars::a#0 != (number) $2c
  (bool~) bool_const_vars::$5 ← (byte) bool_const_vars::a#0 >= (number) -8
  (bool~) bool_const_vars::$6 ← (bool~) bool_const_vars::$4 || (bool~) bool_const_vars::$5
  (bool) bool_const_vars::b2#0 ← (bool~) bool_const_vars::$6
  (bool~) bool_const_vars::$7 ← ! (bool) bool_const_vars::b2#0
  (bool~) bool_const_vars::$8 ← (bool) bool_const_vars::b1#0 && (bool~) bool_const_vars::$7
  (bool~) bool_const_vars::$9 ← (bool~) bool_const_vars::$8 || false
  (bool) bool_const_vars::b#0 ← (bool~) bool_const_vars::$9
  if((bool) bool_const_vars::b#0) goto bool_const_vars::@1
  to:bool_const_vars::@3
bool_const_vars::@1: scope:[bool_const_vars]  from bool_const_vars
  *((byte*) SCREEN#0 + (number) 1) ← (byte) 't'
  to:bool_const_vars::@return
bool_const_vars::@3: scope:[bool_const_vars]  from bool_const_vars
  *((byte*) SCREEN#0 + (number) 1) ← (byte) 'f'
  to:bool_const_vars::@return
bool_const_vars::@return: scope:[bool_const_vars]  from bool_const_vars::@1 bool_const_vars::@3
  return 
  to:@return
bool_const_inline: scope:[bool_const_inline]  from main::@2
  (byte) bool_const_inline::a#0 ← (number) $17
  (bool~) bool_const_inline::$0 ← (byte) bool_const_inline::a#0 != (number) $2c
  (bool~) bool_const_inline::$1 ← (byte) bool_const_inline::a#0 >= (number) -8
  (bool~) bool_const_inline::$2 ← (byte) bool_const_inline::a#0 == (number) $f
  (bool~) bool_const_inline::$3 ← (bool~) bool_const_inline::$1 && (bool~) bool_const_inline::$2
  (bool~) bool_const_inline::$4 ← (bool~) bool_const_inline::$0 || (bool~) bool_const_inline::$3
  (bool~) bool_const_inline::$5 ← (number) $15 < (byte) bool_const_inline::a#0
  (bool~) bool_const_inline::$6 ← ! (bool~) bool_const_inline::$5
  (bool~) bool_const_inline::$7 ← (bool~) bool_const_inline::$4 || (bool~) bool_const_inline::$6
  if((bool~) bool_const_inline::$7) goto bool_const_inline::@1
  to:bool_const_inline::@3
bool_const_inline::@1: scope:[bool_const_inline]  from bool_const_inline
  *((byte*) SCREEN#0 + (number) 2) ← (byte) 't'
  to:bool_const_inline::@return
bool_const_inline::@3: scope:[bool_const_inline]  from bool_const_inline
  *((byte*) SCREEN#0 + (number) 2) ← (byte) 'f'
  to:bool_const_inline::@return
bool_const_inline::@return: scope:[bool_const_inline]  from bool_const_inline::@1 bool_const_inline::@3
  return 
  to:@return
@4: scope:[]  from @begin
  call main 
  to:@5
@5: scope:[]  from @4
  to:@end
@end: scope:[]  from @5

SYMBOL TABLE SSA
(label) @4
(label) @5
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(void()) bool_const_if()
(label) bool_const_if::@1
(label) bool_const_if::@3
(label) bool_const_if::@return
(bool) bool_const_if::b
(bool) bool_const_if::b#0
(void()) bool_const_inline()
(bool~) bool_const_inline::$0
(bool~) bool_const_inline::$1
(bool~) bool_const_inline::$2
(bool~) bool_const_inline::$3
(bool~) bool_const_inline::$4
(bool~) bool_const_inline::$5
(bool~) bool_const_inline::$6
(bool~) bool_const_inline::$7
(label) bool_const_inline::@1
(label) bool_const_inline::@3
(label) bool_const_inline::@return
(byte) bool_const_inline::a
(byte) bool_const_inline::a#0
(void()) bool_const_vars()
(bool~) bool_const_vars::$0
(bool~) bool_const_vars::$1
(bool~) bool_const_vars::$2
(bool~) bool_const_vars::$3
(bool~) bool_const_vars::$4
(bool~) bool_const_vars::$5
(bool~) bool_const_vars::$6
(bool~) bool_const_vars::$7
(bool~) bool_const_vars::$8
(bool~) bool_const_vars::$9
(label) bool_const_vars::@1
(label) bool_const_vars::@3
(label) bool_const_vars::@return
(byte) bool_const_vars::a
(byte) bool_const_vars::a#0
(bool) bool_const_vars::b
(bool) bool_const_vars::b#0
(bool) bool_const_vars::b1
(bool) bool_const_vars::b1#0
(bool) bool_const_vars::b2
(bool) bool_const_vars::b2#0
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return

Adding number conversion cast (unumber) 0 in *((byte*) SCREEN#0 + (number) 0) ← (byte) 't'
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN#0 + (number) 0) ← (byte) 'f'
Adding number conversion cast (unumber) $e in (byte) bool_const_vars::a#0 ← (number) $e
Adding number conversion cast (unumber) $f in (bool~) bool_const_vars::$0 ← (byte) bool_const_vars::a#0 == (number) $f
Adding number conversion cast (unumber) $15 in (bool~) bool_const_vars::$1 ← (number) $15 < (byte) bool_const_vars::a#0
Adding number conversion cast (unumber) $2c in (bool~) bool_const_vars::$4 ← (byte) bool_const_vars::a#0 != (number) $2c
Adding number conversion cast (unumber) -8 in (bool~) bool_const_vars::$5 ← (byte) bool_const_vars::a#0 >= (number) -8
Adding number conversion cast (unumber) 1 in *((byte*) SCREEN#0 + (number) 1) ← (byte) 't'
Adding number conversion cast (unumber) 1 in *((byte*) SCREEN#0 + (number) 1) ← (byte) 'f'
Adding number conversion cast (unumber) $17 in (byte) bool_const_inline::a#0 ← (number) $17
Adding number conversion cast (unumber) $2c in (bool~) bool_const_inline::$0 ← (byte) bool_const_inline::a#0 != (number) $2c
Adding number conversion cast (unumber) -8 in (bool~) bool_const_inline::$1 ← (byte) bool_const_inline::a#0 >= (number) -8
Adding number conversion cast (unumber) $f in (bool~) bool_const_inline::$2 ← (byte) bool_const_inline::a#0 == (number) $f
Adding number conversion cast (unumber) $15 in (bool~) bool_const_inline::$5 ← (number) $15 < (byte) bool_const_inline::a#0
Adding number conversion cast (unumber) 2 in *((byte*) SCREEN#0 + (number) 2) ← (byte) 't'
Adding number conversion cast (unumber) 2 in *((byte*) SCREEN#0 + (number) 2) ← (byte) 'f'
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) bool_const_vars::a#0 ← (unumber)(number) $e
Inlining cast (byte) bool_const_inline::a#0 ← (unumber)(number) $17
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $e
Simplifying constant integer cast $f
Simplifying constant integer cast $15
Simplifying constant integer cast $2c
Simplifying constant integer cast -8
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $17
Simplifying constant integer cast $2c
Simplifying constant integer cast -8
Simplifying constant integer cast $f
Simplifying constant integer cast $15
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $e
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) $2c
Finalized unsigned number type (byte) -8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $17
Finalized unsigned number type (byte) $2c
Finalized unsigned number type (byte) -8
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $15
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [13] (bool~) bool_const_vars::$2 ← (byte) $15 >= (byte) bool_const_vars::a#0 from [12] (bool~) bool_const_vars::$1 ← (byte) $15 < (byte) bool_const_vars::a#0
Inversing boolean not [35] (bool~) bool_const_inline::$6 ← (byte) $15 >= (byte) bool_const_inline::a#0 from [34] (bool~) bool_const_inline::$5 ← (byte) $15 < (byte) bool_const_inline::a#0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (bool) bool_const_vars::b1#0 = (bool~) bool_const_vars::$3 
Alias (bool) bool_const_vars::b2#0 = (bool~) bool_const_vars::$6 
Alias (bool) bool_const_vars::b#0 = (bool~) bool_const_vars::$9 
Successful SSA optimization Pass2AliasElimination
Rewriting || if()-condition to two if()s [22] (bool) bool_const_vars::b#0 ← (bool~) bool_const_vars::$8 || false
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting && if()-condition to two if()s [21] (bool~) bool_const_vars::$8 ← (bool) bool_const_vars::b1#0 && (bool~) bool_const_vars::$7
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [14] (bool) bool_const_vars::b1#0 ← (bool~) bool_const_vars::$0 || (bool~) bool_const_vars::$2
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [36] (bool~) bool_const_inline::$7 ← (bool~) bool_const_inline::$4 || (bool~) bool_const_inline::$6
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [33] (bool~) bool_const_inline::$4 ← (bool~) bool_const_inline::$0 || (bool~) bool_const_inline::$3
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [20] (bool~) bool_const_vars::$7 ← ! (bool) bool_const_vars::b2#0
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [18] (bool) bool_const_vars::b2#0 ← (bool~) bool_const_vars::$4 || (bool~) bool_const_vars::$5
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting && if()-condition to two if()s [32] (bool~) bool_const_inline::$3 ← (bool~) bool_const_inline::$1 && (bool~) bool_const_inline::$2
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const bool) bool_const_if::b#0 = true
Constant (const byte) bool_const_vars::a#0 = $e
Constant (const byte) bool_const_inline::a#0 = $17
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [6] if((const bool) bool_const_if::b#0) goto bool_const_if::@1
if() condition always false - eliminating if(false) goto bool_const_vars::@1
Successful SSA optimization Pass2ConstantIfs
Simplifying expression containing zero SCREEN#0 in [7] *((const byte*) SCREEN#0 + (byte) 0) ← (byte) 't'
Simplifying expression containing zero SCREEN#0 in [8] *((const byte*) SCREEN#0 + (byte) 0) ← (byte) 'f'
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const bool) bool_const_if::b#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block bool_const_if::@3
Successful SSA optimization Pass2EliminateUnusedBlocks
Simple Condition (bool~) bool_const_vars::$0 [10] if((const byte) bool_const_vars::a#0==(byte) $f) goto bool_const_vars::@6
Simple Condition (bool~) bool_const_inline::$0 [18] if((const byte) bool_const_inline::a#0!=(byte) $2c) goto bool_const_inline::@1
Simple Condition (bool~) bool_const_vars::$4 [23] if((const byte) bool_const_vars::a#0!=(byte) $2c) goto bool_const_vars::@5
Simple Condition (bool~) bool_const_vars::$2 [24] if((byte) $15>=(const byte) bool_const_vars::a#0) goto bool_const_vars::@6
Simple Condition (bool~) bool_const_inline::$6 [25] if((byte) $15>=(const byte) bool_const_inline::a#0) goto bool_const_inline::@1
Simple Condition (bool~) bool_const_inline::$1 [26] if((const byte) bool_const_inline::a#0>=(byte) -8) goto bool_const_inline::@7
Simple Condition (bool~) bool_const_vars::$5 [27] if((const byte) bool_const_vars::a#0>=(byte) -8) goto bool_const_vars::@5
Simple Condition (bool~) bool_const_inline::$2 [28] if((const byte) bool_const_inline::a#0==(byte) $f) goto bool_const_inline::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [26] if((const byte) bool_const_inline::a#0<(byte) -8) goto bool_const_inline::@5
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
if() condition always false - eliminating [10] if((const byte) bool_const_vars::a#0==(byte) $f) goto bool_const_vars::@6
if() condition always true - replacing block destination [18] if((const byte) bool_const_inline::a#0!=(byte) $2c) goto bool_const_inline::@1
if() condition always true - replacing block destination [23] if((const byte) bool_const_vars::a#0!=(byte) $2c) goto bool_const_vars::@5
if() condition always true - replacing block destination [24] if((byte) $15>=(const byte) bool_const_vars::a#0) goto bool_const_vars::@6
if() condition always false - eliminating [25] if((byte) $15>=(const byte) bool_const_inline::a#0) goto bool_const_inline::@1
if() condition always false - eliminating [26] if((const byte) bool_const_inline::a#0<(byte) -8) goto bool_const_inline::@5
if() condition always true - replacing block destination [27] if((const byte) bool_const_vars::a#0>=(byte) -8) goto bool_const_vars::@5
if() condition always false - eliminating [28] if((const byte) bool_const_inline::a#0==(byte) $f) goto bool_const_inline::@1
Successful SSA optimization Pass2ConstantIfs
Eliminating unused constant (const byte) bool_const_vars::a#0
Eliminating unused constant (const byte) bool_const_inline::a#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block bool_const_vars::@1
Removing unused block bool_const_inline::@3
Removing unused block bool_const_inline::@5
Removing unused block bool_const_inline::@6
Removing unused block bool_const_vars::@8
Removing unused block bool_const_inline::@7
Successful SSA optimization Pass2EliminateUnusedBlocks
Consolidated array index constant in *(SCREEN#0+1)
Consolidated array index constant in *(SCREEN#0+2)
Successful SSA optimization Pass2ConstantAdditionElimination
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
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_const_inline
Adding NOP phi() at start of bool_const_vars
Adding NOP phi() at start of bool_const_vars::@7
Adding NOP phi() at start of bool_const_vars::@6
Adding NOP phi() at start of bool_const_vars::@5
Adding NOP phi() at start of bool_const_if
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to bool_const_if:6 bool_const_vars:8 bool_const_inline:10 

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @5
Culled Empty Block (label) main::@3
Culled Empty Block (label) bool_const_vars::@7
Culled Empty Block (label) bool_const_vars::@6
Culled Empty Block (label) bool_const_vars::@5
Renumbering block @4 to @1
Renumbering block bool_const_vars::@3 to bool_const_vars::@1
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
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of bool_const_inline
Adding NOP phi() at start of bool_const_vars
Adding NOP phi() at start of bool_const_if

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()
  [5] call bool_const_if 
  to:main::@1
main::@1: scope:[main]  from main
  [6] phi()
  [7] call bool_const_vars 
  to:main::@2
main::@2: scope:[main]  from main::@1
  [8] phi()
  [9] call bool_const_inline 
  to:main::@return
main::@return: scope:[main]  from main::@2
  [10] return 
  to:@return
bool_const_inline: scope:[bool_const_inline]  from main::@2
  [11] phi()
  to:bool_const_inline::@1
bool_const_inline::@1: scope:[bool_const_inline]  from bool_const_inline
  [12] *((const byte*) SCREEN#0+(byte) 2) ← (byte) 't'
  to:bool_const_inline::@return
bool_const_inline::@return: scope:[bool_const_inline]  from bool_const_inline::@1
  [13] return 
  to:@return
bool_const_vars: scope:[bool_const_vars]  from main::@1
  [14] phi()
  to:bool_const_vars::@1
bool_const_vars::@1: scope:[bool_const_vars]  from bool_const_vars
  [15] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 'f'
  to:bool_const_vars::@return
bool_const_vars::@return: scope:[bool_const_vars]  from bool_const_vars::@1
  [16] return 
  to:@return
bool_const_if: scope:[bool_const_if]  from main
  [17] phi()
  to:bool_const_if::@1
bool_const_if::@1: scope:[bool_const_if]  from bool_const_if
  [18] *((const byte*) SCREEN#0) ← (byte) 't'
  to:bool_const_if::@return
bool_const_if::@return: scope:[bool_const_if]  from bool_const_if::@1
  [19] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) bool_const_if()
(bool) bool_const_if::b
(void()) bool_const_inline()
(byte) bool_const_inline::a
(void()) bool_const_vars()
(byte) bool_const_vars::a
(bool) bool_const_vars::b
(bool) bool_const_vars::b1
(bool) bool_const_vars::b2
(void()) main()

Initial phi equivalence classes
Complete equivalence classes

INITIAL ASM
  // File Comments
// A Minimal test of boolean constants.
  // 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: {
    // [5] call bool_const_if 
    // [17] phi from main to bool_const_if [phi:main->bool_const_if]
  bool_const_if_from_main:
    jsr bool_const_if
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
    // main::@1
  b1:
    // [7] call bool_const_vars 
    // [14] phi from main::@1 to bool_const_vars [phi:main::@1->bool_const_vars]
  bool_const_vars_from_b1:
    jsr bool_const_vars
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [9] call bool_const_inline 
    // [11] phi from main::@2 to bool_const_inline [phi:main::@2->bool_const_inline]
  bool_const_inline_from_b2:
    jsr bool_const_inline
    jmp breturn
    // main::@return
  breturn:
    // [10] return 
    rts
}
  // bool_const_inline
// A constant boolean inside an if()
bool_const_inline: {
    jmp b1
    // bool_const_inline::@1
  b1:
    // [12] *((const byte*) SCREEN#0+(byte) 2) ← (byte) 't' -- _deref_pbuc1=vbuc2 
    lda #'t'
    sta SCREEN+2
    jmp breturn
    // bool_const_inline::@return
  breturn:
    // [13] return 
    rts
}
  // bool_const_vars
// A bunch of constant boolean vars (used in an if)
bool_const_vars: {
    jmp b1
    // bool_const_vars::@1
  b1:
    // [15] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 'f' -- _deref_pbuc1=vbuc2 
    lda #'f'
    sta SCREEN+1
    jmp breturn
    // bool_const_vars::@return
  breturn:
    // [16] return 
    rts
}
  // bool_const_if
// A constant boolean inside an if()
bool_const_if: {
    jmp b1
    // bool_const_if::@1
  b1:
    // [18] *((const byte*) SCREEN#0) ← (byte) 't' -- _deref_pbuc1=vbuc2 
    lda #'t'
    sta SCREEN
    jmp breturn
    // bool_const_if::@return
  breturn:
    // [19] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [12] *((const byte*) SCREEN#0+(byte) 2) ← (byte) 't' [ ] ( main:2::bool_const_inline:9 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 'f' [ ] ( main:2::bool_const_vars:7 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) SCREEN#0) ← (byte) 't' [ ] ( main:2::bool_const_if:5 [ ] ) always clobbers reg byte a 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 
Uplift Scope [bool_const_if] 
Uplift Scope [bool_const_vars] 
Uplift Scope [bool_const_inline] 
Uplift Scope [] 

Uplifting [main] best 180 combination 
Uplifting [bool_const_if] best 180 combination 
Uplifting [bool_const_vars] best 180 combination 
Uplifting [bool_const_inline] best 180 combination 
Uplifting [] best 180 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// A Minimal test of boolean constants.
  // 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: {
    // [5] call bool_const_if 
    // [17] phi from main to bool_const_if [phi:main->bool_const_if]
  bool_const_if_from_main:
    jsr bool_const_if
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
    // main::@1
  b1:
    // [7] call bool_const_vars 
    // [14] phi from main::@1 to bool_const_vars [phi:main::@1->bool_const_vars]
  bool_const_vars_from_b1:
    jsr bool_const_vars
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [9] call bool_const_inline 
    // [11] phi from main::@2 to bool_const_inline [phi:main::@2->bool_const_inline]
  bool_const_inline_from_b2:
    jsr bool_const_inline
    jmp breturn
    // main::@return
  breturn:
    // [10] return 
    rts
}
  // bool_const_inline
// A constant boolean inside an if()
bool_const_inline: {
    jmp b1
    // bool_const_inline::@1
  b1:
    // [12] *((const byte*) SCREEN#0+(byte) 2) ← (byte) 't' -- _deref_pbuc1=vbuc2 
    lda #'t'
    sta SCREEN+2
    jmp breturn
    // bool_const_inline::@return
  breturn:
    // [13] return 
    rts
}
  // bool_const_vars
// A bunch of constant boolean vars (used in an if)
bool_const_vars: {
    jmp b1
    // bool_const_vars::@1
  b1:
    // [15] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 'f' -- _deref_pbuc1=vbuc2 
    lda #'f'
    sta SCREEN+1
    jmp breturn
    // bool_const_vars::@return
  breturn:
    // [16] return 
    rts
}
  // bool_const_if
// A constant boolean inside an if()
bool_const_if: {
    jmp b1
    // bool_const_if::@1
  b1:
    // [18] *((const byte*) SCREEN#0) ← (byte) 't' -- _deref_pbuc1=vbuc2 
    lda #'t'
    sta SCREEN
    jmp breturn
    // bool_const_if::@return
  breturn:
    // [19] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_main:
Removing instruction bool_const_vars_from_b1:
Removing instruction b2_from_b1:
Removing instruction bool_const_inline_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction bool_const_if_from_main:
Removing instruction b1:
Removing instruction b2:
Removing instruction breturn:
Removing instruction b1:
Removing instruction breturn:
Removing instruction b1:
Removing instruction breturn:
Removing instruction b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
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()) bool_const_if()
(label) bool_const_if::@1
(label) bool_const_if::@return
(bool) bool_const_if::b
(void()) bool_const_inline()
(label) bool_const_inline::@1
(label) bool_const_inline::@return
(byte) bool_const_inline::a
(void()) bool_const_vars()
(label) bool_const_vars::@1
(label) bool_const_vars::@return
(byte) bool_const_vars::a
(bool) bool_const_vars::b
(bool) bool_const_vars::b1
(bool) bool_const_vars::b2
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@return



FINAL ASSEMBLER
Score: 60

  // File Comments
// A Minimal test of boolean constants.
  // 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: {
    // bool_const_if()
    // [5] call bool_const_if 
    // [17] phi from main to bool_const_if [phi:main->bool_const_if]
    jsr bool_const_if
    // [6] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // bool_const_vars()
    // [7] call bool_const_vars 
    // [14] phi from main::@1 to bool_const_vars [phi:main::@1->bool_const_vars]
    jsr bool_const_vars
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // bool_const_inline()
    // [9] call bool_const_inline 
    // [11] phi from main::@2 to bool_const_inline [phi:main::@2->bool_const_inline]
    jsr bool_const_inline
    // main::@return
    // }
    // [10] return 
    rts
}
  // bool_const_inline
// A constant boolean inside an if()
bool_const_inline: {
    // bool_const_inline::@1
    // SCREEN[2] = 't'
    // [12] *((const byte*) SCREEN#0+(byte) 2) ← (byte) 't' -- _deref_pbuc1=vbuc2 
    lda #'t'
    sta SCREEN+2
    // bool_const_inline::@return
    // }
    // [13] return 
    rts
}
  // bool_const_vars
// A bunch of constant boolean vars (used in an if)
bool_const_vars: {
    // bool_const_vars::@1
    // SCREEN[1] = 'f'
    // [15] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 'f' -- _deref_pbuc1=vbuc2 
    lda #'f'
    sta SCREEN+1
    // bool_const_vars::@return
    // }
    // [16] return 
    rts
}
  // bool_const_if
// A constant boolean inside an if()
bool_const_if: {
    // bool_const_if::@1
    // SCREEN[0] = 't'
    // [18] *((const byte*) SCREEN#0) ← (byte) 't' -- _deref_pbuc1=vbuc2 
    lda #'t'
    sta SCREEN
    // bool_const_if::@return
    // }
    // [19] return 
    rts
}
  // File Data

