Identified constant variable (byte*) SCREEN
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@10

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@1

(void()) main()
main: scope:[main]  from @1
  (byte) main::min#0 ← (byte) $ff
  (byte) main::max#0 ← (byte) 0
  (byte) main::pos#0 ← (byte) 0
  to:main::@1
main::@1: scope:[main]  from main main::@5
  (byte) main::max#6 ← phi( main/(byte) main::max#0 main::@5/(byte) main::max#3 )
  (byte) main::min#4 ← phi( main/(byte) main::min#0 main::@5/(byte) main::min#3 )
  (byte) main::pos#7 ← phi( main/(byte) main::pos#0 main::@5/(byte) main::pos#5 )
  if(true) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  (byte) main::max#4 ← phi( main::@1/(byte) main::max#6 )
  (byte) main::min#2 ← phi( main::@1/(byte) main::min#4 )
  (byte) main::pos#2 ← phi( main::@1/(byte) main::pos#7 )
  (byte) main::pos#1 ← ++ (byte) main::pos#2
  (bool~) main::$0 ← (byte) main::pos#1 < (byte) main::min#2
  (bool~) main::$1 ← ! (bool~) main::$0
  if((bool~) main::$1) goto main::@4
  to:main::@8
main::@4: scope:[main]  from main::@2 main::@8
  (byte) main::min#5 ← phi( main::@2/(byte) main::min#2 main::@8/(byte) main::min#1 )
  (byte) main::max#2 ← phi( main::@2/(byte) main::max#4 main::@8/(byte) main::max#5 )
  (byte) main::pos#3 ← phi( main::@2/(byte) main::pos#1 main::@8/(byte) main::pos#4 )
  (bool~) main::$2 ← (byte) main::pos#3 > (byte) main::max#2
  (bool~) main::$3 ← ! (bool~) main::$2
  if((bool~) main::$3) goto main::@5
  to:main::@9
main::@8: scope:[main]  from main::@2
  (byte) main::max#5 ← phi( main::@2/(byte) main::max#4 )
  (byte) main::pos#4 ← phi( main::@2/(byte) main::pos#1 )
  (byte) main::min#1 ← (byte) main::pos#4
  to:main::@4
main::@5: scope:[main]  from main::@4 main::@9
  (byte) main::pos#5 ← phi( main::@4/(byte) main::pos#3 main::@9/(byte) main::pos#6 )
  (byte) main::max#3 ← phi( main::@4/(byte) main::max#2 main::@9/(byte) main::max#1 )
  (byte) main::min#3 ← phi( main::@4/(byte) main::min#5 main::@9/(byte) main::min#6 )
  *((const byte*) SCREEN + (number) 0) ← (byte) main::min#3
  *((const byte*) SCREEN + (number) 1) ← (byte) main::max#3
  *((const byte*) SCREEN + (number) 2) ← (byte) main::pos#5
  to:main::@1
main::@9: scope:[main]  from main::@4
  (byte) main::min#6 ← phi( main::@4/(byte) main::min#5 )
  (byte) main::pos#6 ← phi( main::@4/(byte) main::pos#3 )
  (byte) main::max#1 ← (byte) main::pos#6
  to:main::@5
main::@return: scope:[main]  from main::@1
  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
(const byte*) SCREEN = (byte*)(number) $400
(void()) main()
(bool~) main::$0
(bool~) main::$1
(bool~) main::$2
(bool~) main::$3
(label) main::@1
(label) main::@2
(label) main::@4
(label) main::@5
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::max
(byte) main::max#0
(byte) main::max#1
(byte) main::max#2
(byte) main::max#3
(byte) main::max#4
(byte) main::max#5
(byte) main::max#6
(byte) main::min
(byte) main::min#0
(byte) main::min#1
(byte) main::min#2
(byte) main::min#3
(byte) main::min#4
(byte) main::min#5
(byte) main::min#6
(byte) main::pos
(byte) main::pos#0
(byte) main::pos#1
(byte) main::pos#2
(byte) main::pos#3
(byte) main::pos#4
(byte) main::pos#5
(byte) main::pos#6
(byte) main::pos#7

Adding number conversion cast (unumber) 0 in *((const byte*) SCREEN + (number) 0) ← (byte) main::min#3
Adding number conversion cast (unumber) 1 in *((const byte*) SCREEN + (number) 1) ← (byte) main::max#3
Adding number conversion cast (unumber) 2 in *((const byte*) SCREEN + (number) 2) ← (byte) main::pos#5
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
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) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [8] (bool~) main::$1 ← (byte) main::pos#1 >= (byte) main::min#2 from [7] (bool~) main::$0 ← (byte) main::pos#1 < (byte) main::min#2
Inversing boolean not [12] (bool~) main::$3 ← (byte) main::pos#3 <= (byte) main::max#2 from [11] (bool~) main::$2 ← (byte) main::pos#3 > (byte) main::max#2
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::pos#2 = (byte) main::pos#7 
Alias (byte) main::min#2 = (byte) main::min#4 
Alias (byte) main::max#4 = (byte) main::max#6 (byte) main::max#5 
Alias (byte) main::pos#1 = (byte) main::pos#4 (byte) main::min#1 
Alias (byte) main::pos#3 = (byte) main::pos#6 (byte) main::max#1 
Alias (byte) main::min#5 = (byte) main::min#6 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (phi-usage) (byte) main::pos#1 = (byte) main::pos#3 (byte) main::pos#5 
Alias (byte) main::max#2 = (byte) main::max#4 
Alias (byte) main::min#3 = (byte) main::min#5 
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (phi-usage) (byte) main::pos#1 = (byte) main::pos#3 (byte) main::pos#5 
Identical Phi Values (byte) main::pos#3 (byte) main::pos#1
Identical Phi Values (byte) main::pos#5 (byte) main::pos#3
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$1 [7] if((byte) main::pos#1>=(byte) main::min#2) goto main::@4
Simple Condition (bool~) main::$3 [10] if((byte) main::pos#1<=(byte) main::max#2) goto main::@5
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) main::min#0 = $ff
Constant (const byte) main::max#0 = 0
Constant (const byte) main::pos#0 = 0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [4] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Simplifying expression containing zero SCREEN in [12] *((const byte*) SCREEN + (byte) 0) ← (byte) main::min#3
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Inlining constant with var siblings (const byte) main::min#0
Inlining constant with var siblings (const byte) main::max#0
Inlining constant with var siblings (const byte) main::pos#0
Constant inlined main::min#0 = (byte) $ff
Constant inlined main::max#0 = (byte) 0
Constant inlined main::pos#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(SCREEN+1)
Consolidated array index constant in *(SCREEN+2)
Successful SSA optimization Pass2ConstantAdditionElimination
Added new block during phi lifting main::@11(between main::@2 and main::@4)
Added new block during phi lifting main::@12(between main::@4 and main::@5)
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 5 initial phi equivalence classes
Not coalescing [9] main::min#9 ← main::pos#1
Not coalescing [12] main::max#9 ← main::pos#1
Coalesced [17] main::pos#8 ← main::pos#1
Coalesced [18] main::min#7 ← main::min#3
Coalesced [19] main::max#7 ← main::max#3
Coalesced (already) [20] main::max#8 ← main::max#2
Coalesced (already) [21] main::min#8 ← main::min#2
Coalesced down to 3 phi equivalence classes
Culled Empty Block (label) @2
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::@11
Renumbering block main::@4 to main::@3
Renumbering block main::@5 to main::@4
Renumbering block main::@8 to main::@5
Renumbering block main::@9 to main::@6
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main

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

(void()) main()
main: scope:[main]  from @1
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@4
  [5] (byte) main::max#2 ← phi( main/(byte) 0 main::@4/(byte) main::max#3 )
  [5] (byte) main::min#2 ← phi( main/(byte) $ff main::@4/(byte) main::min#3 )
  [5] (byte) main::pos#2 ← phi( main/(byte) 0 main::@4/(byte) main::pos#1 )
  to:main::@2
main::@2: scope:[main]  from main::@1
  [6] (byte) main::pos#1 ← ++ (byte) main::pos#2
  [7] if((byte) main::pos#1>=(byte) main::min#2) goto main::@3
  to:main::@5
main::@5: scope:[main]  from main::@2
  [8] (byte) main::min#9 ← (byte) main::pos#1
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@5
  [9] (byte) main::min#3 ← phi( main::@2/(byte) main::min#2 main::@5/(byte) main::min#9 )
  [10] if((byte) main::pos#1<=(byte) main::max#2) goto main::@4
  to:main::@6
main::@6: scope:[main]  from main::@3
  [11] (byte) main::max#9 ← (byte) main::pos#1
  to:main::@4
main::@4: scope:[main]  from main::@3 main::@6
  [12] (byte) main::max#3 ← phi( main::@3/(byte) main::max#2 main::@6/(byte) main::max#9 )
  [13] *((const byte*) SCREEN) ← (byte) main::min#3
  [14] *((const byte*) SCREEN+(byte) 1) ← (byte) main::max#3
  [15] *((const byte*) SCREEN+(byte) 2) ← (byte) main::pos#1
  to:main::@1


VARIABLE REGISTER WEIGHTS
(void()) main()
(byte) main::max
(byte) main::max#2 5.5
(byte) main::max#3 11.0
(byte) main::max#9 22.0
(byte) main::min
(byte) main::min#2 11.0
(byte) main::min#3 6.285714285714286
(byte) main::min#9 22.0
(byte) main::pos
(byte) main::pos#1 7.699999999999999
(byte) main::pos#2 22.0

Initial phi equivalence classes
[ main::pos#2 main::pos#1 ]
[ main::min#2 main::min#3 main::min#9 ]
[ main::max#2 main::max#3 main::max#9 ]
Complete equivalence classes
[ main::pos#2 main::pos#1 ]
[ main::min#2 main::min#3 main::min#9 ]
[ main::max#2 main::max#3 main::max#9 ]
Allocated zp[1]:2 [ main::pos#2 main::pos#1 ]
Allocated zp[1]:3 [ main::min#2 main::min#3 main::min#9 ]
Allocated zp[1]:4 [ main::max#2 main::max#3 main::max#9 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Results in infinite compile loop as the compiler keeps trying to remove the same (empty) alias
  // 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 pos = 2
    .label min = 3
    .label max = 4
    // [5] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [5] phi (byte) main::max#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z max
    // [5] phi (byte) main::min#2 = (byte) $ff [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #$ff
    sta.z min
    // [5] phi (byte) main::pos#2 = (byte) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta.z pos
    jmp __b1
    // main::@1
  __b1:
    jmp __b2
    // main::@2
  __b2:
    // [6] (byte) main::pos#1 ← ++ (byte) main::pos#2 -- vbuz1=_inc_vbuz1 
    inc.z pos
    // [7] if((byte) main::pos#1>=(byte) main::min#2) goto main::@3 -- vbuz1_ge_vbuz2_then_la1 
    lda.z pos
    cmp.z min
    bcs __b3_from___b2
    jmp __b5
    // main::@5
  __b5:
    // [8] (byte) main::min#9 ← (byte) main::pos#1 -- vbuz1=vbuz2 
    lda.z pos
    sta.z min
    // [9] phi from main::@2 main::@5 to main::@3 [phi:main::@2/main::@5->main::@3]
  __b3_from___b2:
  __b3_from___b5:
    // [9] phi (byte) main::min#3 = (byte) main::min#2 [phi:main::@2/main::@5->main::@3#0] -- register_copy 
    jmp __b3
    // main::@3
  __b3:
    // [10] if((byte) main::pos#1<=(byte) main::max#2) goto main::@4 -- vbuz1_le_vbuz2_then_la1 
    lda.z max
    cmp.z pos
    bcs __b4_from___b3
    jmp __b6
    // main::@6
  __b6:
    // [11] (byte) main::max#9 ← (byte) main::pos#1 -- vbuz1=vbuz2 
    lda.z pos
    sta.z max
    // [12] phi from main::@3 main::@6 to main::@4 [phi:main::@3/main::@6->main::@4]
  __b4_from___b3:
  __b4_from___b6:
    // [12] phi (byte) main::max#3 = (byte) main::max#2 [phi:main::@3/main::@6->main::@4#0] -- register_copy 
    jmp __b4
    // main::@4
  __b4:
    // [13] *((const byte*) SCREEN) ← (byte) main::min#3 -- _deref_pbuc1=vbuz1 
    lda.z min
    sta SCREEN
    // [14] *((const byte*) SCREEN+(byte) 1) ← (byte) main::max#3 -- _deref_pbuc1=vbuz1 
    lda.z max
    sta SCREEN+1
    // [15] *((const byte*) SCREEN+(byte) 2) ← (byte) main::pos#1 -- _deref_pbuc1=vbuz1 
    lda.z pos
    sta SCREEN+2
    // [5] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  __b1_from___b4:
    // [5] phi (byte) main::max#2 = (byte) main::max#3 [phi:main::@4->main::@1#0] -- register_copy 
    // [5] phi (byte) main::min#2 = (byte) main::min#3 [phi:main::@4->main::@1#1] -- register_copy 
    // [5] phi (byte) main::pos#2 = (byte) main::pos#1 [phi:main::@4->main::@1#2] -- register_copy 
    jmp __b1
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Potential registers zp[1]:2 [ main::pos#2 main::pos#1 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ main::min#2 main::min#3 main::min#9 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:4 [ main::max#2 main::max#3 main::max#9 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 39.29: zp[1]:3 [ main::min#2 main::min#3 main::min#9 ] 38.5: zp[1]:4 [ main::max#2 main::max#3 main::max#9 ] 29.7: zp[1]:2 [ main::pos#2 main::pos#1 ] 
Uplift Scope [] 

Uplifting [main] best 652 combination reg byte x [ main::min#2 main::min#3 main::min#9 ] reg byte y [ main::max#2 main::max#3 main::max#9 ] reg byte a [ main::pos#2 main::pos#1 ] 
Uplifting [] best 652 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Results in infinite compile loop as the compiler keeps trying to remove the same (empty) alias
  // 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] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [5] phi (byte) main::max#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 
    ldy #0
    // [5] phi (byte) main::min#2 = (byte) $ff [phi:main->main::@1#1] -- vbuxx=vbuc1 
    ldx #$ff
    // [5] phi (byte) main::pos#2 = (byte) 0 [phi:main->main::@1#2] -- vbuaa=vbuc1 
    lda #0
    jmp __b1
    // main::@1
  __b1:
    jmp __b2
    // main::@2
  __b2:
    // [6] (byte) main::pos#1 ← ++ (byte) main::pos#2 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
    // [7] if((byte) main::pos#1>=(byte) main::min#2) goto main::@3 -- vbuaa_ge_vbuxx_then_la1 
    stx.z $ff
    cmp.z $ff
    bcs __b3_from___b2
    jmp __b5
    // main::@5
  __b5:
    // [8] (byte) main::min#9 ← (byte) main::pos#1 -- vbuxx=vbuaa 
    tax
    // [9] phi from main::@2 main::@5 to main::@3 [phi:main::@2/main::@5->main::@3]
  __b3_from___b2:
  __b3_from___b5:
    // [9] phi (byte) main::min#3 = (byte) main::min#2 [phi:main::@2/main::@5->main::@3#0] -- register_copy 
    jmp __b3
    // main::@3
  __b3:
    // [10] if((byte) main::pos#1<=(byte) main::max#2) goto main::@4 -- vbuaa_le_vbuyy_then_la1 
    sta.z $ff
    cpy.z $ff
    bcs __b4_from___b3
    jmp __b6
    // main::@6
  __b6:
    // [11] (byte) main::max#9 ← (byte) main::pos#1 -- vbuyy=vbuaa 
    tay
    // [12] phi from main::@3 main::@6 to main::@4 [phi:main::@3/main::@6->main::@4]
  __b4_from___b3:
  __b4_from___b6:
    // [12] phi (byte) main::max#3 = (byte) main::max#2 [phi:main::@3/main::@6->main::@4#0] -- register_copy 
    jmp __b4
    // main::@4
  __b4:
    // [13] *((const byte*) SCREEN) ← (byte) main::min#3 -- _deref_pbuc1=vbuxx 
    stx SCREEN
    // [14] *((const byte*) SCREEN+(byte) 1) ← (byte) main::max#3 -- _deref_pbuc1=vbuyy 
    sty SCREEN+1
    // [15] *((const byte*) SCREEN+(byte) 2) ← (byte) main::pos#1 -- _deref_pbuc1=vbuaa 
    sta SCREEN+2
    // [5] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  __b1_from___b4:
    // [5] phi (byte) main::max#2 = (byte) main::max#3 [phi:main::@4->main::@1#0] -- register_copy 
    // [5] phi (byte) main::min#2 = (byte) main::min#3 [phi:main::@4->main::@1#1] -- register_copy 
    // [5] phi (byte) main::pos#2 = (byte) main::pos#1 [phi:main::@4->main::@1#2] -- register_copy 
    jmp __b1
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b5
Removing instruction jmp __b3
Removing instruction jmp __b6
Removing instruction jmp __b4
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction lda #0 with TYA
Replacing label __bbegin with __b1
Replacing label __b3_from___b2 with __b3
Replacing label __b4_from___b3 with __b4
Replacing label __b1 with __b2
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
Removing instruction __b1:
Removing instruction __b3_from___b2:
Removing instruction __b3_from___b5:
Removing instruction __b4_from___b3:
Removing instruction __b4_from___b6:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction __b1_from_main:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __b1_from___b4:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction __b1:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte*) SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(byte) main::max
(byte) main::max#2 reg byte y 5.5
(byte) main::max#3 reg byte y 11.0
(byte) main::max#9 reg byte y 22.0
(byte) main::min
(byte) main::min#2 reg byte x 11.0
(byte) main::min#3 reg byte x 6.285714285714286
(byte) main::min#9 reg byte x 22.0
(byte) main::pos
(byte) main::pos#1 reg byte a 7.699999999999999
(byte) main::pos#2 reg byte a 22.0

reg byte a [ main::pos#2 main::pos#1 ]
reg byte x [ main::min#2 main::min#3 main::min#9 ]
reg byte y [ main::max#2 main::max#3 main::max#9 ]


FINAL ASSEMBLER
Score: 460

  // File Comments
// Results in infinite compile loop as the compiler keeps trying to remove the same (empty) alias
  // 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: {
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (byte) main::max#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 
    ldy #0
    // [5] phi (byte) main::min#2 = (byte) $ff [phi:main->main::@1#1] -- vbuxx=vbuc1 
    ldx #$ff
    // [5] phi (byte) main::pos#2 = (byte) 0 [phi:main->main::@1#2] -- vbuaa=vbuc1 
    tya
    // main::@1
    // main::@2
  __b2:
    // pos++;
    // [6] (byte) main::pos#1 ← ++ (byte) main::pos#2 -- vbuaa=_inc_vbuaa 
    clc
    adc #1
    // if(pos<min)
    // [7] if((byte) main::pos#1>=(byte) main::min#2) goto main::@3 -- vbuaa_ge_vbuxx_then_la1 
    stx.z $ff
    cmp.z $ff
    bcs __b3
    // main::@5
    // [8] (byte) main::min#9 ← (byte) main::pos#1 -- vbuxx=vbuaa 
    tax
    // [9] phi from main::@2 main::@5 to main::@3 [phi:main::@2/main::@5->main::@3]
    // [9] phi (byte) main::min#3 = (byte) main::min#2 [phi:main::@2/main::@5->main::@3#0] -- register_copy 
    // main::@3
  __b3:
    // if(pos>max)
    // [10] if((byte) main::pos#1<=(byte) main::max#2) goto main::@4 -- vbuaa_le_vbuyy_then_la1 
    sta.z $ff
    cpy.z $ff
    bcs __b4
    // main::@6
    // [11] (byte) main::max#9 ← (byte) main::pos#1 -- vbuyy=vbuaa 
    tay
    // [12] phi from main::@3 main::@6 to main::@4 [phi:main::@3/main::@6->main::@4]
    // [12] phi (byte) main::max#3 = (byte) main::max#2 [phi:main::@3/main::@6->main::@4#0] -- register_copy 
    // main::@4
  __b4:
    // SCREEN[0] = min
    // [13] *((const byte*) SCREEN) ← (byte) main::min#3 -- _deref_pbuc1=vbuxx 
    stx SCREEN
    // SCREEN[1] = max
    // [14] *((const byte*) SCREEN+(byte) 1) ← (byte) main::max#3 -- _deref_pbuc1=vbuyy 
    sty SCREEN+1
    // SCREEN[2] = pos
    // [15] *((const byte*) SCREEN+(byte) 2) ← (byte) main::pos#1 -- _deref_pbuc1=vbuaa 
    sta SCREEN+2
    // [5] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
    // [5] phi (byte) main::max#2 = (byte) main::max#3 [phi:main::@4->main::@1#0] -- register_copy 
    // [5] phi (byte) main::min#2 = (byte) main::min#3 [phi:main::@4->main::@1#1] -- register_copy 
    // [5] phi (byte) main::pos#2 = (byte) main::pos#1 [phi:main::@4->main::@1#2] -- register_copy 
    jmp __b2
}
  // File Data

