
CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!-  }
  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()

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
  asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!-  }
  to:main::@return
main::@return: scope:[main]  from main
  [1] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void main()

Initial phi equivalence classes
Complete equivalence classes
REGISTER UPLIFT POTENTIAL REGISTERS
Statement asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!-  } always clobbers reg byte a reg byte x 

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

Uplifting [main] best 37 combination 
Uplifting [] best 37 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
  // Commodore 64 PRG executable file
.file [name="inline-asm.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: {
    // asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!-  }
    lda #'a'
    ldx #$ff
  !:
    sta $400,x
    sta $500,x
    sta $600,x
    sta $700,x
    dex
    bne !-
    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()



FINAL ASSEMBLER
Score: 34

  // File Comments
  // Upstart
  // Commodore 64 PRG executable file
.file [name="inline-asm.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: {
    // asm
    // asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!-  }
    lda #'a'
    ldx #$ff
  !:
    sta $400,x
    sta $500,x
    sta $600,x
    sta $700,x
    dex
    bne !-
    // main::@return
    // }
    // [1] return 
    rts
}
  // File Data

