Resolved forward reference irq to __interrupt(rom_min_c64) void irq()
Inlined call call __init

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start::@1
  *KERNEL_IRQ = &irq
  to:main::@1
main::@1: scope:[main]  from main main::@7
  if(true) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  main::x#0 = 0
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@7
  main::x#6 = phi( main::@2/main::x#0, main::@7/main::x#1 )
  main::y#0 = 0
  to:main::@4
main::@4: scope:[main]  from main::@3 main::@6
  main::x#4 = phi( main::@3/main::x#6, main::@6/main::x#5 )
  main::y#4 = phi( main::@3/main::y#0, main::@6/main::y#1 )
  main::a#0 = 0
  to:main::@5
main::@5: scope:[main]  from main::@4 main::@5
  main::x#2 = phi( main::@4/main::x#4, main::@5/main::x#2 )
  main::y#2 = phi( main::@4/main::y#4, main::@5/main::y#2 )
  main::a#2 = phi( main::@4/main::a#0, main::@5/main::a#1 )
  main::$0 = main::a#2 + main::y#2
  SCREEN[main::x#2] = main::$0
  main::a#1 = main::a#2 + rangenext(0,$a)
  main::$1 = main::a#1 != rangelast(0,$a)
  if(main::$1) goto main::@5
  to:main::@6
main::@6: scope:[main]  from main::@5
  main::x#5 = phi( main::@5/main::x#2 )
  main::y#3 = phi( main::@5/main::y#2 )
  main::y#1 = main::y#3 + rangenext(0,$a)
  main::$2 = main::y#1 != rangelast(0,$a)
  if(main::$2) goto main::@4
  to:main::@7
main::@7: scope:[main]  from main::@6
  main::x#3 = phi( main::@6/main::x#5 )
  main::x#1 = main::x#3 + rangenext(0,$a)
  main::$3 = main::x#1 != rangelast(0,$a)
  if(main::$3) goto main::@3
  to:main::@1
main::@return: scope:[main]  from main::@1
  return 
  to:@return

__interrupt(rom_min_c64) void irq()
irq: scope:[irq]  from
  *IRQ_STATUS = 1
  asm { lda$dc0d  }
  SCREEN[$28] = col1
  col1 = ++ col1
  to:irq::@return
irq::@return: scope:[irq]  from irq
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  col1 = 0
  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
__constant char * const IRQ_STATUS = (char *)$d019
__constant void (** const KERNEL_IRQ)() = (void (**)())$314
__constant char * const SCREEN = (char *)$400
void __start()
__loadstore volatile char col1
__interrupt(rom_min_c64) void irq()
void main()
char main::$0
bool main::$1
bool main::$2
bool main::$3
char main::a
char main::a#0
char main::a#1
char main::a#2
char main::x
char main::x#0
char main::x#1
char main::x#2
char main::x#3
char main::x#4
char main::x#5
char main::x#6
char main::y
char main::y#0
char main::y#1
char main::y#2
char main::y#3
char main::y#4

Adding number conversion cast (unumber) 1 in *IRQ_STATUS = 1
Adding number conversion cast (unumber) $28 in SCREEN[$28] = col1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast *IRQ_STATUS = (unumber)1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (void (**)()) 788
Simplifying constant pointer cast (char *) 53273
Simplifying constant pointer cast (char *) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias main::y#2 = main::y#3 
Alias main::x#2 = main::x#5 main::x#3 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values main::y#2 main::y#4
Identical Phi Values main::x#2 main::x#4
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values main::x#4 main::x#6
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition main::$1 [12] if(main::a#1!=rangelast(0,$a)) goto main::@5
Simple Condition main::$2 [15] if(main::y#1!=rangelast(0,$a)) goto main::@4
Simple Condition main::$3 [18] if(main::x#1!=rangelast(0,$a)) goto main::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::x#0 = 0
Constant main::y#0 = 0
Constant main::a#0 = 0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [1] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [10] main::a#1 = ++ main::a#2 to ++
Resolved ranged comparison value [12] if(main::a#1!=rangelast(0,$a)) goto main::@5 to $b
Resolved ranged next value [13] main::y#1 = ++ main::y#4 to ++
Resolved ranged comparison value [15] if(main::y#1!=rangelast(0,$a)) goto main::@4 to $b
Resolved ranged next value [16] main::x#1 = ++ main::x#6 to ++
Resolved ranged comparison value [18] if(main::x#1!=rangelast(0,$a)) goto main::@3 to $b
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) $b in if(main::a#1!=$b) goto main::@5
Adding number conversion cast (unumber) $b in if(main::y#1!=$b) goto main::@4
Adding number conversion cast (unumber) $b in if(main::x#1!=$b) goto main::@3
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $b
Simplifying constant integer cast $b
Simplifying constant integer cast $b
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $b
Finalized unsigned number type (char) $b
Finalized unsigned number type (char) $b
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inlining constant with var siblings main::x#0
Inlining constant with var siblings main::y#0
Inlining constant with var siblings main::a#0
Constant inlined main::a#0 = 0
Constant inlined main::x#0 = 0
Constant inlined main::y#0 = 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(SCREEN+$28)
Successful SSA optimization Pass2ConstantAdditionElimination
Added new block during phi lifting main::@8(between main::@7 and main::@3)
Added new block during phi lifting main::@9(between main::@6 and main::@4)
Added new block during phi lifting main::@10(between main::@5 and main::@5)
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
CALL GRAPH
Calls in [__start] to main:3 

Created 3 initial phi equivalence classes
Coalesced [25] main::x#7 = main::x#1
Coalesced [26] main::y#5 = main::y#1
Coalesced [27] main::a#3 = main::a#1
Coalesced down to 3 phi equivalence classes
Culled Empty Block label __start::@2
Culled Empty Block label main::@1
Culled Empty Block label main::@2
Culled Empty Block label main::@9
Culled Empty Block label main::@10
Renumbering block main::@3 to main::@1
Renumbering block main::@4 to main::@2
Renumbering block main::@5 to main::@3
Renumbering block main::@6 to main::@4
Renumbering block main::@7 to main::@5
Renumbering block main::@8 to main::@6
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main::@6

FINAL CONTROL FLOW GRAPH

void __start()
__start: scope:[__start]  from
  [0] phi()
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  [1] col1 = 0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  [2] phi()
  [3] call main
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  [4] return 
  to:@return

__interrupt(rom_min_c64) void irq()
irq: scope:[irq]  from
  [5] *IRQ_STATUS = 1
  asm { lda$dc0d  }
  [7] *(SCREEN+$28) = col1
  [8] col1 = ++ col1
  to:irq::@return
irq::@return: scope:[irq]  from irq
  [9] return 
  to:@return

void main()
main: scope:[main]  from __start::@1
  [10] *KERNEL_IRQ = &irq
  to:main::@1
main::@1: scope:[main]  from main main::@5 main::@6
  [11] main::x#6 = phi( main/0, main::@6/main::x#1, main::@5/0 )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@4
  [12] main::y#4 = phi( main::@1/0, main::@4/main::y#1 )
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  [13] main::a#2 = phi( main::@2/0, main::@3/main::a#1 )
  [14] main::$0 = main::a#2 + main::y#4
  [15] SCREEN[main::x#6] = main::$0
  [16] main::a#1 = ++ main::a#2
  [17] if(main::a#1!=$b) goto main::@3
  to:main::@4
main::@4: scope:[main]  from main::@3
  [18] main::y#1 = ++ main::y#4
  [19] if(main::y#1!=$b) goto main::@2
  to:main::@5
main::@5: scope:[main]  from main::@4
  [20] main::x#1 = ++ main::x#6
  [21] if(main::x#1!=$b) goto main::@6
  to:main::@1
main::@6: scope:[main]  from main::@5
  [22] phi()
  to:main::@1


VARIABLE REGISTER WEIGHTS
void __start()
__loadstore volatile char col1 // 2.6666666666666665
__interrupt(rom_min_c64) void irq()
void main()
char main::$0 // 200002.0
char main::a
char main::a#1 // 150001.5
char main::a#2 // 100001.0
char main::x
char main::x#1 // 701.0
char main::x#6 // 11233.666666666668
char main::y
char main::y#1 // 15001.5
char main::y#4 // 20000.499999999996

Initial phi equivalence classes
[ main::x#6 main::x#1 ]
[ main::y#4 main::y#1 ]
[ main::a#2 main::a#1 ]
Added variable col1 to live range equivalence class [ col1 ]
Added variable main::$0 to live range equivalence class [ main::$0 ]
Complete equivalence classes
[ main::x#6 main::x#1 ]
[ main::y#4 main::y#1 ]
[ main::a#2 main::a#1 ]
[ col1 ]
[ main::$0 ]
Allocated zp[1]:2 [ main::a#2 main::a#1 ]
Allocated zp[1]:3 [ main::$0 ]
Allocated zp[1]:4 [ main::y#4 main::y#1 ]
Allocated zp[1]:5 [ main::x#6 main::x#1 ]
Allocated zp[1]:6 [ col1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] col1 = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [5] *IRQ_STATUS = 1 [ col1 ] (  [ col1 ] { }  ) always clobbers reg byte a 
Statement asm { lda$dc0d  } always clobbers reg byte a 
Statement [7] *(SCREEN+$28) = col1 [ col1 ] (  [ col1 ] { }  ) always clobbers reg byte a 
Statement [10] *KERNEL_IRQ = &irq [ ] ( main:3 [ ] { }  ) always clobbers reg byte a 
Statement [14] main::$0 = main::a#2 + main::y#4 [ main::x#6 main::y#4 main::a#2 main::$0 ] ( main:3 [ main::x#6 main::y#4 main::a#2 main::$0 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::x#6 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::a#2 main::a#1 ]
Statement [1] col1 = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [5] *IRQ_STATUS = 1 [ col1 ] (  [ col1 ] { }  ) always clobbers reg byte a 
Statement asm { lda$dc0d  } always clobbers reg byte a 
Statement [7] *(SCREEN+$28) = col1 [ col1 ] (  [ col1 ] { }  ) always clobbers reg byte a 
Statement [10] *KERNEL_IRQ = &irq [ ] ( main:3 [ ] { }  ) always clobbers reg byte a 
Statement [14] main::$0 = main::a#2 + main::y#4 [ main::x#6 main::y#4 main::a#2 main::$0 ] ( main:3 [ main::x#6 main::y#4 main::a#2 main::$0 ] { }  ) always clobbers reg byte a 
Potential registers zp[1]:5 [ main::x#6 main::x#1 ] : zp[1]:5 , reg byte x , reg byte y , 
Potential registers zp[1]:4 [ main::y#4 main::y#1 ] : zp[1]:4 , reg byte x , reg byte y , 
Potential registers zp[1]:2 [ main::a#2 main::a#1 ] : zp[1]:2 , reg byte x , reg byte y , 
Potential registers zp[1]:6 [ col1 ] : zp[1]:6 , 
Potential registers zp[1]:3 [ main::$0 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 250,002.5: zp[1]:2 [ main::a#2 main::a#1 ] 200,002: zp[1]:3 [ main::$0 ] 35,002: zp[1]:4 [ main::y#4 main::y#1 ] 11,934.67: zp[1]:5 [ main::x#6 main::x#1 ] 
Uplift Scope [] 2.67: zp[1]:6 [ col1 ] 
Uplift Scope [irq] 
Uplift Scope [__start] 

Uplifting [main] best 323400 combination reg byte y [ main::a#2 main::a#1 ] reg byte a [ main::$0 ] zp[1]:4 [ main::y#4 main::y#1 ] reg byte x [ main::x#6 main::x#1 ] 
Limited combination testing to 100 combinations of 108 possible.
Uplifting [] best 323400 combination zp[1]:6 [ col1 ] 
Uplifting [irq] best 323400 combination 
Uplifting [__start] best 323400 combination 
Attempting to uplift remaining variables inzp[1]:4 [ main::y#4 main::y#1 ]
Uplifting [main] best 323400 combination zp[1]:4 [ main::y#4 main::y#1 ] 
Attempting to uplift remaining variables inzp[1]:6 [ col1 ]
Uplifting [] best 323400 combination zp[1]:6 [ col1 ] 
Allocated (was zp[1]:4) zp[1]:2 [ main::y#4 main::y#1 ]
Allocated (was zp[1]:6) zp[1]:3 [ col1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Illustrates problem where volatiles reuse ZP addresses of other variables
  // Upstart
  // Commodore 64 PRG executable file
.file [name="interrupt-volatile-reuse-problem2.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(__start)
  // Global Constants & labels
  .label KERNEL_IRQ = $314
  .label IRQ_STATUS = $d019
  .label SCREEN = $400
  .label col1 = 3
.segment Code
  // __start
__start: {
    jmp __init1
    // __start::__init1
  __init1:
    // [1] col1 = 0 -- vbuz1=vbuc1 
    lda #0
    sta.z col1
    // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
  __b1_from___init1:
    jmp __b1
    // __start::@1
  __b1:
    // [3] call main
    jsr main
    jmp __breturn
    // __start::@return
  __breturn:
    // [4] return 
    rts
}
  // irq
irq: {
    // interrupt(isr_rom_min_c64_entry) -- isr_rom_min_c64_entry 
    // [5] *IRQ_STATUS = 1 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #1
    sta IRQ_STATUS
    // asm { lda$dc0d  }
    lda $dc0d
    // [7] *(SCREEN+$28) = col1 -- _deref_pbuc1=vbuz1 
    lda.z col1
    sta SCREEN+$28
    // [8] col1 = ++ col1 -- vbuz1=_inc_vbuz1 
    inc.z col1
    jmp __breturn
    // irq::@return
  __breturn:
    // [9] return 
    // interrupt(isr_rom_min_c64_exit) -- isr_rom_min_c64_exit 
    jmp $ea81
}
  // main
main: {
    .label y = 2
    // [10] *KERNEL_IRQ = &irq -- _deref_qprc1=pprc2 
    lda #<irq
    sta KERNEL_IRQ
    lda #>irq
    sta KERNEL_IRQ+1
    // [11] phi from main main::@5 to main::@1 [phi:main/main::@5->main::@1]
  __b1_from_main:
  __b1_from___b5:
    // [11] phi main::x#6 = 0 [phi:main/main::@5->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp __b1
    // main::@1
  __b1:
    // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    // [12] phi main::y#4 = 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    jmp __b2
    // [12] phi from main::@4 to main::@2 [phi:main::@4->main::@2]
  __b2_from___b4:
    // [12] phi main::y#4 = main::y#1 [phi:main::@4->main::@2#0] -- register_copy 
    jmp __b2
    // main::@2
  __b2:
    // [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  __b3_from___b2:
    // [13] phi main::a#2 = 0 [phi:main::@2->main::@3#0] -- vbuyy=vbuc1 
    ldy #0
    jmp __b3
    // [13] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
  __b3_from___b3:
    // [13] phi main::a#2 = main::a#1 [phi:main::@3->main::@3#0] -- register_copy 
    jmp __b3
    // main::@3
  __b3:
    // [14] main::$0 = main::a#2 + main::y#4 -- vbuaa=vbuyy_plus_vbuz1 
    tya
    clc
    adc.z y
    // [15] SCREEN[main::x#6] = main::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // [16] main::a#1 = ++ main::a#2 -- vbuyy=_inc_vbuyy 
    iny
    // [17] if(main::a#1!=$b) goto main::@3 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$b
    bne __b3_from___b3
    jmp __b4
    // main::@4
  __b4:
    // [18] main::y#1 = ++ main::y#4 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [19] if(main::y#1!=$b) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$b
    cmp.z y
    bne __b2_from___b4
    jmp __b5
    // main::@5
  __b5:
    // [20] main::x#1 = ++ main::x#6 -- vbuxx=_inc_vbuxx 
    inx
    // [21] if(main::x#1!=$b) goto main::@6 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne __b6_from___b5
    jmp __b1_from___b5
    // [22] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [11] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  __b1_from___b6:
    // [11] phi main::x#6 = main::x#1 [phi:main::@6->main::@1#0] -- register_copy 
    jmp __b1
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b6
Succesful ASM optimization Pass5NextJumpElimination
Replacing label __b3_from___b3 with __b3
Replacing label __b2_from___b4 with __b2
Replacing label __b6_from___b5 with __b6
Removing instruction __b1_from___init1:
Removing instruction __b1_from_main:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b4:
Removing instruction __b3_from___b2:
Removing instruction __b3_from___b3:
Removing instruction __b6_from___b5:
Removing instruction __b1_from___b6:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __b4:
Removing instruction __b5:
Succesful ASM optimization Pass5UnusedLabelElimination
Skipping double jump to __b1 in bne __b6
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label __b1_from___b5 to __b4
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp __b2
Removing instruction jmp __b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b6:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction jmp __b1
Succesful ASM optimization Pass5UnreachableCodeElimination

FINAL SYMBOL TABLE
__constant char * const IRQ_STATUS = (char *) 53273
__constant void (** const KERNEL_IRQ)() = (void (**)()) 788
__constant char * const SCREEN = (char *) 1024
void __start()
__loadstore volatile char col1 // zp[1]:3 2.6666666666666665
__interrupt(rom_min_c64) void irq()
void main()
char main::$0 // reg byte a 200002.0
char main::a
char main::a#1 // reg byte y 150001.5
char main::a#2 // reg byte y 100001.0
char main::x
char main::x#1 // reg byte x 701.0
char main::x#6 // reg byte x 11233.666666666668
char main::y
char main::y#1 // y zp[1]:2 15001.5
char main::y#4 // y zp[1]:2 20000.499999999996

reg byte x [ main::x#6 main::x#1 ]
zp[1]:2 [ main::y#4 main::y#1 ]
reg byte y [ main::a#2 main::a#1 ]
zp[1]:3 [ col1 ]
reg byte a [ main::$0 ]


FINAL ASSEMBLER
Score: 223731

  // File Comments
// Illustrates problem where volatiles reuse ZP addresses of other variables
  // Upstart
  // Commodore 64 PRG executable file
.file [name="interrupt-volatile-reuse-problem2.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(__start)
  // Global Constants & labels
  .label KERNEL_IRQ = $314
  .label IRQ_STATUS = $d019
  .label SCREEN = $400
  .label col1 = 3
.segment Code
  // __start
__start: {
    // __start::__init1
    // volatile byte col1 = 0
    // [1] col1 = 0 -- vbuz1=vbuc1 
    lda #0
    sta.z col1
    // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
    // __start::@1
    // [3] call main
    jsr main
    // __start::@return
    // [4] return 
    rts
}
  // irq
irq: {
    // interrupt(isr_rom_min_c64_entry) -- isr_rom_min_c64_entry 
    // *IRQ_STATUS = 1
    // [5] *IRQ_STATUS = 1 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #1
    sta IRQ_STATUS
    // asm
    // asm { lda$dc0d  }
    lda $dc0d
    // SCREEN[40] = col1++
    // [7] *(SCREEN+$28) = col1 -- _deref_pbuc1=vbuz1 
    lda.z col1
    sta SCREEN+$28
    // SCREEN[40] = col1++;
    // [8] col1 = ++ col1 -- vbuz1=_inc_vbuz1 
    inc.z col1
    // irq::@return
    // }
    // [9] return 
    // interrupt(isr_rom_min_c64_exit) -- isr_rom_min_c64_exit 
    jmp $ea81
}
  // main
main: {
    .label y = 2
    // *KERNEL_IRQ = &irq
    // [10] *KERNEL_IRQ = &irq -- _deref_qprc1=pprc2 
    lda #<irq
    sta KERNEL_IRQ
    lda #>irq
    sta KERNEL_IRQ+1
    // [11] phi from main main::@5 to main::@1 [phi:main/main::@5->main::@1]
  __b4:
    // [11] phi main::x#6 = 0 [phi:main/main::@5->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // main::@1
  __b1:
    // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // [12] phi main::y#4 = 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    // [12] phi from main::@4 to main::@2 [phi:main::@4->main::@2]
    // [12] phi main::y#4 = main::y#1 [phi:main::@4->main::@2#0] -- register_copy 
    // main::@2
  __b2:
    // [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // [13] phi main::a#2 = 0 [phi:main::@2->main::@3#0] -- vbuyy=vbuc1 
    ldy #0
    // [13] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
    // [13] phi main::a#2 = main::a#1 [phi:main::@3->main::@3#0] -- register_copy 
    // main::@3
  __b3:
    // a+y
    // [14] main::$0 = main::a#2 + main::y#4 -- vbuaa=vbuyy_plus_vbuz1 
    tya
    clc
    adc.z y
    // SCREEN[x] = a+y
    // [15] SCREEN[main::x#6] = main::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // for (byte a:0..10)
    // [16] main::a#1 = ++ main::a#2 -- vbuyy=_inc_vbuyy 
    iny
    // [17] if(main::a#1!=$b) goto main::@3 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$b
    bne __b3
    // main::@4
    // for(byte y: 0..10)
    // [18] main::y#1 = ++ main::y#4 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [19] if(main::y#1!=$b) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$b
    cmp.z y
    bne __b2
    // main::@5
    // for(byte x: 0..10)
    // [20] main::x#1 = ++ main::x#6 -- vbuxx=_inc_vbuxx 
    inx
    // [21] if(main::x#1!=$b) goto main::@6 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne __b1
    jmp __b4
    // [22] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
    // main::@6
    // [11] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
    // [11] phi main::x#6 = main::x#1 [phi:main::@6->main::@1#0] -- register_copy 
}
  // File Data

