
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@1
main: scope:[main]  from @1
  (byte*) main::SCREEN#0 ← ((byte*)) (number) $400
  (byte) main::idx#0 ← (number) 0
  *((byte*) main::SCREEN#0 + (byte) main::idx#0) ← (const byte) TYPEID_VOID
  (byte) main::idx#1 ← ++ (byte) main::idx#0
  *((byte*) main::SCREEN#0 + (byte) main::idx#1) ← (const byte) TYPEID_BYTE
  (byte) main::idx#2 ← ++ (byte) main::idx#1
  *((byte*) main::SCREEN#0 + (byte) main::idx#2) ← (const byte) TYPEID_SIGNED_BYTE
  (byte) main::idx#3 ← ++ (byte) main::idx#2
  *((byte*) main::SCREEN#0 + (byte) main::idx#3) ← (const byte) TYPEID_WORD
  (byte) main::idx#4 ← ++ (byte) main::idx#3
  *((byte*) main::SCREEN#0 + (byte) main::idx#4) ← (const byte) TYPEID_SIGNED_WORD
  (byte) main::idx#5 ← ++ (byte) main::idx#4
  *((byte*) main::SCREEN#0 + (byte) main::idx#5) ← (const byte) TYPEID_DWORD
  (byte) main::idx#6 ← ++ (byte) main::idx#5
  *((byte*) main::SCREEN#0 + (byte) main::idx#6) ← (const byte) TYPEID_SIGNED_DWORD
  (byte) main::idx#7 ← ++ (byte) main::idx#6
  *((byte*) main::SCREEN#0 + (byte) main::idx#7) ← (const byte) TYPEID_BOOL
  (byte) main::idx#8 ← ++ (byte) main::idx#7
  *((byte*) main::SCREEN#0 + (byte) main::idx#8) ← (const byte) TYPEID_POINTER_BYTE
  (byte) main::idx#9 ← ++ (byte) main::idx#8
  *((byte*) main::SCREEN#0 + (byte) main::idx#9) ← (const byte) TYPEID_POINTER_SIGNED_BYTE
  (byte) main::idx#10 ← ++ (byte) main::idx#9
  *((byte*) main::SCREEN#0 + (byte) main::idx#10) ← (const byte) TYPEID_POINTER_WORD
  (byte) main::idx#11 ← ++ (byte) main::idx#10
  *((byte*) main::SCREEN#0 + (byte) main::idx#11) ← (const byte) TYPEID_POINTER_SIGNED_WORD
  (byte) main::idx#12 ← ++ (byte) main::idx#11
  *((byte*) main::SCREEN#0 + (byte) main::idx#12) ← (const byte) TYPEID_POINTER_DWORD
  (byte) main::idx#13 ← ++ (byte) main::idx#12
  *((byte*) main::SCREEN#0 + (byte) main::idx#13) ← (const byte) TYPEID_POINTER_SIGNED_DWORD
  (byte) main::idx#14 ← ++ (byte) main::idx#13
  *((byte*) main::SCREEN#0 + (byte) main::idx#14) ← (const byte) TYPEID_POINTER_BOOL
  (byte) main::idx#15 ← ++ (byte) main::idx#14
  *((byte*) main::SCREEN#0 + (byte) main::idx#15) ← (const byte) TYPEID_POINTER_PROCEDURE
  (byte) main::idx#16 ← ++ (byte) main::idx#15
  *((byte*) main::SCREEN#0 + (byte) main::idx#16) ← (const byte) TYPEID_POINTER_POINTER_BYTE
  (byte) main::idx#17 ← ++ (byte) main::idx#16
  (byte) main::idx#18 ← (number) $28
  *((byte*) main::SCREEN#0 + (byte) main::idx#18) ← (const byte) TYPEID_BYTE
  (byte) main::idx#19 ← ++ (byte) main::idx#18
  *((byte*) main::SCREEN#0 + (byte) main::idx#19) ← (const byte) TYPEID_BYTE
  (byte) main::idx#20 ← ++ (byte) main::idx#19
  *((byte*) main::SCREEN#0 + (byte) main::idx#20) ← (const byte) TYPEID_SIGNED_BYTE
  (byte) main::idx#21 ← ++ (byte) main::idx#20
  *((byte*) main::SCREEN#0 + (byte) main::idx#21) ← (const byte) TYPEID_SIGNED_WORD
  (byte) main::idx#22 ← ++ (byte) main::idx#21
  *((byte*) main::SCREEN#0 + (byte) main::idx#22) ← (const byte) TYPEID_WORD
  (byte) main::idx#23 ← ++ (byte) main::idx#22
  *((byte*) main::SCREEN#0 + (byte) main::idx#23) ← (const byte) TYPEID_SIGNED_WORD
  (byte) main::idx#24 ← ++ (byte) main::idx#23
  *((byte*) main::SCREEN#0 + (byte) main::idx#24) ← (const byte) TYPEID_SIGNED_WORD
  (byte) main::idx#25 ← ++ (byte) main::idx#24
  *((byte*) main::SCREEN#0 + (byte) main::idx#25) ← (const byte) TYPEID_WORD
  (byte) main::idx#26 ← ++ (byte) main::idx#25
  *((byte*) main::SCREEN#0 + (byte) main::idx#26) ← (const byte) TYPEID_SIGNED_WORD
  (byte) main::idx#27 ← ++ (byte) main::idx#26
  *((byte*) main::SCREEN#0 + (byte) main::idx#27) ← (const byte) TYPEID_SIGNED_DWORD
  (byte) main::idx#28 ← ++ (byte) main::idx#27
  *((byte*) main::SCREEN#0 + (byte) main::idx#28) ← (const byte) TYPEID_DWORD
  (byte) main::idx#29 ← ++ (byte) main::idx#28
  *((byte*) main::SCREEN#0 + (byte) main::idx#29) ← (const byte) TYPEID_SIGNED_DWORD
  (byte) main::idx#30 ← ++ (byte) main::idx#29
  to:main::@return
main::@return: scope:[main]  from main
  return 
  to:@return
@1: scope:[]  from @begin
  call main 
  to:@2
@2: scope:[]  from @1
  to:@end
@end: scope:[]  from @2

SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(const byte) TYPEID_BOOL = (number) 7
(const byte) TYPEID_BYTE = (number) 1
(const byte) TYPEID_DWORD = (number) 5
(const byte) TYPEID_POINTER_BOOL = (number) $17
(const byte) TYPEID_POINTER_BYTE = (number) $11
(const byte) TYPEID_POINTER_DWORD = (number) $15
(const byte) TYPEID_POINTER_POINTER_BYTE = (number) $21
(const byte) TYPEID_POINTER_PROCEDURE = (number) $1f
(const byte) TYPEID_POINTER_SIGNED_BYTE = (number) $12
(const byte) TYPEID_POINTER_SIGNED_DWORD = (number) $16
(const byte) TYPEID_POINTER_SIGNED_WORD = (number) $14
(const byte) TYPEID_POINTER_WORD = (number) $13
(const byte) TYPEID_SIGNED_BYTE = (number) 2
(const byte) TYPEID_SIGNED_DWORD = (number) 6
(const byte) TYPEID_SIGNED_WORD = (number) 4
(const byte) TYPEID_VOID = (number) 0
(const byte) TYPEID_WORD = (number) 3
(void()) main()
(label) main::@return
(byte*) main::SCREEN
(byte*) main::SCREEN#0
(byte) main::idx
(byte) main::idx#0
(byte) main::idx#1
(byte) main::idx#10
(byte) main::idx#11
(byte) main::idx#12
(byte) main::idx#13
(byte) main::idx#14
(byte) main::idx#15
(byte) main::idx#16
(byte) main::idx#17
(byte) main::idx#18
(byte) main::idx#19
(byte) main::idx#2
(byte) main::idx#20
(byte) main::idx#21
(byte) main::idx#22
(byte) main::idx#23
(byte) main::idx#24
(byte) main::idx#25
(byte) main::idx#26
(byte) main::idx#27
(byte) main::idx#28
(byte) main::idx#29
(byte) main::idx#3
(byte) main::idx#30
(byte) main::idx#4
(byte) main::idx#5
(byte) main::idx#6
(byte) main::idx#7
(byte) main::idx#8
(byte) main::idx#9

Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (byte) main::idx#18 ← (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Inlining cast (byte) main::idx#18 ← (unumber)(number) $28
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::idx#18 = $28
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::SCREEN#0 in [2] *((const byte*) main::SCREEN#0 + (const byte) main::idx#0) ← (const byte) TYPEID_VOID
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) main::idx#17 and assignment [33] (byte) main::idx#17 ← ++ (byte) main::idx#16
Eliminating unused variable (byte) main::idx#30 and assignment [57] (byte) main::idx#30 ← ++ (byte) main::idx#29
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [1] (byte) main::idx#1 ← ++ (const byte) main::idx#0
Constant right-side identified [34] (byte) main::idx#19 ← ++ (const byte) main::idx#18
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#1 = ++main::idx#0
Constant (const byte) main::idx#19 = ++main::idx#18
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [2] (byte) main::idx#2 ← ++ (const byte) main::idx#1
Constant right-side identified [34] (byte) main::idx#20 ← ++ (const byte) main::idx#19
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#2 = ++main::idx#1
Constant (const byte) main::idx#20 = ++main::idx#19
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [3] (byte) main::idx#3 ← ++ (const byte) main::idx#2
Constant right-side identified [34] (byte) main::idx#21 ← ++ (const byte) main::idx#20
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#3 = ++main::idx#2
Constant (const byte) main::idx#21 = ++main::idx#20
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [4] (byte) main::idx#4 ← ++ (const byte) main::idx#3
Constant right-side identified [34] (byte) main::idx#22 ← ++ (const byte) main::idx#21
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#4 = ++main::idx#3
Constant (const byte) main::idx#22 = ++main::idx#21
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [5] (byte) main::idx#5 ← ++ (const byte) main::idx#4
Constant right-side identified [34] (byte) main::idx#23 ← ++ (const byte) main::idx#22
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#5 = ++main::idx#4
Constant (const byte) main::idx#23 = ++main::idx#22
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [6] (byte) main::idx#6 ← ++ (const byte) main::idx#5
Constant right-side identified [34] (byte) main::idx#24 ← ++ (const byte) main::idx#23
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#6 = ++main::idx#5
Constant (const byte) main::idx#24 = ++main::idx#23
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [7] (byte) main::idx#7 ← ++ (const byte) main::idx#6
Constant right-side identified [34] (byte) main::idx#25 ← ++ (const byte) main::idx#24
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#7 = ++main::idx#6
Constant (const byte) main::idx#25 = ++main::idx#24
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [8] (byte) main::idx#8 ← ++ (const byte) main::idx#7
Constant right-side identified [34] (byte) main::idx#26 ← ++ (const byte) main::idx#25
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#8 = ++main::idx#7
Constant (const byte) main::idx#26 = ++main::idx#25
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [9] (byte) main::idx#9 ← ++ (const byte) main::idx#8
Constant right-side identified [34] (byte) main::idx#27 ← ++ (const byte) main::idx#26
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#9 = ++main::idx#8
Constant (const byte) main::idx#27 = ++main::idx#26
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [10] (byte) main::idx#10 ← ++ (const byte) main::idx#9
Constant right-side identified [34] (byte) main::idx#28 ← ++ (const byte) main::idx#27
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#10 = ++main::idx#9
Constant (const byte) main::idx#28 = ++main::idx#27
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [11] (byte) main::idx#11 ← ++ (const byte) main::idx#10
Constant right-side identified [34] (byte) main::idx#29 ← ++ (const byte) main::idx#28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#11 = ++main::idx#10
Constant (const byte) main::idx#29 = ++main::idx#28
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [12] (byte) main::idx#12 ← ++ (const byte) main::idx#11
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#12 = ++main::idx#11
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [13] (byte) main::idx#13 ← ++ (const byte) main::idx#12
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#13 = ++main::idx#12
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [14] (byte) main::idx#14 ← ++ (const byte) main::idx#13
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#14 = ++main::idx#13
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [15] (byte) main::idx#15 ← ++ (const byte) main::idx#14
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#15 = ++main::idx#14
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [16] (byte) main::idx#16 ← ++ (const byte) main::idx#15
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#16 = ++main::idx#15
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with different constant siblings (const byte) main::idx#0
Inlining constant with different constant siblings (const byte) main::idx#18
Inlining constant with different constant siblings (const byte) main::idx#1
Inlining constant with different constant siblings (const byte) main::idx#19
Inlining constant with different constant siblings (const byte) main::idx#2
Inlining constant with different constant siblings (const byte) main::idx#20
Inlining constant with different constant siblings (const byte) main::idx#3
Inlining constant with different constant siblings (const byte) main::idx#21
Inlining constant with different constant siblings (const byte) main::idx#4
Inlining constant with different constant siblings (const byte) main::idx#22
Inlining constant with different constant siblings (const byte) main::idx#5
Inlining constant with different constant siblings (const byte) main::idx#23
Inlining constant with different constant siblings (const byte) main::idx#6
Inlining constant with different constant siblings (const byte) main::idx#24
Inlining constant with different constant siblings (const byte) main::idx#7
Inlining constant with different constant siblings (const byte) main::idx#25
Inlining constant with different constant siblings (const byte) main::idx#8
Inlining constant with different constant siblings (const byte) main::idx#26
Inlining constant with different constant siblings (const byte) main::idx#9
Inlining constant with different constant siblings (const byte) main::idx#27
Inlining constant with different constant siblings (const byte) main::idx#10
Inlining constant with different constant siblings (const byte) main::idx#28
Inlining constant with different constant siblings (const byte) main::idx#11
Inlining constant with different constant siblings (const byte) main::idx#29
Inlining constant with different constant siblings (const byte) main::idx#12
Inlining constant with different constant siblings (const byte) main::idx#13
Inlining constant with different constant siblings (const byte) main::idx#14
Inlining constant with different constant siblings (const byte) main::idx#15
Inlining constant with different constant siblings (const byte) main::idx#16
Constant inlined main::idx#16 = ++++++++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#18 = (byte) $28
Constant inlined main::idx#19 = ++(byte) $28
Constant inlined main::idx#12 = ++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#13 = ++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#14 = ++++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#15 = ++++++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#20 = ++++(byte) $28
Constant inlined main::idx#21 = ++++++(byte) $28
Constant inlined main::idx#22 = ++++++++(byte) $28
Constant inlined main::idx#27 = ++++++++++++++++++(byte) $28
Constant inlined main::idx#28 = ++++++++++++++++++++(byte) $28
Constant inlined main::idx#29 = ++++++++++++++++++++++(byte) $28
Constant inlined main::idx#23 = ++++++++++(byte) $28
Constant inlined main::idx#24 = ++++++++++++(byte) $28
Constant inlined main::idx#25 = ++++++++++++++(byte) $28
Constant inlined main::idx#26 = ++++++++++++++++(byte) $28
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::idx#1 = ++(byte) 0
Constant inlined main::idx#2 = ++++(byte) 0
Constant inlined main::idx#3 = ++++++(byte) 0
Constant inlined main::idx#4 = ++++++++(byte) 0
Constant inlined main::idx#5 = ++++++++++(byte) 0
Constant inlined main::idx#6 = ++++++++++++(byte) 0
Constant inlined main::idx#7 = ++++++++++++++(byte) 0
Constant inlined main::idx#8 = ++++++++++++++++(byte) 0
Constant inlined main::idx#9 = ++++++++++++++++++(byte) 0
Constant inlined main::idx#10 = ++++++++++++++++++++(byte) 0
Constant inlined main::idx#11 = ++++++++++++++++++++++(byte) 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(main::SCREEN#0+++0)
Consolidated array index constant in *(main::SCREEN#0+++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+$28)
Consolidated array index constant in *(main::SCREEN#0+++$28)
Consolidated array index constant in *(main::SCREEN#0+++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++$28)
Successful SSA optimization Pass2ConstantAdditionElimination
Simplifying constant integer increment ++0
Simplifying constant integer increment ++0
Simplifying constant integer increment ++1
Simplifying constant integer increment ++2
Simplifying constant integer increment ++3
Simplifying constant integer increment ++4
Simplifying constant integer increment ++5
Simplifying constant integer increment ++6
Simplifying constant integer increment ++7
Simplifying constant integer increment ++8
Simplifying constant integer increment ++9
Simplifying constant integer increment ++$a
Simplifying constant integer increment ++$b
Simplifying constant integer increment ++$c
Simplifying constant integer increment ++$d
Simplifying constant integer increment ++$e
Simplifying constant integer increment ++$28
Simplifying constant integer increment ++$28
Simplifying constant integer increment ++$29
Simplifying constant integer increment ++$2a
Simplifying constant integer increment ++$2b
Simplifying constant integer increment ++$2c
Simplifying constant integer increment ++$2d
Simplifying constant integer increment ++$2e
Simplifying constant integer increment ++$2f
Simplifying constant integer increment ++$30
Simplifying constant integer increment ++$31
Successful SSA optimization Pass2ConstantSimplification
Simplifying constant integer increment ++1
Simplifying constant integer increment ++2
Simplifying constant integer increment ++3
Simplifying constant integer increment ++4
Simplifying constant integer increment ++5
Simplifying constant integer increment ++6
Simplifying constant integer increment ++7
Simplifying constant integer increment ++8
Simplifying constant integer increment ++9
Simplifying constant integer increment ++$a
Simplifying constant integer increment ++$b
Simplifying constant integer increment ++$c
Simplifying constant integer increment ++$d
Simplifying constant integer increment ++$e
Simplifying constant integer increment ++$f
Simplifying constant integer increment ++$29
Simplifying constant integer increment ++$2a
Simplifying constant integer increment ++$2b
Simplifying constant integer increment ++$2c
Simplifying constant integer increment ++$2d
Simplifying constant integer increment ++$2e
Simplifying constant integer increment ++$2f
Simplifying constant integer increment ++$30
Simplifying constant integer increment ++$31
Simplifying constant integer increment ++$32
Successful SSA optimization Pass2ConstantSimplification
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
CALL GRAPH
Calls in [] to main:2 

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @2
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()
main: scope:[main]  from @1
  [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID
  [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) TYPEID_BYTE
  [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) TYPEID_SIGNED_BYTE
  [7] *((const byte*) main::SCREEN#0+(byte) 3) ← (const byte) TYPEID_WORD
  [8] *((const byte*) main::SCREEN#0+(byte) 4) ← (const byte) TYPEID_SIGNED_WORD
  [9] *((const byte*) main::SCREEN#0+(byte) 5) ← (const byte) TYPEID_DWORD
  [10] *((const byte*) main::SCREEN#0+(byte) 6) ← (const byte) TYPEID_SIGNED_DWORD
  [11] *((const byte*) main::SCREEN#0+(byte) 7) ← (const byte) TYPEID_BOOL
  [12] *((const byte*) main::SCREEN#0+(byte) 8) ← (const byte) TYPEID_POINTER_BYTE
  [13] *((const byte*) main::SCREEN#0+(byte) 9) ← (const byte) TYPEID_POINTER_SIGNED_BYTE
  [14] *((const byte*) main::SCREEN#0+(byte) $a) ← (const byte) TYPEID_POINTER_WORD
  [15] *((const byte*) main::SCREEN#0+(byte) $b) ← (const byte) TYPEID_POINTER_SIGNED_WORD
  [16] *((const byte*) main::SCREEN#0+(byte) $c) ← (const byte) TYPEID_POINTER_DWORD
  [17] *((const byte*) main::SCREEN#0+(byte) $d) ← (const byte) TYPEID_POINTER_SIGNED_DWORD
  [18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL
  [19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE
  [20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE
  [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE
  [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE
  [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE
  [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD
  [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD
  [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD
  [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD
  [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD
  [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD
  [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD
  [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD
  [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD
  to:main::@return
main::@return: scope:[main]  from main
  [33] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::SCREEN
(byte) main::idx

Initial phi equivalence classes
Complete equivalence classes

INITIAL ASM
  // File Comments
// Test typeid() of the different types
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .const TYPEID_VOID = 0
  .const TYPEID_BYTE = 1
  .const TYPEID_SIGNED_BYTE = 2
  .const TYPEID_WORD = 3
  .const TYPEID_SIGNED_WORD = 4
  .const TYPEID_DWORD = 5
  .const TYPEID_SIGNED_DWORD = 6
  .const TYPEID_BOOL = 7
  .const TYPEID_POINTER_BYTE = $11
  .const TYPEID_POINTER_SIGNED_BYTE = $12
  .const TYPEID_POINTER_WORD = $13
  .const TYPEID_POINTER_SIGNED_WORD = $14
  .const TYPEID_POINTER_DWORD = $15
  .const TYPEID_POINTER_SIGNED_DWORD = $16
  .const TYPEID_POINTER_BOOL = $17
  .const TYPEID_POINTER_PROCEDURE = $1f
  .const TYPEID_POINTER_POINTER_BYTE = $21
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .label SCREEN = $400
    // [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID -- _deref_pbuc1=vbuc2 
    // Simple types
    lda #TYPEID_VOID
    sta SCREEN
    // [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BYTE
    sta SCREEN+1
    // [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_BYTE
    sta SCREEN+2
    // [7] *((const byte*) main::SCREEN#0+(byte) 3) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+3
    // [8] *((const byte*) main::SCREEN#0+(byte) 4) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+4
    // [9] *((const byte*) main::SCREEN#0+(byte) 5) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_DWORD
    sta SCREEN+5
    // [10] *((const byte*) main::SCREEN#0+(byte) 6) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+6
    // [11] *((const byte*) main::SCREEN#0+(byte) 7) ← (const byte) TYPEID_BOOL -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BOOL
    sta SCREEN+7
    // [12] *((const byte*) main::SCREEN#0+(byte) 8) ← (const byte) TYPEID_POINTER_BYTE -- _deref_pbuc1=vbuc2 
    // Pointer types
    lda #TYPEID_POINTER_BYTE
    sta SCREEN+8
    // [13] *((const byte*) main::SCREEN#0+(byte) 9) ← (const byte) TYPEID_POINTER_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_BYTE
    sta SCREEN+9
    // [14] *((const byte*) main::SCREEN#0+(byte) $a) ← (const byte) TYPEID_POINTER_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_WORD
    sta SCREEN+$a
    // [15] *((const byte*) main::SCREEN#0+(byte) $b) ← (const byte) TYPEID_POINTER_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_WORD
    sta SCREEN+$b
    // [16] *((const byte*) main::SCREEN#0+(byte) $c) ← (const byte) TYPEID_POINTER_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_DWORD
    sta SCREEN+$c
    // [17] *((const byte*) main::SCREEN#0+(byte) $d) ← (const byte) TYPEID_POINTER_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_DWORD
    sta SCREEN+$d
    // [18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_BOOL
    sta SCREEN+$e
    // [19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE -- _deref_pbuc1=vbuc2 
    // Pointer to procedure
    lda #TYPEID_POINTER_PROCEDURE
    sta SCREEN+$f
    // [20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE -- _deref_pbuc1=vbuc2 
    // Pointer to pointer
    lda #TYPEID_POINTER_POINTER_BYTE
    sta SCREEN+$10
    // [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    // Test C types
    lda #TYPEID_BYTE
    sta SCREEN+$28
    // [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BYTE
    sta SCREEN+$29
    // [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_BYTE
    sta SCREEN+$2a
    // [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2b
    // [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+$2c
    // [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2d
    // [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2e
    // [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+$2f
    // [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$30
    // [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+$31
    // [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_DWORD
    sta SCREEN+$32
    // [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+$33
    jmp breturn
    // main::@return
  breturn:
    // [33] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) TYPEID_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) TYPEID_SIGNED_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) main::SCREEN#0+(byte) 3) ← (const byte) TYPEID_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) main::SCREEN#0+(byte) 4) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [9] *((const byte*) main::SCREEN#0+(byte) 5) ← (const byte) TYPEID_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) main::SCREEN#0+(byte) 6) ← (const byte) TYPEID_SIGNED_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] *((const byte*) main::SCREEN#0+(byte) 7) ← (const byte) TYPEID_BOOL [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [12] *((const byte*) main::SCREEN#0+(byte) 8) ← (const byte) TYPEID_POINTER_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) main::SCREEN#0+(byte) 9) ← (const byte) TYPEID_POINTER_SIGNED_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [14] *((const byte*) main::SCREEN#0+(byte) $a) ← (const byte) TYPEID_POINTER_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) main::SCREEN#0+(byte) $b) ← (const byte) TYPEID_POINTER_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [16] *((const byte*) main::SCREEN#0+(byte) $c) ← (const byte) TYPEID_POINTER_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte*) main::SCREEN#0+(byte) $d) ← (const byte) TYPEID_POINTER_SIGNED_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a 

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

Uplifting [main] best 195 combination 
Uplifting [] best 195 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test typeid() of the different types
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .const TYPEID_VOID = 0
  .const TYPEID_BYTE = 1
  .const TYPEID_SIGNED_BYTE = 2
  .const TYPEID_WORD = 3
  .const TYPEID_SIGNED_WORD = 4
  .const TYPEID_DWORD = 5
  .const TYPEID_SIGNED_DWORD = 6
  .const TYPEID_BOOL = 7
  .const TYPEID_POINTER_BYTE = $11
  .const TYPEID_POINTER_SIGNED_BYTE = $12
  .const TYPEID_POINTER_WORD = $13
  .const TYPEID_POINTER_SIGNED_WORD = $14
  .const TYPEID_POINTER_DWORD = $15
  .const TYPEID_POINTER_SIGNED_DWORD = $16
  .const TYPEID_POINTER_BOOL = $17
  .const TYPEID_POINTER_PROCEDURE = $1f
  .const TYPEID_POINTER_POINTER_BYTE = $21
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .label SCREEN = $400
    // [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID -- _deref_pbuc1=vbuc2 
    // Simple types
    lda #TYPEID_VOID
    sta SCREEN
    // [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BYTE
    sta SCREEN+1
    // [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_BYTE
    sta SCREEN+2
    // [7] *((const byte*) main::SCREEN#0+(byte) 3) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+3
    // [8] *((const byte*) main::SCREEN#0+(byte) 4) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+4
    // [9] *((const byte*) main::SCREEN#0+(byte) 5) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_DWORD
    sta SCREEN+5
    // [10] *((const byte*) main::SCREEN#0+(byte) 6) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+6
    // [11] *((const byte*) main::SCREEN#0+(byte) 7) ← (const byte) TYPEID_BOOL -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BOOL
    sta SCREEN+7
    // [12] *((const byte*) main::SCREEN#0+(byte) 8) ← (const byte) TYPEID_POINTER_BYTE -- _deref_pbuc1=vbuc2 
    // Pointer types
    lda #TYPEID_POINTER_BYTE
    sta SCREEN+8
    // [13] *((const byte*) main::SCREEN#0+(byte) 9) ← (const byte) TYPEID_POINTER_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_BYTE
    sta SCREEN+9
    // [14] *((const byte*) main::SCREEN#0+(byte) $a) ← (const byte) TYPEID_POINTER_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_WORD
    sta SCREEN+$a
    // [15] *((const byte*) main::SCREEN#0+(byte) $b) ← (const byte) TYPEID_POINTER_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_WORD
    sta SCREEN+$b
    // [16] *((const byte*) main::SCREEN#0+(byte) $c) ← (const byte) TYPEID_POINTER_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_DWORD
    sta SCREEN+$c
    // [17] *((const byte*) main::SCREEN#0+(byte) $d) ← (const byte) TYPEID_POINTER_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_DWORD
    sta SCREEN+$d
    // [18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_BOOL
    sta SCREEN+$e
    // [19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE -- _deref_pbuc1=vbuc2 
    // Pointer to procedure
    lda #TYPEID_POINTER_PROCEDURE
    sta SCREEN+$f
    // [20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE -- _deref_pbuc1=vbuc2 
    // Pointer to pointer
    lda #TYPEID_POINTER_POINTER_BYTE
    sta SCREEN+$10
    // [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    // Test C types
    lda #TYPEID_BYTE
    sta SCREEN+$28
    // [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BYTE
    sta SCREEN+$29
    // [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_BYTE
    sta SCREEN+$2a
    // [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2b
    // [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+$2c
    // [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2d
    // [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2e
    // [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+$2f
    // [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$30
    // [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+$31
    // [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_DWORD
    sta SCREEN+$32
    // [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+$33
    jmp breturn
    // main::@return
  breturn:
    // [33] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #TYPEID_BYTE
Removing instruction lda #TYPEID_SIGNED_WORD
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte) TYPEID_BOOL TYPEID_BOOL = (number) 7
(const byte) TYPEID_BYTE TYPEID_BYTE = (number) 1
(const byte) TYPEID_DWORD TYPEID_DWORD = (number) 5
(const byte) TYPEID_POINTER_BOOL TYPEID_POINTER_BOOL = (number) $17
(const byte) TYPEID_POINTER_BYTE TYPEID_POINTER_BYTE = (number) $11
(const byte) TYPEID_POINTER_DWORD TYPEID_POINTER_DWORD = (number) $15
(const byte) TYPEID_POINTER_POINTER_BYTE TYPEID_POINTER_POINTER_BYTE = (number) $21
(const byte) TYPEID_POINTER_PROCEDURE TYPEID_POINTER_PROCEDURE = (number) $1f
(const byte) TYPEID_POINTER_SIGNED_BYTE TYPEID_POINTER_SIGNED_BYTE = (number) $12
(const byte) TYPEID_POINTER_SIGNED_DWORD TYPEID_POINTER_SIGNED_DWORD = (number) $16
(const byte) TYPEID_POINTER_SIGNED_WORD TYPEID_POINTER_SIGNED_WORD = (number) $14
(const byte) TYPEID_POINTER_WORD TYPEID_POINTER_WORD = (number) $13
(const byte) TYPEID_SIGNED_BYTE TYPEID_SIGNED_BYTE = (number) 2
(const byte) TYPEID_SIGNED_DWORD TYPEID_SIGNED_DWORD = (number) 6
(const byte) TYPEID_SIGNED_WORD TYPEID_SIGNED_WORD = (number) 4
(const byte) TYPEID_VOID TYPEID_VOID = (number) 0
(const byte) TYPEID_WORD TYPEID_WORD = (number) 3
(void()) main()
(label) main::@return
(byte*) main::SCREEN
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
(byte) main::idx



FINAL ASSEMBLER
Score: 176

  // File Comments
// Test typeid() of the different types
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .const TYPEID_VOID = 0
  .const TYPEID_BYTE = 1
  .const TYPEID_SIGNED_BYTE = 2
  .const TYPEID_WORD = 3
  .const TYPEID_SIGNED_WORD = 4
  .const TYPEID_DWORD = 5
  .const TYPEID_SIGNED_DWORD = 6
  .const TYPEID_BOOL = 7
  .const TYPEID_POINTER_BYTE = $11
  .const TYPEID_POINTER_SIGNED_BYTE = $12
  .const TYPEID_POINTER_WORD = $13
  .const TYPEID_POINTER_SIGNED_WORD = $14
  .const TYPEID_POINTER_DWORD = $15
  .const TYPEID_POINTER_SIGNED_DWORD = $16
  .const TYPEID_POINTER_BOOL = $17
  .const TYPEID_POINTER_PROCEDURE = $1f
  .const TYPEID_POINTER_POINTER_BYTE = $21
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .label SCREEN = $400
    // SCREEN[idx++] = typeid(void)
    // [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID -- _deref_pbuc1=vbuc2 
    // Simple types
    lda #TYPEID_VOID
    sta SCREEN
    // SCREEN[idx++] = typeid(byte)
    // [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BYTE
    sta SCREEN+1
    // SCREEN[idx++] = typeid(signed byte)
    // [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_BYTE
    sta SCREEN+2
    // SCREEN[idx++] = typeid(word)
    // [7] *((const byte*) main::SCREEN#0+(byte) 3) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+3
    // SCREEN[idx++] = typeid(signed word)
    // [8] *((const byte*) main::SCREEN#0+(byte) 4) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+4
    // SCREEN[idx++] = typeid(dword)
    // [9] *((const byte*) main::SCREEN#0+(byte) 5) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_DWORD
    sta SCREEN+5
    // SCREEN[idx++] = typeid(signed dword)
    // [10] *((const byte*) main::SCREEN#0+(byte) 6) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+6
    // SCREEN[idx++] = typeid(bool)
    // [11] *((const byte*) main::SCREEN#0+(byte) 7) ← (const byte) TYPEID_BOOL -- _deref_pbuc1=vbuc2 
    lda #TYPEID_BOOL
    sta SCREEN+7
    // SCREEN[idx++] = typeid(byte*)
    // [12] *((const byte*) main::SCREEN#0+(byte) 8) ← (const byte) TYPEID_POINTER_BYTE -- _deref_pbuc1=vbuc2 
    // Pointer types
    lda #TYPEID_POINTER_BYTE
    sta SCREEN+8
    // SCREEN[idx++] = typeid(signed byte*)
    // [13] *((const byte*) main::SCREEN#0+(byte) 9) ← (const byte) TYPEID_POINTER_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_BYTE
    sta SCREEN+9
    // SCREEN[idx++] = typeid(word*)
    // [14] *((const byte*) main::SCREEN#0+(byte) $a) ← (const byte) TYPEID_POINTER_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_WORD
    sta SCREEN+$a
    // SCREEN[idx++] = typeid(signed word*)
    // [15] *((const byte*) main::SCREEN#0+(byte) $b) ← (const byte) TYPEID_POINTER_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_WORD
    sta SCREEN+$b
    // SCREEN[idx++] = typeid(dword*)
    // [16] *((const byte*) main::SCREEN#0+(byte) $c) ← (const byte) TYPEID_POINTER_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_DWORD
    sta SCREEN+$c
    // SCREEN[idx++] = typeid(signed dword*)
    // [17] *((const byte*) main::SCREEN#0+(byte) $d) ← (const byte) TYPEID_POINTER_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_SIGNED_DWORD
    sta SCREEN+$d
    // SCREEN[idx++] = typeid(bool*)
    // [18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL -- _deref_pbuc1=vbuc2 
    lda #TYPEID_POINTER_BOOL
    sta SCREEN+$e
    // SCREEN[idx++] = typeid(byte()*)
    // [19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE -- _deref_pbuc1=vbuc2 
    // Pointer to procedure
    lda #TYPEID_POINTER_PROCEDURE
    sta SCREEN+$f
    // SCREEN[idx++] = typeid(byte**)
    // [20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE -- _deref_pbuc1=vbuc2 
    // Pointer to pointer
    lda #TYPEID_POINTER_POINTER_BYTE
    sta SCREEN+$10
    // SCREEN[idx++] = typeid(char)
    // [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    // Test C types
    lda #TYPEID_BYTE
    sta SCREEN+$28
    // SCREEN[idx++] = typeid(unsigned char)
    // [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2 
    sta SCREEN+$29
    // SCREEN[idx++] = typeid(signed char)
    // [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_BYTE
    sta SCREEN+$2a
    // SCREEN[idx++] = typeid(short)
    // [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2b
    // SCREEN[idx++] = typeid(unsigned short)
    // [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+$2c
    // SCREEN[idx++] = typeid(signed short)
    // [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$2d
    // SCREEN[idx++] = typeid(int)
    // [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    sta SCREEN+$2e
    // SCREEN[idx++] = typeid(unsigned int)
    // [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_WORD
    sta SCREEN+$2f
    // SCREEN[idx++] = typeid(signed int)
    // [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_WORD
    sta SCREEN+$30
    // SCREEN[idx++] = typeid(long)
    // [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+$31
    // SCREEN[idx++] = typeid(unsigned long)
    // [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_DWORD
    sta SCREEN+$32
    // SCREEN[idx++] = typeid(signed long)
    // [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2 
    lda #TYPEID_SIGNED_DWORD
    sta SCREEN+$33
    // main::@return
    // }
    // [33] return 
    rts
}
  // File Data

