
CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  main::i#0 = 0
  to:main::@1
main::@1: scope:[main]  from main main::@4
  main::i#2 = phi( main/main::i#0, main::@4/main::i#1 )
  cond::b#0 = main::i#2
  call cond
  cond::return#0 = cond::return#2
  to:main::@5
main::@5: scope:[main]  from main::@1
  main::i#6 = phi( main::@1/main::i#2 )
  cond::return#3 = phi( main::@1/cond::return#0 )
  main::$0 = cond::return#3
  if(main::$0) goto main::@2
  to:main::@3
main::@2: scope:[main]  from main::@5
  main::i#3 = phi( main::@5/main::i#6 )
  m1::i#0 = main::i#3
  call m1
  m1::return#0 = m1::return#2
  to:main::@6
main::@6: scope:[main]  from main::@2
  main::i#7 = phi( main::@2/main::i#3 )
  m1::return#3 = phi( main::@2/m1::return#0 )
  main::$3 = m1::return#3
  main::$4 = main::$3
  to:main::@4
main::@3: scope:[main]  from main::@5
  main::i#4 = phi( main::@5/main::i#6 )
  m2::i#0 = main::i#4
  call m2
  m2::return#0 = m2::return#2
  to:main::@7
main::@7: scope:[main]  from main::@3
  main::i#8 = phi( main::@3/main::i#4 )
  m2::return#3 = phi( main::@3/m2::return#0 )
  main::$1 = m2::return#3
  main::$2 = main::$1
  to:main::@4
main::@4: scope:[main]  from main::@6 main::@7
  main::i#5 = phi( main::@6/main::i#7, main::@7/main::i#8 )
  main::$5 = phi( main::@6/main::$4, main::@7/main::$2 )
  main::SCREEN[main::i#5] = main::$5
  main::i#1 = main::i#5 + rangenext(0,9)
  main::$6 = main::i#1 != rangelast(0,9)
  if(main::$6) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@4
  return 
  to:@return

bool cond(char b)
cond: scope:[cond]  from main::@1
  cond::b#1 = phi( main::@1/cond::b#0 )
  cond::$0 = cond::b#1 < 5
  cond::return#1 = cond::$0
  to:cond::@return
cond::@return: scope:[cond]  from cond
  cond::return#4 = phi( cond/cond::return#1 )
  cond::return#2 = cond::return#4
  return 
  to:@return

char m1(char i)
m1: scope:[m1]  from main::@2
  m1::i#1 = phi( main::@2/m1::i#0 )
  m1::$0 = 5 + m1::i#1
  m1::return#1 = m1::$0
  to:m1::@return
m1::@return: scope:[m1]  from m1
  m1::return#4 = phi( m1/m1::return#1 )
  m1::return#2 = m1::return#4
  return 
  to:@return

char m2(char i)
m2: scope:[m2]  from main::@3
  m2::i#1 = phi( main::@3/m2::i#0 )
  m2::$0 = $a + m2::i#1
  m2::return#1 = m2::$0
  to:m2::@return
m2::@return: scope:[m2]  from m2
  m2::return#4 = phi( m2/m2::return#1 )
  m2::return#2 = m2::return#4
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  call main
  to:__start::@1
__start::@1: scope:[__start]  from __start
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  return 
  to:@return

SYMBOL TABLE SSA
void __start()
bool cond(char b)
bool cond::$0
char cond::b
char cond::b#0
char cond::b#1
bool cond::return
bool cond::return#0
bool cond::return#1
bool cond::return#2
bool cond::return#3
bool cond::return#4
char m1(char i)
number m1::$0
char m1::i
char m1::i#0
char m1::i#1
char m1::return
char m1::return#0
char m1::return#1
char m1::return#2
char m1::return#3
char m1::return#4
char m2(char i)
number m2::$0
char m2::i
char m2::i#0
char m2::i#1
char m2::return
char m2::return#0
char m2::return#1
char m2::return#2
char m2::return#3
char m2::return#4
void main()
bool main::$0
char main::$1
char main::$2
char main::$3
char main::$4
char main::$5
bool main::$6
__constant char * const main::SCREEN = (char *)$400
char main::i
char main::i#0
char main::i#1
char main::i#2
char main::i#3
char main::i#4
char main::i#5
char main::i#6
char main::i#7
char main::i#8

Adding number conversion cast (unumber) 5 in cond::$0 = cond::b#1 < 5
Adding number conversion cast (unumber) 5 in m1::$0 = 5 + m1::i#1
Adding number conversion cast (unumber) m1::$0 in m1::$0 = (unumber)5 + m1::i#1
Adding number conversion cast (unumber) $a in m2::$0 = $a + m2::i#1
Adding number conversion cast (unumber) m2::$0 in m2::$0 = (unumber)$a + m2::i#1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (char *) 1024
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast $a
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 5
Finalized unsigned number type (char) 5
Finalized unsigned number type (char) $a
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in m1::$0 = 5 + m1::i#1
Inferred type updated to char in m2::$0 = $a + m2::i#1
Alias cond::return#0 = cond::return#3 
Alias main::i#2 = main::i#6 main::i#3 main::i#7 main::i#4 main::i#8 
Alias m1::return#0 = m1::return#3 
Alias main::$4 = main::$3 
Alias m2::return#0 = m2::return#3 
Alias main::$2 = main::$1 
Alias cond::return#1 = cond::$0 cond::return#4 cond::return#2 
Alias m1::return#1 = m1::$0 m1::return#4 m1::return#2 
Alias m2::return#1 = m2::$0 m2::return#4 m2::return#2 
Successful SSA optimization Pass2AliasElimination
Alias main::i#2 = main::i#5 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values cond::b#1 cond::b#0
Identical Phi Values m1::i#1 m1::i#0
Identical Phi Values m2::i#1 m2::i#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition main::$6 [19] if(main::i#1!=rangelast(0,9)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [17] main::i#1 = ++ main::i#2 to ++
Resolved ranged comparison value [19] if(main::i#1!=rangelast(0,9)) goto main::@1 to $a
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) $a in [17] if(main::i#1!=$a) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $a
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $a
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inlining constant with var siblings main::i#0
Constant inlined main::i#0 = 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@8(between main::@4 and main::@1)
Adding NOP phi() at start of main
CALL GRAPH
Calls in [main] to cond:3 m2:8 m1:19 

Created 2 initial phi equivalence classes
Coalesced [11] main::$8 = main::$2
Coalesced [17] main::i#9 = main::i#1
Coalesced [22] main::$7 = main::$4
Coalesced down to 2 phi equivalence classes
Culled Empty Block label main::@8
Adding NOP phi() at start of main

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@4
  [1] main::i#2 = phi( main/0, main::@4/main::i#1 )
  [2] cond::b#0 = main::i#2
  [3] call cond
  [4] cond::return#0 = cond::return#1
  to:main::@5
main::@5: scope:[main]  from main::@1
  [5] main::$0 = cond::return#0
  [6] if(main::$0) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@5
  [7] m2::i#0 = main::i#2
  [8] call m2
  [9] m2::return#0 = m2::return#1
  to:main::@7
main::@7: scope:[main]  from main::@3
  [10] main::$2 = m2::return#0
  to:main::@4
main::@4: scope:[main]  from main::@6 main::@7
  [11] main::$5 = phi( main::@6/main::$4, main::@7/main::$2 )
  [12] main::SCREEN[main::i#2] = main::$5
  [13] main::i#1 = ++ main::i#2
  [14] if(main::i#1!=$a) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@4
  [15] return 
  to:@return
main::@2: scope:[main]  from main::@5
  [16] m1::i#0 = main::i#2
  [17] call m1
  [18] m1::return#0 = m1::return#1
  to:main::@6
main::@6: scope:[main]  from main::@2
  [19] main::$4 = m1::return#0
  to:main::@4

bool cond(char b)
cond: scope:[cond]  from main::@1
  [20] cond::return#1 = cond::b#0 < 5
  to:cond::@return
cond::@return: scope:[cond]  from cond
  [21] return 
  to:@return

char m2(char i)
m2: scope:[m2]  from main::@3
  [22] m2::return#1 = $a + m2::i#0
  to:m2::@return
m2::@return: scope:[m2]  from m2
  [23] return 
  to:@return

char m1(char i)
m1: scope:[m1]  from main::@2
  [24] m1::return#1 = 5 + m1::i#0
  to:m1::@return
m1::@return: scope:[m1]  from m1
  [25] return 
  to:@return


VARIABLE REGISTER WEIGHTS
bool cond(char b)
char cond::b
char cond::b#0 // 112.0
bool cond::return
bool cond::return#0 // 22.0
bool cond::return#1 // 37.33333333333333
char m1(char i)
char m1::i
char m1::i#0 // 112.0
char m1::return
char m1::return#0 // 22.0
char m1::return#1 // 37.33333333333333
char m2(char i)
char m2::i
char m2::i#0 // 112.0
char m2::return
char m2::return#0 // 22.0
char m2::return#1 // 37.33333333333333
void main()
bool main::$0 // 22.0
char main::$2 // 22.0
char main::$4 // 22.0
char main::$5 // 33.0
char main::i
char main::i#1 // 16.5
char main::i#2 // 4.125

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::$5 main::$4 main::$2 ]
Added variable cond::b#0 to live range equivalence class [ cond::b#0 ]
Added variable cond::return#0 to live range equivalence class [ cond::return#0 ]
Added variable main::$0 to live range equivalence class [ main::$0 ]
Added variable m2::i#0 to live range equivalence class [ m2::i#0 ]
Added variable m2::return#0 to live range equivalence class [ m2::return#0 ]
Added variable m1::i#0 to live range equivalence class [ m1::i#0 ]
Added variable m1::return#0 to live range equivalence class [ m1::return#0 ]
Added variable cond::return#1 to live range equivalence class [ cond::return#1 ]
Added variable m2::return#1 to live range equivalence class [ m2::return#1 ]
Added variable m1::return#1 to live range equivalence class [ m1::return#1 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::$5 main::$4 main::$2 ]
[ cond::b#0 ]
[ cond::return#0 ]
[ main::$0 ]
[ m2::i#0 ]
[ m2::return#0 ]
[ m1::i#0 ]
[ m1::return#0 ]
[ cond::return#1 ]
[ m2::return#1 ]
[ m1::return#1 ]
Allocated zp[1]:2 [ cond::b#0 ]
Allocated zp[1]:3 [ m2::i#0 ]
Allocated zp[1]:4 [ m1::i#0 ]
Allocated zp[1]:5 [ main::$5 main::$4 main::$2 ]
Allocated zp[1]:6 [ cond::return#1 ]
Allocated zp[1]:7 [ m2::return#1 ]
Allocated zp[1]:8 [ m1::return#1 ]
Allocated zp[1]:9 [ cond::return#0 ]
Allocated zp[1]:10 [ main::$0 ]
Allocated zp[1]:11 [ m2::return#0 ]
Allocated zp[1]:12 [ m1::return#0 ]
Allocated zp[1]:13 [ main::i#2 main::i#1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [20] cond::return#1 = cond::b#0 < 5 [ cond::return#1 ] ( cond:3 [ main::i#2 cond::return#1 ] { { cond::b#0 = main::i#2 } { cond::return#0 = cond::return#1 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:13 [ main::i#2 main::i#1 ]
Statement [20] cond::return#1 = cond::b#0 < 5 [ cond::return#1 ] ( cond:3 [ main::i#2 cond::return#1 ] { { cond::b#0 = main::i#2 } { cond::return#0 = cond::return#1 } }  ) always clobbers reg byte a 
Potential registers zp[1]:13 [ main::i#2 main::i#1 ] : zp[1]:13 , reg byte x , reg byte y , 
Potential registers zp[1]:5 [ main::$5 main::$4 main::$2 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:2 [ cond::b#0 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:9 [ cond::return#0 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:10 [ main::$0 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ m2::i#0 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:11 [ m2::return#0 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:4 [ m1::i#0 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:12 [ m1::return#0 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:6 [ cond::return#1 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ m2::return#1 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:8 [ m1::return#1 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [cond] 112: zp[1]:2 [ cond::b#0 ] 37.33: zp[1]:6 [ cond::return#1 ] 22: zp[1]:9 [ cond::return#0 ] 
Uplift Scope [m1] 112: zp[1]:4 [ m1::i#0 ] 37.33: zp[1]:8 [ m1::return#1 ] 22: zp[1]:12 [ m1::return#0 ] 
Uplift Scope [m2] 112: zp[1]:3 [ m2::i#0 ] 37.33: zp[1]:7 [ m2::return#1 ] 22: zp[1]:11 [ m2::return#0 ] 
Uplift Scope [main] 77: zp[1]:5 [ main::$5 main::$4 main::$2 ] 22: zp[1]:10 [ main::$0 ] 20.62: zp[1]:13 [ main::i#2 main::i#1 ] 
Uplift Scope [] 

Uplifting [cond] best 1287 combination reg byte a [ cond::b#0 ] reg byte a [ cond::return#1 ] reg byte a [ cond::return#0 ] 
Uplifting [m1] best 1163 combination reg byte a [ m1::i#0 ] reg byte a [ m1::return#1 ] reg byte a [ m1::return#0 ] 
Uplifting [m2] best 1039 combination reg byte a [ m2::i#0 ] reg byte a [ m2::return#1 ] reg byte a [ m2::return#0 ] 
Uplifting [main] best 739 combination reg byte a [ main::$5 main::$4 main::$2 ] reg byte a [ main::$0 ] reg byte x [ main::i#2 main::i#1 ] 
Uplifting [] best 739 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Tests the ternary operator - when the condition is constant
  // Upstart
  // Commodore 64 PRG executable file
.file [name="ternary-3.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
.segment Code
  // main
main: {
    .label SCREEN = $400
    // [1] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [1] phi main::i#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp __b1
    // [1] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  __b1_from___b4:
    // [1] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [2] cond::b#0 = main::i#2 -- vbuaa=vbuxx 
    txa
    // [3] call cond
    jsr cond
    // [4] cond::return#0 = cond::return#1
    jmp __b5
    // main::@5
  __b5:
    // [5] main::$0 = cond::return#0
    // [6] if(main::$0) goto main::@2 -- vboaa_then_la1 
    cmp #0
    bne __b2
    jmp __b3
    // main::@3
  __b3:
    // [7] m2::i#0 = main::i#2 -- vbuaa=vbuxx 
    txa
    // [8] call m2
    jsr m2
    // [9] m2::return#0 = m2::return#1
    jmp __b7
    // main::@7
  __b7:
    // [10] main::$2 = m2::return#0
    // [11] phi from main::@6 main::@7 to main::@4 [phi:main::@6/main::@7->main::@4]
  __b4_from___b6:
  __b4_from___b7:
    // [11] phi main::$5 = main::$4 [phi:main::@6/main::@7->main::@4#0] -- register_copy 
    jmp __b4
    // main::@4
  __b4:
    // [12] main::SCREEN[main::i#2] = main::$5 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // [13] main::i#1 = ++ main::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [14] if(main::i#1!=$a) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$a
    bne __b1_from___b4
    jmp __breturn
    // main::@return
  __breturn:
    // [15] return 
    rts
    // main::@2
  __b2:
    // [16] m1::i#0 = main::i#2 -- vbuaa=vbuxx 
    txa
    // [17] call m1
    jsr m1
    // [18] m1::return#0 = m1::return#1
    jmp __b6
    // main::@6
  __b6:
    // [19] main::$4 = m1::return#0
    jmp __b4_from___b6
}
  // cond
// __register(A) bool cond(__register(A) char b)
cond: {
    // [20] cond::return#1 = cond::b#0 < 5 -- vboaa=vbuaa_lt_vbuc1 
    cmp #5
    lda #0
    rol
    eor #1
    jmp __breturn
    // cond::@return
  __breturn:
    // [21] return 
    rts
}
  // m2
// __register(A) char m2(__register(A) char i)
m2: {
    // [22] m2::return#1 = $a + m2::i#0 -- vbuaa=vbuc1_plus_vbuaa 
    clc
    adc #$a
    jmp __breturn
    // m2::@return
  __breturn:
    // [23] return 
    rts
}
  // m1
// __register(A) char m1(__register(A) char i)
m1: {
    // [24] m1::return#1 = 5 + m1::i#0 -- vbuaa=vbuc1_plus_vbuaa 
    clc
    adc #5
    jmp __breturn
    // m1::@return
  __breturn:
    // [25] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __b5
Removing instruction jmp __b3
Removing instruction jmp __b7
Removing instruction jmp __b4
Removing instruction jmp __breturn
Removing instruction jmp __b6
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label __b1_from___b4 with __b1
Replacing label __b4_from___b6 with __b4
Removing instruction __b1_from___b4:
Removing instruction __b7:
Removing instruction __b4_from___b6:
Removing instruction __b4_from___b7:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __b1_from_main:
Removing instruction __b5:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b6:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp __b1
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
bool cond(char b)
char cond::b
char cond::b#0 // reg byte a 112.0
bool cond::return
bool cond::return#0 // reg byte a 22.0
bool cond::return#1 // reg byte a 37.33333333333333
char m1(char i)
char m1::i
char m1::i#0 // reg byte a 112.0
char m1::return
char m1::return#0 // reg byte a 22.0
char m1::return#1 // reg byte a 37.33333333333333
char m2(char i)
char m2::i
char m2::i#0 // reg byte a 112.0
char m2::return
char m2::return#0 // reg byte a 22.0
char m2::return#1 // reg byte a 37.33333333333333
void main()
bool main::$0 // reg byte a 22.0
char main::$2 // reg byte a 22.0
char main::$4 // reg byte a 22.0
char main::$5 // reg byte a 33.0
__constant char * const main::SCREEN = (char *) 1024
char main::i
char main::i#1 // reg byte x 16.5
char main::i#2 // reg byte x 4.125

reg byte x [ main::i#2 main::i#1 ]
reg byte a [ main::$5 main::$4 main::$2 ]
reg byte a [ cond::b#0 ]
reg byte a [ cond::return#0 ]
reg byte a [ main::$0 ]
reg byte a [ m2::i#0 ]
reg byte a [ m2::return#0 ]
reg byte a [ m1::i#0 ]
reg byte a [ m1::return#0 ]
reg byte a [ cond::return#1 ]
reg byte a [ m2::return#1 ]
reg byte a [ m1::return#1 ]


FINAL ASSEMBLER
Score: 490

  // File Comments
// Tests the ternary operator - when the condition is constant
  // Upstart
  // Commodore 64 PRG executable file
.file [name="ternary-3.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
.segment Code
  // main
main: {
    .label SCREEN = $400
    // [1] phi from main to main::@1 [phi:main->main::@1]
    // [1] phi main::i#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [1] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
    // [1] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy 
    // main::@1
  __b1:
    // cond(i)
    // [2] cond::b#0 = main::i#2 -- vbuaa=vbuxx 
    txa
    // [3] call cond
    jsr cond
    // [4] cond::return#0 = cond::return#1
    // main::@5
    // [5] main::$0 = cond::return#0
    // cond(i)?m1(i):m2(i)
    // [6] if(main::$0) goto main::@2 -- vboaa_then_la1 
    cmp #0
    bne __b2
    // main::@3
    // m2(i)
    // [7] m2::i#0 = main::i#2 -- vbuaa=vbuxx 
    txa
    // [8] call m2
    jsr m2
    // [9] m2::return#0 = m2::return#1
    // main::@7
    // cond(i)?m1(i):m2(i)
    // [10] main::$2 = m2::return#0
    // [11] phi from main::@6 main::@7 to main::@4 [phi:main::@6/main::@7->main::@4]
    // [11] phi main::$5 = main::$4 [phi:main::@6/main::@7->main::@4#0] -- register_copy 
    // main::@4
  __b4:
    // SCREEN[i] = cond(i)?m1(i):m2(i)
    // [12] main::SCREEN[main::i#2] = main::$5 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // for( byte i: 0..9)
    // [13] main::i#1 = ++ main::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [14] if(main::i#1!=$a) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$a
    bne __b1
    // main::@return
    // }
    // [15] return 
    rts
    // main::@2
  __b2:
    // m1(i)
    // [16] m1::i#0 = main::i#2 -- vbuaa=vbuxx 
    txa
    // [17] call m1
    jsr m1
    // [18] m1::return#0 = m1::return#1
    // main::@6
    // cond(i)?m1(i):m2(i)
    // [19] main::$4 = m1::return#0
    jmp __b4
}
  // cond
// __register(A) bool cond(__register(A) char b)
cond: {
    // b<5
    // [20] cond::return#1 = cond::b#0 < 5 -- vboaa=vbuaa_lt_vbuc1 
    cmp #5
    lda #0
    rol
    eor #1
    // cond::@return
    // }
    // [21] return 
    rts
}
  // m2
// __register(A) char m2(__register(A) char i)
m2: {
    // 10+i
    // [22] m2::return#1 = $a + m2::i#0 -- vbuaa=vbuc1_plus_vbuaa 
    clc
    adc #$a
    // m2::@return
    // }
    // [23] return 
    rts
}
  // m1
// __register(A) char m1(__register(A) char i)
m1: {
    // 5+i
    // [24] m1::return#1 = 5 + m1::i#0 -- vbuaa=vbuc1_plus_vbuaa 
    clc
    adc #5
    // m1::@return
    // }
    // [25] return 
    rts
}
  // File Data

