Inlined call call _init CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from _start::@1 (byte) main::y#0 ← (byte) 5 to:main::@1 main::@1: scope:[main] from main main::@3 (byte) main::y#2 ← phi( main/(byte) main::y#0 main::@3/(byte) main::y#1 ) (word~) main::$5 ← (word)(byte) main::y#2 (number~) main::$0 ← (word~) main::$5 * (number) $28 (byte*~) main::$1 ← (const byte*) SCREEN + (number~) main::$0 (byte*) main::line#0 ← (byte*~) main::$1 (byte) main::x#0 ← (byte) 5 to:main::@2 main::@2: scope:[main] from main::@1 main::@2 (byte*) main::line#1 ← phi( main::@1/(byte*) main::line#0 main::@2/(byte*) main::line#1 ) (byte) main::y#3 ← phi( main::@1/(byte) main::y#2 main::@2/(byte) main::y#3 ) (byte) main::x#2 ← phi( main::@1/(byte) main::x#0 main::@2/(byte) main::x#1 ) (byte~) main::$2 ← (byte) main::x#2 + (byte) main::y#3 *((byte*) main::line#1 + (byte) main::x#2) ← (byte~) main::$2 (byte) main::x#1 ← (byte) main::x#2 + rangenext(5,$f) (bool~) main::$3 ← (byte) main::x#1 != rangelast(5,$f) if((bool~) main::$3) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 (byte) main::y#4 ← phi( main::@2/(byte) main::y#3 ) (byte) main::y#1 ← (byte) main::y#4 + rangenext(5,$f) (bool~) main::$4 ← (byte) main::y#1 != rangelast(5,$f) if((bool~) main::$4) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 return to:@return (void()) _start() _start: scope:[_start] from to:_start::_init1 _start::_init1: scope:[_start] from _start to:_start::@1 _start::@1: scope:[_start] from _start::_init1 call main to:_start::@2 _start::@2: scope:[_start] from _start::@1 to:_start::@return _start::@return: scope:[_start] from _start::@2 return to:@return SYMBOL TABLE SSA (const byte*) SCREEN = (byte*)(number) $400 (void()) _start() (label) _start::@1 (label) _start::@2 (label) _start::@return (label) _start::_init1 (void()) main() (number~) main::$0 (byte*~) main::$1 (byte~) main::$2 (bool~) main::$3 (bool~) main::$4 (word~) main::$5 (label) main::@1 (label) main::@2 (label) main::@3 (label) main::@return (byte*) main::line (byte*) main::line#0 (byte*) main::line#1 (byte) main::x (byte) main::x#0 (byte) main::x#1 (byte) main::x#2 (byte) main::y (byte) main::y#0 (byte) main::y#1 (byte) main::y#2 (byte) main::y#3 (byte) main::y#4 Adding number conversion cast (unumber) $28 in (number~) main::$0 ← (word~) main::$5 * (number) $28 Adding number conversion cast (unumber) main::$0 in (number~) main::$0 ← (word~) main::$5 * (unumber)(number) $28 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant pointer cast (byte*) 1024 Simplifying constant integer cast $28 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $28 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to word in (unumber~) main::$0 ← (word~) main::$5 * (byte) $28 Alias main::line#0 = main::$1 Alias main::y#3 = main::y#4 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::y#3 (byte) main::y#2 Identical Phi Values (byte*) main::line#1 (byte*) main::line#0 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$3 [11] if((byte) main::x#1!=rangelast(5,$f)) goto main::@2 Simple Condition (bool~) main::$4 [14] if((byte) main::y#1!=rangelast(5,$f)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::y#0 = 5 Constant (const byte) main::x#0 = 5 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [9] main::x#1 ← ++ main::x#2 to ++ Resolved ranged comparison value [11] if(main::x#1!=rangelast(5,$f)) goto main::@2 to (number) $10 Resolved ranged next value [12] main::y#1 ← ++ main::y#2 to ++ Resolved ranged comparison value [14] if(main::y#1!=rangelast(5,$f)) goto main::@1 to (number) $10 Removing unused procedure _start Removing unused procedure block _start Removing unused procedure block _start::_init1 Removing unused procedure block _start::@1 Removing unused procedure block _start::@2 Removing unused procedure block _start::@return Successful SSA optimization PassNEliminateEmptyStart Adding number conversion cast (unumber) $10 in [8] if((byte) main::x#1!=(number) $10) goto main::@2 Adding number conversion cast (unumber) $10 in [10] if((byte) main::y#1!=(number) $10) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $10 Simplifying constant integer cast $10 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $10 Successful SSA optimization PassNFinalizeNumberTypeConversions Rewriting multiplication to use shift and addition[2] (word~) main::$0 ← (word~) main::$5 * (byte) $28 Inlining constant with var siblings (const byte) main::y#0 Inlining constant with var siblings (const byte) main::x#0 Constant inlined main::x#0 = (byte) 5 Constant inlined main::y#0 = (byte) 5 Successful SSA optimization Pass2ConstantInlining Alias main::$0 = main::$8 Successful SSA optimization Pass2AliasElimination Added new block during phi lifting main::@4(between main::@3 and main::@1) Added new block during phi lifting main::@5(between main::@2 and main::@2) Adding NOP phi() at start of main CALL GRAPH Created 2 initial phi equivalence classes Coalesced [15] main::y#5 ← main::y#1 Coalesced [16] main::x#3 ← main::x#1 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) main::@4 Culled Empty Block (label) main::@5 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::@3 [1] (byte) main::y#2 ← phi( main/(byte) 5 main::@3/(byte) main::y#1 ) [2] (word~) main::$5 ← (word)(byte) main::y#2 [3] (word~) main::$6 ← (word~) main::$5 << (byte) 2 [4] (word~) main::$7 ← (word~) main::$6 + (word~) main::$5 [5] (word~) main::$0 ← (word~) main::$7 << (byte) 3 [6] (byte*) main::line#0 ← (const byte*) SCREEN + (word~) main::$0 to:main::@2 main::@2: scope:[main] from main::@1 main::@2 [7] (byte) main::x#2 ← phi( main::@1/(byte) 5 main::@2/(byte) main::x#1 ) [8] (byte~) main::$2 ← (byte) main::x#2 + (byte) main::y#2 [9] *((byte*) main::line#0 + (byte) main::x#2) ← (byte~) main::$2 [10] (byte) main::x#1 ← ++ (byte) main::x#2 [11] if((byte) main::x#1!=(byte) $10) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 [12] (byte) main::y#1 ← ++ (byte) main::y#2 [13] if((byte) main::y#1!=(byte) $10) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 [14] return to:@return VARIABLE REGISTER WEIGHTS (void()) main() (word~) main::$0 22.0 (byte~) main::$2 202.0 (word~) main::$5 16.5 (word~) main::$6 22.0 (word~) main::$7 22.0 (byte*) main::line (byte*) main::line#0 18.666666666666664 (byte) main::x (byte) main::x#1 151.5 (byte) main::x#2 134.66666666666666 (byte) main::y (byte) main::y#1 16.5 (byte) main::y#2 11.181818181818182 Initial phi equivalence classes [ main::y#2 main::y#1 ] [ main::x#2 main::x#1 ] Added variable main::$5 to live range equivalence class [ main::$5 ] 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::$0 to live range equivalence class [ main::$0 ] Added variable main::line#0 to live range equivalence class [ main::line#0 ] Added variable main::$2 to live range equivalence class [ main::$2 ] Complete equivalence classes [ main::y#2 main::y#1 ] [ main::x#2 main::x#1 ] [ main::$5 ] [ main::$6 ] [ main::$7 ] [ main::$0 ] [ main::line#0 ] [ main::$2 ] Allocated zp[1]:2 [ main::y#2 main::y#1 ] Allocated zp[1]:3 [ main::x#2 main::x#1 ] Allocated zp[2]:4 [ main::$5 ] Allocated zp[2]:6 [ main::$6 ] Allocated zp[2]:8 [ main::$7 ] Allocated zp[2]:10 [ main::$0 ] Allocated zp[2]:12 [ main::line#0 ] Allocated zp[1]:14 [ main::$2 ] INITIAL ASM Target platform is c64basic / MOS6502X // File Comments // Fill a square on the screen // Upstart .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels .label SCREEN = $400 // main main: { .label __0 = $a .label __2 = $e .label __5 = 4 .label line = $c .label x = 3 .label y = 2 .label __6 = 6 .label __7 = 8 // [1] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: // [1] phi (byte) main::y#2 = (byte) 5 [phi:main->main::@1#0] -- vbuz1=vbuc1 lda #5 sta.z y jmp __b1 // [1] phi from main::@3 to main::@1 [phi:main::@3->main::@1] __b1_from___b3: // [1] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@3->main::@1#0] -- register_copy jmp __b1 // main::@1 __b1: // [2] (word~) main::$5 ← (word)(byte) main::y#2 -- vwuz1=_word_vbuz2 lda.z y sta.z __5 lda #0 sta.z __5+1 // [3] (word~) main::$6 ← (word~) main::$5 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda.z __5 asl sta.z __6 lda.z __5+1 rol sta.z __6+1 asl.z __6 rol.z __6+1 // [4] (word~) main::$7 ← (word~) main::$6 + (word~) main::$5 -- vwuz1=vwuz2_plus_vwuz3 lda.z __6 clc adc.z __5 sta.z __7 lda.z __6+1 adc.z __5+1 sta.z __7+1 // [5] (word~) main::$0 ← (word~) main::$7 << (byte) 3 -- vwuz1=vwuz2_rol_3 lda.z __7 asl sta.z __0 lda.z __7+1 rol sta.z __0+1 asl.z __0 rol.z __0+1 asl.z __0 rol.z __0+1 // [6] (byte*) main::line#0 ← (const byte*) SCREEN + (word~) main::$0 -- pbuz1=pbuc1_plus_vwuz2 lda.z __0 clc adc #SCREEN sta.z line+1 // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] __b2_from___b1: // [7] phi (byte) main::x#2 = (byte) 5 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 lda #5 sta.z x jmp __b2 // [7] phi from main::@2 to main::@2 [phi:main::@2->main::@2] __b2_from___b2: // [7] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@2->main::@2#0] -- register_copy jmp __b2 // main::@2 __b2: // [8] (byte~) main::$2 ← (byte) main::x#2 + (byte) main::y#2 -- vbuz1=vbuz2_plus_vbuz3 lda.z x clc adc.z y sta.z __2 // [9] *((byte*) main::line#0 + (byte) main::x#2) ← (byte~) main::$2 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z __2 ldy.z x sta (line),y // [10] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 inc.z x // [11] if((byte) main::x#1!=(byte) $10) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z x bne __b2_from___b2 jmp __b3 // main::@3 __b3: // [12] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuz1=_inc_vbuz1 inc.z y // [13] if((byte) main::y#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z y bne __b1_from___b3 jmp __breturn // main::@return __breturn: // [14] return rts } // File Data REGISTER UPLIFT POTENTIAL REGISTERS Statement [2] (word~) main::$5 ← (word)(byte) main::y#2 [ main::y#2 main::$5 ] ( [ main::y#2 main::$5 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::y#2 main::y#1 ] Statement [3] (word~) main::$6 ← (word~) main::$5 << (byte) 2 [ main::y#2 main::$5 main::$6 ] ( [ main::y#2 main::$5 main::$6 ] { } ) always clobbers reg byte a Statement [4] (word~) main::$7 ← (word~) main::$6 + (word~) main::$5 [ main::y#2 main::$7 ] ( [ main::y#2 main::$7 ] { } ) always clobbers reg byte a Statement [5] (word~) main::$0 ← (word~) main::$7 << (byte) 3 [ main::y#2 main::$0 ] ( [ main::y#2 main::$0 ] { } ) always clobbers reg byte a Statement [6] (byte*) main::line#0 ← (const byte*) SCREEN + (word~) main::$0 [ main::y#2 main::line#0 ] ( [ main::y#2 main::line#0 ] { } ) always clobbers reg byte a Statement [8] (byte~) main::$2 ← (byte) main::x#2 + (byte) main::y#2 [ main::y#2 main::line#0 main::x#2 main::$2 ] ( [ main::y#2 main::line#0 main::x#2 main::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::x#2 main::x#1 ] Statement [2] (word~) main::$5 ← (word)(byte) main::y#2 [ main::y#2 main::$5 ] ( [ main::y#2 main::$5 ] { } ) always clobbers reg byte a Statement [3] (word~) main::$6 ← (word~) main::$5 << (byte) 2 [ main::y#2 main::$5 main::$6 ] ( [ main::y#2 main::$5 main::$6 ] { } ) always clobbers reg byte a Statement [4] (word~) main::$7 ← (word~) main::$6 + (word~) main::$5 [ main::y#2 main::$7 ] ( [ main::y#2 main::$7 ] { } ) always clobbers reg byte a Statement [5] (word~) main::$0 ← (word~) main::$7 << (byte) 3 [ main::y#2 main::$0 ] ( [ main::y#2 main::$0 ] { } ) always clobbers reg byte a Statement [6] (byte*) main::line#0 ← (const byte*) SCREEN + (word~) main::$0 [ main::y#2 main::line#0 ] ( [ main::y#2 main::line#0 ] { } ) always clobbers reg byte a Statement [8] (byte~) main::$2 ← (byte) main::x#2 + (byte) main::y#2 [ main::y#2 main::line#0 main::x#2 main::$2 ] ( [ main::y#2 main::line#0 main::x#2 main::$2 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ main::y#2 main::y#1 ] : zp[1]:2 , reg byte x , reg byte y , Potential registers zp[1]:3 [ main::x#2 main::x#1 ] : zp[1]:3 , reg byte x , reg byte y , Potential registers zp[2]:4 [ main::$5 ] : zp[2]:4 , Potential registers zp[2]:6 [ main::$6 ] : zp[2]:6 , Potential registers zp[2]:8 [ main::$7 ] : zp[2]:8 , Potential registers zp[2]:10 [ main::$0 ] : zp[2]:10 , Potential registers zp[2]:12 [ main::line#0 ] : zp[2]:12 , Potential registers zp[1]:14 [ main::$2 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES Uplift Scope [main] 286.17: zp[1]:3 [ main::x#2 main::x#1 ] 202: zp[1]:14 [ main::$2 ] 27.68: zp[1]:2 [ main::y#2 main::y#1 ] 22: zp[2]:6 [ main::$6 ] 22: zp[2]:8 [ main::$7 ] 22: zp[2]:10 [ main::$0 ] 18.67: zp[2]:12 [ main::line#0 ] 16.5: zp[2]:4 [ main::$5 ] Uplift Scope [] Uplifting [main] best 4431 combination reg byte y [ main::x#2 main::x#1 ] reg byte a [ main::$2 ] zp[1]:2 [ main::y#2 main::y#1 ] zp[2]:6 [ main::$6 ] zp[2]:8 [ main::$7 ] zp[2]:10 [ main::$0 ] zp[2]:12 [ main::line#0 ] zp[2]:4 [ main::$5 ] Uplifting [] best 4431 combination Attempting to uplift remaining variables inzp[1]:2 [ main::y#2 main::y#1 ] Uplifting [main] best 4431 combination zp[1]:2 [ main::y#2 main::y#1 ] Coalescing zero page register [ zp[2]:4 [ main::$5 ] ] with [ zp[2]:8 [ main::$7 ] ] - score: 1 Coalescing zero page register [ zp[2]:10 [ main::$0 ] ] with [ zp[2]:12 [ main::line#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:4 [ main::$5 main::$7 ] ] with [ zp[2]:10 [ main::$0 main::line#0 ] ] - score: 1 Allocated (was zp[2]:4) zp[2]:3 [ main::$5 main::$7 main::$0 main::line#0 ] Allocated (was zp[2]:6) zp[2]:5 [ main::$6 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments // Fill a square on the screen // Upstart .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels .label SCREEN = $400 // main main: { .label __0 = 3 .label __5 = 3 .label line = 3 .label y = 2 .label __6 = 5 .label __7 = 3 // [1] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: // [1] phi (byte) main::y#2 = (byte) 5 [phi:main->main::@1#0] -- vbuz1=vbuc1 lda #5 sta.z y jmp __b1 // [1] phi from main::@3 to main::@1 [phi:main::@3->main::@1] __b1_from___b3: // [1] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@3->main::@1#0] -- register_copy jmp __b1 // main::@1 __b1: // [2] (word~) main::$5 ← (word)(byte) main::y#2 -- vwuz1=_word_vbuz2 lda.z y sta.z __5 lda #0 sta.z __5+1 // [3] (word~) main::$6 ← (word~) main::$5 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda.z __5 asl sta.z __6 lda.z __5+1 rol sta.z __6+1 asl.z __6 rol.z __6+1 // [4] (word~) main::$7 ← (word~) main::$6 + (word~) main::$5 -- vwuz1=vwuz2_plus_vwuz1 lda.z __7 clc adc.z __6 sta.z __7 lda.z __7+1 adc.z __6+1 sta.z __7+1 // [5] (word~) main::$0 ← (word~) main::$7 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl.z __0 rol.z __0+1 asl.z __0 rol.z __0+1 asl.z __0 rol.z __0+1 // [6] (byte*) main::line#0 ← (const byte*) SCREEN + (word~) main::$0 -- pbuz1=pbuc1_plus_vwuz1 clc lda.z line adc #SCREEN sta.z line+1 // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] __b2_from___b1: // [7] phi (byte) main::x#2 = (byte) 5 [phi:main::@1->main::@2#0] -- vbuyy=vbuc1 ldy #5 jmp __b2 // [7] phi from main::@2 to main::@2 [phi:main::@2->main::@2] __b2_from___b2: // [7] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@2->main::@2#0] -- register_copy jmp __b2 // main::@2 __b2: // [8] (byte~) main::$2 ← (byte) main::x#2 + (byte) main::y#2 -- vbuaa=vbuyy_plus_vbuz1 tya clc adc.z y // [9] *((byte*) main::line#0 + (byte) main::x#2) ← (byte~) main::$2 -- pbuz1_derefidx_vbuyy=vbuaa sta (line),y // [10] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuyy=_inc_vbuyy iny // [11] if((byte) main::x#1!=(byte) $10) goto main::@2 -- vbuyy_neq_vbuc1_then_la1 cpy #$10 bne __b2_from___b2 jmp __b3 // main::@3 __b3: // [12] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuz1=_inc_vbuz1 inc.z y // [13] if((byte) main::y#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z y bne __b1_from___b3 jmp __breturn // main::@return __breturn: // [14] return rts } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp __b1 Removing instruction jmp __b2 Removing instruction jmp __b3 Removing instruction jmp __breturn Succesful ASM optimization Pass5NextJumpElimination Replacing label __b2_from___b2 with __b2 Replacing label __b1_from___b3 with __b1 Removing instruction __b1_from___b3: Removing instruction __b2_from___b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction __b1_from_main: Removing instruction __b2_from___b1: Removing instruction __b3: Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination Removing instruction jmp __b1 Removing instruction jmp __b2 Succesful ASM optimization Pass5NextJumpElimination FINAL SYMBOL TABLE (const byte*) SCREEN = (byte*) 1024 (void()) main() (word~) main::$0 zp[2]:3 22.0 (byte~) main::$2 reg byte a 202.0 (word~) main::$5 zp[2]:3 16.5 (word~) main::$6 zp[2]:5 22.0 (word~) main::$7 zp[2]:3 22.0 (label) main::@1 (label) main::@2 (label) main::@3 (label) main::@return (byte*) main::line (byte*) main::line#0 line zp[2]:3 18.666666666666664 (byte) main::x (byte) main::x#1 reg byte y 151.5 (byte) main::x#2 reg byte y 134.66666666666666 (byte) main::y (byte) main::y#1 y zp[1]:2 16.5 (byte) main::y#2 y zp[1]:2 11.181818181818182 zp[1]:2 [ main::y#2 main::y#1 ] reg byte y [ main::x#2 main::x#1 ] zp[2]:3 [ main::$5 main::$7 main::$0 main::line#0 ] zp[2]:5 [ main::$6 ] reg byte a [ main::$2 ] FINAL ASSEMBLER Score: 3381 // File Comments // Fill a square on the screen // Upstart .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels .label SCREEN = $400 // main main: { .label __0 = 3 .label __5 = 3 .label line = 3 .label y = 2 .label __6 = 5 .label __7 = 3 // [1] phi from main to main::@1 [phi:main->main::@1] // [1] phi (byte) main::y#2 = (byte) 5 [phi:main->main::@1#0] -- vbuz1=vbuc1 lda #5 sta.z y // [1] phi from main::@3 to main::@1 [phi:main::@3->main::@1] // [1] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@3->main::@1#0] -- register_copy // main::@1 __b1: // (word)y*40 // [2] (word~) main::$5 ← (word)(byte) main::y#2 -- vwuz1=_word_vbuz2 lda.z y sta.z __5 lda #0 sta.z __5+1 // [3] (word~) main::$6 ← (word~) main::$5 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda.z __5 asl sta.z __6 lda.z __5+1 rol sta.z __6+1 asl.z __6 rol.z __6+1 // [4] (word~) main::$7 ← (word~) main::$6 + (word~) main::$5 -- vwuz1=vwuz2_plus_vwuz1 lda.z __7 clc adc.z __6 sta.z __7 lda.z __7+1 adc.z __6+1 sta.z __7+1 // [5] (word~) main::$0 ← (word~) main::$7 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl.z __0 rol.z __0+1 asl.z __0 rol.z __0+1 asl.z __0 rol.z __0+1 // line = SCREEN+(word)y*40 // [6] (byte*) main::line#0 ← (const byte*) SCREEN + (word~) main::$0 -- pbuz1=pbuc1_plus_vwuz1 clc lda.z line adc #SCREEN sta.z line+1 // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] // [7] phi (byte) main::x#2 = (byte) 5 [phi:main::@1->main::@2#0] -- vbuyy=vbuc1 ldy #5 // [7] phi from main::@2 to main::@2 [phi:main::@2->main::@2] // [7] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@2->main::@2#0] -- register_copy // main::@2 __b2: // x+y // [8] (byte~) main::$2 ← (byte) main::x#2 + (byte) main::y#2 -- vbuaa=vbuyy_plus_vbuz1 tya clc adc.z y // line[x] = x+y // [9] *((byte*) main::line#0 + (byte) main::x#2) ← (byte~) main::$2 -- pbuz1_derefidx_vbuyy=vbuaa sta (line),y // for( byte x: 5..15) // [10] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuyy=_inc_vbuyy iny // [11] if((byte) main::x#1!=(byte) $10) goto main::@2 -- vbuyy_neq_vbuc1_then_la1 cpy #$10 bne __b2 // main::@3 // for( byte y: 5..15) // [12] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuz1=_inc_vbuz1 inc.z y // [13] if((byte) main::y#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z y bne __b1 // main::@return // } // [14] return rts } // File Data