Inlined call call __init

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start::@1
  screen#0 = (char *)$400
  *screen#0 = 'a'
  to:main::@return
main::@return: scope:[main]  from main
  screen#5 = phi( main/screen#0 )
  screen#1 = screen#5
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  screen#2 = (char *) 0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  screen#8 = phi( __start::__init1/screen#2 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  screen#6 = phi( __start::@1/screen#1 )
  screen#3 = screen#6
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  screen#7 = phi( __start::@2/screen#3 )
  screen#4 = screen#7
  return 
  to:@return

SYMBOL TABLE SSA
void __start()
void main()
char *screen
char *screen#0
char *screen#1
char *screen#2
char *screen#3
char *screen#4
char *screen#5
char *screen#6
char *screen#7
char *screen#8

Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Alias screen#0 = screen#5 screen#1 
Alias screen#2 = screen#8 
Alias screen#3 = screen#6 screen#7 screen#4 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values screen#3 screen#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant screen#0 = (char *) 1024
Constant screen#2 = (char *) 0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant screen#2
Successful SSA optimization PassNEliminateUnusedVars
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
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] *screen#0 = 'a'
  to:main::@return
main::@return: scope:[main]  from main
  [1] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void main()
char *screen

Initial phi equivalence classes
Complete equivalence classes
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [0] *screen#0 = 'a' [ ] (  [ ] { }  ) always clobbers reg byte a 

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

Uplifting [main] best 15 combination 
Uplifting [] best 15 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Variables without initialization causes problems when compiling
  // Upstart
  // Commodore 64 PRG executable file
.file [name="var-init-problem.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: {
    // [0] *screen#0 = 'a' -- _deref_pbuc1=vbuc2 
    lda #'a'
    sta screen
    jmp __breturn
    // main::@return
  __breturn:
    // [1] 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()
char *screen
__constant char *screen#0 = (char *) 1024 // screen



FINAL ASSEMBLER
Score: 12

  // File Comments
// Variables without initialization causes problems when compiling
  // Upstart
  // Commodore 64 PRG executable file
.file [name="var-init-problem.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: {
    // *screen = 'a'
    // [0] *screen#0 = 'a' -- _deref_pbuc1=vbuc2 
    lda #'a'
    sta screen
    // main::@return
    // }
    // [1] return 
    rts
}
  // File Data

