
CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  main::$4 = 0 * SIZEOF_UNSIGNED_INT
  fibs[main::$4] = 0
  main::$5 = 1 * SIZEOF_UNSIGNED_INT
  fibs[main::$5] = 1
  main::i#0 = 0
  to:main::@1
main::@1: scope:[main]  from main main::@2
  main::i#2 = phi( main/main::i#0, main::@2/main::i#1 )
  main::$0 = main::i#2 < $19-2
  if(main::$0) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  main::i#3 = phi( main::@1/main::i#2 )
  main::$1 = main::i#3 + 2
  main::$2 = main::i#3 + 1
  main::$6 = main::i#3 * SIZEOF_UNSIGNED_INT
  main::$7 = main::$2 * SIZEOF_UNSIGNED_INT
  main::$3 = fibs[main::$6] + fibs[main::$7]
  main::$8 = main::$1 * SIZEOF_UNSIGNED_INT
  fibs[main::$8] = main::$3
  main::i#1 = ++ main::i#3
  to:main::@1
main::@return: scope:[main]  from main::@1
  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
__constant char SIZEOF_UNSIGNED_INT = 2
void __start()
__constant unsigned int fibs[$19] = { fill( $19, 0) }
void main()
bool main::$0
number main::$1
number main::$2
unsigned int main::$3
number main::$4
number main::$5
unsigned int main::$6
number main::$7
number main::$8
unsigned int main::i
unsigned int main::i#0
unsigned int main::i#1
unsigned int main::i#2
unsigned int main::i#3

Adding number conversion cast (unumber) 0 in main::$4 = 0 * SIZEOF_UNSIGNED_INT
Adding number conversion cast (unumber) main::$4 in main::$4 = (unumber)0 * SIZEOF_UNSIGNED_INT
Adding number conversion cast (unumber) 0 in fibs[main::$4] = 0
Adding number conversion cast (unumber) 1 in main::$5 = 1 * SIZEOF_UNSIGNED_INT
Adding number conversion cast (unumber) main::$5 in main::$5 = (unumber)1 * SIZEOF_UNSIGNED_INT
Adding number conversion cast (unumber) 1 in fibs[main::$5] = 1
Adding number conversion cast (unumber) $19-2 in main::$0 = main::i#2 < $19-2
Adding number conversion cast (unumber) 2 in main::$1 = main::i#3 + 2
Adding number conversion cast (unumber) main::$1 in main::$1 = main::i#3 + (unumber)2
Adding number conversion cast (unumber) 1 in main::$2 = main::i#3 + 1
Adding number conversion cast (unumber) main::$2 in main::$2 = main::i#3 + (unumber)1
Adding number conversion cast (unumber) main::$7 in main::$7 = main::$2 * SIZEOF_UNSIGNED_INT
Adding number conversion cast (unumber) main::$8 in main::$8 = main::$1 * SIZEOF_UNSIGNED_INT
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast fibs[main::$4] = (unumber)0
Inlining cast fibs[main::$5] = (unumber)1
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in main::$4 = 0 * SIZEOF_UNSIGNED_INT
Inferred type updated to char in main::$5 = 1 * SIZEOF_UNSIGNED_INT
Inferred type updated to unsigned int in main::$1 = main::i#3 + 2
Inferred type updated to unsigned int in main::$2 = main::i#3 + 1
Inferred type updated to unsigned int in main::$7 = main::$2 * SIZEOF_UNSIGNED_INT
Inferred type updated to unsigned int in main::$8 = main::$1 * SIZEOF_UNSIGNED_INT
Alias main::i#2 = main::i#3 
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$0 [7] if(main::i#2<(char)$19-2) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [0] main::$4 = 0 * SIZEOF_UNSIGNED_INT
Constant right-side identified [2] main::$5 = 1 * SIZEOF_UNSIGNED_INT
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$4 = 0*SIZEOF_UNSIGNED_INT
Constant main::$5 = 1*SIZEOF_UNSIGNED_INT
Constant main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
De-inlining pointer[w] to *(pointer+w)   [12] main::$3 = fibs[main::$6] + fibs[main::$7]
De-inlining pointer[w] to *(pointer+w)   [12] main::$3 = *main::$9 + fibs[main::$7]
De-inlining pointer[w] to *(pointer+w)   [14] fibs[main::$8] = main::$3
Successful SSA optimization Pass2DeInlineWordDerefIdx
Simplifying constant evaluating to zero 0*SIZEOF_UNSIGNED_INT in 
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero fibs in [1] fibs[main::$4] = 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant main::$4
Successful SSA optimization PassNEliminateUnusedVars
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
Rewriting multiplication to use shift [6] main::$6 = main::i#2 * SIZEOF_UNSIGNED_INT
Rewriting multiplication to use shift [7] main::$7 = main::$2 * SIZEOF_UNSIGNED_INT
Rewriting multiplication to use shift [11] main::$8 = main::$1 * SIZEOF_UNSIGNED_INT
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings main::i#0
Constant inlined main::$5 = 1*SIZEOF_UNSIGNED_INT
Constant inlined main::i#0 = 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(fibs+1*SIZEOF_UNSIGNED_INT)
Successful SSA optimization Pass2ConstantAdditionElimination
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying constant integer cast $19-2
Successful SSA optimization PassNCastSimplification
CALL GRAPH

Created 1 initial phi equivalence classes
Coalesced [16] main::i#4 = main::i#1
Coalesced down to 1 phi equivalence classes

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] *fibs = 0
  [1] *(fibs+1*SIZEOF_UNSIGNED_INT) = 1
  to:main::@1
main::@1: scope:[main]  from main main::@2
  [2] main::i#2 = phi( main/0, main::@2/main::i#1 )
  [3] if(main::i#2<$19-2) goto main::@2
  to:main::@return
main::@return: scope:[main]  from main::@1
  [4] return 
  to:@return
main::@2: scope:[main]  from main::@1
  [5] main::$1 = main::i#2 + 2
  [6] main::$2 = main::i#2 + 1
  [7] main::$6 = main::i#2 << 1
  [8] main::$7 = main::$2 << 1
  [9] main::$9 = fibs + main::$6
  [10] main::$10 = fibs + main::$7
  [11] main::$3 = *main::$9 + *main::$10
  [12] main::$8 = main::$1 << 1
  [13] main::$11 = fibs + main::$8
  [14] *main::$11 = main::$3
  [15] main::i#1 = ++ main::i#2
  to:main::@1


VARIABLE REGISTER WEIGHTS
void main()
unsigned int main::$1 // 3.142857142857143
unsigned int *main::$10 // 22.0
unsigned int *main::$11 // 22.0
unsigned int main::$2 // 11.0
unsigned int main::$3 // 7.333333333333333
unsigned int main::$6 // 11.0
unsigned int main::$7 // 11.0
unsigned int main::$8 // 22.0
unsigned int *main::$9 // 11.0
unsigned int main::i
unsigned int main::i#1 // 22.0
unsigned int main::i#2 // 5.5

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
Added variable main::$1 to live range equivalence class [ main::$1 ]
Added variable main::$2 to live range equivalence class [ main::$2 ]
Added variable main::$6 to live range equivalence class [ main::$6 ]
Added variable main::$7 to live range equivalence class [ main::$7 ]
Added variable main::$9 to live range equivalence class [ main::$9 ]
Added variable main::$10 to live range equivalence class [ main::$10 ]
Added variable main::$3 to live range equivalence class [ main::$3 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$11 to live range equivalence class [ main::$11 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::$1 ]
[ main::$2 ]
[ main::$6 ]
[ main::$7 ]
[ main::$9 ]
[ main::$10 ]
[ main::$3 ]
[ main::$8 ]
[ main::$11 ]
Allocated zp[2]:2 [ main::i#2 main::i#1 ]
Allocated zp[2]:4 [ main::$10 ]
Allocated zp[2]:6 [ main::$8 ]
Allocated zp[2]:8 [ main::$11 ]
Allocated zp[2]:10 [ main::$2 ]
Allocated zp[2]:12 [ main::$6 ]
Allocated zp[2]:14 [ main::$7 ]
Allocated zp[2]:16 [ main::$9 ]
Allocated zp[2]:18 [ main::$3 ]
Allocated zp[2]:20 [ main::$1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [0] *fibs = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [1] *(fibs+1*SIZEOF_UNSIGNED_INT) = 1 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [3] if(main::i#2<$19-2) goto main::@2 [ main::i#2 ] (  [ main::i#2 ] { }  ) always clobbers reg byte a 
Statement [5] main::$1 = main::i#2 + 2 [ main::i#2 main::$1 ] (  [ main::i#2 main::$1 ] { }  ) always clobbers reg byte a 
Statement [6] main::$2 = main::i#2 + 1 [ main::i#2 main::$1 main::$2 ] (  [ main::i#2 main::$1 main::$2 ] { }  ) always clobbers reg byte a 
Statement [7] main::$6 = main::i#2 << 1 [ main::i#2 main::$1 main::$2 main::$6 ] (  [ main::i#2 main::$1 main::$2 main::$6 ] { }  ) always clobbers reg byte a 
Statement [8] main::$7 = main::$2 << 1 [ main::i#2 main::$1 main::$6 main::$7 ] (  [ main::i#2 main::$1 main::$6 main::$7 ] { }  ) always clobbers reg byte a 
Statement [9] main::$9 = fibs + main::$6 [ main::i#2 main::$1 main::$7 main::$9 ] (  [ main::i#2 main::$1 main::$7 main::$9 ] { }  ) always clobbers reg byte a 
Statement [10] main::$10 = fibs + main::$7 [ main::i#2 main::$1 main::$9 main::$10 ] (  [ main::i#2 main::$1 main::$9 main::$10 ] { }  ) always clobbers reg byte a 
Statement [11] main::$3 = *main::$9 + *main::$10 [ main::i#2 main::$1 main::$3 ] (  [ main::i#2 main::$1 main::$3 ] { }  ) always clobbers reg byte a reg byte y 
Statement [12] main::$8 = main::$1 << 1 [ main::i#2 main::$3 main::$8 ] (  [ main::i#2 main::$3 main::$8 ] { }  ) always clobbers reg byte a 
Statement [13] main::$11 = fibs + main::$8 [ main::i#2 main::$3 main::$11 ] (  [ main::i#2 main::$3 main::$11 ] { }  ) always clobbers reg byte a 
Statement [14] *main::$11 = main::$3 [ main::i#2 ] (  [ main::i#2 ] { }  ) always clobbers reg byte a reg byte y 
Potential registers zp[2]:2 [ main::i#2 main::i#1 ] : zp[2]:2 , 
Potential registers zp[2]:20 [ main::$1 ] : zp[2]:20 , 
Potential registers zp[2]:10 [ main::$2 ] : zp[2]:10 , 
Potential registers zp[2]:12 [ main::$6 ] : zp[2]:12 , 
Potential registers zp[2]:14 [ main::$7 ] : zp[2]:14 , 
Potential registers zp[2]:16 [ main::$9 ] : zp[2]:16 , 
Potential registers zp[2]:4 [ main::$10 ] : zp[2]:4 , 
Potential registers zp[2]:18 [ main::$3 ] : zp[2]:18 , 
Potential registers zp[2]:6 [ main::$8 ] : zp[2]:6 , 
Potential registers zp[2]:8 [ main::$11 ] : zp[2]:8 , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 27.5: zp[2]:2 [ main::i#2 main::i#1 ] 22: zp[2]:4 [ main::$10 ] 22: zp[2]:6 [ main::$8 ] 22: zp[2]:8 [ main::$11 ] 11: zp[2]:10 [ main::$2 ] 11: zp[2]:12 [ main::$6 ] 11: zp[2]:14 [ main::$7 ] 11: zp[2]:16 [ main::$9 ] 7.33: zp[2]:18 [ main::$3 ] 3.14: zp[2]:20 [ main::$1 ] 
Uplift Scope [] 

Uplifting [main] best 2415 combination zp[2]:2 [ main::i#2 main::i#1 ] zp[2]:4 [ main::$10 ] zp[2]:6 [ main::$8 ] zp[2]:8 [ main::$11 ] zp[2]:10 [ main::$2 ] zp[2]:12 [ main::$6 ] zp[2]:14 [ main::$7 ] zp[2]:16 [ main::$9 ] zp[2]:18 [ main::$3 ] zp[2]:20 [ main::$1 ] 
Uplifting [] best 2415 combination 
Coalescing zero page register [ zp[2]:20 [ main::$1 ] ] with [ zp[2]:6 [ main::$8 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ main::$2 ] ] with [ zp[2]:14 [ main::$7 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ main::$6 ] ] with [ zp[2]:16 [ main::$9 ] ] - score: 1
Coalescing zero page register [ zp[2]:4 [ main::$10 ] ] with [ zp[2]:18 [ main::$3 ] ] - score: 1
Coalescing zero page register [ zp[2]:20 [ main::$1 main::$8 ] ] with [ zp[2]:8 [ main::$11 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ main::$2 main::$7 ] ] with [ zp[2]:4 [ main::$10 main::$3 ] ] - score: 1
Allocated (was zp[2]:10) zp[2]:2 [ main::$2 main::$7 main::$10 main::$3 ]
Allocated (was zp[2]:20) zp[2]:4 [ main::$1 main::$8 main::$11 ]
Allocated (was zp[2]:2) zp[2]:6 [ main::i#2 main::i#1 ]
Allocated (was zp[2]:12) zp[2]:8 [ main::$6 main::$9 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test array index pointer rewriting
// 16bit array with 16bit index
// Fibonacci calculation uses adjacent indices inside the loop
  // Upstart
  // Commodore 64 PRG executable file
.file [name="index-pointer-rewrite-7.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
  .const SIZEOF_UNSIGNED_INT = 2
.segment Code
  // main
main: {
    .label __1 = 4
    .label __2 = 2
    .label __3 = 2
    .label __6 = 8
    .label __7 = 2
    .label __8 = 4
    .label i = 6
    .label __9 = 8
    .label __10 = 2
    .label __11 = 4
    // [0] *fibs = 0 -- _deref_pwuc1=vbuc2 
    lda #<0
    sta fibs
    lda #>0
    sta fibs+1
    // [1] *(fibs+1*SIZEOF_UNSIGNED_INT) = 1 -- _deref_pwuc1=vbuc2 
    lda #<1
    sta fibs+1*SIZEOF_UNSIGNED_INT
    lda #>1
    sta fibs+1*SIZEOF_UNSIGNED_INT+1
    // [2] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [2] phi main::i#2 = 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z i
    lda #>0
    sta.z i+1
    jmp __b1
    // main::@1
  __b1:
    // [3] if(main::i#2<$19-2) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 
    lda.z i+1
    bne !+
    lda.z i
    cmp #$19-2
    bcc __b2
  !:
    jmp __breturn
    // main::@return
  __breturn:
    // [4] return 
    rts
    // main::@2
  __b2:
    // [5] main::$1 = main::i#2 + 2 -- vwuz1=vwuz2_plus_vbuc1 
    lda #2
    clc
    adc.z i
    sta.z __1
    lda #0
    adc.z i+1
    sta.z __1+1
    // [6] main::$2 = main::i#2 + 1 -- vwuz1=vwuz2_plus_1 
    clc
    lda.z i
    adc #1
    sta.z __2
    lda.z i+1
    adc #0
    sta.z __2+1
    // [7] main::$6 = main::i#2 << 1 -- vwuz1=vwuz2_rol_1 
    lda.z i
    asl
    sta.z __6
    lda.z i+1
    rol
    sta.z __6+1
    // [8] main::$7 = main::$2 << 1 -- vwuz1=vwuz1_rol_1 
    asl.z __7
    rol.z __7+1
    // [9] main::$9 = fibs + main::$6 -- pwuz1=pwuc1_plus_vwuz1 
    lda.z __9
    clc
    adc #<fibs
    sta.z __9
    lda.z __9+1
    adc #>fibs
    sta.z __9+1
    // [10] main::$10 = fibs + main::$7 -- pwuz1=pwuc1_plus_vwuz1 
    lda.z __10
    clc
    adc #<fibs
    sta.z __10
    lda.z __10+1
    adc #>fibs
    sta.z __10+1
    // [11] main::$3 = *main::$9 + *main::$10 -- vwuz1=_deref_pwuz2_plus__deref_pwuz1 
    ldy #0
    clc
    lda (__3),y
    adc (__9),y
    pha
    iny
    lda (__3),y
    adc (__9),y
    sta.z __3+1
    pla
    sta.z __3
    // [12] main::$8 = main::$1 << 1 -- vwuz1=vwuz1_rol_1 
    asl.z __8
    rol.z __8+1
    // [13] main::$11 = fibs + main::$8 -- pwuz1=pwuc1_plus_vwuz1 
    lda.z __11
    clc
    adc #<fibs
    sta.z __11
    lda.z __11+1
    adc #>fibs
    sta.z __11+1
    // [14] *main::$11 = main::$3 -- _deref_pwuz1=vwuz2 
    ldy #0
    lda.z __3
    sta (__11),y
    iny
    lda.z __3+1
    sta (__11),y
    // [15] main::i#1 = ++ main::i#2 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
  __b1_from___b2:
    // [2] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#0] -- register_copy 
    jmp __b1
}
  // File Data
.segment Data
  fibs: .fill 2*$19, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __b1_from_main:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction lda #<0
Succesful ASM optimization Pass5UnnecesaryLoadElimination

FINAL SYMBOL TABLE
__constant char SIZEOF_UNSIGNED_INT = 2
__constant unsigned int fibs[$19] = { fill( $19, 0) }
void main()
unsigned int main::$1 // zp[2]:4 3.142857142857143
unsigned int *main::$10 // zp[2]:2 22.0
unsigned int *main::$11 // zp[2]:4 22.0
unsigned int main::$2 // zp[2]:2 11.0
unsigned int main::$3 // zp[2]:2 7.333333333333333
unsigned int main::$6 // zp[2]:8 11.0
unsigned int main::$7 // zp[2]:2 11.0
unsigned int main::$8 // zp[2]:4 22.0
unsigned int *main::$9 // zp[2]:8 11.0
unsigned int main::i
unsigned int main::i#1 // i zp[2]:6 22.0
unsigned int main::i#2 // i zp[2]:6 5.5

zp[2]:6 [ main::i#2 main::i#1 ]
zp[2]:4 [ main::$1 main::$8 main::$11 ]
zp[2]:2 [ main::$2 main::$7 main::$10 main::$3 ]
zp[2]:8 [ main::$6 main::$9 ]


FINAL ASSEMBLER
Score: 2263

  // File Comments
// Test array index pointer rewriting
// 16bit array with 16bit index
// Fibonacci calculation uses adjacent indices inside the loop
  // Upstart
  // Commodore 64 PRG executable file
.file [name="index-pointer-rewrite-7.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
  .const SIZEOF_UNSIGNED_INT = 2
.segment Code
  // main
main: {
    .label __1 = 4
    .label __2 = 2
    .label __3 = 2
    .label __6 = 8
    .label __7 = 2
    .label __8 = 4
    .label i = 6
    .label __9 = 8
    .label __10 = 2
    .label __11 = 4
    // fibs[0] = 0
    // [0] *fibs = 0 -- _deref_pwuc1=vbuc2 
    lda #<0
    sta fibs
    sta fibs+1
    // fibs[1] = 1
    // [1] *(fibs+1*SIZEOF_UNSIGNED_INT) = 1 -- _deref_pwuc1=vbuc2 
    lda #<1
    sta fibs+1*SIZEOF_UNSIGNED_INT
    lda #>1
    sta fibs+1*SIZEOF_UNSIGNED_INT+1
    // [2] phi from main to main::@1 [phi:main->main::@1]
    // [2] phi main::i#2 = 0 [phi:main->main::@1#0] -- vwuz1=vwuc1 
    sta.z i
    sta.z i+1
    // main::@1
  __b1:
    // for(unsigned short i=0;i<NUM_FIBS-2;i++)
    // [3] if(main::i#2<$19-2) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 
    lda.z i+1
    bne !+
    lda.z i
    cmp #$19-2
    bcc __b2
  !:
    // main::@return
    // }
    // [4] return 
    rts
    // main::@2
  __b2:
    // i+2
    // [5] main::$1 = main::i#2 + 2 -- vwuz1=vwuz2_plus_vbuc1 
    lda #2
    clc
    adc.z i
    sta.z __1
    lda #0
    adc.z i+1
    sta.z __1+1
    // i+1
    // [6] main::$2 = main::i#2 + 1 -- vwuz1=vwuz2_plus_1 
    clc
    lda.z i
    adc #1
    sta.z __2
    lda.z i+1
    adc #0
    sta.z __2+1
    // fibs[i]+fibs[i+1]
    // [7] main::$6 = main::i#2 << 1 -- vwuz1=vwuz2_rol_1 
    lda.z i
    asl
    sta.z __6
    lda.z i+1
    rol
    sta.z __6+1
    // [8] main::$7 = main::$2 << 1 -- vwuz1=vwuz1_rol_1 
    asl.z __7
    rol.z __7+1
    // [9] main::$9 = fibs + main::$6 -- pwuz1=pwuc1_plus_vwuz1 
    lda.z __9
    clc
    adc #<fibs
    sta.z __9
    lda.z __9+1
    adc #>fibs
    sta.z __9+1
    // [10] main::$10 = fibs + main::$7 -- pwuz1=pwuc1_plus_vwuz1 
    lda.z __10
    clc
    adc #<fibs
    sta.z __10
    lda.z __10+1
    adc #>fibs
    sta.z __10+1
    // [11] main::$3 = *main::$9 + *main::$10 -- vwuz1=_deref_pwuz2_plus__deref_pwuz1 
    ldy #0
    clc
    lda (__3),y
    adc (__9),y
    pha
    iny
    lda (__3),y
    adc (__9),y
    sta.z __3+1
    pla
    sta.z __3
    // fibs[i+2] = fibs[i]+fibs[i+1]
    // [12] main::$8 = main::$1 << 1 -- vwuz1=vwuz1_rol_1 
    asl.z __8
    rol.z __8+1
    // [13] main::$11 = fibs + main::$8 -- pwuz1=pwuc1_plus_vwuz1 
    lda.z __11
    clc
    adc #<fibs
    sta.z __11
    lda.z __11+1
    adc #>fibs
    sta.z __11+1
    // [14] *main::$11 = main::$3 -- _deref_pwuz1=vwuz2 
    ldy #0
    lda.z __3
    sta (__11),y
    iny
    lda.z __3+1
    sta (__11),y
    // for(unsigned short i=0;i<NUM_FIBS-2;i++)
    // [15] main::i#1 = ++ main::i#2 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
    // [2] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#0] -- register_copy 
    jmp __b1
}
  // File Data
.segment Data
  fibs: .fill 2*$19, 0

