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
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  to:@1
main: scope:[main]  from @1
  (byte) main::min#0 ← (number) $ff
  (byte) main::max#0 ← (number) 0
  (byte) main::pos#0 ← (number) 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 )
  *((byte*) SCREEN#0 + (number) 0) ← (byte) main::min#3
  *((byte*) SCREEN#0 + (number) 1) ← (byte) main::max#3
  *((byte*) SCREEN#0 + (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
(byte*) SCREEN
(byte*) SCREEN#0
(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) $ff in (byte) main::min#0 ← (number) $ff
Adding number conversion cast (unumber) 0 in (byte) main::max#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::pos#0 ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) SCREEN#0 + (number) 0) ← (byte) main::min#3
Adding number conversion cast (unumber) 1 in *((byte*) SCREEN#0 + (number) 1) ← (byte) main::max#3
Adding number conversion cast (unumber) 2 in *((byte*) SCREEN#0 + (number) 2) ← (byte) main::pos#5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::min#0 ← (unumber)(number) $ff
Inlining cast (byte) main::max#0 ← (unumber)(number) 0
Inlining cast (byte) main::pos#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $ff
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
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 [9] (bool~) main::$1 ← (byte) main::pos#1 >= (byte) main::min#2 from [8] (bool~) main::$0 ← (byte) main::pos#1 < (byte) main::min#2
Inversing boolean not [13] (bool~) main::$3 ← (byte) main::pos#3 <= (byte) main::max#2 from [12] (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
Alias (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
Alias candidate removed (solo) (byte) main::pos#3 = 
Identical Phi Values (byte) main::pos#3 (byte) main::pos#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$1 [10] if((byte) main::pos#1>=(byte) main::min#2) goto main::@4
Simple Condition (bool~) main::$3 [14] if((byte) main::pos#1<=(byte) main::max#2) goto main::@5
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024
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 [5] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Simplifying expression containing zero SCREEN#0 in [18] *((const byte*) SCREEN#0 + (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#0+1)
Consolidated array index constant in *(SCREEN#0+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()
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#0) ← (byte) main::min#3
  [14] *((const byte*) SCREEN#0+(byte) 1) ← (byte) main::max#3
  [15] *((const byte*) SCREEN#0+(byte) 2) ← (byte) main::pos#1
  to:main::@1


VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(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 ZP_BYTE:2 [ main::pos#2 main::pos#1 ]
Allocated zp ZP_BYTE:3 [ main::min#2 main::min#3 main::min#9 ]
Allocated zp ZP_BYTE:4 [ main::max#2 main::max#3 main::max#9 ]

INITIAL ASM
  // File Comments
// Results in infinite compile loop as the compiler keeps trying to remove the same (empty) alias
  // 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 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 max
    // [5] phi (byte) main::min#2 = (byte) $ff [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #$ff
    sta min
    // [5] phi (byte) main::pos#2 = (byte) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta pos
    jmp b1
    // main::@1
  b1:
    jmp b2
    // main::@2
  b2:
    // [6] (byte) main::pos#1 ← ++ (byte) main::pos#2 -- vbuz1=_inc_vbuz1 
    inc pos
    // [7] if((byte) main::pos#1>=(byte) main::min#2) goto main::@3 -- vbuz1_ge_vbuz2_then_la1 
    lda pos
    cmp min
    bcs b3_from_b2
    jmp b5
    // main::@5
  b5:
    // [8] (byte~) main::min#9 ← (byte) main::pos#1 -- vbuz1=vbuz2 
    lda pos
    sta 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 max
    cmp pos
    bcs b4_from_b3
    jmp b6
    // main::@6
  b6:
    // [11] (byte~) main::max#9 ← (byte) main::pos#1 -- vbuz1=vbuz2 
    lda pos
    sta 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#0) ← (byte) main::min#3 -- _deref_pbuc1=vbuz1 
    lda min
    sta SCREEN
    // [14] *((const byte*) SCREEN#0+(byte) 1) ← (byte) main::max#3 -- _deref_pbuc1=vbuz1 
    lda max
    sta SCREEN+1
    // [15] *((const byte*) SCREEN#0+(byte) 2) ← (byte) main::pos#1 -- _deref_pbuc1=vbuz1 
    lda 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 ZP_BYTE:2 [ main::pos#2 main::pos#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ main::min#2 main::min#3 main::min#9 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:4 [ main::max#2 main::max#3 main::max#9 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 39.29: zp ZP_BYTE:3 [ main::min#2 main::min#3 main::min#9 ] 38.5: zp ZP_BYTE:4 [ main::max#2 main::max#3 main::max#9 ] 29.7: zp ZP_BYTE: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
  // 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] 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 $ff
    cmp $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 $ff
    cpy $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#0) ← (byte) main::min#3 -- _deref_pbuc1=vbuxx 
    stx SCREEN
    // [14] *((const byte*) SCREEN#0+(byte) 1) ← (byte) main::max#3 -- _deref_pbuc1=vbuyy 
    sty SCREEN+1
    // [15] *((const byte*) SCREEN#0+(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 b3_from_b2 with b3
Replacing label b4_from_b3 with b4
Replacing label b1 with b2
Removing instruction b1_from_bbegin:
Removing instruction b1:
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 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()
(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
  // 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: {
    // [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 $ff
    cmp $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 $ff
    cpy $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#0) ← (byte) main::min#3 -- _deref_pbuc1=vbuxx 
    stx SCREEN
    // SCREEN[1] = max
    // [14] *((const byte*) SCREEN#0+(byte) 1) ← (byte) main::max#3 -- _deref_pbuc1=vbuyy 
    sty SCREEN+1
    // SCREEN[2] = pos
    // [15] *((const byte*) SCREEN#0+(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

