Setting inferred volatile on symbol affected by address-of main::pb = &main::b
Setting inferred volatile on symbol affected by address-of main::ppb = &main::pb

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  main::b = 'a'
  main::pb = &main::b
  *main::SCREEN = *(*main::ppb)
  to:main::@return
main::@return: scope:[main]  from main
  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
void __start()
void main()
__constant char * const main::SCREEN = (char *)$400
__loadstore volatile char main::b
__loadstore char * volatile main::pb
__constant char **main::ppb = &main::pb

Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
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
CALL GRAPH

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] main::b = 'a'
  [1] main::pb = &main::b
  [2] *main::SCREEN = *(*main::ppb)
  to:main::@return
main::@return: scope:[main]  from main
  [3] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void main()
__loadstore volatile char main::b // 2.0
__loadstore char * volatile main::pb // 20.0

Initial phi equivalence classes
Added variable main::b to live range equivalence class [ main::b ]
Added variable main::pb to live range equivalence class [ main::pb ]
Complete equivalence classes
[ main::b ]
[ main::pb ]
Allocated zp[2]:2 [ main::pb ]
Allocated zp[1]:4 [ main::b ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [0] main::b = 'a' [ main::b ] (  [ main::b ] { }  ) always clobbers reg byte a 
Statement [1] main::pb = &main::b [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [2] *main::SCREEN = *(*main::ppb) [ ] (  [ ] { }  ) always clobbers reg byte a reg byte y 
Potential registers zp[1]:4 [ main::b ] : zp[1]:4 , 
Potential registers zp[2]:2 [ main::pb ] : zp[2]:2 , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 20: zp[2]:2 [ main::pb ] 2: zp[1]:4 [ main::b ] 
Uplift Scope [] 

Uplifting [main] best 47 combination zp[2]:2 [ main::pb ] zp[1]:4 [ main::b ] 
Uplifting [] best 47 combination 
Attempting to uplift remaining variables inzp[1]:4 [ main::b ]
Uplifting [main] best 47 combination zp[1]:4 [ main::b ] 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Tests a simple pointer to a pointer
  // Upstart
  // Commodore 64 PRG executable file
.file [name="pointer-pointer-1.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
.segment Code
  // main
main: {
    .label SCREEN = $400
    .label ppb = pb
    .label b = 4
    .label pb = 2
    // [0] main::b = 'a' -- vbuz1=vbuc1 
    lda #'a'
    sta.z b
    // [1] main::pb = &main::b -- pbuz1=pbuc1 
    lda #<b
    sta.z pb
    lda #>b
    sta.z pb+1
    // [2] *main::SCREEN = *(*main::ppb) -- _deref_pbuc1=_deref_(_deref_qbuc2) 
    ldy.z ppb
    sty.z $fe
    ldy.z ppb+1
    sty.z $ff
    ldy #0
    lda ($fe),y
    sta SCREEN
    jmp __breturn
    // main::@return
  __breturn:
    // [3] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
void main()
__constant char * const main::SCREEN = (char *) 1024
__loadstore volatile char main::b // zp[1]:4 2.0
__loadstore char * volatile main::pb // zp[2]:2 20.0
__constant char **main::ppb = &main::pb

zp[1]:4 [ main::b ]
zp[2]:2 [ main::pb ]


FINAL ASSEMBLER
Score: 44

  // File Comments
// Tests a simple pointer to a pointer
  // Upstart
  // Commodore 64 PRG executable file
.file [name="pointer-pointer-1.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
.segment Code
  // main
main: {
    .label SCREEN = $400
    .label ppb = pb
    .label b = 4
    .label pb = 2
    // byte b = 'a'
    // [0] main::b = 'a' -- vbuz1=vbuc1 
    lda #'a'
    sta.z b
    // byte* pb = &b
    // [1] main::pb = &main::b -- pbuz1=pbuc1 
    lda #<b
    sta.z pb
    lda #>b
    sta.z pb+1
    // *SCREEN = **ppb
    // [2] *main::SCREEN = *(*main::ppb) -- _deref_pbuc1=_deref_(_deref_qbuc2) 
    ldy.z ppb
    sty.z $fe
    ldy.z ppb+1
    sty.z $ff
    ldy #0
    lda ($fe),y
    sta SCREEN
    // main::@return
    // }
    // [3] return 
    rts
}
  // File Data

