
CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  to:main::@1
main::@1: scope:[main]  from main main::@1
  *SCREEN = ++ *SCREEN
  to:main::@1
main::@return: scope:[main]  from
  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 * const SCREEN = (char *)$400
void __start()
void main()

Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
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

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()
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [1] *SCREEN = ++ *SCREEN
  to:main::@1


VARIABLE REGISTER WEIGHTS
void main()

Initial phi equivalence classes
Complete equivalence classes
REGISTER UPLIFT POTENTIAL REGISTERS

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

Uplifting [main] best 120 combination 
Uplifting [] best 120 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test a for() loop that runs forever
  // Upstart
  // Commodore 64 PRG executable file
.file [name="for-ever.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
  .label SCREEN = $400
.segment Code
  // main
main: {
    jmp __b1
    // main::@1
  __b1:
    // [1] *SCREEN = ++ *SCREEN -- _deref_pbuc1=_inc__deref_pbuc1 
    inc SCREEN
    jmp __b1
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
__constant char * const SCREEN = (char *) 1024
void main()



FINAL ASSEMBLER
Score: 90

  // File Comments
// Test a for() loop that runs forever
  // Upstart
  // Commodore 64 PRG executable file
.file [name="for-ever.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
  .label SCREEN = $400
.segment Code
  // main
main: {
    // main::@1
  __b1:
    // (*SCREEN)++;
    // [1] *SCREEN = ++ *SCREEN -- _deref_pbuc1=_inc__deref_pbuc1 
    inc SCREEN
    jmp __b1
}
  // File Data

