Calling convention STACK_CALL adding prepare/execute/finalize for call *main::f 

CONTROL FLOW GRAPH SSA

void fn1()
fn1: scope:[fn1]  from
  *fn1::BORDER_COLOR = ++ *fn1::BORDER_COLOR
  to:fn1::@return
fn1::@return: scope:[fn1]  from fn1
  return 
  to:@return

void main()
main: scope:[main]  from __start
  callexecute *main::f 
  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 fn1()
__constant char * const fn1::BORDER_COLOR = (char *)$d020
void main()
__constant void (*main::f)() = &fn1

Simplifying constant pointer cast (char *) 53280
Successful SSA optimization PassNCastSimplification
Replacing constant pointer function [2] callexecute fn1 
Successful SSA optimization Pass2ConstantCallPointerIdentification
Eliminating unused constant main::f
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
Adding NOP phi() at start of main
CALL GRAPH
Calls in [main] to fn1:1 

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Adding NOP phi() at start of main

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  [1] callexecute fn1 
  to:main::@return
main::@return: scope:[main]  from main
  [2] return 
  to:@return

__stackcall void fn1()
fn1: scope:[fn1]  from main
  [3] *fn1::BORDER_COLOR = ++ *fn1::BORDER_COLOR
  to:fn1::@return
fn1::@return: scope:[fn1]  from fn1
  [4] return 
  to:@return


VARIABLE REGISTER WEIGHTS
__stackcall void fn1()
void main()

Initial phi equivalence classes
Complete equivalence classes
REGISTER UPLIFT POTENTIAL REGISTERS

REGISTER UPLIFT SCOPES
Uplift Scope [fn1] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [fn1] best 30 combination 
Uplifting [main] best 30 combination 
Uplifting [] best 30 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Tests creating, assigning and calling pointers to non-args no-return functions
  // Upstart
  // Commodore 64 PRG executable file
.file [name="function-pointer-noarg-call.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: {
    // [1] callexecute fn1  -- call_vprc1 
    jsr fn1
    jmp __breturn
    // main::@return
  __breturn:
    // [2] return 
    rts
}
  // fn1
fn1: {
    .label BORDER_COLOR = $d020
    // [3] *fn1::BORDER_COLOR = ++ *fn1::BORDER_COLOR -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDER_COLOR
    jmp __breturn
    // fn1::@return
  __breturn:
    // [4] return 
    rts
}
  // File Data

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

FINAL SYMBOL TABLE
__stackcall void fn1()
__constant char * const fn1::BORDER_COLOR = (char *) 53280
void main()



FINAL ASSEMBLER
Score: 24

  // File Comments
// Tests creating, assigning and calling pointers to non-args no-return functions
  // Upstart
  // Commodore 64 PRG executable file
.file [name="function-pointer-noarg-call.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: {
    // (*f)()
    // [1] callexecute fn1  -- call_vprc1 
    jsr fn1
    // main::@return
    // }
    // [2] return 
    rts
}
  // fn1
fn1: {
    .label BORDER_COLOR = $d020
    // (*BORDER_COLOR)++;
    // [3] *fn1::BORDER_COLOR = ++ *fn1::BORDER_COLOR -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDER_COLOR
    // fn1::@return
    // }
    // [4] return 
    rts
}
  // File Data

