From 0a58b03094dd87c9606fae80a4c84753249615e8 Mon Sep 17 00:00:00 2001 From: jespergravgaard <jesper@balmangravgaard.dk> Date: Wed, 7 Aug 2019 01:32:46 +0200 Subject: [PATCH] Constant loop head identification working. #246 is essentially complete. A few program grow to much from the optimization - this needs attention at some point. --- .../kickc/model/iterator/ProgramValue.java | 12 +- .../Pass2LoopHeadConstantIdentification.java | 1 + .../PassNCalcVariableReferenceInfos.java | 25 +- .../kickc/passes/utils/Unroller.java | 173 +- src/test/ref/bool-ifs-min.asm | 24 + src/test/ref/bool-ifs-min.cfg | 31 + src/test/ref/bool-ifs-min.log | 613 + src/test/ref/bool-ifs-min.sym | 19 + src/test/ref/bool-vars.asm | 48 +- src/test/ref/bool-vars.cfg | 99 +- src/test/ref/bool-vars.log | 2090 ++- src/test/ref/bool-vars.sym | 33 +- src/test/ref/comparison-rewriting.asm | 40 +- src/test/ref/comparison-rewriting.cfg | 47 +- src/test/ref/comparison-rewriting.log | 935 +- src/test/ref/comparison-rewriting.sym | 17 +- src/test/ref/complex/tetris/tetris.asm | 13 +- src/test/ref/complex/tetris/tetris.cfg | 665 +- src/test/ref/complex/tetris/tetris.log | 5957 +++++---- src/test/ref/complex/tetris/tetris.sym | 15 +- src/test/ref/condition-integer-0.asm | 52 +- src/test/ref/condition-integer-0.cfg | 56 +- src/test/ref/condition-integer-0.log | 945 +- src/test/ref/condition-integer-0.sym | 28 +- src/test/ref/condition-integer-1.asm | 48 +- src/test/ref/condition-integer-1.cfg | 50 +- src/test/ref/condition-integer-1.log | 927 +- src/test/ref/condition-integer-1.sym | 30 +- src/test/ref/condition-integer-3.asm | 10 +- src/test/ref/condition-integer-3.cfg | 29 +- src/test/ref/condition-integer-3.log | 371 +- src/test/ref/condition-integer-3.sym | 16 +- src/test/ref/euclid-problem.asm | 13 +- src/test/ref/euclid-problem.cfg | 23 +- src/test/ref/euclid-problem.log | 510 +- src/test/ref/euclid-problem.sym | 13 +- src/test/ref/examples/fire/fire.asm | 68 +- src/test/ref/examples/fire/fire.cfg | 84 +- src/test/ref/examples/fire/fire.log | 1391 +- src/test/ref/examples/fire/fire.sym | 21 +- src/test/ref/ifmin.asm | 8 +- src/test/ref/ifmin.cfg | 15 +- src/test/ref/ifmin.log | 203 +- src/test/ref/ifmin.sym | 7 +- src/test/ref/loop-for-sideeffect.asm | 13 +- src/test/ref/loop-for-sideeffect.cfg | 20 +- src/test/ref/loop-for-sideeffect.log | 228 +- src/test/ref/loop-for-sideeffect.sym | 8 +- src/test/ref/loop-memset-min.asm | 16 +- src/test/ref/loop-memset-min.cfg | 16 +- src/test/ref/loop-memset-min.log | 241 +- src/test/ref/loop-memset-min.sym | 6 +- src/test/ref/loop-while-min.asm | 8 +- src/test/ref/loop-while-min.cfg | 16 +- src/test/ref/loop-while-min.log | 196 +- src/test/ref/loop-while-min.sym | 6 +- src/test/ref/loop-while-sideeffect.asm | 13 +- src/test/ref/loop-while-sideeffect.cfg | 17 +- src/test/ref/loop-while-sideeffect.log | 213 +- src/test/ref/loop-while-sideeffect.sym | 7 - src/test/ref/loopmin.asm | 8 +- src/test/ref/loopmin.cfg | 22 +- src/test/ref/loopmin.log | 305 +- src/test/ref/loopmin.sym | 14 +- src/test/ref/plasma-center.asm | 179 +- src/test/ref/plasma-center.cfg | 115 +- src/test/ref/plasma-center.log | 3310 +++-- src/test/ref/plasma-center.sym | 188 +- src/test/ref/ptrtest.asm | 38 +- src/test/ref/ptrtest.cfg | 80 +- src/test/ref/ptrtest.log | 1783 ++- src/test/ref/ptrtest.sym | 45 +- src/test/ref/ptrtestmin.asm | 9 +- src/test/ref/ptrtestmin.cfg | 19 +- src/test/ref/ptrtestmin.log | 274 +- src/test/ref/ptrtestmin.sym | 11 +- src/test/ref/sandbox-ternary-error.asm | 22 +- src/test/ref/sandbox-ternary-error.cfg | 43 +- src/test/ref/sandbox-ternary-error.log | 467 +- src/test/ref/sandbox-ternary-error.sym | 12 +- src/test/ref/sandbox.asm | 90 +- src/test/ref/sandbox.cfg | 521 +- src/test/ref/sandbox.log | 10487 ++++++++++++---- src/test/ref/sandbox.sym | 148 +- src/test/ref/screen-center-distance.asm | 170 +- src/test/ref/screen-center-distance.cfg | 173 +- src/test/ref/screen-center-distance.log | 3045 +++-- src/test/ref/screen-center-distance.sym | 162 +- src/test/ref/screen-show-spiral-buckets.asm | 193 +- src/test/ref/screen-show-spiral-buckets.cfg | 105 +- src/test/ref/screen-show-spiral-buckets.log | 3196 +++-- src/test/ref/screen-show-spiral-buckets.sym | 183 +- src/test/ref/screen-show-spiral.asm | 211 +- src/test/ref/screen-show-spiral.cfg | 115 +- src/test/ref/screen-show-spiral.log | 2970 +++-- src/test/ref/screen-show-spiral.sym | 272 +- src/test/ref/sequence-locality-0.asm | 26 +- src/test/ref/sequence-locality-0.cfg | 29 +- src/test/ref/sequence-locality-0.log | 387 +- src/test/ref/sequence-locality-0.sym | 17 +- src/test/ref/sequence-locality-1.asm | 12 +- src/test/ref/sequence-locality-1.cfg | 34 +- src/test/ref/sequence-locality-1.log | 391 +- src/test/ref/sequence-locality-1.sym | 12 +- src/test/ref/sieve.asm | 293 +- src/test/ref/sieve.cfg | 458 +- src/test/ref/sieve.log | 10180 ++++++++++++--- src/test/ref/sieve.sym | 253 +- src/test/ref/signed-bytes.asm | 18 +- src/test/ref/signed-bytes.cfg | 20 +- src/test/ref/signed-bytes.log | 298 +- src/test/ref/signed-bytes.sym | 12 +- src/test/ref/struct-ptr-5.asm | 16 +- src/test/ref/struct-ptr-5.cfg | 38 +- src/test/ref/struct-ptr-5.log | 446 +- src/test/ref/struct-ptr-5.sym | 12 +- src/test/ref/ternary-1.asm | 10 +- src/test/ref/ternary-1.cfg | 24 +- src/test/ref/ternary-1.log | 275 +- src/test/ref/ternary-1.sym | 9 +- src/test/ref/ternary-inference.asm | 10 +- src/test/ref/ternary-inference.cfg | 26 +- src/test/ref/ternary-inference.log | 294 +- src/test/ref/ternary-inference.sym | 11 +- src/test/ref/unroll-loop-modifyvar.log | 451 +- src/test/ref/unroll-screenfill-while.log | 471 +- src/test/ref/unroll-while-min.log | 76 +- 127 files changed, 41541 insertions(+), 18852 deletions(-) create mode 100644 src/test/ref/bool-ifs-min.asm create mode 100644 src/test/ref/bool-ifs-min.cfg create mode 100644 src/test/ref/bool-ifs-min.log create mode 100644 src/test/ref/bool-ifs-min.sym diff --git a/src/main/java/dk/camelot64/kickc/model/iterator/ProgramValue.java b/src/main/java/dk/camelot64/kickc/model/iterator/ProgramValue.java index e8086431e..90309aa16 100644 --- a/src/main/java/dk/camelot64/kickc/model/iterator/ProgramValue.java +++ b/src/main/java/dk/camelot64/kickc/model/iterator/ProgramValue.java @@ -8,11 +8,10 @@ import dk.camelot64.kickc.model.values.*; /** * Any Value in the program being iterated by {@link ProgramValueIterator}. - * + * <p> * The Value can be inspected using get() and replaced inside the model using set(val). - * + * <p> * The context of the Value can be determined from the sub-class containing it plus the parameters to the ProgramValueHandler. - * */ public interface ProgramValue { @@ -204,6 +203,11 @@ public interface ProgramValue { public void set(Value value) { phiVariable.getValues().get(i).setrValue((RValue) value); } + + public LabelRef getPredecessor() { + return phiVariable.getValues().get(i).getPredecessor(); + } + } class PhiValuePredecessor implements ProgramValue { @@ -472,7 +476,7 @@ public interface ProgramValue { @Override public void set(Value value) { - structValue.setValue(memberRef, (ConstantValue)value); + structValue.setValue(memberRef, (ConstantValue) value); } } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2LoopHeadConstantIdentification.java b/src/main/java/dk/camelot64/kickc/passes/Pass2LoopHeadConstantIdentification.java index 58f179787..cbf6b4cb8 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2LoopHeadConstantIdentification.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2LoopHeadConstantIdentification.java @@ -36,6 +36,7 @@ public class Pass2LoopHeadConstantIdentification extends Pass2SsaOptimization { ControlFlowBlock loopHeadBlock = getGraph().getBlock(loopHeadRef); boolean modified = optimizeLoopHead(loopHeadBlock, loop, variableReferenceInfos); if(modified) { + getProgram().clearVariableReferenceInfos(); getProgram().clearStatementInfos(); getProgram().clearLoopSet(); getProgram().clearDominators(); diff --git a/src/main/java/dk/camelot64/kickc/passes/calcs/PassNCalcVariableReferenceInfos.java b/src/main/java/dk/camelot64/kickc/passes/calcs/PassNCalcVariableReferenceInfos.java index 832bf4357..b33cfe26b 100644 --- a/src/main/java/dk/camelot64/kickc/passes/calcs/PassNCalcVariableReferenceInfos.java +++ b/src/main/java/dk/camelot64/kickc/passes/calcs/PassNCalcVariableReferenceInfos.java @@ -183,32 +183,19 @@ public class PassNCalcVariableReferenceInfos extends PassNCalcBase<VariableRefer * @param stmt The statement * @return Variables defined by the statement */ - private Collection<VariableRef> getDefinedVars(Statement stmt) { - if(stmt instanceof StatementAssignment) { - StatementAssignment assignment = (StatementAssignment) stmt; - LValue lValue = assignment.getlValue(); - if(lValue instanceof VariableRef) { - return Collections.singletonList((VariableRef) lValue); - } - } else if(stmt instanceof StatementPhiBlock) { + public static Collection<VariableRef> getDefinedVars(Statement stmt) { + if(stmt instanceof StatementPhiBlock) { List<VariableRef> defined = new ArrayList<>(); StatementPhiBlock phi = (StatementPhiBlock) stmt; for(StatementPhiBlock.PhiVariable phiVariable : phi.getPhiVariables()) { defined.add(phiVariable.getVariable()); } return defined; - } else if(stmt instanceof StatementCall) { - List<VariableRef> defined = new ArrayList<>(); - if(((StatementCall) stmt).getlValue() instanceof VariableRef) { - defined.add((VariableRef) ((StatementCall) stmt).getlValue()); + } else if(stmt instanceof StatementLValue) { + LValue lValue = ((StatementLValue) stmt).getlValue(); + if(lValue instanceof VariableRef) { + return Collections.singletonList((VariableRef) lValue); } - return defined; - } else if(stmt instanceof StatementCallPointer) { - List<VariableRef> defined = new ArrayList<>(); - if(((StatementCallPointer) stmt).getlValue() instanceof VariableRef) { - defined.add((VariableRef) ((StatementCallPointer) stmt).getlValue()); - } - return defined; } return new ArrayList<>(); } diff --git a/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java b/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java index 06d2fedf7..206d16f09 100644 --- a/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java +++ b/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java @@ -10,8 +10,11 @@ import dk.camelot64.kickc.model.symbols.Variable; import dk.camelot64.kickc.model.symbols.VariableVersion; import dk.camelot64.kickc.model.values.*; import dk.camelot64.kickc.passes.AliasReplacer; +import dk.camelot64.kickc.passes.Pass1GenerateSingleStaticAssignmentForm; +import dk.camelot64.kickc.passes.calcs.PassNCalcVariableReferenceInfos; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; /** * Utility for copying blocks in a program - typically to unroll loops or conditions. @@ -72,70 +75,142 @@ public class Unroller { } /** - * Ensure that all variables defined inside the blocks to be copied has a PHI in successor blocks. + * Ensure that variables defined inside and used outside the blocks to be copied has different versions in different successors blocks. */ private void prepare() { for(VariableRef origVarRef : getVarsDefinedIn(unrollBlocks, program)) { // Find out if the variable is ever referenced outside the loop if(isReferencedOutside(origVarRef, unrollBlocks, program)) { - // Add any needed PHI-statements to the successors - for(SuccessorTransition successorTransition : getSuccessorTransitions(unrollBlocks, program.getGraph())) { - ControlFlowBlock successorBlock = program.getGraph().getBlock(successorTransition.successor); - StatementPhiBlock phiBlock = successorBlock.getPhiBlock(); - // Create a new version of the variable - Variable origVar = program.getScope().getVariable(origVarRef); - Variable newVar; - if(origVar instanceof VariableVersion) { - newVar = ((VariableVersion) origVar).getVersionOf().createVersion(); - } else { - newVar = origVar.getScope().addVariableIntermediate(); - } - // Replace all references from the new phi and forward - forwardReplaceAllUsages(successorTransition.successor, origVarRef, newVar.getRef(), new LinkedHashSet<>()); - // Create the new phi-variable in the successor phi block - StatementPhiBlock.PhiVariable newPhiVar = phiBlock.addPhiVariable(newVar.getRef()); - newPhiVar.setrValue(successorTransition.predecessor, origVarRef); - program.getLog().append("Creating PHI for " + origVarRef.getFullName() + " in block " + successorBlock.getLabel() + " - " + phiBlock.toString(program, false)); - - } + // Re-version all usages of the specific variable version + Map<LabelRef, VariableRef> newPhis = new LinkedHashMap<>(); + Map<LabelRef, VariableRef> varVersions = new LinkedHashMap<>(); + reVersionAllUsages(origVarRef, newPhis, varVersions); + program.getLog().append("GRAPH (NEW VERSIONS for " + origVarRef + ")"); + program.getLog().append(program.getGraph().toString(program)); + // Recursively fill out & add PHI-functions until they have propagated everywhere needed + completePhiFunctions(newPhis, varVersions); } } } /** - * Introduces a new version of a variable - and replaces all uses of the old variable with the new one from a specific point in the control flow graph and forward until the old variable is defined. - * @param blockRef The block to replace the usage from - * @param origVarRef The original variable - * @param newVarRef The new variable replacing the original - * @param visited All blocks that have already been visited. + * Find all usages of a variable and create new versions for each usage. + * + * @param origVarRef The original variable where all usages must have new versions + * @param newPhis Map that will be populated with all new (empty) PHI-variables for the new versionw - these will be populated later. + * @param varVersions Map that will be populated with the version of the origVariable at the end of each block where it has a defined version. */ - private void forwardReplaceAllUsages(LabelRef blockRef, VariableRef origVarRef, VariableRef newVarRef, Set<LabelRef> visited) { - VariableReferenceInfos variableReferenceInfos = program.getVariableReferenceInfos(); - LinkedHashMap<SymbolRef, RValue> aliases = new LinkedHashMap<>(); - aliases.put(origVarRef, newVarRef); - AliasReplacer aliasReplacer = new AliasReplacer(aliases); - ControlFlowBlock block = program.getGraph().getBlock(blockRef); - if(block!=null) { + private void reVersionAllUsages(VariableRef origVarRef, Map<LabelRef, VariableRef> newPhis, Map<LabelRef, VariableRef> varVersions) { + + // First add the definition of origVar to varVersions + for(ControlFlowBlock block : program.getGraph().getAllBlocks()) { for(Statement statement : block.getStatements()) { - Collection<VariableRef> definedVars = variableReferenceInfos.getDefinedVars(statement); - if(definedVars!=null && definedVars.contains(origVarRef)) { - // Found definition of the original variable - don't replace any more - return; + Collection<VariableRef> definedVars = PassNCalcVariableReferenceInfos.getDefinedVars(statement); + if(definedVars.contains(origVarRef)) { + varVersions.put(block.getLabel(), origVarRef); } - // Replace any usage in the statement - ProgramValueIterator.execute(statement, aliasReplacer, null, block); } } - visited.add(blockRef); - if(block!=null) { - if(block.getConditionalSuccessor() != null && !visited.contains(block.getConditionalSuccessor())) { - forwardReplaceAllUsages(block.getConditionalSuccessor(), origVarRef, newVarRef, visited); + // Next iterate the entire graph ensuring that all usages create new versions (except usages right after the definition) + for(ControlFlowBlock block : program.getGraph().getAllBlocks()) { + AtomicReference<VariableRef> currentVersion = new AtomicReference<>(); + // Set current version from map + currentVersion.set(varVersions.get(block.getLabel())); + for(Statement statement : block.getStatements()) { + ProgramValueIterator.execute(statement, (programValue, currentStmt, stmtIt, currentBlock) -> { + Value value = programValue.get(); + if(origVarRef.equals(value)) { + // Found a reference! + if(statement instanceof StatementPhiBlock && programValue instanceof ProgramValue.PhiVariable) { + // This is the definition - don't replace it + currentVersion.set(origVarRef); + varVersions.put(block.getLabel(), origVarRef); + } else if(statement instanceof StatementLValue && programValue instanceof ProgramValue.ProgramValueLValue) { + // This is the definition - don't replace it + currentVersion.set(origVarRef); + varVersions.put(block.getLabel(), origVarRef); + } else if(statement instanceof StatementPhiBlock && programValue instanceof ProgramValue.PhiValue) { + // The reference is inside a PHI-value - we need a version in the predecessor + LabelRef predecessor = ((ProgramValue.PhiValue) programValue).getPredecessor(); + VariableRef predecessorVersion = varVersions.get(predecessor); + if(predecessorVersion == null) { + // Add a new PHI to the predecessor + predecessorVersion = createNewVersion(origVarRef); + varVersions.put(predecessor, predecessorVersion); + newPhis.put(predecessor, predecessorVersion); + } + // Use the definition + programValue.set(predecessorVersion); + } else if(currentVersion.get() == null) { + // Found a reference - no definition - create a new version + VariableRef newVarRef = createNewVersion(origVarRef); + currentVersion.set(newVarRef); + varVersions.put(block.getLabel(), newVarRef); + newPhis.put(block.getLabel(), currentVersion.get()); + // Use the definition + programValue.set(newVarRef); + } else { + programValue.set(currentVersion.get()); + } + } + }, null, null); } - if(block.getDefaultSuccessor() != null && !visited.contains(block.getDefaultSuccessor())) { - forwardReplaceAllUsages(block.getDefaultSuccessor(), origVarRef, newVarRef, visited); - } - if(block.getCallSuccessor() != null && !visited.contains(block.getCallSuccessor())) { - forwardReplaceAllUsages(block.getCallSuccessor(), origVarRef, newVarRef, visited); + } + // Add the new empty PHI-blocks() + for(LabelRef blockRef : newPhis.keySet()) { + ControlFlowBlock block = program.getGraph().getBlock(blockRef); + VariableRef newVersion = newPhis.get(blockRef); + block.getPhiBlock().addPhiVariable(newVersion); + } + + } + + /** + * Create a new version of a variable + * @param origVarRef The original variable + * @return The new version + */ + private VariableRef createNewVersion(VariableRef origVarRef) { + Variable origVar = program.getScope().getVariable(origVarRef); + Scope scope = origVar.getScope(); + VariableRef newVarRef; + if(origVarRef.isIntermediate()) { + newVarRef = scope.addVariableIntermediate().getRef(); + } else { + newVarRef = ((VariableVersion) origVar).getVersionOf().createVersion().getRef(); + } + return newVarRef; + } + + /** + * Look through all new phi-functions and fill out their parameters. + * Both passed maps are modified + * + * @param newPhis New (empty) PHI-variables for the new versions that need to be populated + * @param varVersions Map with the version of the origVariable at the end of each block where it has a defined version. + */ + private void completePhiFunctions(Map<LabelRef, VariableRef> newPhis, Map<LabelRef, VariableRef> varVersions) { + Map<LabelRef, VariableRef> todo = newPhis; + while(todo.size() > 0) { + Map<LabelRef, VariableRef> doing = todo; + todo = new LinkedHashMap<>(); + for(LabelRef blockRef : doing.keySet()) { + VariableRef doingVarRef = doing.get(blockRef); + ControlFlowBlock block = program.getGraph().getBlock(blockRef); + StatementPhiBlock.PhiVariable doingPhiVariable = block.getPhiBlock().getPhiVariable(doingVarRef); + List<ControlFlowBlock> predecessors = Pass1GenerateSingleStaticAssignmentForm.getPhiPredecessors(block, program); + for(ControlFlowBlock predecessor : predecessors) { + VariableRef predecessorVarRef = varVersions.get(predecessor.getLabel()); + if(predecessorVarRef == null) { + // Variable has no version in the predecessor block - add a new PHI and populate later! + VariableRef newVarRef = createNewVersion(doingVarRef); + predecessor.getPhiBlock().addPhiVariable(newVarRef); + varVersions.put(predecessor.getLabel(), newVarRef); + todo.put(predecessor.getLabel(), newVarRef); + predecessorVarRef = newVarRef; + } + doingPhiVariable.setrValue(predecessor.getLabel(), predecessorVarRef); + } } } } @@ -272,7 +347,7 @@ public class Unroller { } /** - * Patch the PHI-block of an external successor block. Ensures that the PHI-block also receives data from the new coped block. + * Patch the PHI-block of an external successor block. Ensures that the PHI-block also receives data from the new copied block. * * @param successor The successor block's label * @param origBlock The label of the original block diff --git a/src/test/ref/bool-ifs-min.asm b/src/test/ref/bool-ifs-min.asm new file mode 100644 index 000000000..eb3694ab2 --- /dev/null +++ b/src/test/ref/bool-ifs-min.asm @@ -0,0 +1,24 @@ +// A test of boolean conditions using && || and ! +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .label screen = $400 + ldx #0 + b3: + lda #'*' + sta screen,x + b2: + inx + cpx #$15 + bne b1 + rts + b1: + txa + and #1 + cpx #$a + bcs b2 + cmp #0 + bne b2 + jmp b3 +} diff --git a/src/test/ref/bool-ifs-min.cfg b/src/test/ref/bool-ifs-min.cfg new file mode 100644 index 000000000..b08122f1b --- /dev/null +++ b/src/test/ref/bool-ifs-min.cfg @@ -0,0 +1,31 @@ +@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] phi() + to:main::@3 +main::@3: scope:[main] from main main::@4 + [5] (byte) main::i#9 ← phi( main::@4/(byte) main::i#1 main/(byte) 0 ) + [6] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' + to:main::@2 +main::@2: scope:[main] from main::@1 main::@3 main::@4 + [7] (byte) main::i#5 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#9 main::@4/(byte) main::i#1 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#5 + [9] if((byte) main::i#1!=(byte) $15) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@2 + [10] return + to:@return +main::@1: scope:[main] from main::@2 + [11] (byte~) main::$6 ← (byte) main::i#1 & (byte) 1 + [12] if((byte) main::i#1>=(byte) $a) goto main::@2 + to:main::@4 +main::@4: scope:[main] from main::@1 + [13] if((byte~) main::$6!=(byte) 0) goto main::@2 + to:main::@3 diff --git a/src/test/ref/bool-ifs-min.log b/src/test/ref/bool-ifs-min.log new file mode 100644 index 000000000..0ebfd22f2 --- /dev/null +++ b/src/test/ref/bool-ifs-min.log @@ -0,0 +1,613 @@ +Culled Empty Block (label) main::@4 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte*) main::screen#0 ← ((byte*)) (number) $400 + (byte) main::i#0 ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 ) + (bool~) main::$0 ← (byte) main::i#2 < (number) $a + (number~) main::$1 ← (byte) main::i#2 & (number) 1 + (bool~) main::$2 ← (number~) main::$1 == (number) 0 + (bool~) main::$3 ← (bool~) main::$0 && (bool~) main::$2 + (bool~) main::$4 ← ! (bool~) main::$3 + if((bool~) main::$4) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@3 + (byte) main::i#3 ← phi( main::@1/(byte) main::i#2 main::@3/(byte) main::i#4 ) + (byte) main::i#1 ← (byte) main::i#3 + rangenext(0,$14) + (bool~) main::$5 ← (byte) main::i#1 != rangelast(0,$14) + if((bool~) main::$5) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@1 + (byte) main::i#4 ← phi( main::@1/(byte) main::i#2 ) + *((byte*) main::screen#0 + (byte) main::i#4) ← (byte) '*' + to:main::@2 +main::@return: scope:[main] from main::@2 + 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 +(void()) main() +(bool~) main::$0 +(number~) main::$1 +(bool~) main::$2 +(bool~) main::$3 +(bool~) main::$4 +(bool~) main::$5 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(byte) main::i +(byte) main::i#0 +(byte) main::i#1 +(byte) main::i#2 +(byte) main::i#3 +(byte) main::i#4 +(byte*) main::screen +(byte*) main::screen#0 + +Adding number conversion cast (unumber) $a in (bool~) main::$0 ← (byte) main::i#2 < (number) $a +Adding number conversion cast (unumber) 1 in (number~) main::$1 ← (byte) main::i#2 & (number) 1 +Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (byte) main::i#2 & (unumber)(number) 1 +Adding number conversion cast (unumber) 0 in (bool~) main::$2 ← (unumber~) main::$1 == (number) 0 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast (byte*) main::screen#0 ← (byte*)(number) $400 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 1024 +Simplifying constant integer cast $a +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) $a +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to byte in (unumber~) main::$1 ← (byte) main::i#2 & (byte) 1 +Alias (byte) main::i#2 = (byte) main::i#4 +Successful SSA optimization Pass2AliasElimination +Alias (byte) main::i#2 = (byte) main::i#3 +Successful SSA optimization Pass2AliasElimination +Simple Condition (bool~) main::$5 [12] if((byte) main::i#1!=rangelast(0,$14)) goto main::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Rewriting ! if()-condition to reversed if() [7] (bool~) main::$4 ← ! (bool~) main::$3 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting && if()-condition to two if()s [6] (bool~) main::$3 ← (bool~) main::$0 && (bool~) main::$2 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Constant (const byte*) main::screen#0 = (byte*) 1024 +Constant (const byte) main::i#0 = 0 +Successful SSA optimization Pass2ConstantIdentification +Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,$14)) goto main::@1 to (number) $15 +Adding number conversion cast (unumber) $15 in if((byte) main::i#1!=(number) $15) goto main::@1 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast $15 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) $15 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Simple Condition (bool~) main::$0 [4] if((byte) main::i#2<(byte) $a) goto main::@5 +Simple Condition (bool~) main::$2 [10] if((byte~) main::$1==(byte) 0) goto main::@3 +Successful SSA optimization Pass2ConditionalJumpSimplification +Negating conditional jump and destination [4] if((byte) main::i#2>=(byte) $a) goto main::@2 +Negating conditional jump and destination [10] if((byte~) main::$1!=(byte) 0) goto main::@2 +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] (byte~) main::$1 ← (byte) main::i#2 & (byte) 1 + [2] if((byte) main::i#2>=(byte) $a) goto main::@2 + to:main::@5 +main::@2: scope:[main] from main::@1 main::@3 main::@5 + (byte) main::i#5 ← phi( ) + [3] (byte) main::i#1 ← ++ (byte) main::i#5 + [4] if((byte) main::i#1!=(byte) $15) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@5 + (byte) main::i#6 ← phi( ) + [5] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte) '*' + to:main::@2 +main::@return: scope:[main] from main::@2 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@5: scope:[main] from main::@1 + [8] if((byte~) main::$1!=(byte) 0) goto main::@2 + to:main::@3 + +GRAPH (NEW VERSIONS for main::$1) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] (byte~) main::$1 ← (byte) main::i#2 & (byte) 1 + [2] if((byte) main::i#2>=(byte) $a) goto main::@2 + to:main::@5 +main::@2: scope:[main] from main::@1 main::@3 main::@5 + (byte) main::i#5 ← phi( main::@1/(byte) main::i#2 main::@3/(byte) main::i#6 main::@5/(byte) main::i#7 ) + [3] (byte) main::i#1 ← ++ (byte) main::i#5 + [4] if((byte) main::i#1!=(byte) $15) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@5 + (byte) main::i#6 ← phi( main::@5/(byte) main::i#7 ) + [5] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte) '*' + to:main::@2 +main::@return: scope:[main] from main::@2 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@5: scope:[main] from main::@1 + (var) main::$6 ← phi( ) + (byte) main::i#7 ← phi( main::@1/(byte) main::i#2 ) + [8] if((var) main::$6!=(byte) 0) goto main::@2 + to:main::@3 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::i#1 = (byte) main::i#2 +Alias (byte) main::i#6 = (byte) main::i#7 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#8 (const byte) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [13] (byte~) main::$7 ← (const byte) main::i#0 & (byte) 1 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::$7 = main::i#0&1 +Successful SSA optimization Pass2ConstantIdentification +Removing PHI-reference to removed block (main::@1_1) in block main::@2 +if() condition always false - eliminating [14] if((const byte) main::i#0>=(byte) $a) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Simplifying constant evaluating to zero (const byte) main::i#0&(byte) 1 in +Successful SSA optimization PassNSimplifyConstantZero +GRAPH (NEW VERSIONS for main::i#6) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1_1 +main::@1: scope:[main] from main::@2 + [0] (byte~) main::$1 ← (byte) main::i#1 & (byte) 1 + [1] if((byte) main::i#1>=(byte) $a) goto main::@2 + to:main::@5 +main::@2: scope:[main] from main::@1 main::@3 main::@5 + [2] (byte) main::i#5 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#9 main::@5/(byte) main::i#6 ) + [3] (byte) main::i#1 ← ++ (byte) main::i#5 + [4] if((byte) main::i#1!=(byte) $15) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@5 + (byte) main::i#9 ← phi( ) + [5] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' + to:main::@2 +main::@return: scope:[main] from main::@2 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@5: scope:[main] from main::@1 main::@1_1 + [8] (byte~) main::$6 ← phi( main::@1/(byte~) main::$1 main::@1_1/(const byte) main::$7 ) + [8] (byte) main::i#6 ← phi( main::@1/(byte) main::i#1 main::@1_1/(const byte) main::i#0 ) + [9] if((byte~) main::$6!=(byte) 0) goto main::@2 + to:main::@3 +main::@1_1: scope:[main] from main + to:main::@5 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::i#1 = (byte) main::i#6 +Alias (byte~) main::$6 = (byte~) main::$1 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#10 (const byte) main::i#0 +Identical Phi Values (byte~) main::$8 (const byte) main::$7 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@5_1) in block main::@2 +if() condition always false - eliminating [12] if((const byte) main::$7!=(byte) 0) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Eliminating unused constant (const byte) main::$7 +Successful SSA optimization PassNEliminateUnusedVars +Inlining constant with var siblings (const byte) main::i#0 +Constant inlined main::i#0 = (byte) 0 +Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting main::@6(between main::@1 and main::@2) +Added new block during phi lifting main::@7(between main::@5 and main::@2) +Added new block during phi lifting main::@8(between main::@5 and main::@3) +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 +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 +Adding NOP phi() at start of main::@5_1 +CALL GRAPH +Calls in [] to main:2 + +Created 2 initial phi equivalence classes +Coalesced [10] main::i#12 ← main::i#9 +Coalesced [18] main::i#14 ← main::i#1 +Coalesced (already) [19] main::i#13 ← main::i#1 +Coalesced (already) [20] main::i#11 ← main::i#1 +Coalesced down to 1 phi equivalence classes +Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@5_1 +Culled Empty Block (label) main::@8 +Culled Empty Block (label) main::@7 +Culled Empty Block (label) main::@6 +Renumbering block main::@5 to main::@4 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main + +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] phi() + to:main::@3 +main::@3: scope:[main] from main main::@4 + [5] (byte) main::i#9 ← phi( main::@4/(byte) main::i#1 main/(byte) 0 ) + [6] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' + to:main::@2 +main::@2: scope:[main] from main::@1 main::@3 main::@4 + [7] (byte) main::i#5 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#9 main::@4/(byte) main::i#1 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#5 + [9] if((byte) main::i#1!=(byte) $15) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@2 + [10] return + to:@return +main::@1: scope:[main] from main::@2 + [11] (byte~) main::$6 ← (byte) main::i#1 & (byte) 1 + [12] if((byte) main::i#1>=(byte) $a) goto main::@2 + to:main::@4 +main::@4: scope:[main] from main::@1 + [13] if((byte~) main::$6!=(byte) 0) goto main::@2 + to:main::@3 + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte~) main::$6 551.0 +(byte) main::i +(byte) main::i#1 1041.4 +(byte) main::i#5 2114.0 +(byte) main::i#9 61.5 +(byte*) main::screen + +Initial phi equivalence classes +[ main::i#5 main::i#9 main::i#1 ] +Added variable main::$6 to zero page equivalence class [ main::$6 ] +Complete equivalence classes +[ main::i#5 main::i#9 main::i#1 ] +[ main::$6 ] +Allocated zp ZP_BYTE:2 [ main::i#5 main::i#9 main::i#1 ] +Allocated zp ZP_BYTE:3 [ main::$6 ] + +INITIAL ASM +Target platform is c64basic + // File Comments +// A test of boolean conditions using && || and ! + // Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" + // Global Constants & labels + // @begin +bbegin: + // [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 + // @1 +b1: + // [2] call main + // [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main + // [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend + // @end +bend: + // main +main: { + .label screen = $400 + .label i = 2 + .label _6 = 3 + // [5] phi from main to main::@3 [phi:main->main::@3] + b3_from_main: + // [5] phi (byte) main::i#9 = (byte) 0 [phi:main->main::@3#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b3 + // main::@3 + b3: + // [6] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #'*' + ldy i + sta screen,y + // [7] phi from main::@1 main::@3 main::@4 to main::@2 [phi:main::@1/main::@3/main::@4->main::@2] + b2_from_b1: + b2_from_b3: + b2_from_b4: + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3/main::@4->main::@2#0] -- register_copy + jmp b2 + // main::@2 + b2: + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuz1=_inc_vbuz1 + inc i + // [9] if((byte) main::i#1!=(byte) $15) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$15 + cmp i + bne b1 + jmp breturn + // main::@return + breturn: + // [10] return + rts + // main::@1 + b1: + // [11] (byte~) main::$6 ← (byte) main::i#1 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 + lda #1 + and i + sta _6 + // [12] if((byte) main::i#1>=(byte) $a) goto main::@2 -- vbuz1_ge_vbuc1_then_la1 + lda i + cmp #$a + bcs b2_from_b1 + jmp b4 + // main::@4 + b4: + // [13] if((byte~) main::$6!=(byte) 0) goto main::@2 -- vbuz1_neq_0_then_la1 + lda _6 + cmp #0 + bne b2_from_b4 + // [5] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + b3_from_b4: + // [5] phi (byte) main::i#9 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy + jmp b3 +} + // File Data + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [6] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' [ main::i#9 ] ( main:2 [ main::i#9 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#5 main::i#9 main::i#1 ] +Statement [11] (byte~) main::$6 ← (byte) main::i#1 & (byte) 1 [ main::i#1 main::$6 ] ( main:2 [ main::i#1 main::$6 ] ) always clobbers reg byte a +Statement [6] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' [ main::i#9 ] ( main:2 [ main::i#9 ] ) always clobbers reg byte a +Statement [11] (byte~) main::$6 ← (byte) main::i#1 & (byte) 1 [ main::i#1 main::$6 ] ( main:2 [ main::i#1 main::$6 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::i#5 main::i#9 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::$6 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 3,216.9: zp ZP_BYTE:2 [ main::i#5 main::i#9 main::i#1 ] 551: zp ZP_BYTE:3 [ main::$6 ] +Uplift Scope [] + +Uplifting [main] best 24618 combination reg byte x [ main::i#5 main::i#9 main::i#1 ] reg byte a [ main::$6 ] +Uplifting [] best 24618 combination + +ASSEMBLER BEFORE OPTIMIZATION + // File Comments +// A test of boolean conditions using && || and ! + // Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" + // Global Constants & labels + // @begin +bbegin: + // [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 + // @1 +b1: + // [2] call main + // [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main + // [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend + // @end +bend: + // main +main: { + .label screen = $400 + // [5] phi from main to main::@3 [phi:main->main::@3] + b3_from_main: + // [5] phi (byte) main::i#9 = (byte) 0 [phi:main->main::@3#0] -- vbuxx=vbuc1 + ldx #0 + jmp b3 + // main::@3 + b3: + // [6] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' + sta screen,x + // [7] phi from main::@1 main::@3 main::@4 to main::@2 [phi:main::@1/main::@3/main::@4->main::@2] + b2_from_b1: + b2_from_b3: + b2_from_b4: + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3/main::@4->main::@2#0] -- register_copy + jmp b2 + // main::@2 + b2: + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuxx=_inc_vbuxx + inx + // [9] if((byte) main::i#1!=(byte) $15) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #$15 + bne b1 + jmp breturn + // main::@return + breturn: + // [10] return + rts + // main::@1 + b1: + // [11] (byte~) main::$6 ← (byte) main::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // [12] if((byte) main::i#1>=(byte) $a) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 + cpx #$a + bcs b2_from_b1 + jmp b4 + // main::@4 + b4: + // [13] if((byte~) main::$6!=(byte) 0) goto main::@2 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b2_from_b4 + // [5] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + b3_from_b4: + // [5] phi (byte) main::i#9 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy + jmp b3 +} + // File Data + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b3 +Removing instruction jmp b2 +Removing instruction jmp breturn +Removing instruction jmp b4 +Succesful ASM optimization Pass5NextJumpElimination +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b4 with b2 +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction main_from_b1: +Removing instruction bend_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b3: +Removing instruction b2_from_b4: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction b3_from_main: +Removing instruction breturn: +Removing instruction b4: +Removing instruction b3_from_b4: +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 +(void()) main() +(byte~) main::$6 reg byte a 551.0 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@return +(byte) main::i +(byte) main::i#1 reg byte x 1041.4 +(byte) main::i#5 reg byte x 2114.0 +(byte) main::i#9 reg byte x 61.5 +(byte*) main::screen +(const byte*) main::screen#0 screen = (byte*) 1024 + +reg byte x [ main::i#5 main::i#9 main::i#1 ] +reg byte a [ main::$6 ] + + +FINAL ASSEMBLER +Score: 15576 + + // File Comments +// A test of boolean conditions using && || and ! + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + // @begin + // [1] phi from @begin to @1 [phi:@begin->@1] + // @1 + // [2] call main + // [4] phi from @1 to main [phi:@1->main] + // [3] phi from @1 to @end [phi:@1->@end] + // @end + // main +main: { + .label screen = $400 + // [5] phi from main to main::@3 [phi:main->main::@3] + // [5] phi (byte) main::i#9 = (byte) 0 [phi:main->main::@3#0] -- vbuxx=vbuc1 + ldx #0 + // main::@3 + b3: + // screen[i] = '*' + // [6] *((const byte*) main::screen#0 + (byte) main::i#9) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' + sta screen,x + // [7] phi from main::@1 main::@3 main::@4 to main::@2 [phi:main::@1/main::@3/main::@4->main::@2] + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3/main::@4->main::@2#0] -- register_copy + // main::@2 + b2: + // for( char i : 0..20) + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuxx=_inc_vbuxx + inx + // [9] if((byte) main::i#1!=(byte) $15) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #$15 + bne b1 + // main::@return + // } + // [10] return + rts + // main::@1 + b1: + // i&1 + // [11] (byte~) main::$6 ← (byte) main::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // if( (i<10) && ((i&1)==0) ) + // [12] if((byte) main::i#1>=(byte) $a) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 + cpx #$a + bcs b2 + // main::@4 + // [13] if((byte~) main::$6!=(byte) 0) goto main::@2 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b2 + // [5] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + // [5] phi (byte) main::i#9 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy + jmp b3 +} + // File Data + diff --git a/src/test/ref/bool-ifs-min.sym b/src/test/ref/bool-ifs-min.sym new file mode 100644 index 000000000..44f9da6db --- /dev/null +++ b/src/test/ref/bool-ifs-min.sym @@ -0,0 +1,19 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(byte~) main::$6 reg byte a 551.0 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@return +(byte) main::i +(byte) main::i#1 reg byte x 1041.4 +(byte) main::i#5 reg byte x 2114.0 +(byte) main::i#9 reg byte x 61.5 +(byte*) main::screen +(const byte*) main::screen#0 screen = (byte*) 1024 + +reg byte x [ main::i#5 main::i#9 main::i#1 ] +reg byte a [ main::$6 ] diff --git a/src/test/ref/bool-vars.asm b/src/test/ref/bool-vars.asm index e4b28d49a..edc92601f 100644 --- a/src/test/ref/bool-vars.asm +++ b/src/test/ref/bool-vars.asm @@ -59,6 +59,14 @@ bool_complex: { bool_not: { .label screen = $450 ldx #0 + b4: + lda #' ' + sta screen,x + b3: + inx + cpx #$15 + bne b1 + rts b1: txa and #1 @@ -68,19 +76,19 @@ bool_not: { beq b4 lda #'*' sta screen,x - b3: - inx - cpx #$15 - bne b1 - rts - b4: - lda #' ' - sta screen,x jmp b3 } bool_or: { .label screen = $428 ldx #0 + b2: + lda #'*' + sta screen,x + b3: + inx + cpx #$15 + bne b1 + rts b1: txa and #1 @@ -90,19 +98,19 @@ bool_or: { beq b2 lda #' ' sta screen,x - b3: - inx - cpx #$15 - bne b1 - rts - b2: - lda #'*' - sta screen,x jmp b3 } bool_and: { .label screen = $400 ldx #0 + b2: + lda #'*' + sta screen,x + b3: + inx + cpx #$15 + bne b1 + rts b1: txa and #1 @@ -113,13 +121,5 @@ bool_and: { b4: lda #' ' sta screen,x - b3: - inx - cpx #$15 - bne b1 - rts - b2: - lda #'*' - sta screen,x jmp b3 } diff --git a/src/test/ref/bool-vars.cfg b/src/test/ref/bool-vars.cfg index 402c02d77..e71e984a4 100644 --- a/src/test/ref/bool-vars.cfg +++ b/src/test/ref/bool-vars.cfg @@ -60,73 +60,76 @@ bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7 to:bool_complex::@3 bool_not: scope:[bool_not] from main::@2 [27] phi() - to:bool_not::@1 -bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 - [28] (byte) bool_not::i#2 ← phi( bool_not/(byte) 0 bool_not::@3/(byte) bool_not::i#1 ) - [29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 - [30] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 - to:bool_not::@5 -bool_not::@5: scope:[bool_not] from bool_not::@1 - [31] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 - to:bool_not::@2 -bool_not::@2: scope:[bool_not] from bool_not::@5 - [32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' + to:bool_not::@4 +bool_not::@4: scope:[bool_not] from bool_not bool_not::@1 bool_not::@5 + [28] (byte) bool_not::i#7 ← phi( bool_not::@1/(byte) bool_not::i#1 bool_not/(byte) 0 bool_not::@5/(byte) bool_not::i#1 ) + [29] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' to:bool_not::@3 bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 - [33] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 - [34] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + [30] (byte) bool_not::i#8 ← phi( bool_not::@2/(byte) bool_not::i#1 bool_not::@4/(byte) bool_not::i#7 ) + [31] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 + [32] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 to:bool_not::@return bool_not::@return: scope:[bool_not] from bool_not::@3 - [35] return + [33] return to:@return -bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5 - [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' +bool_not::@1: scope:[bool_not] from bool_not::@3 + [34] (byte~) bool_not::$6 ← (byte) bool_not::i#1 & (byte) 1 + [35] if((byte) bool_not::i#1<(byte) $a) goto bool_not::@4 + to:bool_not::@5 +bool_not::@5: scope:[bool_not] from bool_not::@1 + [36] if((byte~) bool_not::$6==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_not::@2: scope:[bool_not] from bool_not::@5 + [37] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#1) ← (byte) '*' to:bool_not::@3 bool_or: scope:[bool_or] from main::@1 - [37] phi() - to:bool_or::@1 -bool_or::@1: scope:[bool_or] from bool_or bool_or::@3 - [38] (byte) bool_or::i#2 ← phi( bool_or/(byte) 0 bool_or::@3/(byte) bool_or::i#1 ) - [39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 - [40] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 - to:bool_or::@5 -bool_or::@5: scope:[bool_or] from bool_or::@1 - [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 - to:bool_or::@4 -bool_or::@4: scope:[bool_or] from bool_or::@5 - [42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' + [38] phi() + to:bool_or::@2 +bool_or::@2: scope:[bool_or] from bool_or bool_or::@1 bool_or::@5 + [39] (byte) bool_or::i#6 ← phi( bool_or::@1/(byte) bool_or::i#1 bool_or/(byte) 0 bool_or::@5/(byte) bool_or::i#1 ) + [40] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' to:bool_or::@3 bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 - [43] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 - [44] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + [41] (byte) bool_or::i#8 ← phi( bool_or::@2/(byte) bool_or::i#6 bool_or::@4/(byte) bool_or::i#1 ) + [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 + [43] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 to:bool_or::@return bool_or::@return: scope:[bool_or] from bool_or::@3 - [45] return + [44] return to:@return -bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5 - [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' +bool_or::@1: scope:[bool_or] from bool_or::@3 + [45] (byte~) bool_or::$5 ← (byte) bool_or::i#1 & (byte) 1 + [46] if((byte) bool_or::i#1<(byte) $a) goto bool_or::@2 + to:bool_or::@5 +bool_or::@5: scope:[bool_or] from bool_or::@1 + [47] if((byte~) bool_or::$5==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_or::@4: scope:[bool_or] from bool_or::@5 + [48] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#1) ← (byte) ' ' to:bool_or::@3 bool_and: scope:[bool_and] from main - [47] phi() - to:bool_and::@1 -bool_and::@1: scope:[bool_and] from bool_and bool_and::@3 - [48] (byte) bool_and::i#2 ← phi( bool_and/(byte) 0 bool_and::@3/(byte) bool_and::i#1 ) - [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 - [50] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 - to:bool_and::@5 -bool_and::@5: scope:[bool_and] from bool_and::@1 - [51] if((byte~) bool_and::$1==(byte) 0) goto bool_and::@2 - to:bool_and::@4 -bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5 - [52] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' + [49] phi() + to:bool_and::@2 +bool_and::@2: scope:[bool_and] from bool_and bool_and::@5 + [50] (byte) bool_and::i#11 ← phi( bool_and::@5/(byte) bool_and::i#1 bool_and/(byte) 0 ) + [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' to:bool_and::@3 bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 - [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 + [52] (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#11 bool_and::@4/(byte) bool_and::i#1 ) + [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 [54] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 to:bool_and::@return bool_and::@return: scope:[bool_and] from bool_and::@3 [55] return to:@return -bool_and::@2: scope:[bool_and] from bool_and::@5 - [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' +bool_and::@1: scope:[bool_and] from bool_and::@3 + [56] (byte~) bool_and::$5 ← (byte) bool_and::i#1 & (byte) 1 + [57] if((byte) bool_and::i#1>=(byte) $a) goto bool_and::@4 + to:bool_and::@5 +bool_and::@5: scope:[bool_and] from bool_and::@1 + [58] if((byte~) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5 + [59] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#1) ← (byte) ' ' to:bool_and::@3 diff --git a/src/test/ref/bool-vars.log b/src/test/ref/bool-vars.log index 24085e8b2..7ee806b30 100644 --- a/src/test/ref/bool-vars.log +++ b/src/test/ref/bool-vars.log @@ -437,6 +437,1051 @@ Simple Condition (bool) bool_or::o2#0 [47] if((byte~) bool_or::$1==(byte) 0) got Simple Condition (bool) bool_not::o2#0 [48] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Negating conditional jump and destination [9] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 +GRAPH (NEW VERSIONS for bool_and::i#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call bool_and + to:main::@1 +main::@1: scope:[main] from main + [1] call bool_or + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call bool_not + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call bool_complex + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +bool_and: scope:[bool_and] from main + to:bool_and::@1 +bool_and::@1: scope:[bool_and] from bool_and bool_and::@3 + [5] (byte) bool_and::i#2 ← phi( bool_and/(const byte) bool_and::i#0 bool_and::@3/(byte) bool_and::i#1 ) + [6] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 + [7] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_and::@2: scope:[bool_and] from bool_and::@7 + (byte) bool_and::i#6 ← phi( ) + [8] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#6) ← (byte) '*' + to:bool_and::@3 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@7 + (byte) bool_and::i#7 ← phi( ) + [9] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#7) ← (byte) ' ' + to:bool_and::@3 +bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 + (byte) bool_and::i#8 ← phi( ) + [10] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 + [11] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 + to:bool_and::@return +bool_and::@return: scope:[bool_and] from bool_and::@3 + [12] return + to:@return +bool_or: scope:[bool_or] from main::@1 + to:bool_or::@1 +bool_or::@1: scope:[bool_or] from bool_or bool_or::@3 + [13] (byte) bool_or::i#2 ← phi( bool_or/(const byte) bool_or::i#0 bool_or::@3/(byte) bool_or::i#1 ) + [14] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 + [15] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 + to:bool_or::@7 +bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7 + [16] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' + to:bool_or::@3 +bool_or::@4: scope:[bool_or] from bool_or::@7 + [17] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' + to:bool_or::@3 +bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 + [18] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 + [19] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + to:bool_or::@return +bool_or::@return: scope:[bool_or] from bool_or::@3 + [20] return + to:@return +bool_not: scope:[bool_not] from main::@2 + to:bool_not::@1 +bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 + [21] (byte) bool_not::i#2 ← phi( bool_not/(const byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 ) + [22] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 + [23] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 + to:bool_not::@7 +bool_not::@2: scope:[bool_not] from bool_not::@7 + [24] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' + to:bool_not::@3 +bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7 + [25] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' + to:bool_not::@3 +bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 + [26] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 + [27] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + to:bool_not::@return +bool_not::@return: scope:[bool_not] from bool_not::@3 + [28] return + to:@return +bool_complex: scope:[bool_complex] from main::@3 + to:bool_complex::@1 +bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3 + [29] (byte) bool_complex::i#2 ← phi( bool_complex/(const byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 ) + [30] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a + [31] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 + [32] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 + [33] if((bool) bool_complex::o1#0) goto bool_complex::@8 + to:bool_complex::@7 +bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9 + [34] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' + to:bool_complex::@3 +bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9 + [35] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' + to:bool_complex::@3 +bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4 + [36] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 + [37] if((byte) bool_complex::i#1!=(byte) $15) goto bool_complex::@1 + to:bool_complex::@return +bool_complex::@return: scope:[bool_complex] from bool_complex::@3 + [38] return + to:@return +@5: scope:[] from @begin + [39] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +bool_and::@7: scope:[bool_and] from bool_and::@1 + [40] if((byte~) bool_and::$1==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_or::@7: scope:[bool_or] from bool_or::@1 + [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_not::@7: scope:[bool_not] from bool_not::@1 + [42] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8 + [43] if((bool) bool_complex::o1#0) goto bool_complex::@4 + to:bool_complex::@9 +bool_complex::@8: scope:[bool_complex] from bool_complex::@1 + [44] if((bool) bool_complex::o2#0) goto bool_complex::@2 + to:bool_complex::@7 +bool_complex::@9: scope:[bool_complex] from bool_complex::@7 + [45] if((bool) bool_complex::o2#0) goto bool_complex::@4 + to:bool_complex::@2 + +GRAPH (NEW VERSIONS for bool_and::$1) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call bool_and + to:main::@1 +main::@1: scope:[main] from main + [1] call bool_or + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call bool_not + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call bool_complex + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +bool_and: scope:[bool_and] from main + to:bool_and::@1 +bool_and::@1: scope:[bool_and] from bool_and bool_and::@3 + [5] (byte) bool_and::i#2 ← phi( bool_and/(const byte) bool_and::i#0 bool_and::@3/(byte) bool_and::i#1 ) + [6] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 + [7] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_and::@2: scope:[bool_and] from bool_and::@7 + (byte) bool_and::i#6 ← phi( bool_and::@7/(byte) bool_and::i#9 ) + [8] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#6) ← (byte) '*' + to:bool_and::@3 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@7 + (byte) bool_and::i#7 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@7/(byte) bool_and::i#9 ) + [9] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#7) ← (byte) ' ' + to:bool_and::@3 +bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 + (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#6 bool_and::@4/(byte) bool_and::i#7 ) + [10] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 + [11] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 + to:bool_and::@return +bool_and::@return: scope:[bool_and] from bool_and::@3 + [12] return + to:@return +bool_or: scope:[bool_or] from main::@1 + to:bool_or::@1 +bool_or::@1: scope:[bool_or] from bool_or bool_or::@3 + [13] (byte) bool_or::i#2 ← phi( bool_or/(const byte) bool_or::i#0 bool_or::@3/(byte) bool_or::i#1 ) + [14] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 + [15] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 + to:bool_or::@7 +bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7 + [16] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' + to:bool_or::@3 +bool_or::@4: scope:[bool_or] from bool_or::@7 + [17] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' + to:bool_or::@3 +bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 + [18] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 + [19] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + to:bool_or::@return +bool_or::@return: scope:[bool_or] from bool_or::@3 + [20] return + to:@return +bool_not: scope:[bool_not] from main::@2 + to:bool_not::@1 +bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 + [21] (byte) bool_not::i#2 ← phi( bool_not/(const byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 ) + [22] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 + [23] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 + to:bool_not::@7 +bool_not::@2: scope:[bool_not] from bool_not::@7 + [24] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' + to:bool_not::@3 +bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7 + [25] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' + to:bool_not::@3 +bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 + [26] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 + [27] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + to:bool_not::@return +bool_not::@return: scope:[bool_not] from bool_not::@3 + [28] return + to:@return +bool_complex: scope:[bool_complex] from main::@3 + to:bool_complex::@1 +bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3 + [29] (byte) bool_complex::i#2 ← phi( bool_complex/(const byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 ) + [30] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a + [31] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 + [32] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 + [33] if((bool) bool_complex::o1#0) goto bool_complex::@8 + to:bool_complex::@7 +bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9 + [34] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' + to:bool_complex::@3 +bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9 + [35] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' + to:bool_complex::@3 +bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4 + [36] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 + [37] if((byte) bool_complex::i#1!=(byte) $15) goto bool_complex::@1 + to:bool_complex::@return +bool_complex::@return: scope:[bool_complex] from bool_complex::@3 + [38] return + to:@return +@5: scope:[] from @begin + [39] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +bool_and::@7: scope:[bool_and] from bool_and::@1 + (var) bool_and::$5 ← phi( ) + (byte) bool_and::i#9 ← phi( bool_and::@1/(byte) bool_and::i#2 ) + [40] if((var) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_or::@7: scope:[bool_or] from bool_or::@1 + [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_not::@7: scope:[bool_not] from bool_not::@1 + [42] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8 + [43] if((bool) bool_complex::o1#0) goto bool_complex::@4 + to:bool_complex::@9 +bool_complex::@8: scope:[bool_complex] from bool_complex::@1 + [44] if((bool) bool_complex::o2#0) goto bool_complex::@2 + to:bool_complex::@7 +bool_complex::@9: scope:[bool_complex] from bool_complex::@7 + [45] if((bool) bool_complex::o2#0) goto bool_complex::@4 + to:bool_complex::@2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for bool_or::i#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call bool_and + to:main::@1 +main::@1: scope:[main] from main + [1] call bool_or + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call bool_not + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call bool_complex + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +bool_and: scope:[bool_and] from main + to:bool_and::@1_1 +bool_and::@1: scope:[bool_and] from bool_and::@3 + [5] (byte) bool_and::i#2 ← phi( bool_and::@3/(byte) bool_and::i#1 ) + [6] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 + [7] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_and::@2: scope:[bool_and] from bool_and::@7 + (byte) bool_and::i#6 ← phi( bool_and::@7/(byte) bool_and::i#9 ) + [8] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#6) ← (byte) '*' + to:bool_and::@3 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@1_1 bool_and::@7 + (byte) bool_and::i#7 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 bool_and::@7/(byte) bool_and::i#9 ) + [9] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#7) ← (byte) ' ' + to:bool_and::@3 +bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 + (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#6 bool_and::@4/(byte) bool_and::i#7 ) + [10] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 + [11] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 + to:bool_and::@return +bool_and::@return: scope:[bool_and] from bool_and::@3 + [12] return + to:@return +bool_or: scope:[bool_or] from main::@1 + to:bool_or::@1 +bool_or::@1: scope:[bool_or] from bool_or bool_or::@3 + [13] (byte) bool_or::i#2 ← phi( bool_or/(const byte) bool_or::i#0 bool_or::@3/(byte) bool_or::i#1 ) + [14] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 + [15] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 + to:bool_or::@7 +bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7 + (byte) bool_or::i#6 ← phi( ) + [16] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' + to:bool_or::@3 +bool_or::@4: scope:[bool_or] from bool_or::@7 + (byte) bool_or::i#7 ← phi( ) + [17] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#7) ← (byte) ' ' + to:bool_or::@3 +bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 + (byte) bool_or::i#8 ← phi( ) + [18] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 + [19] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + to:bool_or::@return +bool_or::@return: scope:[bool_or] from bool_or::@3 + [20] return + to:@return +bool_not: scope:[bool_not] from main::@2 + to:bool_not::@1 +bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 + [21] (byte) bool_not::i#2 ← phi( bool_not/(const byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 ) + [22] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 + [23] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 + to:bool_not::@7 +bool_not::@2: scope:[bool_not] from bool_not::@7 + [24] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' + to:bool_not::@3 +bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7 + [25] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' + to:bool_not::@3 +bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 + [26] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 + [27] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + to:bool_not::@return +bool_not::@return: scope:[bool_not] from bool_not::@3 + [28] return + to:@return +bool_complex: scope:[bool_complex] from main::@3 + to:bool_complex::@1 +bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3 + [29] (byte) bool_complex::i#2 ← phi( bool_complex/(const byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 ) + [30] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a + [31] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 + [32] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 + [33] if((bool) bool_complex::o1#0) goto bool_complex::@8 + to:bool_complex::@7 +bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9 + [34] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' + to:bool_complex::@3 +bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9 + [35] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' + to:bool_complex::@3 +bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4 + [36] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 + [37] if((byte) bool_complex::i#1!=(byte) $15) goto bool_complex::@1 + to:bool_complex::@return +bool_complex::@return: scope:[bool_complex] from bool_complex::@3 + [38] return + to:@return +@5: scope:[] from @begin + [39] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +bool_and::@7: scope:[bool_and] from bool_and::@1 bool_and::@1_1 + (var) bool_and::$5 ← phi( bool_and::@1/(byte~) bool_and::$1 bool_and::@1_1/(byte~) bool_and::$6 ) + (byte) bool_and::i#9 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 ) + [40] if((var) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_or::@7: scope:[bool_or] from bool_or::@1 + [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_not::@7: scope:[bool_not] from bool_not::@1 + [42] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8 + [43] if((bool) bool_complex::o1#0) goto bool_complex::@4 + to:bool_complex::@9 +bool_complex::@8: scope:[bool_complex] from bool_complex::@1 + [44] if((bool) bool_complex::o2#0) goto bool_complex::@2 + to:bool_complex::@7 +bool_complex::@9: scope:[bool_complex] from bool_complex::@7 + [45] if((bool) bool_complex::o2#0) goto bool_complex::@4 + to:bool_complex::@2 +bool_and::@1_1: scope:[bool_and] from bool_and + (byte) bool_and::i#10 ← phi( bool_and/(const byte) bool_and::i#0 ) + (byte~) bool_and::$6 ← (byte) bool_and::i#10 & (byte) 1 + if((byte) bool_and::i#10>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 + +GRAPH (NEW VERSIONS for bool_or::$1) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call bool_and + to:main::@1 +main::@1: scope:[main] from main + [1] call bool_or + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call bool_not + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call bool_complex + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +bool_and: scope:[bool_and] from main + to:bool_and::@1_1 +bool_and::@1: scope:[bool_and] from bool_and::@3 + [5] (byte) bool_and::i#2 ← phi( bool_and::@3/(byte) bool_and::i#1 ) + [6] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 + [7] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_and::@2: scope:[bool_and] from bool_and::@7 + (byte) bool_and::i#6 ← phi( bool_and::@7/(byte) bool_and::i#9 ) + [8] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#6) ← (byte) '*' + to:bool_and::@3 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@1_1 bool_and::@7 + (byte) bool_and::i#7 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 bool_and::@7/(byte) bool_and::i#9 ) + [9] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#7) ← (byte) ' ' + to:bool_and::@3 +bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 + (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#6 bool_and::@4/(byte) bool_and::i#7 ) + [10] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 + [11] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 + to:bool_and::@return +bool_and::@return: scope:[bool_and] from bool_and::@3 + [12] return + to:@return +bool_or: scope:[bool_or] from main::@1 + to:bool_or::@1 +bool_or::@1: scope:[bool_or] from bool_or bool_or::@3 + [13] (byte) bool_or::i#2 ← phi( bool_or/(const byte) bool_or::i#0 bool_or::@3/(byte) bool_or::i#1 ) + [14] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 + [15] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 + to:bool_or::@7 +bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7 + (byte) bool_or::i#6 ← phi( bool_or::@1/(byte) bool_or::i#2 bool_or::@7/(byte) bool_or::i#9 ) + [16] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' + to:bool_or::@3 +bool_or::@4: scope:[bool_or] from bool_or::@7 + (byte) bool_or::i#7 ← phi( bool_or::@7/(byte) bool_or::i#9 ) + [17] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#7) ← (byte) ' ' + to:bool_or::@3 +bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 + (byte) bool_or::i#8 ← phi( bool_or::@2/(byte) bool_or::i#6 bool_or::@4/(byte) bool_or::i#7 ) + [18] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 + [19] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + to:bool_or::@return +bool_or::@return: scope:[bool_or] from bool_or::@3 + [20] return + to:@return +bool_not: scope:[bool_not] from main::@2 + to:bool_not::@1 +bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 + [21] (byte) bool_not::i#2 ← phi( bool_not/(const byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 ) + [22] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 + [23] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 + to:bool_not::@7 +bool_not::@2: scope:[bool_not] from bool_not::@7 + [24] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' + to:bool_not::@3 +bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7 + [25] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' + to:bool_not::@3 +bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 + [26] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 + [27] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + to:bool_not::@return +bool_not::@return: scope:[bool_not] from bool_not::@3 + [28] return + to:@return +bool_complex: scope:[bool_complex] from main::@3 + to:bool_complex::@1 +bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3 + [29] (byte) bool_complex::i#2 ← phi( bool_complex/(const byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 ) + [30] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a + [31] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 + [32] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 + [33] if((bool) bool_complex::o1#0) goto bool_complex::@8 + to:bool_complex::@7 +bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9 + [34] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' + to:bool_complex::@3 +bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9 + [35] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' + to:bool_complex::@3 +bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4 + [36] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 + [37] if((byte) bool_complex::i#1!=(byte) $15) goto bool_complex::@1 + to:bool_complex::@return +bool_complex::@return: scope:[bool_complex] from bool_complex::@3 + [38] return + to:@return +@5: scope:[] from @begin + [39] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +bool_and::@7: scope:[bool_and] from bool_and::@1 bool_and::@1_1 + (var) bool_and::$5 ← phi( bool_and::@1/(byte~) bool_and::$1 bool_and::@1_1/(byte~) bool_and::$6 ) + (byte) bool_and::i#9 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 ) + [40] if((var) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_or::@7: scope:[bool_or] from bool_or::@1 + (var) bool_or::$5 ← phi( ) + (byte) bool_or::i#9 ← phi( bool_or::@1/(byte) bool_or::i#2 ) + [41] if((var) bool_or::$5==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_not::@7: scope:[bool_not] from bool_not::@1 + [42] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8 + [43] if((bool) bool_complex::o1#0) goto bool_complex::@4 + to:bool_complex::@9 +bool_complex::@8: scope:[bool_complex] from bool_complex::@1 + [44] if((bool) bool_complex::o2#0) goto bool_complex::@2 + to:bool_complex::@7 +bool_complex::@9: scope:[bool_complex] from bool_complex::@7 + [45] if((bool) bool_complex::o2#0) goto bool_complex::@4 + to:bool_complex::@2 +bool_and::@1_1: scope:[bool_and] from bool_and + (byte) bool_and::i#10 ← phi( bool_and/(const byte) bool_and::i#0 ) + (byte~) bool_and::$6 ← (byte) bool_and::i#10 & (byte) 1 + if((byte) bool_and::i#10>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for bool_not::i#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call bool_and + to:main::@1 +main::@1: scope:[main] from main + [1] call bool_or + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call bool_not + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call bool_complex + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +bool_and: scope:[bool_and] from main + to:bool_and::@1_1 +bool_and::@1: scope:[bool_and] from bool_and::@3 + [5] (byte) bool_and::i#2 ← phi( bool_and::@3/(byte) bool_and::i#1 ) + [6] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 + [7] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_and::@2: scope:[bool_and] from bool_and::@7 + (byte) bool_and::i#6 ← phi( bool_and::@7/(byte) bool_and::i#9 ) + [8] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#6) ← (byte) '*' + to:bool_and::@3 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@1_1 bool_and::@7 + (byte) bool_and::i#7 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 bool_and::@7/(byte) bool_and::i#9 ) + [9] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#7) ← (byte) ' ' + to:bool_and::@3 +bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 + (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#6 bool_and::@4/(byte) bool_and::i#7 ) + [10] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 + [11] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 + to:bool_and::@return +bool_and::@return: scope:[bool_and] from bool_and::@3 + [12] return + to:@return +bool_or: scope:[bool_or] from main::@1 + to:bool_or::@1_1 +bool_or::@1: scope:[bool_or] from bool_or::@3 + [13] (byte) bool_or::i#2 ← phi( bool_or::@3/(byte) bool_or::i#1 ) + [14] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 + [15] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 + to:bool_or::@7 +bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@1_1 bool_or::@7 + (byte) bool_or::i#6 ← phi( bool_or::@1/(byte) bool_or::i#2 bool_or::@1_1/(byte) bool_or::i#10 bool_or::@7/(byte) bool_or::i#9 ) + [16] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' + to:bool_or::@3 +bool_or::@4: scope:[bool_or] from bool_or::@7 + (byte) bool_or::i#7 ← phi( bool_or::@7/(byte) bool_or::i#9 ) + [17] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#7) ← (byte) ' ' + to:bool_or::@3 +bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 + (byte) bool_or::i#8 ← phi( bool_or::@2/(byte) bool_or::i#6 bool_or::@4/(byte) bool_or::i#7 ) + [18] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 + [19] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + to:bool_or::@return +bool_or::@return: scope:[bool_or] from bool_or::@3 + [20] return + to:@return +bool_not: scope:[bool_not] from main::@2 + to:bool_not::@1 +bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 + [21] (byte) bool_not::i#2 ← phi( bool_not/(const byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 ) + [22] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 + [23] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 + to:bool_not::@7 +bool_not::@2: scope:[bool_not] from bool_not::@7 + (byte) bool_not::i#6 ← phi( ) + [24] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#6) ← (byte) '*' + to:bool_not::@3 +bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7 + (byte) bool_not::i#7 ← phi( ) + [25] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' + to:bool_not::@3 +bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 + (byte) bool_not::i#8 ← phi( ) + [26] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 + [27] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + to:bool_not::@return +bool_not::@return: scope:[bool_not] from bool_not::@3 + [28] return + to:@return +bool_complex: scope:[bool_complex] from main::@3 + to:bool_complex::@1 +bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3 + [29] (byte) bool_complex::i#2 ← phi( bool_complex/(const byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 ) + [30] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a + [31] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 + [32] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 + [33] if((bool) bool_complex::o1#0) goto bool_complex::@8 + to:bool_complex::@7 +bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9 + [34] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' + to:bool_complex::@3 +bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9 + [35] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' + to:bool_complex::@3 +bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4 + [36] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 + [37] if((byte) bool_complex::i#1!=(byte) $15) goto bool_complex::@1 + to:bool_complex::@return +bool_complex::@return: scope:[bool_complex] from bool_complex::@3 + [38] return + to:@return +@5: scope:[] from @begin + [39] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +bool_and::@7: scope:[bool_and] from bool_and::@1 bool_and::@1_1 + (var) bool_and::$5 ← phi( bool_and::@1/(byte~) bool_and::$1 bool_and::@1_1/(byte~) bool_and::$6 ) + (byte) bool_and::i#9 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 ) + [40] if((var) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_or::@7: scope:[bool_or] from bool_or::@1 bool_or::@1_1 + (var) bool_or::$5 ← phi( bool_or::@1/(byte~) bool_or::$1 bool_or::@1_1/(byte~) bool_or::$6 ) + (byte) bool_or::i#9 ← phi( bool_or::@1/(byte) bool_or::i#2 bool_or::@1_1/(byte) bool_or::i#10 ) + [41] if((var) bool_or::$5==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_not::@7: scope:[bool_not] from bool_not::@1 + [42] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8 + [43] if((bool) bool_complex::o1#0) goto bool_complex::@4 + to:bool_complex::@9 +bool_complex::@8: scope:[bool_complex] from bool_complex::@1 + [44] if((bool) bool_complex::o2#0) goto bool_complex::@2 + to:bool_complex::@7 +bool_complex::@9: scope:[bool_complex] from bool_complex::@7 + [45] if((bool) bool_complex::o2#0) goto bool_complex::@4 + to:bool_complex::@2 +bool_and::@1_1: scope:[bool_and] from bool_and + (byte) bool_and::i#10 ← phi( bool_and/(const byte) bool_and::i#0 ) + (byte~) bool_and::$6 ← (byte) bool_and::i#10 & (byte) 1 + if((byte) bool_and::i#10>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_or::@1_1: scope:[bool_or] from bool_or + (byte) bool_or::i#10 ← phi( bool_or/(const byte) bool_or::i#0 ) + (byte~) bool_or::$6 ← (byte) bool_or::i#10 & (byte) 1 + if((byte) bool_or::i#10<(byte) $a) goto bool_or::@2 + to:bool_or::@7 + +GRAPH (NEW VERSIONS for bool_not::$1) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call bool_and + to:main::@1 +main::@1: scope:[main] from main + [1] call bool_or + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call bool_not + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call bool_complex + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +bool_and: scope:[bool_and] from main + to:bool_and::@1_1 +bool_and::@1: scope:[bool_and] from bool_and::@3 + [5] (byte) bool_and::i#2 ← phi( bool_and::@3/(byte) bool_and::i#1 ) + [6] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 + [7] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_and::@2: scope:[bool_and] from bool_and::@7 + (byte) bool_and::i#6 ← phi( bool_and::@7/(byte) bool_and::i#9 ) + [8] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#6) ← (byte) '*' + to:bool_and::@3 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@1_1 bool_and::@7 + (byte) bool_and::i#7 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 bool_and::@7/(byte) bool_and::i#9 ) + [9] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#7) ← (byte) ' ' + to:bool_and::@3 +bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 + (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#6 bool_and::@4/(byte) bool_and::i#7 ) + [10] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 + [11] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 + to:bool_and::@return +bool_and::@return: scope:[bool_and] from bool_and::@3 + [12] return + to:@return +bool_or: scope:[bool_or] from main::@1 + to:bool_or::@1_1 +bool_or::@1: scope:[bool_or] from bool_or::@3 + [13] (byte) bool_or::i#2 ← phi( bool_or::@3/(byte) bool_or::i#1 ) + [14] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 + [15] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 + to:bool_or::@7 +bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@1_1 bool_or::@7 + (byte) bool_or::i#6 ← phi( bool_or::@1/(byte) bool_or::i#2 bool_or::@1_1/(byte) bool_or::i#10 bool_or::@7/(byte) bool_or::i#9 ) + [16] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' + to:bool_or::@3 +bool_or::@4: scope:[bool_or] from bool_or::@7 + (byte) bool_or::i#7 ← phi( bool_or::@7/(byte) bool_or::i#9 ) + [17] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#7) ← (byte) ' ' + to:bool_or::@3 +bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 + (byte) bool_or::i#8 ← phi( bool_or::@2/(byte) bool_or::i#6 bool_or::@4/(byte) bool_or::i#7 ) + [18] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 + [19] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + to:bool_or::@return +bool_or::@return: scope:[bool_or] from bool_or::@3 + [20] return + to:@return +bool_not: scope:[bool_not] from main::@2 + to:bool_not::@1 +bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 + [21] (byte) bool_not::i#2 ← phi( bool_not/(const byte) bool_not::i#0 bool_not::@3/(byte) bool_not::i#1 ) + [22] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 + [23] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 + to:bool_not::@7 +bool_not::@2: scope:[bool_not] from bool_not::@7 + (byte) bool_not::i#6 ← phi( bool_not::@7/(byte) bool_not::i#9 ) + [24] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#6) ← (byte) '*' + to:bool_not::@3 +bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7 + (byte) bool_not::i#7 ← phi( bool_not::@1/(byte) bool_not::i#2 bool_not::@7/(byte) bool_not::i#9 ) + [25] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' + to:bool_not::@3 +bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 + (byte) bool_not::i#8 ← phi( bool_not::@2/(byte) bool_not::i#6 bool_not::@4/(byte) bool_not::i#7 ) + [26] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 + [27] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + to:bool_not::@return +bool_not::@return: scope:[bool_not] from bool_not::@3 + [28] return + to:@return +bool_complex: scope:[bool_complex] from main::@3 + to:bool_complex::@1 +bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3 + [29] (byte) bool_complex::i#2 ← phi( bool_complex/(const byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 ) + [30] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a + [31] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 + [32] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 + [33] if((bool) bool_complex::o1#0) goto bool_complex::@8 + to:bool_complex::@7 +bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9 + [34] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' + to:bool_complex::@3 +bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9 + [35] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' + to:bool_complex::@3 +bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4 + [36] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 + [37] if((byte) bool_complex::i#1!=(byte) $15) goto bool_complex::@1 + to:bool_complex::@return +bool_complex::@return: scope:[bool_complex] from bool_complex::@3 + [38] return + to:@return +@5: scope:[] from @begin + [39] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +bool_and::@7: scope:[bool_and] from bool_and::@1 bool_and::@1_1 + (var) bool_and::$5 ← phi( bool_and::@1/(byte~) bool_and::$1 bool_and::@1_1/(byte~) bool_and::$6 ) + (byte) bool_and::i#9 ← phi( bool_and::@1/(byte) bool_and::i#2 bool_and::@1_1/(byte) bool_and::i#10 ) + [40] if((var) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_or::@7: scope:[bool_or] from bool_or::@1 bool_or::@1_1 + (var) bool_or::$5 ← phi( bool_or::@1/(byte~) bool_or::$1 bool_or::@1_1/(byte~) bool_or::$6 ) + (byte) bool_or::i#9 ← phi( bool_or::@1/(byte) bool_or::i#2 bool_or::@1_1/(byte) bool_or::i#10 ) + [41] if((var) bool_or::$5==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_not::@7: scope:[bool_not] from bool_not::@1 + (var) bool_not::$6 ← phi( ) + (byte) bool_not::i#9 ← phi( bool_not::@1/(byte) bool_not::i#2 ) + [42] if((var) bool_not::$6==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8 + [43] if((bool) bool_complex::o1#0) goto bool_complex::@4 + to:bool_complex::@9 +bool_complex::@8: scope:[bool_complex] from bool_complex::@1 + [44] if((bool) bool_complex::o2#0) goto bool_complex::@2 + to:bool_complex::@7 +bool_complex::@9: scope:[bool_complex] from bool_complex::@7 + [45] if((bool) bool_complex::o2#0) goto bool_complex::@4 + to:bool_complex::@2 +bool_and::@1_1: scope:[bool_and] from bool_and + (byte) bool_and::i#10 ← phi( bool_and/(const byte) bool_and::i#0 ) + (byte~) bool_and::$6 ← (byte) bool_and::i#10 & (byte) 1 + if((byte) bool_and::i#10>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_or::@1_1: scope:[bool_or] from bool_or + (byte) bool_or::i#10 ← phi( bool_or/(const byte) bool_or::i#0 ) + (byte~) bool_or::$6 ← (byte) bool_or::i#10 & (byte) 1 + if((byte) bool_or::i#10<(byte) $a) goto bool_or::@2 + to:bool_or::@7 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) bool_and::i#1 = (byte) bool_and::i#2 +Alias (byte) bool_and::i#6 = (byte) bool_and::i#9 +Alias (byte) bool_or::i#1 = (byte) bool_or::i#2 +Alias (byte) bool_or::i#7 = (byte) bool_or::i#9 +Alias (byte) bool_not::i#1 = (byte) bool_not::i#2 +Alias (byte) bool_not::i#6 = (byte) bool_not::i#9 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) bool_and::i#10 (const byte) bool_and::i#0 +Identical Phi Values (byte) bool_or::i#10 (const byte) bool_or::i#0 +Identical Phi Values (byte) bool_not::i#10 (const byte) bool_not::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [59] (byte~) bool_and::$6 ← (const byte) bool_and::i#0 & (byte) 1 +Constant right-side identified [62] (byte~) bool_or::$6 ← (const byte) bool_or::i#0 & (byte) 1 +Constant right-side identified [65] (byte~) bool_not::$7 ← (const byte) bool_not::i#0 & (byte) 1 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) bool_and::$6 = bool_and::i#0&1 +Constant (const byte) bool_or::$6 = bool_or::i#0&1 +Constant (const byte) bool_not::$7 = bool_not::i#0&1 +Successful SSA optimization Pass2ConstantIdentification +Removing PHI-reference to removed block (bool_and::@1_1) in block bool_and::@4 +if() condition always false - eliminating [60] if((const byte) bool_and::i#0>=(byte) $a) goto bool_and::@4 +Removing PHI-reference to removed block (bool_or::@1_1) in block bool_or::@7 +Removing PHI-reference to removed block (bool_or::@1_1) in block bool_or::@7 +if() condition always true - replacing block destination [63] if((const byte) bool_or::i#0<(byte) $a) goto bool_or::@2 +Removing PHI-reference to removed block (bool_not::@1_1) in block bool_not::@7 +Removing PHI-reference to removed block (bool_not::@1_1) in block bool_not::@7 +if() condition always true - replacing block destination [66] if((const byte) bool_not::i#0<(byte) $a) goto bool_not::@4 +Successful SSA optimization Pass2ConstantIfs +Simplifying constant evaluating to zero (const byte) bool_and::i#0&(byte) 1 in +Simplifying constant evaluating to zero (const byte) bool_or::i#0&(byte) 1 in +Simplifying constant evaluating to zero (const byte) bool_not::i#0&(byte) 1 in +Successful SSA optimization PassNSimplifyConstantZero +Eliminating unused constant (const byte) bool_or::$6 +Eliminating unused constant (const byte) bool_not::$7 +Successful SSA optimization PassNEliminateUnusedVars +GRAPH (NEW VERSIONS for bool_and::i#6) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call bool_and + to:main::@1 +main::@1: scope:[main] from main + [1] call bool_or + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call bool_not + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call bool_complex + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +bool_and: scope:[bool_and] from main + to:bool_and::@1_1 +bool_and::@1: scope:[bool_and] from bool_and::@3 + [5] (byte~) bool_and::$1 ← (byte) bool_and::i#1 & (byte) 1 + [6] if((byte) bool_and::i#1>=(byte) $a) goto bool_and::@4 + to:bool_and::@7 +bool_and::@2: scope:[bool_and] from bool_and::@7 + (byte) bool_and::i#11 ← phi( ) + [7] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' + to:bool_and::@3 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@7 + [8] (byte) bool_and::i#7 ← phi( bool_and::@1/(byte) bool_and::i#1 bool_and::@7/(byte) bool_and::i#6 ) + [9] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#7) ← (byte) ' ' + to:bool_and::@3 +bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 + [10] (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#11 bool_and::@4/(byte) bool_and::i#7 ) + [11] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 + [12] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 + to:bool_and::@return +bool_and::@return: scope:[bool_and] from bool_and::@3 + [13] return + to:@return +bool_or: scope:[bool_or] from main::@1 + to:bool_or::@1_1 +bool_or::@1: scope:[bool_or] from bool_or::@3 + [14] (byte~) bool_or::$1 ← (byte) bool_or::i#1 & (byte) 1 + [15] if((byte) bool_or::i#1<(byte) $a) goto bool_or::@2 + to:bool_or::@7 +bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@1_1 bool_or::@7 + [16] (byte) bool_or::i#6 ← phi( bool_or::@1/(byte) bool_or::i#1 bool_or::@1_1/(const byte) bool_or::i#0 bool_or::@7/(byte) bool_or::i#7 ) + [17] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' + to:bool_or::@3 +bool_or::@4: scope:[bool_or] from bool_or::@7 + [18] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#7) ← (byte) ' ' + to:bool_or::@3 +bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 + [19] (byte) bool_or::i#8 ← phi( bool_or::@2/(byte) bool_or::i#6 bool_or::@4/(byte) bool_or::i#7 ) + [20] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 + [21] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + to:bool_or::@return +bool_or::@return: scope:[bool_or] from bool_or::@3 + [22] return + to:@return +bool_not: scope:[bool_not] from main::@2 + to:bool_not::@1_1 +bool_not::@1: scope:[bool_not] from bool_not::@3 + [23] (byte~) bool_not::$1 ← (byte) bool_not::i#1 & (byte) 1 + [24] if((byte) bool_not::i#1<(byte) $a) goto bool_not::@4 + to:bool_not::@7 +bool_not::@2: scope:[bool_not] from bool_not::@7 + [25] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#6) ← (byte) '*' + to:bool_not::@3 +bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@1_1 bool_not::@7 + [26] (byte) bool_not::i#7 ← phi( bool_not::@1/(byte) bool_not::i#1 bool_not::@1_1/(const byte) bool_not::i#0 bool_not::@7/(byte) bool_not::i#6 ) + [27] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' + to:bool_not::@3 +bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 + [28] (byte) bool_not::i#8 ← phi( bool_not::@2/(byte) bool_not::i#6 bool_not::@4/(byte) bool_not::i#7 ) + [29] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 + [30] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + to:bool_not::@return +bool_not::@return: scope:[bool_not] from bool_not::@3 + [31] return + to:@return +bool_complex: scope:[bool_complex] from main::@3 + to:bool_complex::@1 +bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3 + [32] (byte) bool_complex::i#2 ← phi( bool_complex/(const byte) bool_complex::i#0 bool_complex::@3/(byte) bool_complex::i#1 ) + [33] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a + [34] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 + [35] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 + [36] if((bool) bool_complex::o1#0) goto bool_complex::@8 + to:bool_complex::@7 +bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9 + [37] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' + to:bool_complex::@3 +bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9 + [38] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' + to:bool_complex::@3 +bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4 + [39] (byte) bool_complex::i#1 ← ++ (byte) bool_complex::i#2 + [40] if((byte) bool_complex::i#1!=(byte) $15) goto bool_complex::@1 + to:bool_complex::@return +bool_complex::@return: scope:[bool_complex] from bool_complex::@3 + [41] return + to:@return +@5: scope:[] from @begin + [42] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +bool_and::@7: scope:[bool_and] from bool_and::@1 bool_and::@1_1 + [43] (byte~) bool_and::$5 ← phi( bool_and::@1/(byte~) bool_and::$1 bool_and::@1_1/(const byte) bool_and::$6 ) + [43] (byte) bool_and::i#6 ← phi( bool_and::@1/(byte) bool_and::i#1 bool_and::@1_1/(const byte) bool_and::i#0 ) + [44] if((byte~) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_or::@7: scope:[bool_or] from bool_or::@1 + [45] (byte~) bool_or::$5 ← phi( bool_or::@1/(byte~) bool_or::$1 ) + [45] (byte) bool_or::i#7 ← phi( bool_or::@1/(byte) bool_or::i#1 ) + [46] if((byte~) bool_or::$5==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_not::@7: scope:[bool_not] from bool_not::@1 + [47] (byte~) bool_not::$6 ← phi( bool_not::@1/(byte~) bool_not::$1 ) + [47] (byte) bool_not::i#6 ← phi( bool_not::@1/(byte) bool_not::i#1 ) + [48] if((byte~) bool_not::$6==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8 + [49] if((bool) bool_complex::o1#0) goto bool_complex::@4 + to:bool_complex::@9 +bool_complex::@8: scope:[bool_complex] from bool_complex::@1 + [50] if((bool) bool_complex::o2#0) goto bool_complex::@2 + to:bool_complex::@7 +bool_complex::@9: scope:[bool_complex] from bool_complex::@7 + [51] if((bool) bool_complex::o2#0) goto bool_complex::@4 + to:bool_complex::@2 +bool_and::@1_1: scope:[bool_and] from bool_and + to:bool_and::@7 +bool_or::@1_1: scope:[bool_or] from bool_or + to:bool_or::@2 +bool_not::@1_1: scope:[bool_not] from bool_not + to:bool_not::@4 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) bool_and::i#1 = (byte) bool_and::i#6 +Alias (byte~) bool_and::$5 = (byte~) bool_and::$1 +Alias (byte) bool_or::i#1 = (byte) bool_or::i#7 +Alias (byte~) bool_or::$5 = (byte~) bool_or::$1 +Alias (byte) bool_not::i#1 = (byte) bool_not::i#6 +Alias (byte~) bool_not::$6 = (byte~) bool_not::$1 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) bool_and::i#12 (const byte) bool_and::i#0 +Identical Phi Values (byte~) bool_and::$7 (const byte) bool_and::$6 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (bool_and::@7_1) in block bool_and::@4 +if() condition always true - replacing block destination [54] if((const byte) bool_and::$6==(byte) 0) goto bool_and::@2 +Successful SSA optimization Pass2ConstantIfs +Eliminating unused constant (const byte) bool_and::$6 +Successful SSA optimization PassNEliminateUnusedVars +Alias (byte) bool_and::i#1 = (byte) bool_and::i#7 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) bool_and::i#0 Inlining constant with var siblings (const byte) bool_or::i#0 Inlining constant with var siblings (const byte) bool_not::i#0 @@ -446,9 +1491,11 @@ Constant inlined bool_or::i#0 = (byte) 0 Constant inlined bool_not::i#0 = (byte) 0 Constant inlined bool_and::i#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting bool_and::@8(between bool_and::@3 and bool_and::@1) -Added new block during phi lifting bool_or::@8(between bool_or::@3 and bool_or::@1) -Added new block during phi lifting bool_not::@8(between bool_not::@3 and bool_not::@1) +Added new block during phi lifting bool_and::@8(between bool_and::@7 and bool_and::@2) +Added new block during phi lifting bool_or::@8(between bool_or::@1 and bool_or::@2) +Added new block during phi lifting bool_or::@9(between bool_or::@7 and bool_or::@2) +Added new block during phi lifting bool_not::@8(between bool_not::@1 and bool_not::@4) +Added new block during phi lifting bool_not::@9(between bool_not::@7 and bool_not::@4) Added new block during phi lifting bool_complex::@10(between bool_complex::@3 and bool_complex::@1) Adding NOP phi() at start of @begin Adding NOP phi() at start of @5 @@ -461,23 +1508,41 @@ Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::@4 Adding NOP phi() at start of bool_complex Adding NOP phi() at start of bool_not +Adding NOP phi() at start of bool_not::@1_1 Adding NOP phi() at start of bool_or +Adding NOP phi() at start of bool_or::@1_1 Adding NOP phi() at start of bool_and +Adding NOP phi() at start of bool_and::@1_1 +Adding NOP phi() at start of bool_and::@7_1 CALL GRAPH Calls in [] to main:2 Calls in [main] to bool_and:6 bool_or:8 bool_not:10 bool_complex:12 -Created 4 initial phi equivalence classes +Created 7 initial phi equivalence classes Coalesced [28] bool_complex::i#6 ← bool_complex::i#1 -Coalesced [39] bool_not::i#6 ← bool_not::i#1 -Coalesced [50] bool_or::i#6 ← bool_or::i#1 -Coalesced [61] bool_and::i#6 ← bool_and::i#1 +Coalesced [34] bool_not::i#14 ← bool_not::i#7 +Coalesced [43] bool_not::i#13 ← bool_not::i#1 +Coalesced (already) [44] bool_not::i#12 ← bool_not::i#1 +Coalesced (already) [45] bool_not::i#11 ← bool_not::i#1 +Coalesced [50] bool_or::i#13 ← bool_or::i#6 +Coalesced [59] bool_or::i#14 ← bool_or::i#1 +Coalesced (already) [60] bool_or::i#12 ← bool_or::i#1 +Coalesced (already) [61] bool_or::i#11 ← bool_or::i#1 +Coalesced [67] bool_and::i#14 ← bool_and::i#11 +Coalesced [76] bool_and::i#15 ← bool_and::i#1 +Coalesced (already) [77] bool_and::i#13 ← bool_and::i#1 Coalesced down to 4 phi equivalence classes Culled Empty Block (label) @6 Culled Empty Block (label) main::@4 Culled Empty Block (label) bool_complex::@10 +Culled Empty Block (label) bool_not::@1_1 +Culled Empty Block (label) bool_not::@9 Culled Empty Block (label) bool_not::@8 +Culled Empty Block (label) bool_or::@1_1 +Culled Empty Block (label) bool_or::@9 Culled Empty Block (label) bool_or::@8 +Culled Empty Block (label) bool_and::@1_1 +Culled Empty Block (label) bool_and::@7_1 Culled Empty Block (label) bool_and::@8 Renumbering block @5 to @1 Renumbering block bool_and::@7 to bool_and::@5 @@ -561,84 +1626,88 @@ bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7 to:bool_complex::@3 bool_not: scope:[bool_not] from main::@2 [27] phi() - to:bool_not::@1 -bool_not::@1: scope:[bool_not] from bool_not bool_not::@3 - [28] (byte) bool_not::i#2 ← phi( bool_not/(byte) 0 bool_not::@3/(byte) bool_not::i#1 ) - [29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 - [30] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 - to:bool_not::@5 -bool_not::@5: scope:[bool_not] from bool_not::@1 - [31] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 - to:bool_not::@2 -bool_not::@2: scope:[bool_not] from bool_not::@5 - [32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' + to:bool_not::@4 +bool_not::@4: scope:[bool_not] from bool_not bool_not::@1 bool_not::@5 + [28] (byte) bool_not::i#7 ← phi( bool_not::@1/(byte) bool_not::i#1 bool_not/(byte) 0 bool_not::@5/(byte) bool_not::i#1 ) + [29] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' to:bool_not::@3 bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 - [33] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 - [34] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 + [30] (byte) bool_not::i#8 ← phi( bool_not::@2/(byte) bool_not::i#1 bool_not::@4/(byte) bool_not::i#7 ) + [31] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 + [32] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 to:bool_not::@return bool_not::@return: scope:[bool_not] from bool_not::@3 - [35] return + [33] return to:@return -bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5 - [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' +bool_not::@1: scope:[bool_not] from bool_not::@3 + [34] (byte~) bool_not::$6 ← (byte) bool_not::i#1 & (byte) 1 + [35] if((byte) bool_not::i#1<(byte) $a) goto bool_not::@4 + to:bool_not::@5 +bool_not::@5: scope:[bool_not] from bool_not::@1 + [36] if((byte~) bool_not::$6==(byte) 0) goto bool_not::@4 + to:bool_not::@2 +bool_not::@2: scope:[bool_not] from bool_not::@5 + [37] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#1) ← (byte) '*' to:bool_not::@3 bool_or: scope:[bool_or] from main::@1 - [37] phi() - to:bool_or::@1 -bool_or::@1: scope:[bool_or] from bool_or bool_or::@3 - [38] (byte) bool_or::i#2 ← phi( bool_or/(byte) 0 bool_or::@3/(byte) bool_or::i#1 ) - [39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 - [40] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 - to:bool_or::@5 -bool_or::@5: scope:[bool_or] from bool_or::@1 - [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 - to:bool_or::@4 -bool_or::@4: scope:[bool_or] from bool_or::@5 - [42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' + [38] phi() + to:bool_or::@2 +bool_or::@2: scope:[bool_or] from bool_or bool_or::@1 bool_or::@5 + [39] (byte) bool_or::i#6 ← phi( bool_or::@1/(byte) bool_or::i#1 bool_or/(byte) 0 bool_or::@5/(byte) bool_or::i#1 ) + [40] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' to:bool_or::@3 bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 - [43] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 - [44] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 + [41] (byte) bool_or::i#8 ← phi( bool_or::@2/(byte) bool_or::i#6 bool_or::@4/(byte) bool_or::i#1 ) + [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 + [43] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 to:bool_or::@return bool_or::@return: scope:[bool_or] from bool_or::@3 - [45] return + [44] return to:@return -bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5 - [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' +bool_or::@1: scope:[bool_or] from bool_or::@3 + [45] (byte~) bool_or::$5 ← (byte) bool_or::i#1 & (byte) 1 + [46] if((byte) bool_or::i#1<(byte) $a) goto bool_or::@2 + to:bool_or::@5 +bool_or::@5: scope:[bool_or] from bool_or::@1 + [47] if((byte~) bool_or::$5==(byte) 0) goto bool_or::@2 + to:bool_or::@4 +bool_or::@4: scope:[bool_or] from bool_or::@5 + [48] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#1) ← (byte) ' ' to:bool_or::@3 bool_and: scope:[bool_and] from main - [47] phi() - to:bool_and::@1 -bool_and::@1: scope:[bool_and] from bool_and bool_and::@3 - [48] (byte) bool_and::i#2 ← phi( bool_and/(byte) 0 bool_and::@3/(byte) bool_and::i#1 ) - [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 - [50] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 - to:bool_and::@5 -bool_and::@5: scope:[bool_and] from bool_and::@1 - [51] if((byte~) bool_and::$1==(byte) 0) goto bool_and::@2 - to:bool_and::@4 -bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5 - [52] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' + [49] phi() + to:bool_and::@2 +bool_and::@2: scope:[bool_and] from bool_and bool_and::@5 + [50] (byte) bool_and::i#11 ← phi( bool_and::@5/(byte) bool_and::i#1 bool_and/(byte) 0 ) + [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' to:bool_and::@3 bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 - [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 + [52] (byte) bool_and::i#8 ← phi( bool_and::@2/(byte) bool_and::i#11 bool_and::@4/(byte) bool_and::i#1 ) + [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 [54] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 to:bool_and::@return bool_and::@return: scope:[bool_and] from bool_and::@3 [55] return to:@return -bool_and::@2: scope:[bool_and] from bool_and::@5 - [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' +bool_and::@1: scope:[bool_and] from bool_and::@3 + [56] (byte~) bool_and::$5 ← (byte) bool_and::i#1 & (byte) 1 + [57] if((byte) bool_and::i#1>=(byte) $a) goto bool_and::@4 + to:bool_and::@5 +bool_and::@5: scope:[bool_and] from bool_and::@1 + [58] if((byte~) bool_and::$5==(byte) 0) goto bool_and::@2 + to:bool_and::@4 +bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5 + [59] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#1) ← (byte) ' ' to:bool_and::@3 VARIABLE REGISTER WEIGHTS (void()) bool_and() -(byte~) bool_and::$1 11.0 +(byte~) bool_and::$5 101.0 (byte) bool_and::i -(byte) bool_and::i#1 16.5 -(byte) bool_and::i#2 11.0 +(byte) bool_and::i#1 117.83333333333331 +(byte) bool_and::i#11 61.5 +(byte) bool_and::i#8 213.0 (bool) bool_and::o1 (bool) bool_and::o2 (bool) bool_and::o3 @@ -657,19 +1726,21 @@ VARIABLE REGISTER WEIGHTS (bool) bool_complex::o5 (byte*) bool_complex::screen (void()) bool_not() -(byte~) bool_not::$1 11.0 +(byte~) bool_not::$6 101.0 (byte) bool_not::i -(byte) bool_not::i#1 16.5 -(byte) bool_not::i#2 11.0 +(byte) bool_not::i#1 134.66666666666666 +(byte) bool_not::i#7 112.0 +(byte) bool_not::i#8 213.0 (bool) bool_not::o1 (bool) bool_not::o2 (bool) bool_not::o3 (byte*) bool_not::screen (void()) bool_or() -(byte~) bool_or::$1 11.0 +(byte~) bool_or::$5 101.0 (byte) bool_or::i -(byte) bool_or::i#1 16.5 -(byte) bool_or::i#2 11.0 +(byte) bool_or::i#1 134.66666666666666 +(byte) bool_or::i#6 112.0 +(byte) bool_or::i#8 213.0 (bool) bool_or::o1 (bool) bool_or::o2 (bool) bool_or::o3 @@ -678,36 +1749,36 @@ VARIABLE REGISTER WEIGHTS Initial phi equivalence classes [ bool_complex::i#2 bool_complex::i#1 ] -[ bool_not::i#2 bool_not::i#1 ] -[ bool_or::i#2 bool_or::i#1 ] -[ bool_and::i#2 bool_and::i#1 ] +[ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] +[ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] +[ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] Added variable bool_complex::o1#0 to zero page equivalence class [ bool_complex::o1#0 ] Added variable bool_complex::$1 to zero page equivalence class [ bool_complex::$1 ] Added variable bool_complex::o2#0 to zero page equivalence class [ bool_complex::o2#0 ] -Added variable bool_not::$1 to zero page equivalence class [ bool_not::$1 ] -Added variable bool_or::$1 to zero page equivalence class [ bool_or::$1 ] -Added variable bool_and::$1 to zero page equivalence class [ bool_and::$1 ] +Added variable bool_not::$6 to zero page equivalence class [ bool_not::$6 ] +Added variable bool_or::$5 to zero page equivalence class [ bool_or::$5 ] +Added variable bool_and::$5 to zero page equivalence class [ bool_and::$5 ] Complete equivalence classes [ bool_complex::i#2 bool_complex::i#1 ] -[ bool_not::i#2 bool_not::i#1 ] -[ bool_or::i#2 bool_or::i#1 ] -[ bool_and::i#2 bool_and::i#1 ] +[ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] +[ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] +[ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] [ bool_complex::o1#0 ] [ bool_complex::$1 ] [ bool_complex::o2#0 ] -[ bool_not::$1 ] -[ bool_or::$1 ] -[ bool_and::$1 ] +[ bool_not::$6 ] +[ bool_or::$5 ] +[ bool_and::$5 ] Allocated zp ZP_BYTE:2 [ bool_complex::i#2 bool_complex::i#1 ] -Allocated zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ] -Allocated zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ] -Allocated zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ] +Allocated zp ZP_BYTE:3 [ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] +Allocated zp ZP_BYTE:4 [ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] +Allocated zp ZP_BYTE:5 [ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] Allocated zp ZP_BOOL:6 [ bool_complex::o1#0 ] Allocated zp ZP_BYTE:7 [ bool_complex::$1 ] Allocated zp ZP_BOOL:8 [ bool_complex::o2#0 ] -Allocated zp ZP_BYTE:9 [ bool_not::$1 ] -Allocated zp ZP_BYTE:10 [ bool_or::$1 ] -Allocated zp ZP_BYTE:11 [ bool_and::$1 ] +Allocated zp ZP_BYTE:9 [ bool_not::$6 ] +Allocated zp ZP_BYTE:10 [ bool_or::$5 ] +Allocated zp ZP_BYTE:11 [ bool_and::$5 ] INITIAL ASM Target platform is c64basic @@ -737,7 +1808,7 @@ bend: // main main: { // [5] call bool_and - // [47] phi from main to bool_and [phi:main->bool_and] + // [49] phi from main to bool_and [phi:main->bool_and] bool_and_from_main: jsr bool_and // [6] phi from main to main::@1 [phi:main->main::@1] @@ -746,7 +1817,7 @@ main: { // main::@1 b1: // [7] call bool_or - // [37] phi from main::@1 to bool_or [phi:main::@1->bool_or] + // [38] phi from main::@1 to bool_or [phi:main::@1->bool_or] bool_or_from_b1: jsr bool_or // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] @@ -868,185 +1939,199 @@ bool_complex: { // bool_not bool_not: { .label screen = $450 - .label _1 = 9 .label i = 3 - // [28] phi from bool_not to bool_not::@1 [phi:bool_not->bool_not::@1] - b1_from_bool_not: - // [28] phi (byte) bool_not::i#2 = (byte) 0 [phi:bool_not->bool_not::@1#0] -- vbuz1=vbuc1 + .label _6 = 9 + // [28] phi from bool_not to bool_not::@4 [phi:bool_not->bool_not::@4] + b4_from_bool_not: + // [28] phi (byte) bool_not::i#7 = (byte) 0 [phi:bool_not->bool_not::@4#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [28] phi from bool_not::@3 to bool_not::@1 [phi:bool_not::@3->bool_not::@1] - b1_from_b3: - // [28] phi (byte) bool_not::i#2 = (byte) bool_not::i#1 [phi:bool_not::@3->bool_not::@1#0] -- register_copy - jmp b1 - // bool_not::@1 - b1: - // [29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 - lda #1 - and i - sta _1 - // [30] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #$a - bcc b4 - jmp b5 - // bool_not::@5 - b5: - // [31] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 -- vbuz1_eq_0_then_la1 - lda _1 - cmp #0 - beq b4 - jmp b2 - // bool_not::@2 - b2: - // [32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 - lda #'*' - ldy i - sta screen,y - jmp b3 - // bool_not::@3 - b3: - // [33] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 -- vbuz1=_inc_vbuz1 - inc i - // [34] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$15 - cmp i - bne b1_from_b3 - jmp breturn - // bool_not::@return - breturn: - // [35] return - rts + jmp b4 + // [28] phi from bool_not::@1 bool_not::@5 to bool_not::@4 [phi:bool_not::@1/bool_not::@5->bool_not::@4] + b4_from_b1: + b4_from_b5: + // [28] phi (byte) bool_not::i#7 = (byte) bool_not::i#1 [phi:bool_not::@1/bool_not::@5->bool_not::@4#0] -- register_copy + jmp b4 // bool_not::@4 b4: - // [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + // [29] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 lda #' ' ldy i sta screen,y + // [30] phi from bool_not::@2 bool_not::@4 to bool_not::@3 [phi:bool_not::@2/bool_not::@4->bool_not::@3] + b3_from_b2: + b3_from_b4: + // [30] phi (byte) bool_not::i#8 = (byte) bool_not::i#1 [phi:bool_not::@2/bool_not::@4->bool_not::@3#0] -- register_copy jmp b3 + // bool_not::@3 + b3: + // [31] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 -- vbuz1=_inc_vbuz1 + inc i + // [32] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$15 + cmp i + bne b1 + jmp breturn + // bool_not::@return + breturn: + // [33] return + rts + // bool_not::@1 + b1: + // [34] (byte~) bool_not::$6 ← (byte) bool_not::i#1 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 + lda #1 + and i + sta _6 + // [35] if((byte) bool_not::i#1<(byte) $a) goto bool_not::@4 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$a + bcc b4_from_b1 + jmp b5 + // bool_not::@5 + b5: + // [36] if((byte~) bool_not::$6==(byte) 0) goto bool_not::@4 -- vbuz1_eq_0_then_la1 + lda _6 + cmp #0 + beq b4_from_b5 + jmp b2 + // bool_not::@2 + b2: + // [37] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#1) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #'*' + ldy i + sta screen,y + jmp b3_from_b2 } // bool_or bool_or: { .label screen = $428 - .label _1 = $a .label i = 4 - // [38] phi from bool_or to bool_or::@1 [phi:bool_or->bool_or::@1] - b1_from_bool_or: - // [38] phi (byte) bool_or::i#2 = (byte) 0 [phi:bool_or->bool_or::@1#0] -- vbuz1=vbuc1 + .label _5 = $a + // [39] phi from bool_or to bool_or::@2 [phi:bool_or->bool_or::@2] + b2_from_bool_or: + // [39] phi (byte) bool_or::i#6 = (byte) 0 [phi:bool_or->bool_or::@2#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [38] phi from bool_or::@3 to bool_or::@1 [phi:bool_or::@3->bool_or::@1] - b1_from_b3: - // [38] phi (byte) bool_or::i#2 = (byte) bool_or::i#1 [phi:bool_or::@3->bool_or::@1#0] -- register_copy - jmp b1 - // bool_or::@1 - b1: - // [39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 - lda #1 - and i - sta _1 - // [40] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #$a - bcc b2 - jmp b5 - // bool_or::@5 - b5: - // [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 -- vbuz1_eq_0_then_la1 - lda _1 - cmp #0 - beq b2 - jmp b4 - // bool_or::@4 - b4: - // [42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 - lda #' ' - ldy i - sta screen,y - jmp b3 - // bool_or::@3 - b3: - // [43] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 -- vbuz1=_inc_vbuz1 - inc i - // [44] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$15 - cmp i - bne b1_from_b3 - jmp breturn - // bool_or::@return - breturn: - // [45] return - rts + jmp b2 + // [39] phi from bool_or::@1 bool_or::@5 to bool_or::@2 [phi:bool_or::@1/bool_or::@5->bool_or::@2] + b2_from_b1: + b2_from_b5: + // [39] phi (byte) bool_or::i#6 = (byte) bool_or::i#1 [phi:bool_or::@1/bool_or::@5->bool_or::@2#0] -- register_copy + jmp b2 // bool_or::@2 b2: - // [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 + // [40] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 lda #'*' ldy i sta screen,y + // [41] phi from bool_or::@2 bool_or::@4 to bool_or::@3 [phi:bool_or::@2/bool_or::@4->bool_or::@3] + b3_from_b2: + b3_from_b4: + // [41] phi (byte) bool_or::i#8 = (byte) bool_or::i#6 [phi:bool_or::@2/bool_or::@4->bool_or::@3#0] -- register_copy jmp b3 + // bool_or::@3 + b3: + // [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 -- vbuz1=_inc_vbuz1 + inc i + // [43] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$15 + cmp i + bne b1 + jmp breturn + // bool_or::@return + breturn: + // [44] return + rts + // bool_or::@1 + b1: + // [45] (byte~) bool_or::$5 ← (byte) bool_or::i#1 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 + lda #1 + and i + sta _5 + // [46] if((byte) bool_or::i#1<(byte) $a) goto bool_or::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$a + bcc b2_from_b1 + jmp b5 + // bool_or::@5 + b5: + // [47] if((byte~) bool_or::$5==(byte) 0) goto bool_or::@2 -- vbuz1_eq_0_then_la1 + lda _5 + cmp #0 + beq b2_from_b5 + jmp b4 + // bool_or::@4 + b4: + // [48] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#1) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #' ' + ldy i + sta screen,y + jmp b3_from_b4 } // bool_and bool_and: { .label screen = $400 - .label _1 = $b .label i = 5 - // [48] phi from bool_and to bool_and::@1 [phi:bool_and->bool_and::@1] - b1_from_bool_and: - // [48] phi (byte) bool_and::i#2 = (byte) 0 [phi:bool_and->bool_and::@1#0] -- vbuz1=vbuc1 + .label _5 = $b + // [50] phi from bool_and to bool_and::@2 [phi:bool_and->bool_and::@2] + b2_from_bool_and: + // [50] phi (byte) bool_and::i#11 = (byte) 0 [phi:bool_and->bool_and::@2#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [48] phi from bool_and::@3 to bool_and::@1 [phi:bool_and::@3->bool_and::@1] - b1_from_b3: - // [48] phi (byte) bool_and::i#2 = (byte) bool_and::i#1 [phi:bool_and::@3->bool_and::@1#0] -- register_copy - jmp b1 + jmp b2 + // [50] phi from bool_and::@5 to bool_and::@2 [phi:bool_and::@5->bool_and::@2] + b2_from_b5: + // [50] phi (byte) bool_and::i#11 = (byte) bool_and::i#1 [phi:bool_and::@5->bool_and::@2#0] -- register_copy + jmp b2 + // bool_and::@2 + b2: + // [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #'*' + ldy i + sta screen,y + // [52] phi from bool_and::@2 bool_and::@4 to bool_and::@3 [phi:bool_and::@2/bool_and::@4->bool_and::@3] + b3_from_b2: + b3_from_b4: + // [52] phi (byte) bool_and::i#8 = (byte) bool_and::i#11 [phi:bool_and::@2/bool_and::@4->bool_and::@3#0] -- register_copy + jmp b3 + // bool_and::@3 + b3: + // [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 -- vbuz1=_inc_vbuz1 + inc i + // [54] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$15 + cmp i + bne b1 + jmp breturn + // bool_and::@return + breturn: + // [55] return + rts // bool_and::@1 b1: - // [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 + // [56] (byte~) bool_and::$5 ← (byte) bool_and::i#1 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 lda #1 and i - sta _1 - // [50] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 -- vbuz1_ge_vbuc1_then_la1 + sta _5 + // [57] if((byte) bool_and::i#1>=(byte) $a) goto bool_and::@4 -- vbuz1_ge_vbuc1_then_la1 lda i cmp #$a bcs b4 jmp b5 // bool_and::@5 b5: - // [51] if((byte~) bool_and::$1==(byte) 0) goto bool_and::@2 -- vbuz1_eq_0_then_la1 - lda _1 + // [58] if((byte~) bool_and::$5==(byte) 0) goto bool_and::@2 -- vbuz1_eq_0_then_la1 + lda _5 cmp #0 - beq b2 + beq b2_from_b5 jmp b4 // bool_and::@4 b4: - // [52] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + // [59] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#1) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 lda #' ' ldy i sta screen,y - jmp b3 - // bool_and::@3 - b3: - // [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 -- vbuz1=_inc_vbuz1 - inc i - // [54] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$15 - cmp i - bne b1_from_b3 - jmp breturn - // bool_and::@return - breturn: - // [55] return - rts - // bool_and::@2 - b2: - // [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuz1=vbuc2 - lda #'*' - ldy i - sta screen,y - jmp b3 + jmp b3_from_b4 } // File Data @@ -1063,15 +2148,18 @@ Statement [20] if((bool) bool_complex::o1#0) goto bool_complex::@4 [ bool_comple Statement [21] if((bool) bool_complex::o2#0) goto bool_complex::@4 [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a Statement [22] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a Statement [26] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a -Statement [32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ] -Statement [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a -Statement [42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ] -Statement [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a -Statement [52] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ] -Statement [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a +Statement [29] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' [ bool_not::i#7 ] ( main:2::bool_not:9 [ bool_not::i#7 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] +Statement [34] (byte~) bool_not::$6 ← (byte) bool_not::i#1 & (byte) 1 [ bool_not::i#1 bool_not::$6 ] ( main:2::bool_not:9 [ bool_not::i#1 bool_not::$6 ] ) always clobbers reg byte a +Statement [37] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#1) ← (byte) '*' [ bool_not::i#1 ] ( main:2::bool_not:9 [ bool_not::i#1 ] ) always clobbers reg byte a +Statement [40] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' [ bool_or::i#6 ] ( main:2::bool_or:7 [ bool_or::i#6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] +Statement [45] (byte~) bool_or::$5 ← (byte) bool_or::i#1 & (byte) 1 [ bool_or::i#1 bool_or::$5 ] ( main:2::bool_or:7 [ bool_or::i#1 bool_or::$5 ] ) always clobbers reg byte a +Statement [48] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#1) ← (byte) ' ' [ bool_or::i#1 ] ( main:2::bool_or:7 [ bool_or::i#1 ] ) always clobbers reg byte a +Statement [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' [ bool_and::i#11 ] ( main:2::bool_and:5 [ bool_and::i#11 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] +Statement [56] (byte~) bool_and::$5 ← (byte) bool_and::i#1 & (byte) 1 [ bool_and::i#1 bool_and::$5 ] ( main:2::bool_and:5 [ bool_and::i#1 bool_and::$5 ] ) always clobbers reg byte a +Statement [59] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#1) ← (byte) ' ' [ bool_and::i#1 ] ( main:2::bool_and:5 [ bool_and::i#1 ] ) always clobbers reg byte a Statement [15] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte) $a [ bool_complex::i#2 bool_complex::o1#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 ] ) always clobbers reg byte a Statement [16] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte) 1 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::$1 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::$1 ] ) always clobbers reg byte a Statement [17] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte) 0 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ) always clobbers reg byte a @@ -1081,40 +2169,40 @@ Statement [20] if((bool) bool_complex::o1#0) goto bool_complex::@4 [ bool_comple Statement [21] if((bool) bool_complex::o2#0) goto bool_complex::@4 [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a Statement [22] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a Statement [26] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a -Statement [29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 [ bool_not::i#2 bool_not::$1 ] ( main:2::bool_not:9 [ bool_not::i#2 bool_not::$1 ] ) always clobbers reg byte a -Statement [32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a -Statement [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' [ bool_not::i#2 ] ( main:2::bool_not:9 [ bool_not::i#2 ] ) always clobbers reg byte a -Statement [39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 [ bool_or::i#2 bool_or::$1 ] ( main:2::bool_or:7 [ bool_or::i#2 bool_or::$1 ] ) always clobbers reg byte a -Statement [42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a -Statement [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' [ bool_or::i#2 ] ( main:2::bool_or:7 [ bool_or::i#2 ] ) always clobbers reg byte a -Statement [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 [ bool_and::i#2 bool_and::$1 ] ( main:2::bool_and:5 [ bool_and::i#2 bool_and::$1 ] ) always clobbers reg byte a -Statement [52] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a -Statement [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' [ bool_and::i#2 ] ( main:2::bool_and:5 [ bool_and::i#2 ] ) always clobbers reg byte a +Statement [29] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' [ bool_not::i#7 ] ( main:2::bool_not:9 [ bool_not::i#7 ] ) always clobbers reg byte a +Statement [34] (byte~) bool_not::$6 ← (byte) bool_not::i#1 & (byte) 1 [ bool_not::i#1 bool_not::$6 ] ( main:2::bool_not:9 [ bool_not::i#1 bool_not::$6 ] ) always clobbers reg byte a +Statement [37] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#1) ← (byte) '*' [ bool_not::i#1 ] ( main:2::bool_not:9 [ bool_not::i#1 ] ) always clobbers reg byte a +Statement [40] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' [ bool_or::i#6 ] ( main:2::bool_or:7 [ bool_or::i#6 ] ) always clobbers reg byte a +Statement [45] (byte~) bool_or::$5 ← (byte) bool_or::i#1 & (byte) 1 [ bool_or::i#1 bool_or::$5 ] ( main:2::bool_or:7 [ bool_or::i#1 bool_or::$5 ] ) always clobbers reg byte a +Statement [48] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#1) ← (byte) ' ' [ bool_or::i#1 ] ( main:2::bool_or:7 [ bool_or::i#1 ] ) always clobbers reg byte a +Statement [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' [ bool_and::i#11 ] ( main:2::bool_and:5 [ bool_and::i#11 ] ) always clobbers reg byte a +Statement [56] (byte~) bool_and::$5 ← (byte) bool_and::i#1 & (byte) 1 [ bool_and::i#1 bool_and::$5 ] ( main:2::bool_and:5 [ bool_and::i#1 bool_and::$5 ] ) always clobbers reg byte a +Statement [59] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#1) ← (byte) ' ' [ bool_and::i#1 ] ( main:2::bool_and:5 [ bool_and::i#1 ] ) always clobbers reg byte a Potential registers zp ZP_BYTE:2 [ bool_complex::i#2 bool_complex::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:4 [ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:5 [ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , Potential registers zp ZP_BOOL:6 [ bool_complex::o1#0 ] : zp ZP_BOOL:6 , Potential registers zp ZP_BYTE:7 [ bool_complex::$1 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BOOL:8 [ bool_complex::o2#0 ] : zp ZP_BOOL:8 , -Potential registers zp ZP_BYTE:9 [ bool_not::$1 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:10 [ bool_or::$1 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:11 [ bool_and::$1 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:9 [ bool_not::$6 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:10 [ bool_or::$5 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:11 [ bool_and::$5 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES +Uplift Scope [bool_or] 459.67: zp ZP_BYTE:4 [ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] 101: zp ZP_BYTE:10 [ bool_or::$5 ] +Uplift Scope [bool_not] 459.67: zp ZP_BYTE:3 [ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] 101: zp ZP_BYTE:9 [ bool_not::$6 ] +Uplift Scope [bool_and] 392.33: zp ZP_BYTE:5 [ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] 101: zp ZP_BYTE:11 [ bool_and::$5 ] Uplift Scope [bool_complex] 23.1: zp ZP_BYTE:2 [ bool_complex::i#2 bool_complex::i#1 ] 22: zp ZP_BYTE:7 [ bool_complex::$1 ] 8.25: zp ZP_BOOL:8 [ bool_complex::o2#0 ] 6.6: zp ZP_BOOL:6 [ bool_complex::o1#0 ] -Uplift Scope [bool_and] 27.5: zp ZP_BYTE:5 [ bool_and::i#2 bool_and::i#1 ] 11: zp ZP_BYTE:11 [ bool_and::$1 ] -Uplift Scope [bool_or] 27.5: zp ZP_BYTE:4 [ bool_or::i#2 bool_or::i#1 ] 11: zp ZP_BYTE:10 [ bool_or::$1 ] -Uplift Scope [bool_not] 27.5: zp ZP_BYTE:3 [ bool_not::i#2 bool_not::i#1 ] 11: zp ZP_BYTE:9 [ bool_not::$1 ] Uplift Scope [main] Uplift Scope [] -Uplifting [bool_complex] best 3583 combination reg byte x [ bool_complex::i#2 bool_complex::i#1 ] reg byte a [ bool_complex::$1 ] zp ZP_BOOL:8 [ bool_complex::o2#0 ] zp ZP_BOOL:6 [ bool_complex::o1#0 ] -Uplifting [bool_and] best 3333 combination reg byte x [ bool_and::i#2 bool_and::i#1 ] reg byte a [ bool_and::$1 ] -Uplifting [bool_or] best 3083 combination reg byte x [ bool_or::i#2 bool_or::i#1 ] reg byte a [ bool_or::$1 ] -Uplifting [bool_not] best 2833 combination reg byte x [ bool_not::i#2 bool_not::i#1 ] reg byte a [ bool_not::$1 ] -Uplifting [main] best 2833 combination -Uplifting [] best 2833 combination +Uplifting [bool_or] best 18208 combination reg byte x [ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] reg byte a [ bool_or::$5 ] +Uplifting [bool_not] best 16248 combination reg byte x [ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] reg byte a [ bool_not::$6 ] +Uplifting [bool_and] best 14288 combination reg byte x [ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] reg byte a [ bool_and::$5 ] +Uplifting [bool_complex] best 14038 combination reg byte x [ bool_complex::i#2 bool_complex::i#1 ] reg byte a [ bool_complex::$1 ] zp ZP_BOOL:8 [ bool_complex::o2#0 ] zp ZP_BOOL:6 [ bool_complex::o1#0 ] +Uplifting [main] best 14038 combination +Uplifting [] best 14038 combination Allocated (was zp ZP_BOOL:6) zp ZP_BOOL:2 [ bool_complex::o1#0 ] Allocated (was zp ZP_BOOL:8) zp ZP_BOOL:3 [ bool_complex::o2#0 ] @@ -1145,7 +2233,7 @@ bend: // main main: { // [5] call bool_and - // [47] phi from main to bool_and [phi:main->bool_and] + // [49] phi from main to bool_and [phi:main->bool_and] bool_and_from_main: jsr bool_and // [6] phi from main to main::@1 [phi:main->main::@1] @@ -1154,7 +2242,7 @@ main: { // main::@1 b1: // [7] call bool_or - // [37] phi from main::@1 to bool_or [phi:main::@1->bool_or] + // [38] phi from main::@1 to bool_or [phi:main::@1->bool_or] bool_or_from_b1: jsr bool_or // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] @@ -1267,158 +2355,172 @@ bool_complex: { // bool_not bool_not: { .label screen = $450 - // [28] phi from bool_not to bool_not::@1 [phi:bool_not->bool_not::@1] - b1_from_bool_not: - // [28] phi (byte) bool_not::i#2 = (byte) 0 [phi:bool_not->bool_not::@1#0] -- vbuxx=vbuc1 + // [28] phi from bool_not to bool_not::@4 [phi:bool_not->bool_not::@4] + b4_from_bool_not: + // [28] phi (byte) bool_not::i#7 = (byte) 0 [phi:bool_not->bool_not::@4#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [28] phi from bool_not::@3 to bool_not::@1 [phi:bool_not::@3->bool_not::@1] - b1_from_b3: - // [28] phi (byte) bool_not::i#2 = (byte) bool_not::i#1 [phi:bool_not::@3->bool_not::@1#0] -- register_copy - jmp b1 - // bool_not::@1 - b1: - // [29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 - txa - and #1 - // [30] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b4 - jmp b5 - // bool_not::@5 - b5: - // [31] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1 - cmp #0 - beq b4 - jmp b2 - // bool_not::@2 - b2: - // [32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #'*' + jmp b4 + // [28] phi from bool_not::@1 bool_not::@5 to bool_not::@4 [phi:bool_not::@1/bool_not::@5->bool_not::@4] + b4_from_b1: + b4_from_b5: + // [28] phi (byte) bool_not::i#7 = (byte) bool_not::i#1 [phi:bool_not::@1/bool_not::@5->bool_not::@4#0] -- register_copy + jmp b4 + // bool_not::@4 + b4: + // [29] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #' ' sta screen,x + // [30] phi from bool_not::@2 bool_not::@4 to bool_not::@3 [phi:bool_not::@2/bool_not::@4->bool_not::@3] + b3_from_b2: + b3_from_b4: + // [30] phi (byte) bool_not::i#8 = (byte) bool_not::i#1 [phi:bool_not::@2/bool_not::@4->bool_not::@3#0] -- register_copy jmp b3 // bool_not::@3 b3: - // [33] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 -- vbuxx=_inc_vbuxx + // [31] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 -- vbuxx=_inc_vbuxx inx - // [34] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 -- vbuxx_neq_vbuc1_then_la1 + // [32] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$15 - bne b1_from_b3 + bne b1 jmp breturn // bool_not::@return breturn: - // [35] return + // [33] return rts - // bool_not::@4 - b4: - // [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #' ' + // bool_not::@1 + b1: + // [34] (byte~) bool_not::$6 ← (byte) bool_not::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // [35] if((byte) bool_not::i#1<(byte) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b4_from_b1 + jmp b5 + // bool_not::@5 + b5: + // [36] if((byte~) bool_not::$6==(byte) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b4_from_b5 + jmp b2 + // bool_not::@2 + b2: + // [37] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#1) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' sta screen,x - jmp b3 + jmp b3_from_b2 } // bool_or bool_or: { .label screen = $428 - // [38] phi from bool_or to bool_or::@1 [phi:bool_or->bool_or::@1] - b1_from_bool_or: - // [38] phi (byte) bool_or::i#2 = (byte) 0 [phi:bool_or->bool_or::@1#0] -- vbuxx=vbuc1 + // [39] phi from bool_or to bool_or::@2 [phi:bool_or->bool_or::@2] + b2_from_bool_or: + // [39] phi (byte) bool_or::i#6 = (byte) 0 [phi:bool_or->bool_or::@2#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [38] phi from bool_or::@3 to bool_or::@1 [phi:bool_or::@3->bool_or::@1] - b1_from_b3: - // [38] phi (byte) bool_or::i#2 = (byte) bool_or::i#1 [phi:bool_or::@3->bool_or::@1#0] -- register_copy - jmp b1 - // bool_or::@1 - b1: - // [39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 - txa - and #1 - // [40] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b2 - jmp b5 - // bool_or::@5 - b5: - // [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1 - cmp #0 - beq b2 - jmp b4 - // bool_or::@4 - b4: - // [42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #' ' + jmp b2 + // [39] phi from bool_or::@1 bool_or::@5 to bool_or::@2 [phi:bool_or::@1/bool_or::@5->bool_or::@2] + b2_from_b1: + b2_from_b5: + // [39] phi (byte) bool_or::i#6 = (byte) bool_or::i#1 [phi:bool_or::@1/bool_or::@5->bool_or::@2#0] -- register_copy + jmp b2 + // bool_or::@2 + b2: + // [40] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' sta screen,x + // [41] phi from bool_or::@2 bool_or::@4 to bool_or::@3 [phi:bool_or::@2/bool_or::@4->bool_or::@3] + b3_from_b2: + b3_from_b4: + // [41] phi (byte) bool_or::i#8 = (byte) bool_or::i#6 [phi:bool_or::@2/bool_or::@4->bool_or::@3#0] -- register_copy jmp b3 // bool_or::@3 b3: - // [43] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 -- vbuxx=_inc_vbuxx + // [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 -- vbuxx=_inc_vbuxx inx - // [44] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 -- vbuxx_neq_vbuc1_then_la1 + // [43] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$15 - bne b1_from_b3 + bne b1 jmp breturn // bool_or::@return breturn: - // [45] return + // [44] return rts - // bool_or::@2 - b2: - // [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #'*' + // bool_or::@1 + b1: + // [45] (byte~) bool_or::$5 ← (byte) bool_or::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // [46] if((byte) bool_or::i#1<(byte) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b2_from_b1 + jmp b5 + // bool_or::@5 + b5: + // [47] if((byte~) bool_or::$5==(byte) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2_from_b5 + jmp b4 + // bool_or::@4 + b4: + // [48] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#1) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #' ' sta screen,x - jmp b3 + jmp b3_from_b4 } // bool_and bool_and: { .label screen = $400 - // [48] phi from bool_and to bool_and::@1 [phi:bool_and->bool_and::@1] - b1_from_bool_and: - // [48] phi (byte) bool_and::i#2 = (byte) 0 [phi:bool_and->bool_and::@1#0] -- vbuxx=vbuc1 + // [50] phi from bool_and to bool_and::@2 [phi:bool_and->bool_and::@2] + b2_from_bool_and: + // [50] phi (byte) bool_and::i#11 = (byte) 0 [phi:bool_and->bool_and::@2#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [48] phi from bool_and::@3 to bool_and::@1 [phi:bool_and::@3->bool_and::@1] - b1_from_b3: - // [48] phi (byte) bool_and::i#2 = (byte) bool_and::i#1 [phi:bool_and::@3->bool_and::@1#0] -- register_copy - jmp b1 - // bool_and::@1 - b1: - // [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 - txa - and #1 - // [50] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 -- vbuxx_ge_vbuc1_then_la1 - cpx #$a - bcs b4 - jmp b5 - // bool_and::@5 - b5: - // [51] if((byte~) bool_and::$1==(byte) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1 - cmp #0 - beq b2 - jmp b4 - // bool_and::@4 - b4: - // [52] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #' ' + jmp b2 + // [50] phi from bool_and::@5 to bool_and::@2 [phi:bool_and::@5->bool_and::@2] + b2_from_b5: + // [50] phi (byte) bool_and::i#11 = (byte) bool_and::i#1 [phi:bool_and::@5->bool_and::@2#0] -- register_copy + jmp b2 + // bool_and::@2 + b2: + // [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' sta screen,x + // [52] phi from bool_and::@2 bool_and::@4 to bool_and::@3 [phi:bool_and::@2/bool_and::@4->bool_and::@3] + b3_from_b2: + b3_from_b4: + // [52] phi (byte) bool_and::i#8 = (byte) bool_and::i#11 [phi:bool_and::@2/bool_and::@4->bool_and::@3#0] -- register_copy jmp b3 // bool_and::@3 b3: - // [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 -- vbuxx=_inc_vbuxx + // [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 -- vbuxx=_inc_vbuxx inx // [54] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$15 - bne b1_from_b3 + bne b1 jmp breturn // bool_and::@return breturn: // [55] return rts - // bool_and::@2 - b2: - // [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #'*' + // bool_and::@1 + b1: + // [56] (byte~) bool_and::$5 ← (byte) bool_and::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // [57] if((byte) bool_and::i#1>=(byte) $a) goto bool_and::@4 -- vbuxx_ge_vbuc1_then_la1 + cpx #$a + bcs b4 + jmp b5 + // bool_and::@5 + b5: + // [58] if((byte~) bool_and::$5==(byte) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2_from_b5 + jmp b4 + // bool_and::@4 + b4: + // [59] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#1) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #' ' sta screen,x - jmp b3 + jmp b3_from_b4 } // File Data @@ -1435,26 +2537,31 @@ Removing instruction jmp b7 Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn -Removing instruction jmp b1 +Removing instruction jmp b4 +Removing instruction jmp b3 +Removing instruction jmp breturn Removing instruction jmp b5 Removing instruction jmp b2 +Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn -Removing instruction jmp b1 Removing instruction jmp b5 Removing instruction jmp b4 +Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn -Removing instruction jmp b1 Removing instruction jmp b5 Removing instruction jmp b4 -Removing instruction jmp b3 -Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing label b1_from_b3 with b1 -Replacing label b1_from_b3 with b1 -Replacing label b1_from_b3 with b1 -Replacing label b1_from_b3 with b1 +Replacing label b4_from_b1 with b4 +Replacing label b4_from_b5 with b4 +Replacing label b3_from_b2 with b3 +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b5 with b2 +Replacing label b3_from_b4 with b3 +Replacing label b2_from_b5 with b2 +Replacing label b3_from_b4 with b3 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: @@ -1466,9 +2573,17 @@ Removing instruction bool_not_from_b2: Removing instruction b3_from_b2: Removing instruction bool_complex_from_b3: Removing instruction b1_from_b3: -Removing instruction b1_from_b3: -Removing instruction b1_from_b3: -Removing instruction b1_from_b3: +Removing instruction b4_from_b1: +Removing instruction b4_from_b5: +Removing instruction b3_from_b2: +Removing instruction b3_from_b4: +Removing instruction b2_from_b1: +Removing instruction b2_from_b5: +Removing instruction b3_from_b2: +Removing instruction b3_from_b4: +Removing instruction b2_from_b5: +Removing instruction b3_from_b2: +Removing instruction b3_from_b4: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction bool_and_from_main: @@ -1479,25 +2594,25 @@ Removing instruction breturn: Removing instruction b1_from_bool_complex: Removing instruction b7: Removing instruction breturn: -Removing instruction b1_from_bool_not: +Removing instruction b4_from_bool_not: +Removing instruction breturn: Removing instruction b5: Removing instruction b2: +Removing instruction b2_from_bool_or: Removing instruction breturn: -Removing instruction b1_from_bool_or: Removing instruction b5: Removing instruction b4: +Removing instruction b2_from_bool_and: Removing instruction breturn: -Removing instruction b1_from_bool_and: Removing instruction b5: -Removing instruction breturn: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin Removing instruction jmp b1 -Removing instruction jmp b1 -Removing instruction jmp b1 -Removing instruction jmp b1 +Removing instruction jmp b4 +Removing instruction jmp b2 +Removing instruction jmp b2 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -1507,7 +2622,7 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (void()) bool_and() -(byte~) bool_and::$1 reg byte a 11.0 +(byte~) bool_and::$5 reg byte a 101.0 (label) bool_and::@1 (label) bool_and::@2 (label) bool_and::@3 @@ -1515,8 +2630,9 @@ FINAL SYMBOL TABLE (label) bool_and::@5 (label) bool_and::@return (byte) bool_and::i -(byte) bool_and::i#1 reg byte x 16.5 -(byte) bool_and::i#2 reg byte x 11.0 +(byte) bool_and::i#1 reg byte x 117.83333333333331 +(byte) bool_and::i#11 reg byte x 61.5 +(byte) bool_and::i#8 reg byte x 213.0 (bool) bool_and::o1 (bool) bool_and::o2 (bool) bool_and::o3 @@ -1545,7 +2661,7 @@ FINAL SYMBOL TABLE (byte*) bool_complex::screen (const byte*) bool_complex::screen#0 screen = (byte*) 1144 (void()) bool_not() -(byte~) bool_not::$1 reg byte a 11.0 +(byte~) bool_not::$6 reg byte a 101.0 (label) bool_not::@1 (label) bool_not::@2 (label) bool_not::@3 @@ -1553,15 +2669,16 @@ FINAL SYMBOL TABLE (label) bool_not::@5 (label) bool_not::@return (byte) bool_not::i -(byte) bool_not::i#1 reg byte x 16.5 -(byte) bool_not::i#2 reg byte x 11.0 +(byte) bool_not::i#1 reg byte x 134.66666666666666 +(byte) bool_not::i#7 reg byte x 112.0 +(byte) bool_not::i#8 reg byte x 213.0 (bool) bool_not::o1 (bool) bool_not::o2 (bool) bool_not::o3 (byte*) bool_not::screen (const byte*) bool_not::screen#0 screen = (byte*) 1104 (void()) bool_or() -(byte~) bool_or::$1 reg byte a 11.0 +(byte~) bool_or::$5 reg byte a 101.0 (label) bool_or::@1 (label) bool_or::@2 (label) bool_or::@3 @@ -1569,8 +2686,9 @@ FINAL SYMBOL TABLE (label) bool_or::@5 (label) bool_or::@return (byte) bool_or::i -(byte) bool_or::i#1 reg byte x 16.5 -(byte) bool_or::i#2 reg byte x 11.0 +(byte) bool_or::i#1 reg byte x 134.66666666666666 +(byte) bool_or::i#6 reg byte x 112.0 +(byte) bool_or::i#8 reg byte x 213.0 (bool) bool_or::o1 (bool) bool_or::o2 (bool) bool_or::o3 @@ -1583,19 +2701,19 @@ FINAL SYMBOL TABLE (label) main::@return reg byte x [ bool_complex::i#2 bool_complex::i#1 ] -reg byte x [ bool_not::i#2 bool_not::i#1 ] -reg byte x [ bool_or::i#2 bool_or::i#1 ] -reg byte x [ bool_and::i#2 bool_and::i#1 ] +reg byte x [ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] +reg byte x [ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] +reg byte x [ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] zp ZP_BOOL:2 [ bool_complex::o1#0 ] reg byte a [ bool_complex::$1 ] zp ZP_BOOL:3 [ bool_complex::o2#0 ] -reg byte a [ bool_not::$1 ] -reg byte a [ bool_or::$1 ] -reg byte a [ bool_and::$1 ] +reg byte a [ bool_not::$6 ] +reg byte a [ bool_or::$5 ] +reg byte a [ bool_and::$5 ] FINAL ASSEMBLER -Score: 2059 +Score: 10024 // File Comments // A test of boolean conditions using && || and ! @@ -1615,13 +2733,13 @@ Score: 2059 main: { // bool_and() // [5] call bool_and - // [47] phi from main to bool_and [phi:main->bool_and] + // [49] phi from main to bool_and [phi:main->bool_and] jsr bool_and // [6] phi from main to main::@1 [phi:main->main::@1] // main::@1 // bool_or() // [7] call bool_or - // [37] phi from main::@1 to bool_or [phi:main::@1->bool_or] + // [38] phi from main::@1 to bool_or [phi:main::@1->bool_or] jsr bool_or // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] // main::@2 @@ -1723,129 +2841,121 @@ bool_complex: { // bool_not bool_not: { .label screen = $450 - // [28] phi from bool_not to bool_not::@1 [phi:bool_not->bool_not::@1] - // [28] phi (byte) bool_not::i#2 = (byte) 0 [phi:bool_not->bool_not::@1#0] -- vbuxx=vbuc1 + // [28] phi from bool_not to bool_not::@4 [phi:bool_not->bool_not::@4] + // [28] phi (byte) bool_not::i#7 = (byte) 0 [phi:bool_not->bool_not::@4#0] -- vbuxx=vbuc1 ldx #0 - // [28] phi from bool_not::@3 to bool_not::@1 [phi:bool_not::@3->bool_not::@1] - // [28] phi (byte) bool_not::i#2 = (byte) bool_not::i#1 [phi:bool_not::@3->bool_not::@1#0] -- register_copy - // bool_not::@1 - b1: - // i&1 - // [29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 - txa - and #1 - // if(o3) - // [30] if((byte) bool_not::i#2<(byte) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b4 - // bool_not::@5 - // [31] if((byte~) bool_not::$1==(byte) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1 - cmp #0 - beq b4 - // bool_not::@2 - // screen[i] = '*' - // [32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #'*' + // [28] phi from bool_not::@1 bool_not::@5 to bool_not::@4 [phi:bool_not::@1/bool_not::@5->bool_not::@4] + // [28] phi (byte) bool_not::i#7 = (byte) bool_not::i#1 [phi:bool_not::@1/bool_not::@5->bool_not::@4#0] -- register_copy + // bool_not::@4 + b4: + // screen[i] = ' ' + // [29] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#7) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #' ' sta screen,x + // [30] phi from bool_not::@2 bool_not::@4 to bool_not::@3 [phi:bool_not::@2/bool_not::@4->bool_not::@3] + // [30] phi (byte) bool_not::i#8 = (byte) bool_not::i#1 [phi:bool_not::@2/bool_not::@4->bool_not::@3#0] -- register_copy // bool_not::@3 b3: // for( byte i : 0..20) - // [33] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#2 -- vbuxx=_inc_vbuxx + // [31] (byte) bool_not::i#1 ← ++ (byte) bool_not::i#8 -- vbuxx=_inc_vbuxx inx - // [34] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 -- vbuxx_neq_vbuc1_then_la1 + // [32] if((byte) bool_not::i#1!=(byte) $15) goto bool_not::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$15 bne b1 // bool_not::@return // } - // [35] return + // [33] return rts - // bool_not::@4 - b4: - // screen[i] = ' ' - // [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #' ' + // bool_not::@1 + b1: + // i&1 + // [34] (byte~) bool_not::$6 ← (byte) bool_not::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // if(o3) + // [35] if((byte) bool_not::i#1<(byte) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b4 + // bool_not::@5 + // [36] if((byte~) bool_not::$6==(byte) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b4 + // bool_not::@2 + // screen[i] = '*' + // [37] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#1) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' sta screen,x jmp b3 } // bool_or bool_or: { .label screen = $428 - // [38] phi from bool_or to bool_or::@1 [phi:bool_or->bool_or::@1] - // [38] phi (byte) bool_or::i#2 = (byte) 0 [phi:bool_or->bool_or::@1#0] -- vbuxx=vbuc1 + // [39] phi from bool_or to bool_or::@2 [phi:bool_or->bool_or::@2] + // [39] phi (byte) bool_or::i#6 = (byte) 0 [phi:bool_or->bool_or::@2#0] -- vbuxx=vbuc1 ldx #0 - // [38] phi from bool_or::@3 to bool_or::@1 [phi:bool_or::@3->bool_or::@1] - // [38] phi (byte) bool_or::i#2 = (byte) bool_or::i#1 [phi:bool_or::@3->bool_or::@1#0] -- register_copy - // bool_or::@1 - b1: - // i&1 - // [39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 - txa - and #1 - // if(o3) - // [40] if((byte) bool_or::i#2<(byte) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b2 - // bool_or::@5 - // [41] if((byte~) bool_or::$1==(byte) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1 - cmp #0 - beq b2 - // bool_or::@4 - // screen[i] = ' ' - // [42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #' ' + // [39] phi from bool_or::@1 bool_or::@5 to bool_or::@2 [phi:bool_or::@1/bool_or::@5->bool_or::@2] + // [39] phi (byte) bool_or::i#6 = (byte) bool_or::i#1 [phi:bool_or::@1/bool_or::@5->bool_or::@2#0] -- register_copy + // bool_or::@2 + b2: + // screen[i] = '*' + // [40] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#6) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' sta screen,x + // [41] phi from bool_or::@2 bool_or::@4 to bool_or::@3 [phi:bool_or::@2/bool_or::@4->bool_or::@3] + // [41] phi (byte) bool_or::i#8 = (byte) bool_or::i#6 [phi:bool_or::@2/bool_or::@4->bool_or::@3#0] -- register_copy // bool_or::@3 b3: // for( byte i : 0..20) - // [43] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#2 -- vbuxx=_inc_vbuxx + // [42] (byte) bool_or::i#1 ← ++ (byte) bool_or::i#8 -- vbuxx=_inc_vbuxx inx - // [44] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 -- vbuxx_neq_vbuc1_then_la1 + // [43] if((byte) bool_or::i#1!=(byte) $15) goto bool_or::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$15 bne b1 // bool_or::@return // } - // [45] return + // [44] return rts - // bool_or::@2 - b2: - // screen[i] = '*' - // [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #'*' + // bool_or::@1 + b1: + // i&1 + // [45] (byte~) bool_or::$5 ← (byte) bool_or::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // if(o3) + // [46] if((byte) bool_or::i#1<(byte) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b2 + // bool_or::@5 + // [47] if((byte~) bool_or::$5==(byte) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2 + // bool_or::@4 + // screen[i] = ' ' + // [48] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#1) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #' ' sta screen,x jmp b3 } // bool_and bool_and: { .label screen = $400 - // [48] phi from bool_and to bool_and::@1 [phi:bool_and->bool_and::@1] - // [48] phi (byte) bool_and::i#2 = (byte) 0 [phi:bool_and->bool_and::@1#0] -- vbuxx=vbuc1 + // [50] phi from bool_and to bool_and::@2 [phi:bool_and->bool_and::@2] + // [50] phi (byte) bool_and::i#11 = (byte) 0 [phi:bool_and->bool_and::@2#0] -- vbuxx=vbuc1 ldx #0 - // [48] phi from bool_and::@3 to bool_and::@1 [phi:bool_and::@3->bool_and::@1] - // [48] phi (byte) bool_and::i#2 = (byte) bool_and::i#1 [phi:bool_and::@3->bool_and::@1#0] -- register_copy - // bool_and::@1 - b1: - // i&1 - // [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 - txa - and #1 - // if(o3) - // [50] if((byte) bool_and::i#2>=(byte) $a) goto bool_and::@4 -- vbuxx_ge_vbuc1_then_la1 - cpx #$a - bcs b4 - // bool_and::@5 - // [51] if((byte~) bool_and::$1==(byte) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1 - cmp #0 - beq b2 - // bool_and::@4 - b4: - // screen[i] = ' ' - // [52] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #' ' + // [50] phi from bool_and::@5 to bool_and::@2 [phi:bool_and::@5->bool_and::@2] + // [50] phi (byte) bool_and::i#11 = (byte) bool_and::i#1 [phi:bool_and::@5->bool_and::@2#0] -- register_copy + // bool_and::@2 + b2: + // screen[i] = '*' + // [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#11) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'*' sta screen,x + // [52] phi from bool_and::@2 bool_and::@4 to bool_and::@3 [phi:bool_and::@2/bool_and::@4->bool_and::@3] + // [52] phi (byte) bool_and::i#8 = (byte) bool_and::i#11 [phi:bool_and::@2/bool_and::@4->bool_and::@3#0] -- register_copy // bool_and::@3 b3: // for( byte i : 0..20) - // [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#2 -- vbuxx=_inc_vbuxx + // [53] (byte) bool_and::i#1 ← ++ (byte) bool_and::i#8 -- vbuxx=_inc_vbuxx inx // [54] if((byte) bool_and::i#1!=(byte) $15) goto bool_and::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$15 @@ -1854,11 +2964,25 @@ bool_and: { // } // [55] return rts - // bool_and::@2 - b2: - // screen[i] = '*' - // [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*' -- pbuc1_derefidx_vbuxx=vbuc2 - lda #'*' + // bool_and::@1 + b1: + // i&1 + // [56] (byte~) bool_and::$5 ← (byte) bool_and::i#1 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + txa + and #1 + // if(o3) + // [57] if((byte) bool_and::i#1>=(byte) $a) goto bool_and::@4 -- vbuxx_ge_vbuc1_then_la1 + cpx #$a + bcs b4 + // bool_and::@5 + // [58] if((byte~) bool_and::$5==(byte) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2 + // bool_and::@4 + b4: + // screen[i] = ' ' + // [59] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#1) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #' ' sta screen,x jmp b3 } diff --git a/src/test/ref/bool-vars.sym b/src/test/ref/bool-vars.sym index 1b35c6c86..8a9979b3b 100644 --- a/src/test/ref/bool-vars.sym +++ b/src/test/ref/bool-vars.sym @@ -2,7 +2,7 @@ (label) @begin (label) @end (void()) bool_and() -(byte~) bool_and::$1 reg byte a 11.0 +(byte~) bool_and::$5 reg byte a 101.0 (label) bool_and::@1 (label) bool_and::@2 (label) bool_and::@3 @@ -10,8 +10,9 @@ (label) bool_and::@5 (label) bool_and::@return (byte) bool_and::i -(byte) bool_and::i#1 reg byte x 16.5 -(byte) bool_and::i#2 reg byte x 11.0 +(byte) bool_and::i#1 reg byte x 117.83333333333331 +(byte) bool_and::i#11 reg byte x 61.5 +(byte) bool_and::i#8 reg byte x 213.0 (bool) bool_and::o1 (bool) bool_and::o2 (bool) bool_and::o3 @@ -40,7 +41,7 @@ (byte*) bool_complex::screen (const byte*) bool_complex::screen#0 screen = (byte*) 1144 (void()) bool_not() -(byte~) bool_not::$1 reg byte a 11.0 +(byte~) bool_not::$6 reg byte a 101.0 (label) bool_not::@1 (label) bool_not::@2 (label) bool_not::@3 @@ -48,15 +49,16 @@ (label) bool_not::@5 (label) bool_not::@return (byte) bool_not::i -(byte) bool_not::i#1 reg byte x 16.5 -(byte) bool_not::i#2 reg byte x 11.0 +(byte) bool_not::i#1 reg byte x 134.66666666666666 +(byte) bool_not::i#7 reg byte x 112.0 +(byte) bool_not::i#8 reg byte x 213.0 (bool) bool_not::o1 (bool) bool_not::o2 (bool) bool_not::o3 (byte*) bool_not::screen (const byte*) bool_not::screen#0 screen = (byte*) 1104 (void()) bool_or() -(byte~) bool_or::$1 reg byte a 11.0 +(byte~) bool_or::$5 reg byte a 101.0 (label) bool_or::@1 (label) bool_or::@2 (label) bool_or::@3 @@ -64,8 +66,9 @@ (label) bool_or::@5 (label) bool_or::@return (byte) bool_or::i -(byte) bool_or::i#1 reg byte x 16.5 -(byte) bool_or::i#2 reg byte x 11.0 +(byte) bool_or::i#1 reg byte x 134.66666666666666 +(byte) bool_or::i#6 reg byte x 112.0 +(byte) bool_or::i#8 reg byte x 213.0 (bool) bool_or::o1 (bool) bool_or::o2 (bool) bool_or::o3 @@ -78,12 +81,12 @@ (label) main::@return reg byte x [ bool_complex::i#2 bool_complex::i#1 ] -reg byte x [ bool_not::i#2 bool_not::i#1 ] -reg byte x [ bool_or::i#2 bool_or::i#1 ] -reg byte x [ bool_and::i#2 bool_and::i#1 ] +reg byte x [ bool_not::i#8 bool_not::i#7 bool_not::i#1 ] +reg byte x [ bool_or::i#8 bool_or::i#6 bool_or::i#1 ] +reg byte x [ bool_and::i#8 bool_and::i#11 bool_and::i#1 ] zp ZP_BOOL:2 [ bool_complex::o1#0 ] reg byte a [ bool_complex::$1 ] zp ZP_BOOL:3 [ bool_complex::o2#0 ] -reg byte a [ bool_not::$1 ] -reg byte a [ bool_or::$1 ] -reg byte a [ bool_and::$1 ] +reg byte a [ bool_not::$6 ] +reg byte a [ bool_or::$5 ] +reg byte a [ bool_and::$5 ] diff --git a/src/test/ref/comparison-rewriting.asm b/src/test/ref/comparison-rewriting.asm index 76cf343f8..e5b5cda95 100644 --- a/src/test/ref/comparison-rewriting.asm +++ b/src/test/ref/comparison-rewriting.asm @@ -31,26 +31,14 @@ main: { lda header,x cmp #0 bne b2 - ldx #0 - lda #<$400 + lda #'0' + sta $400+$28 + lda #<$400+$28 sta screen - lda #>$400 + lda #>$400+$28 sta screen+1 - b3: - lda #$28 - clc - adc screen - sta screen - bcc !+ - inc screen+1 - !: - txa - clc - adc #'0' - ldy #0 - sta (screen),y - cpx #5 - bcs b4 + ldx #0 + b9: lda #'+' ldy #2 sta (screen),y @@ -83,5 +71,21 @@ main: { cpx #9+1 bcc b3 rts + b3: + lda #$28 + clc + adc screen + sta screen + bcc !+ + inc screen+1 + !: + txa + clc + adc #'0' + ldy #0 + sta (screen),y + cpx #5 + bcs b4 + jmp b9 header: .text " < <= == >= >@" } diff --git a/src/test/ref/comparison-rewriting.cfg b/src/test/ref/comparison-rewriting.cfg index cb036cd14..ee650d831 100644 --- a/src/test/ref/comparison-rewriting.cfg +++ b/src/test/ref/comparison-rewriting.cfg @@ -21,46 +21,51 @@ main::@2: scope:[main] from main::@1 main::@2 [10] *((byte*) 1024 + (byte) main::i#2) ← *((const byte[]) main::header#0 + (byte) main::i#2) [11] (byte) main::i#1 ← ++ (byte) main::i#2 [12] if(*((const byte[]) main::header#0 + (byte) main::i#1)!=(byte) 0) goto main::@2 - to:main::@3 -main::@3: scope:[main] from main::@2 main::@8 - [13] (byte) main::i1#10 ← phi( main::@8/(byte) main::i1#1 main::@2/(byte) 0 ) - [13] (byte*) main::screen#4 ← phi( main::@8/(byte*) main::screen#1 main::@2/(byte*) 1024 ) - [14] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 - [15] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 - [16] *((byte*) main::screen#1) ← (byte~) main::$3 - [17] if((byte) main::i1#10>=(byte) 5) goto main::@4 + to:main::@5_1 +main::@5_1: scope:[main] from main::@2 + [13] *((byte*) 1024+(byte) $28) ← (byte) '0' to:main::@9 -main::@9: scope:[main] from main::@3 - [18] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' +main::@9: scope:[main] from main::@3 main::@5_1 + [14] (byte*) main::screen#18 ← phi( main::@3/(byte*) main::screen#1 main::@5_1/(byte*) 1024+(byte) $28 ) + [14] (byte) main::i1#18 ← phi( main::@3/(byte) main::i1#1 main::@5_1/(byte) 0 ) + [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' to:main::@4 main::@4: scope:[main] from main::@3 main::@9 - [19] if((byte) main::i1#10>=(byte) 5+(byte) 1) goto main::@5 + [16] (byte*) main::screen#17 ← phi( main::@9/(byte*) main::screen#18 main::@3/(byte*) main::screen#1 ) + [16] (byte) main::i1#13 ← phi( main::@9/(byte) main::i1#18 main::@3/(byte) main::i1#1 ) + [17] if((byte) main::i1#13>=(byte) 5+(byte) 1) goto main::@5 to:main::@10 main::@10: scope:[main] from main::@4 - [20] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' + [18] *((byte*) main::screen#17 + (byte) 5) ← (byte) '+' to:main::@5 main::@5: scope:[main] from main::@10 main::@4 - [21] if((byte) main::i1#10!=(byte) 5) goto main::@6 + [19] if((byte) main::i1#13!=(byte) 5) goto main::@6 to:main::@11 main::@11: scope:[main] from main::@5 - [22] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' + [20] *((byte*) main::screen#17 + (byte) 8) ← (byte) '+' to:main::@6 main::@6: scope:[main] from main::@11 main::@5 - [23] if((byte) main::i1#10<(byte) 5) goto main::@7 + [21] if((byte) main::i1#13<(byte) 5) goto main::@7 to:main::@12 main::@12: scope:[main] from main::@6 - [24] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' + [22] *((byte*) main::screen#17 + (byte) $b) ← (byte) '+' to:main::@7 main::@7: scope:[main] from main::@12 main::@6 - [25] if((byte) main::i1#10<(byte) 5+(byte) 1) goto main::@8 + [23] if((byte) main::i1#13<(byte) 5+(byte) 1) goto main::@8 to:main::@13 main::@13: scope:[main] from main::@7 - [26] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' + [24] *((byte*) main::screen#17 + (byte) $e) ← (byte) '+' to:main::@8 main::@8: scope:[main] from main::@13 main::@7 - [27] (byte) main::i1#1 ← ++ (byte) main::i1#10 - [28] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 + [25] (byte) main::i1#1 ← ++ (byte) main::i1#13 + [26] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 to:main::@return main::@return: scope:[main] from main::@8 - [29] return + [27] return to:@return +main::@3: scope:[main] from main::@8 + [28] (byte*) main::screen#1 ← (byte*) main::screen#17 + (byte) $28 + [29] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#1 + [30] *((byte*) main::screen#1) ← (byte~) main::$3 + [31] if((byte) main::i1#1>=(byte) 5) goto main::@4 + to:main::@9 diff --git a/src/test/ref/comparison-rewriting.log b/src/test/ref/comparison-rewriting.log index 6ae119034..53fc62331 100644 --- a/src/test/ref/comparison-rewriting.log +++ b/src/test/ref/comparison-rewriting.log @@ -298,10 +298,174 @@ Rewriting conditional comparison [46] if((byte) main::i1#10<=(byte) 5) goto main Rewriting conditional comparison [52] if((byte) main::i1#1<=(byte) 9) goto main::@5 Simplifying expression containing zero main::screen#1 in [21] *((byte*) main::screen#1 + (byte) 0) ← (byte~) main::$3 Successful SSA optimization PassNSimplifyExpressionWithZero -Adding number conversion cast (unumber) 5+1 in if((byte) main::i1#10>=(byte) 5+(number) 1) goto main::@7 -Adding number conversion cast (unumber) 1 in if((byte) main::i1#10>=(unumber)(byte) 5+(number) 1) goto main::@7 -Adding number conversion cast (unumber) 5+1 in if((byte) main::i1#10<(byte) 5+(number) 1) goto main::@10 -Adding number conversion cast (unumber) 1 in if((byte) main::i1#10<(unumber)(byte) 5+(number) 1) goto main::@10 +GRAPH (NEW VERSIONS for main::i1#10) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (byte*~) main::$0 ← (const byte*) main::sc#0 + (word) $3e8 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [1] (byte*) main::sc#2 ← phi( main/(const byte*) main::sc#0 main::@1/(byte*) main::sc#1 ) + [2] *((byte*) main::sc#2) ← (byte) ' ' + [3] (byte*) main::sc#1 ← (byte*) main::sc#2 + rangenext(main::sc#0,main::$0) + [4] if((byte*) main::sc#1!=rangelast(main::sc#0,main::$0)) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + [5] (byte) main::i#2 ← phi( main::@2/(const byte) main::i#0 main::@3/(byte) main::i#1 ) + [6] *((const byte*) main::sc#0 + (byte) main::i#2) ← *((const byte[]) main::header#0 + (byte) main::i#2) + [7] (byte) main::i#1 ← ++ (byte) main::i#2 + [8] if(*((const byte[]) main::header#0 + (byte) main::i#1)!=(byte) 0) goto main::@3 + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@5 +main::@5: scope:[main] from main::@10 main::@4 + [9] (byte) main::i1#10 ← phi( main::@10/(byte) main::i1#1 main::@4/(const byte) main::i1#0 ) + [9] (byte*) main::screen#4 ← phi( main::@10/(byte*) main::screen#1 main::@4/(const byte*) main::sc#0 ) + [10] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 + [11] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 + [12] *((byte*) main::screen#1) ← (byte~) main::$3 + [13] if((byte) main::i1#10>=(byte) 5) goto main::@6 + to:main::@11 +main::@6: scope:[main] from main::@11 main::@5 + (byte) main::i1#13 ← phi( ) + [14] if((byte) main::i1#13>=(byte) 5+(number) 1) goto main::@7 + to:main::@12 +main::@11: scope:[main] from main::@5 + [15] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' + to:main::@6 +main::@7: scope:[main] from main::@12 main::@6 + (byte) main::i1#14 ← phi( ) + [16] if((byte) main::i1#14!=(byte) 5) goto main::@8 + to:main::@13 +main::@12: scope:[main] from main::@6 + [17] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' + to:main::@7 +main::@8: scope:[main] from main::@13 main::@7 + (byte) main::i1#15 ← phi( ) + [18] if((byte) main::i1#15<(byte) 5) goto main::@9 + to:main::@14 +main::@13: scope:[main] from main::@7 + [19] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' + to:main::@8 +main::@9: scope:[main] from main::@14 main::@8 + (byte) main::i1#16 ← phi( ) + [20] if((byte) main::i1#16<(byte) 5+(number) 1) goto main::@10 + to:main::@15 +main::@14: scope:[main] from main::@8 + [21] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' + to:main::@9 +main::@10: scope:[main] from main::@15 main::@9 + (byte) main::i1#17 ← phi( ) + [22] (byte) main::i1#1 ← ++ (byte) main::i1#17 + [23] if((byte) main::i1#1<(byte) 9+(number) 1) goto main::@5 + to:main::@return +main::@15: scope:[main] from main::@9 + [24] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' + to:main::@10 +main::@return: scope:[main] from main::@10 + [25] return + to:@return +@1: scope:[] from @begin + [26] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::screen#1) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (byte*~) main::$0 ← (const byte*) main::sc#0 + (word) $3e8 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [1] (byte*) main::sc#2 ← phi( main/(const byte*) main::sc#0 main::@1/(byte*) main::sc#1 ) + [2] *((byte*) main::sc#2) ← (byte) ' ' + [3] (byte*) main::sc#1 ← (byte*) main::sc#2 + rangenext(main::sc#0,main::$0) + [4] if((byte*) main::sc#1!=rangelast(main::sc#0,main::$0)) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + [5] (byte) main::i#2 ← phi( main::@2/(const byte) main::i#0 main::@3/(byte) main::i#1 ) + [6] *((const byte*) main::sc#0 + (byte) main::i#2) ← *((const byte[]) main::header#0 + (byte) main::i#2) + [7] (byte) main::i#1 ← ++ (byte) main::i#2 + [8] if(*((const byte[]) main::header#0 + (byte) main::i#1)!=(byte) 0) goto main::@3 + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@5 +main::@5: scope:[main] from main::@10 main::@4 + [9] (byte) main::i1#10 ← phi( main::@10/(byte) main::i1#1 main::@4/(const byte) main::i1#0 ) + [9] (byte*) main::screen#4 ← phi( main::@10/(byte*) main::screen#17 main::@4/(const byte*) main::sc#0 ) + [10] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 + [11] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 + [12] *((byte*) main::screen#1) ← (byte~) main::$3 + [13] if((byte) main::i1#10>=(byte) 5) goto main::@6 + to:main::@11 +main::@6: scope:[main] from main::@11 main::@5 + (byte) main::i1#13 ← phi( main::@11/(byte) main::i1#18 main::@5/(byte) main::i1#10 ) + [14] if((byte) main::i1#13>=(byte) 5+(number) 1) goto main::@7 + to:main::@12 +main::@11: scope:[main] from main::@5 + (byte*) main::screen#18 ← phi( ) + (byte) main::i1#18 ← phi( main::@5/(byte) main::i1#10 ) + [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' + to:main::@6 +main::@7: scope:[main] from main::@12 main::@6 + (byte) main::i1#14 ← phi( main::@12/(byte) main::i1#19 main::@6/(byte) main::i1#13 ) + [16] if((byte) main::i1#14!=(byte) 5) goto main::@8 + to:main::@13 +main::@12: scope:[main] from main::@6 + (byte*) main::screen#19 ← phi( ) + (byte) main::i1#19 ← phi( main::@6/(byte) main::i1#13 ) + [17] *((byte*) main::screen#19 + (byte) 5) ← (byte) '+' + to:main::@7 +main::@8: scope:[main] from main::@13 main::@7 + (byte) main::i1#15 ← phi( main::@13/(byte) main::i1#20 main::@7/(byte) main::i1#14 ) + [18] if((byte) main::i1#15<(byte) 5) goto main::@9 + to:main::@14 +main::@13: scope:[main] from main::@7 + (byte*) main::screen#20 ← phi( ) + (byte) main::i1#20 ← phi( main::@7/(byte) main::i1#14 ) + [19] *((byte*) main::screen#20 + (byte) 8) ← (byte) '+' + to:main::@8 +main::@9: scope:[main] from main::@14 main::@8 + (byte) main::i1#16 ← phi( main::@14/(byte) main::i1#21 main::@8/(byte) main::i1#15 ) + [20] if((byte) main::i1#16<(byte) 5+(number) 1) goto main::@10 + to:main::@15 +main::@14: scope:[main] from main::@8 + (byte*) main::screen#21 ← phi( ) + (byte) main::i1#21 ← phi( main::@8/(byte) main::i1#15 ) + [21] *((byte*) main::screen#21 + (byte) $b) ← (byte) '+' + to:main::@9 +main::@10: scope:[main] from main::@15 main::@9 + (byte*) main::screen#17 ← phi( ) + (byte) main::i1#17 ← phi( main::@15/(byte) main::i1#22 main::@9/(byte) main::i1#16 ) + [22] (byte) main::i1#1 ← ++ (byte) main::i1#17 + [23] if((byte) main::i1#1<(byte) 9+(number) 1) goto main::@5 + to:main::@return +main::@15: scope:[main] from main::@9 + (byte*) main::screen#22 ← phi( ) + (byte) main::i1#22 ← phi( main::@9/(byte) main::i1#16 ) + [24] *((byte*) main::screen#22 + (byte) $e) ← (byte) '+' + to:main::@10 +main::@return: scope:[main] from main::@10 + [25] return + to:@return +@1: scope:[] from @begin + [26] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Adding number conversion cast (unumber) 5+1 in if((byte) main::i1#13>=(byte) 5+(number) 1) goto main::@7 +Adding number conversion cast (unumber) 1 in if((byte) main::i1#13>=(unumber)(byte) 5+(number) 1) goto main::@7 +Adding number conversion cast (unumber) 5+1 in if((byte) main::i1#16<(byte) 5+(number) 1) goto main::@10 +Adding number conversion cast (unumber) 1 in if((byte) main::i1#16<(unumber)(byte) 5+(number) 1) goto main::@10 Adding number conversion cast (unumber) 9+1 in if((byte) main::i1#1<(byte) 9+(number) 1) goto main::@5 Adding number conversion cast (unumber) 1 in if((byte) main::i1#1<(unumber)(byte) 9+(number) 1) goto main::@5 Successful SSA optimization PassNAddNumberTypeConversions @@ -316,12 +480,39 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte*) main::screen#17 = (byte*) main::screen#4 +Alias (byte) main::i1#1 = (byte) main::i1#10 +Alias (byte) main::i1#13 = (byte) main::i1#19 +Alias (byte*) main::screen#19 = (byte*) main::screen#24 +Alias (byte) main::i1#14 = (byte) main::i1#20 +Alias (byte*) main::screen#20 = (byte*) main::screen#25 +Alias (byte) main::i1#15 = (byte) main::i1#21 +Alias (byte*) main::screen#21 = (byte*) main::screen#26 +Alias (byte) main::i1#16 = (byte) main::i1#22 +Alias (byte*) main::screen#22 = (byte*) main::screen#23 +Successful SSA optimization Pass2AliasElimination +Alias (byte) main::i1#13 = (byte) main::i1#14 (byte) main::i1#15 (byte) main::i1#16 (byte) main::i1#17 +Alias (byte*) main::screen#17 = (byte*) main::screen#20 (byte*) main::screen#19 (byte*) main::screen#21 (byte*) main::screen#22 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte*) main::screen#27 (const byte*) main::sc#0 +Identical Phi Values (byte) main::i1#23 (const byte) main::i1#0 +Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [0] (byte*~) main::$0 ← (const byte*) main::sc#0 + (word) $3e8 +Constant right-side identified [38] (byte*) main::screen#28 ← (const byte*) main::sc#0 + (byte) $28 +Constant right-side identified [39] (byte~) main::$16 ← (byte) '0' + (const byte) main::i1#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::$0 = main::sc#0+$3e8 +Constant (const byte*) main::screen#28 = main::sc#0+$28 +Constant (const byte) main::$16 = '0'+main::i1#0 Successful SSA optimization Pass2ConstantIdentification +Removing PHI-reference to removed block (main::@5_1) in block main::@6 +Removing PHI-reference to removed block (main::@5_1) in block main::@6 +if() condition always false - eliminating [41] if((const byte) main::i1#0>=(byte) 5) goto main::@6 +Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [3] main::sc#1 ← ++ main::sc#2 to ++ Resolved ranged comparison value [4] if(main::sc#1!=rangelast(main::sc#0,main::$0)) goto main::@1 to (byte*)(const byte*) main::$0+(number) 1 +Simplifying expression containing zero '0' in +Successful SSA optimization PassNSimplifyExpressionWithZero Adding number conversion cast (unumber) 1 in if((byte*) main::sc#1!=(byte*)(const byte*) main::$0+(number) 1) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast (const byte*) main::$0+(unumber)(number) 1 @@ -332,15 +523,19 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inlining constant with var siblings (const byte*) main::sc#0 Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const byte) main::i1#0 +Inlining constant with var siblings (const byte*) main::screen#28 +Constant inlined main::$16 = (byte) '0' +Constant inlined main::screen#28 = (byte*) 1024+(byte) $28 +Constant inlined main::$0 = (byte*) 1024+(word) $3e8 Constant inlined main::i#0 = (byte) 0 Constant inlined main::i1#0 = (byte) 0 Constant inlined main::sc#0 = (byte*) 1024 Constant inlined main::$15 = (const byte[]) main::header#0 -Constant inlined main::$0 = (byte*) 1024+(word) $3e8 Successful SSA optimization Pass2ConstantInlining Added new block during phi lifting main::@17(between main::@1 and main::@1) Added new block during phi lifting main::@18(between main::@3 and main::@3) -Added new block during phi lifting main::@19(between main::@10 and main::@5) +Added new block during phi lifting main::@19(between main::@5 and main::@6) +Added new block during phi lifting main::@20(between main::@5 and main::@11) Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @2 @@ -351,15 +546,20 @@ Adding NOP phi() at start of main::@4 CALL GRAPH Calls in [] to main:2 -Created 4 initial phi equivalence classes -Coalesced [33] main::screen#17 ← main::screen#1 -Coalesced [34] main::i1#13 ← main::i1#1 -Coalesced [35] main::i#3 ← main::i#1 -Coalesced [36] main::sc#3 ← main::sc#1 +Created 6 initial phi equivalence classes +Coalesced [19] main::i1#24 ← main::i1#18 +Coalesced [20] main::screen#29 ← main::screen#18 +Coalesced [37] main::i1#26 ← main::i1#1 +Coalesced [38] main::screen#31 ← main::screen#1 +Coalesced (already) [39] main::i1#25 ← main::i1#1 +Coalesced (already) [40] main::screen#30 ← main::screen#1 +Coalesced [41] main::i#3 ← main::i#1 +Coalesced [42] main::sc#3 ← main::sc#1 Coalesced down to 4 phi equivalence classes Culled Empty Block (label) @2 Culled Empty Block (label) main::@2 Culled Empty Block (label) main::@4 +Culled Empty Block (label) main::@20 Culled Empty Block (label) main::@19 Culled Empty Block (label) main::@18 Culled Empty Block (label) main::@17 @@ -404,84 +604,91 @@ main::@2: scope:[main] from main::@1 main::@2 [10] *((byte*) 1024 + (byte) main::i#2) ← *((const byte[]) main::header#0 + (byte) main::i#2) [11] (byte) main::i#1 ← ++ (byte) main::i#2 [12] if(*((const byte[]) main::header#0 + (byte) main::i#1)!=(byte) 0) goto main::@2 - to:main::@3 -main::@3: scope:[main] from main::@2 main::@8 - [13] (byte) main::i1#10 ← phi( main::@8/(byte) main::i1#1 main::@2/(byte) 0 ) - [13] (byte*) main::screen#4 ← phi( main::@8/(byte*) main::screen#1 main::@2/(byte*) 1024 ) - [14] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 - [15] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 - [16] *((byte*) main::screen#1) ← (byte~) main::$3 - [17] if((byte) main::i1#10>=(byte) 5) goto main::@4 + to:main::@5_1 +main::@5_1: scope:[main] from main::@2 + [13] *((byte*) 1024+(byte) $28) ← (byte) '0' to:main::@9 -main::@9: scope:[main] from main::@3 - [18] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' +main::@9: scope:[main] from main::@3 main::@5_1 + [14] (byte*) main::screen#18 ← phi( main::@3/(byte*) main::screen#1 main::@5_1/(byte*) 1024+(byte) $28 ) + [14] (byte) main::i1#18 ← phi( main::@3/(byte) main::i1#1 main::@5_1/(byte) 0 ) + [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' to:main::@4 main::@4: scope:[main] from main::@3 main::@9 - [19] if((byte) main::i1#10>=(byte) 5+(byte) 1) goto main::@5 + [16] (byte*) main::screen#17 ← phi( main::@9/(byte*) main::screen#18 main::@3/(byte*) main::screen#1 ) + [16] (byte) main::i1#13 ← phi( main::@9/(byte) main::i1#18 main::@3/(byte) main::i1#1 ) + [17] if((byte) main::i1#13>=(byte) 5+(byte) 1) goto main::@5 to:main::@10 main::@10: scope:[main] from main::@4 - [20] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' + [18] *((byte*) main::screen#17 + (byte) 5) ← (byte) '+' to:main::@5 main::@5: scope:[main] from main::@10 main::@4 - [21] if((byte) main::i1#10!=(byte) 5) goto main::@6 + [19] if((byte) main::i1#13!=(byte) 5) goto main::@6 to:main::@11 main::@11: scope:[main] from main::@5 - [22] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' + [20] *((byte*) main::screen#17 + (byte) 8) ← (byte) '+' to:main::@6 main::@6: scope:[main] from main::@11 main::@5 - [23] if((byte) main::i1#10<(byte) 5) goto main::@7 + [21] if((byte) main::i1#13<(byte) 5) goto main::@7 to:main::@12 main::@12: scope:[main] from main::@6 - [24] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' + [22] *((byte*) main::screen#17 + (byte) $b) ← (byte) '+' to:main::@7 main::@7: scope:[main] from main::@12 main::@6 - [25] if((byte) main::i1#10<(byte) 5+(byte) 1) goto main::@8 + [23] if((byte) main::i1#13<(byte) 5+(byte) 1) goto main::@8 to:main::@13 main::@13: scope:[main] from main::@7 - [26] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' + [24] *((byte*) main::screen#17 + (byte) $e) ← (byte) '+' to:main::@8 main::@8: scope:[main] from main::@13 main::@7 - [27] (byte) main::i1#1 ← ++ (byte) main::i1#10 - [28] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 + [25] (byte) main::i1#1 ← ++ (byte) main::i1#13 + [26] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 to:main::@return main::@return: scope:[main] from main::@8 - [29] return + [27] return to:@return +main::@3: scope:[main] from main::@8 + [28] (byte*) main::screen#1 ← (byte*) main::screen#17 + (byte) $28 + [29] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#1 + [30] *((byte*) main::screen#1) ← (byte~) main::$3 + [31] if((byte) main::i1#1>=(byte) 5) goto main::@4 + to:main::@9 VARIABLE REGISTER WEIGHTS (void()) main() -(byte~) main::$3 22.0 +(byte~) main::$3 202.0 (byte[]) main::header (byte) main::i (byte) main::i#1 16.5 (byte) main::i#2 22.0 (byte) main::i1 -(byte) main::i1#1 16.5 -(byte) main::i1#10 6.285714285714286 +(byte) main::i1#1 100.99999999999999 +(byte) main::i1#13 68.55555555555554 +(byte) main::i1#18 56.0 (byte*) main::sc (byte*) main::sc#1 16.5 (byte*) main::sc#2 16.5 (byte*) main::screen -(byte*) main::screen#1 5.866666666666666 -(byte*) main::screen#4 22.0 +(byte*) main::screen#1 101.0 +(byte*) main::screen#17 56.090909090909086 +(byte*) main::screen#18 61.5 Initial phi equivalence classes [ main::sc#2 main::sc#1 ] [ main::i#2 main::i#1 ] -[ main::screen#4 main::screen#1 ] -[ main::i1#10 main::i1#1 ] +[ main::i1#13 main::i1#18 main::i1#1 ] +[ main::screen#17 main::screen#18 main::screen#1 ] Added variable main::$3 to zero page equivalence class [ main::$3 ] Complete equivalence classes [ main::sc#2 main::sc#1 ] [ main::i#2 main::i#1 ] -[ main::screen#4 main::screen#1 ] -[ main::i1#10 main::i1#1 ] +[ main::i1#13 main::i1#18 main::i1#1 ] +[ main::screen#17 main::screen#18 main::screen#1 ] [ main::$3 ] Allocated zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] Allocated zp ZP_BYTE:4 [ main::i#2 main::i#1 ] -Allocated zp ZP_WORD:5 [ main::screen#4 main::screen#1 ] -Allocated zp ZP_BYTE:7 [ main::i1#10 main::i1#1 ] +Allocated zp ZP_BYTE:5 [ main::i1#13 main::i1#18 main::i1#1 ] +Allocated zp ZP_WORD:6 [ main::screen#17 main::screen#18 main::screen#1 ] Allocated zp ZP_BYTE:8 [ main::$3 ] INITIAL ASM @@ -514,8 +721,8 @@ main: { .label _3 = 8 .label sc = 2 .label i = 4 - .label screen = 5 - .label i1 = 7 + .label screen = 6 + .label i1 = 5 // [5] phi from main to main::@1 [phi:main->main::@1] b1_from_main: // [5] phi (byte*) main::sc#2 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 @@ -569,25 +776,107 @@ main: { lda header,y cmp #0 bne b2_from_b2 - // [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - b3_from_b2: - // [13] phi (byte) main::i1#10 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1 + jmp b5_1 + // main::@5_1 + b5_1: + // [13] *((byte*) 1024+(byte) $28) ← (byte) '0' -- _deref_pbuc1=vbuc2 + lda #'0' + sta $400+$28 + // [14] phi from main::@5_1 to main::@9 [phi:main::@5_1->main::@9] + b9_from_b5_1: + // [14] phi (byte*) main::screen#18 = (byte*) 1024+(byte) $28 [phi:main::@5_1->main::@9#0] -- pbuz1=pbuc1 + lda #<$400+$28 + sta screen + lda #>$400+$28 + sta screen+1 + // [14] phi (byte) main::i1#18 = (byte) 0 [phi:main::@5_1->main::@9#1] -- vbuz1=vbuc1 lda #0 sta i1 - // [13] phi (byte*) main::screen#4 = (byte*) 1024 [phi:main::@2->main::@3#1] -- pbuz1=pbuc1 - lda #<$400 - sta screen - lda #>$400 - sta screen+1 - jmp b3 - // [13] phi from main::@8 to main::@3 [phi:main::@8->main::@3] - b3_from_b8: - // [13] phi (byte) main::i1#10 = (byte) main::i1#1 [phi:main::@8->main::@3#0] -- register_copy - // [13] phi (byte*) main::screen#4 = (byte*) main::screen#1 [phi:main::@8->main::@3#1] -- register_copy - jmp b3 + jmp b9 + // main::@9 + b9: + // [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #2 + sta (screen),y + // [16] phi from main::@3 main::@9 to main::@4 [phi:main::@3/main::@9->main::@4] + b4_from_b3: + b4_from_b9: + // [16] phi (byte*) main::screen#17 = (byte*) main::screen#1 [phi:main::@3/main::@9->main::@4#0] -- register_copy + // [16] phi (byte) main::i1#13 = (byte) main::i1#1 [phi:main::@3/main::@9->main::@4#1] -- register_copy + jmp b4 + // main::@4 + b4: + // [17] if((byte) main::i1#13>=(byte) 5+(byte) 1) goto main::@5 -- vbuz1_ge_vbuc1_then_la1 + lda i1 + cmp #5+1 + bcs b5 + jmp b10 + // main::@10 + b10: + // [18] *((byte*) main::screen#17 + (byte) 5) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #5 + sta (screen),y + jmp b5 + // main::@5 + b5: + // [19] if((byte) main::i1#13!=(byte) 5) goto main::@6 -- vbuz1_neq_vbuc1_then_la1 + lda #5 + cmp i1 + bne b6 + jmp b11 + // main::@11 + b11: + // [20] *((byte*) main::screen#17 + (byte) 8) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #8 + sta (screen),y + jmp b6 + // main::@6 + b6: + // [21] if((byte) main::i1#13<(byte) 5) goto main::@7 -- vbuz1_lt_vbuc1_then_la1 + lda i1 + cmp #5 + bcc b7 + jmp b12 + // main::@12 + b12: + // [22] *((byte*) main::screen#17 + (byte) $b) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #$b + sta (screen),y + jmp b7 + // main::@7 + b7: + // [23] if((byte) main::i1#13<(byte) 5+(byte) 1) goto main::@8 -- vbuz1_lt_vbuc1_then_la1 + lda i1 + cmp #5+1 + bcc b8 + jmp b13 + // main::@13 + b13: + // [24] *((byte*) main::screen#17 + (byte) $e) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #$e + sta (screen),y + jmp b8 + // main::@8 + b8: + // [25] (byte) main::i1#1 ← ++ (byte) main::i1#13 -- vbuz1=_inc_vbuz1 + inc i1 + // [26] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 -- vbuz1_lt_vbuc1_then_la1 + lda i1 + cmp #9+1 + bcc b3 + jmp breturn + // main::@return + breturn: + // [27] return + rts // main::@3 b3: - // [14] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [28] (byte*) main::screen#1 ← (byte*) main::screen#17 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen @@ -595,95 +884,23 @@ main: { bcc !+ inc screen+1 !: - // [15] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 -- vbuz1=vbuc1_plus_vbuz2 + // [29] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#1 -- vbuz1=vbuc1_plus_vbuz2 lax i1 axs #-['0'] stx _3 - // [16] *((byte*) main::screen#1) ← (byte~) main::$3 -- _deref_pbuz1=vbuz2 + // [30] *((byte*) main::screen#1) ← (byte~) main::$3 -- _deref_pbuz1=vbuz2 lda _3 ldy #0 sta (screen),y - // [17] if((byte) main::i1#10>=(byte) 5) goto main::@4 -- vbuz1_ge_vbuc1_then_la1 + // [31] if((byte) main::i1#1>=(byte) 5) goto main::@4 -- vbuz1_ge_vbuc1_then_la1 lda i1 cmp #5 - bcs b4 + bcs b4_from_b3 + // [14] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + b9_from_b3: + // [14] phi (byte*) main::screen#18 = (byte*) main::screen#1 [phi:main::@3->main::@9#0] -- register_copy + // [14] phi (byte) main::i1#18 = (byte) main::i1#1 [phi:main::@3->main::@9#1] -- register_copy jmp b9 - // main::@9 - b9: - // [18] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #2 - sta (screen),y - jmp b4 - // main::@4 - b4: - // [19] if((byte) main::i1#10>=(byte) 5+(byte) 1) goto main::@5 -- vbuz1_ge_vbuc1_then_la1 - lda i1 - cmp #5+1 - bcs b5 - jmp b10 - // main::@10 - b10: - // [20] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #5 - sta (screen),y - jmp b5 - // main::@5 - b5: - // [21] if((byte) main::i1#10!=(byte) 5) goto main::@6 -- vbuz1_neq_vbuc1_then_la1 - lda #5 - cmp i1 - bne b6 - jmp b11 - // main::@11 - b11: - // [22] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #8 - sta (screen),y - jmp b6 - // main::@6 - b6: - // [23] if((byte) main::i1#10<(byte) 5) goto main::@7 -- vbuz1_lt_vbuc1_then_la1 - lda i1 - cmp #5 - bcc b7 - jmp b12 - // main::@12 - b12: - // [24] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #$b - sta (screen),y - jmp b7 - // main::@7 - b7: - // [25] if((byte) main::i1#10<(byte) 5+(byte) 1) goto main::@8 -- vbuz1_lt_vbuc1_then_la1 - lda i1 - cmp #5+1 - bcc b8 - jmp b13 - // main::@13 - b13: - // [26] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #$e - sta (screen),y - jmp b8 - // main::@8 - b8: - // [27] (byte) main::i1#1 ← ++ (byte) main::i1#10 -- vbuz1=_inc_vbuz1 - inc i1 - // [28] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 -- vbuz1_lt_vbuc1_then_la1 - lda i1 - cmp #9+1 - bcc b3_from_b8 - jmp breturn - // main::@return - breturn: - // [29] return - rts header: .text " < <= == >= >@" } // File Data @@ -694,41 +911,43 @@ Statement [8] if((byte*) main::sc#1!=(byte*) 1024+(word) $3e8+(byte) 1) goto mai Statement [10] *((byte*) 1024 + (byte) main::i#2) ← *((const byte[]) main::header#0 + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::i#2 main::i#1 ] Statement [12] if(*((const byte[]) main::header#0 + (byte) main::i#1)!=(byte) 0) goto main::@2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) always clobbers reg byte a -Statement [14] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ main::i1#10 main::i1#1 ] -Statement [15] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 [ main::i1#10 main::screen#1 main::$3 ] ( main:2 [ main::i1#10 main::screen#1 main::$3 ] ) always clobbers reg byte a -Statement [16] *((byte*) main::screen#1) ← (byte~) main::$3 [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:7 [ main::i1#10 main::i1#1 ] -Statement [18] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [20] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [22] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [24] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [26] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y +Statement [13] *((byte*) 1024+(byte) $28) ← (byte) '0' [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' [ main::i1#18 main::screen#18 ] ( main:2 [ main::i1#18 main::screen#18 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ main::i1#13 main::i1#18 main::i1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ main::i1#13 main::i1#18 main::i1#1 ] +Statement [18] *((byte*) main::screen#17 + (byte) 5) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [20] *((byte*) main::screen#17 + (byte) 8) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [22] *((byte*) main::screen#17 + (byte) $b) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [24] *((byte*) main::screen#17 + (byte) $e) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [28] (byte*) main::screen#1 ← (byte*) main::screen#17 + (byte) $28 [ main::i1#1 main::screen#1 ] ( main:2 [ main::i1#1 main::screen#1 ] ) always clobbers reg byte a +Statement [29] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#1 [ main::i1#1 main::screen#1 main::$3 ] ( main:2 [ main::i1#1 main::screen#1 main::$3 ] ) always clobbers reg byte a +Statement [30] *((byte*) main::screen#1) ← (byte~) main::$3 [ main::i1#1 main::screen#1 ] ( main:2 [ main::i1#1 main::screen#1 ] ) always clobbers reg byte y Statement [6] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a reg byte y Statement [8] if((byte*) main::sc#1!=(byte*) 1024+(word) $3e8+(byte) 1) goto main::@1 [ main::sc#1 ] ( main:2 [ main::sc#1 ] ) always clobbers reg byte a Statement [10] *((byte*) 1024 + (byte) main::i#2) ← *((const byte[]) main::header#0 + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a Statement [12] if(*((const byte[]) main::header#0 + (byte) main::i#1)!=(byte) 0) goto main::@2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) always clobbers reg byte a -Statement [14] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a -Statement [15] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 [ main::i1#10 main::screen#1 main::$3 ] ( main:2 [ main::i1#10 main::screen#1 main::$3 ] ) always clobbers reg byte a -Statement [16] *((byte*) main::screen#1) ← (byte~) main::$3 [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte y -Statement [18] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [20] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [22] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [24] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y -Statement [26] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' [ main::i1#10 main::screen#1 ] ( main:2 [ main::i1#10 main::screen#1 ] ) always clobbers reg byte a reg byte y +Statement [13] *((byte*) 1024+(byte) $28) ← (byte) '0' [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' [ main::i1#18 main::screen#18 ] ( main:2 [ main::i1#18 main::screen#18 ] ) always clobbers reg byte a reg byte y +Statement [18] *((byte*) main::screen#17 + (byte) 5) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [20] *((byte*) main::screen#17 + (byte) 8) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [22] *((byte*) main::screen#17 + (byte) $b) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [24] *((byte*) main::screen#17 + (byte) $e) ← (byte) '+' [ main::i1#13 main::screen#17 ] ( main:2 [ main::i1#13 main::screen#17 ] ) always clobbers reg byte a reg byte y +Statement [28] (byte*) main::screen#1 ← (byte*) main::screen#17 + (byte) $28 [ main::i1#1 main::screen#1 ] ( main:2 [ main::i1#1 main::screen#1 ] ) always clobbers reg byte a +Statement [29] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#1 [ main::i1#1 main::screen#1 main::$3 ] ( main:2 [ main::i1#1 main::screen#1 main::$3 ] ) always clobbers reg byte a +Statement [30] *((byte*) main::screen#1) ← (byte~) main::$3 [ main::i1#1 main::screen#1 ] ( main:2 [ main::i1#1 main::screen#1 ] ) always clobbers reg byte y Potential registers zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_BYTE:4 [ main::i#2 main::i#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:5 [ main::screen#4 main::screen#1 ] : zp ZP_WORD:5 , -Potential registers zp ZP_BYTE:7 [ main::i1#10 main::i1#1 ] : zp ZP_BYTE:7 , reg byte x , +Potential registers zp ZP_BYTE:5 [ main::i1#13 main::i1#18 main::i1#1 ] : zp ZP_BYTE:5 , reg byte x , +Potential registers zp ZP_WORD:6 [ main::screen#17 main::screen#18 main::screen#1 ] : zp ZP_WORD:6 , Potential registers zp ZP_BYTE:8 [ main::$3 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 38.5: zp ZP_BYTE:4 [ main::i#2 main::i#1 ] 33: zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] 27.87: zp ZP_WORD:5 [ main::screen#4 main::screen#1 ] 22.79: zp ZP_BYTE:7 [ main::i1#10 main::i1#1 ] 22: zp ZP_BYTE:8 [ main::$3 ] +Uplift Scope [main] 225.56: zp ZP_BYTE:5 [ main::i1#13 main::i1#18 main::i1#1 ] 218.59: zp ZP_WORD:6 [ main::screen#17 main::screen#18 main::screen#1 ] 202: zp ZP_BYTE:8 [ main::$3 ] 38.5: zp ZP_BYTE:4 [ main::i#2 main::i#1 ] 33: zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] Uplift Scope [] -Uplifting [main] best 2453 combination reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] zp ZP_WORD:5 [ main::screen#4 main::screen#1 ] reg byte x [ main::i1#10 main::i1#1 ] reg byte a [ main::$3 ] -Uplifting [] best 2453 combination -Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ main::screen#4 main::screen#1 ] +Uplifting [main] best 14204 combination reg byte x [ main::i1#13 main::i1#18 main::i1#1 ] zp ZP_WORD:6 [ main::screen#17 main::screen#18 main::screen#1 ] reg byte a [ main::$3 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] +Uplifting [] best 14204 combination +Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ main::screen#17 main::screen#18 main::screen#1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -808,24 +1027,101 @@ main: { lda header,x cmp #0 bne b2_from_b2 - // [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - b3_from_b2: - // [13] phi (byte) main::i1#10 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1 - ldx #0 - // [13] phi (byte*) main::screen#4 = (byte*) 1024 [phi:main::@2->main::@3#1] -- pbuz1=pbuc1 - lda #<$400 + jmp b5_1 + // main::@5_1 + b5_1: + // [13] *((byte*) 1024+(byte) $28) ← (byte) '0' -- _deref_pbuc1=vbuc2 + lda #'0' + sta $400+$28 + // [14] phi from main::@5_1 to main::@9 [phi:main::@5_1->main::@9] + b9_from_b5_1: + // [14] phi (byte*) main::screen#18 = (byte*) 1024+(byte) $28 [phi:main::@5_1->main::@9#0] -- pbuz1=pbuc1 + lda #<$400+$28 sta screen - lda #>$400 + lda #>$400+$28 sta screen+1 - jmp b3 - // [13] phi from main::@8 to main::@3 [phi:main::@8->main::@3] - b3_from_b8: - // [13] phi (byte) main::i1#10 = (byte) main::i1#1 [phi:main::@8->main::@3#0] -- register_copy - // [13] phi (byte*) main::screen#4 = (byte*) main::screen#1 [phi:main::@8->main::@3#1] -- register_copy - jmp b3 + // [14] phi (byte) main::i1#18 = (byte) 0 [phi:main::@5_1->main::@9#1] -- vbuxx=vbuc1 + ldx #0 + jmp b9 + // main::@9 + b9: + // [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #2 + sta (screen),y + // [16] phi from main::@3 main::@9 to main::@4 [phi:main::@3/main::@9->main::@4] + b4_from_b3: + b4_from_b9: + // [16] phi (byte*) main::screen#17 = (byte*) main::screen#1 [phi:main::@3/main::@9->main::@4#0] -- register_copy + // [16] phi (byte) main::i1#13 = (byte) main::i1#1 [phi:main::@3/main::@9->main::@4#1] -- register_copy + jmp b4 + // main::@4 + b4: + // [17] if((byte) main::i1#13>=(byte) 5+(byte) 1) goto main::@5 -- vbuxx_ge_vbuc1_then_la1 + cpx #5+1 + bcs b5 + jmp b10 + // main::@10 + b10: + // [18] *((byte*) main::screen#17 + (byte) 5) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #5 + sta (screen),y + jmp b5 + // main::@5 + b5: + // [19] if((byte) main::i1#13!=(byte) 5) goto main::@6 -- vbuxx_neq_vbuc1_then_la1 + cpx #5 + bne b6 + jmp b11 + // main::@11 + b11: + // [20] *((byte*) main::screen#17 + (byte) 8) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #8 + sta (screen),y + jmp b6 + // main::@6 + b6: + // [21] if((byte) main::i1#13<(byte) 5) goto main::@7 -- vbuxx_lt_vbuc1_then_la1 + cpx #5 + bcc b7 + jmp b12 + // main::@12 + b12: + // [22] *((byte*) main::screen#17 + (byte) $b) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #$b + sta (screen),y + jmp b7 + // main::@7 + b7: + // [23] if((byte) main::i1#13<(byte) 5+(byte) 1) goto main::@8 -- vbuxx_lt_vbuc1_then_la1 + cpx #5+1 + bcc b8 + jmp b13 + // main::@13 + b13: + // [24] *((byte*) main::screen#17 + (byte) $e) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #$e + sta (screen),y + jmp b8 + // main::@8 + b8: + // [25] (byte) main::i1#1 ← ++ (byte) main::i1#13 -- vbuxx=_inc_vbuxx + inx + // [26] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 -- vbuxx_lt_vbuc1_then_la1 + cpx #9+1 + bcc b3 + jmp breturn + // main::@return + breturn: + // [27] return + rts // main::@3 b3: - // [14] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [28] (byte*) main::screen#1 ← (byte*) main::screen#17 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen @@ -833,88 +1129,21 @@ main: { bcc !+ inc screen+1 !: - // [15] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 -- vbuaa=vbuc1_plus_vbuxx + // [29] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#1 -- vbuaa=vbuc1_plus_vbuxx txa clc adc #'0' - // [16] *((byte*) main::screen#1) ← (byte~) main::$3 -- _deref_pbuz1=vbuaa + // [30] *((byte*) main::screen#1) ← (byte~) main::$3 -- _deref_pbuz1=vbuaa ldy #0 sta (screen),y - // [17] if((byte) main::i1#10>=(byte) 5) goto main::@4 -- vbuxx_ge_vbuc1_then_la1 + // [31] if((byte) main::i1#1>=(byte) 5) goto main::@4 -- vbuxx_ge_vbuc1_then_la1 cpx #5 - bcs b4 + bcs b4_from_b3 + // [14] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + b9_from_b3: + // [14] phi (byte*) main::screen#18 = (byte*) main::screen#1 [phi:main::@3->main::@9#0] -- register_copy + // [14] phi (byte) main::i1#18 = (byte) main::i1#1 [phi:main::@3->main::@9#1] -- register_copy jmp b9 - // main::@9 - b9: - // [18] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #2 - sta (screen),y - jmp b4 - // main::@4 - b4: - // [19] if((byte) main::i1#10>=(byte) 5+(byte) 1) goto main::@5 -- vbuxx_ge_vbuc1_then_la1 - cpx #5+1 - bcs b5 - jmp b10 - // main::@10 - b10: - // [20] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #5 - sta (screen),y - jmp b5 - // main::@5 - b5: - // [21] if((byte) main::i1#10!=(byte) 5) goto main::@6 -- vbuxx_neq_vbuc1_then_la1 - cpx #5 - bne b6 - jmp b11 - // main::@11 - b11: - // [22] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #8 - sta (screen),y - jmp b6 - // main::@6 - b6: - // [23] if((byte) main::i1#10<(byte) 5) goto main::@7 -- vbuxx_lt_vbuc1_then_la1 - cpx #5 - bcc b7 - jmp b12 - // main::@12 - b12: - // [24] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #$b - sta (screen),y - jmp b7 - // main::@7 - b7: - // [25] if((byte) main::i1#10<(byte) 5+(byte) 1) goto main::@8 -- vbuxx_lt_vbuc1_then_la1 - cpx #5+1 - bcc b8 - jmp b13 - // main::@13 - b13: - // [26] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #$e - sta (screen),y - jmp b8 - // main::@8 - b8: - // [27] (byte) main::i1#1 ← ++ (byte) main::i1#10 -- vbuxx=_inc_vbuxx - inx - // [28] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 -- vbuxx_lt_vbuc1_then_la1 - cpx #9+1 - bcc b3_from_b8 - jmp breturn - // main::@return - breturn: - // [29] return - rts header: .text " < <= == >= >@" } // File Data @@ -924,7 +1153,7 @@ Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp b1 Removing instruction jmp b2 -Removing instruction jmp b3 +Removing instruction jmp b5_1 Removing instruction jmp b9 Removing instruction jmp b4 Removing instruction jmp b10 @@ -940,32 +1169,33 @@ Succesful ASM optimization Pass5NextJumpElimination Replacing label b1_from_b1 with b1 Replacing label b1_from_b1 with b1 Replacing label b2_from_b2 with b2 -Replacing label b3_from_b8 with b3 +Replacing label b4_from_b3 with b4 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: Removing instruction b1_from_b1: Removing instruction b2_from_b2: -Removing instruction b3_from_b8: +Removing instruction b4_from_b3: +Removing instruction b4_from_b9: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction b1_from_main: Removing instruction b2_from_b1: -Removing instruction b3_from_b2: -Removing instruction b9: +Removing instruction b5_1: +Removing instruction b9_from_b5_1: Removing instruction b10: Removing instruction b11: Removing instruction b12: Removing instruction b13: Removing instruction breturn: +Removing instruction b9_from_b3: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin Removing instruction jmp b1 Removing instruction jmp b2 -Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -975,7 +1205,7 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (void()) main() -(byte~) main::$3 reg byte a 22.0 +(byte~) main::$3 reg byte a 202.0 (label) main::@1 (label) main::@10 (label) main::@11 @@ -985,6 +1215,7 @@ FINAL SYMBOL TABLE (label) main::@3 (label) main::@4 (label) main::@5 +(label) main::@5_1 (label) main::@6 (label) main::@7 (label) main::@8 @@ -996,24 +1227,26 @@ FINAL SYMBOL TABLE (byte) main::i#1 reg byte x 16.5 (byte) main::i#2 reg byte x 22.0 (byte) main::i1 -(byte) main::i1#1 reg byte x 16.5 -(byte) main::i1#10 reg byte x 6.285714285714286 +(byte) main::i1#1 reg byte x 100.99999999999999 +(byte) main::i1#13 reg byte x 68.55555555555554 +(byte) main::i1#18 reg byte x 56.0 (byte*) main::sc (byte*) main::sc#1 sc zp ZP_WORD:2 16.5 (byte*) main::sc#2 sc zp ZP_WORD:2 16.5 (byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:4 5.866666666666666 -(byte*) main::screen#4 screen zp ZP_WORD:4 22.0 +(byte*) main::screen#1 screen zp ZP_WORD:4 101.0 +(byte*) main::screen#17 screen zp ZP_WORD:4 56.090909090909086 +(byte*) main::screen#18 screen zp ZP_WORD:4 61.5 zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] reg byte x [ main::i#2 main::i#1 ] -zp ZP_WORD:4 [ main::screen#4 main::screen#1 ] -reg byte x [ main::i1#10 main::i1#1 ] +reg byte x [ main::i1#13 main::i1#18 main::i1#1 ] +zp ZP_WORD:4 [ main::screen#17 main::screen#18 main::screen#1 ] reg byte a [ main::$3 ] FINAL ASSEMBLER -Score: 1931 +Score: 11012 // File Comments // Test rewriting of constant comparisons @@ -1079,21 +1312,93 @@ main: { lda header,x cmp #0 bne b2 - // [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - // [13] phi (byte) main::i1#10 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1 - ldx #0 - // [13] phi (byte*) main::screen#4 = (byte*) 1024 [phi:main::@2->main::@3#1] -- pbuz1=pbuc1 - lda #<$400 + // main::@5_1 + // screen[0] = '0'+i + // [13] *((byte*) 1024+(byte) $28) ← (byte) '0' -- _deref_pbuc1=vbuc2 + lda #'0' + sta $400+$28 + // [14] phi from main::@5_1 to main::@9 [phi:main::@5_1->main::@9] + // [14] phi (byte*) main::screen#18 = (byte*) 1024+(byte) $28 [phi:main::@5_1->main::@9#0] -- pbuz1=pbuc1 + lda #<$400+$28 sta screen - lda #>$400 + lda #>$400+$28 sta screen+1 - // [13] phi from main::@8 to main::@3 [phi:main::@8->main::@3] - // [13] phi (byte) main::i1#10 = (byte) main::i1#1 [phi:main::@8->main::@3#0] -- register_copy - // [13] phi (byte*) main::screen#4 = (byte*) main::screen#1 [phi:main::@8->main::@3#1] -- register_copy + // [14] phi (byte) main::i1#18 = (byte) 0 [phi:main::@5_1->main::@9#1] -- vbuxx=vbuc1 + ldx #0 + // main::@9 + b9: + // screen[2] = '+' + // [15] *((byte*) main::screen#18 + (byte) 2) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #2 + sta (screen),y + // [16] phi from main::@3 main::@9 to main::@4 [phi:main::@3/main::@9->main::@4] + // [16] phi (byte*) main::screen#17 = (byte*) main::screen#1 [phi:main::@3/main::@9->main::@4#0] -- register_copy + // [16] phi (byte) main::i1#13 = (byte) main::i1#1 [phi:main::@3/main::@9->main::@4#1] -- register_copy + // main::@4 + b4: + // if(i<=5) + // [17] if((byte) main::i1#13>=(byte) 5+(byte) 1) goto main::@5 -- vbuxx_ge_vbuc1_then_la1 + cpx #5+1 + bcs b5 + // main::@10 + // screen[5] = '+' + // [18] *((byte*) main::screen#17 + (byte) 5) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #5 + sta (screen),y + // main::@5 + b5: + // if(i==5) + // [19] if((byte) main::i1#13!=(byte) 5) goto main::@6 -- vbuxx_neq_vbuc1_then_la1 + cpx #5 + bne b6 + // main::@11 + // screen[8] = '+' + // [20] *((byte*) main::screen#17 + (byte) 8) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #8 + sta (screen),y + // main::@6 + b6: + // if(i>=5) + // [21] if((byte) main::i1#13<(byte) 5) goto main::@7 -- vbuxx_lt_vbuc1_then_la1 + cpx #5 + bcc b7 + // main::@12 + // screen[11] = '+' + // [22] *((byte*) main::screen#17 + (byte) $b) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #$b + sta (screen),y + // main::@7 + b7: + // if(i>5) + // [23] if((byte) main::i1#13<(byte) 5+(byte) 1) goto main::@8 -- vbuxx_lt_vbuc1_then_la1 + cpx #5+1 + bcc b8 + // main::@13 + // screen[14] = '+' + // [24] *((byte*) main::screen#17 + (byte) $e) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 + lda #'+' + ldy #$e + sta (screen),y + // main::@8 + b8: + // for(byte i=0;i<=9;i++) + // [25] (byte) main::i1#1 ← ++ (byte) main::i1#13 -- vbuxx=_inc_vbuxx + inx + // [26] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 -- vbuxx_lt_vbuc1_then_la1 + cpx #9+1 + bcc b3 + // main::@return + // } + // [27] return + rts // main::@3 b3: // screen +=40 - // [14] (byte*) main::screen#1 ← (byte*) main::screen#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [28] (byte*) main::screen#1 ← (byte*) main::screen#17 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen @@ -1102,84 +1407,22 @@ main: { inc screen+1 !: // '0'+i - // [15] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#10 -- vbuaa=vbuc1_plus_vbuxx + // [29] (byte~) main::$3 ← (byte) '0' + (byte) main::i1#1 -- vbuaa=vbuc1_plus_vbuxx txa clc adc #'0' // screen[0] = '0'+i - // [16] *((byte*) main::screen#1) ← (byte~) main::$3 -- _deref_pbuz1=vbuaa + // [30] *((byte*) main::screen#1) ← (byte~) main::$3 -- _deref_pbuz1=vbuaa ldy #0 sta (screen),y // if(i<5) - // [17] if((byte) main::i1#10>=(byte) 5) goto main::@4 -- vbuxx_ge_vbuc1_then_la1 + // [31] if((byte) main::i1#1>=(byte) 5) goto main::@4 -- vbuxx_ge_vbuc1_then_la1 cpx #5 bcs b4 - // main::@9 - // screen[2] = '+' - // [18] *((byte*) main::screen#1 + (byte) 2) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #2 - sta (screen),y - // main::@4 - b4: - // if(i<=5) - // [19] if((byte) main::i1#10>=(byte) 5+(byte) 1) goto main::@5 -- vbuxx_ge_vbuc1_then_la1 - cpx #5+1 - bcs b5 - // main::@10 - // screen[5] = '+' - // [20] *((byte*) main::screen#1 + (byte) 5) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #5 - sta (screen),y - // main::@5 - b5: - // if(i==5) - // [21] if((byte) main::i1#10!=(byte) 5) goto main::@6 -- vbuxx_neq_vbuc1_then_la1 - cpx #5 - bne b6 - // main::@11 - // screen[8] = '+' - // [22] *((byte*) main::screen#1 + (byte) 8) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #8 - sta (screen),y - // main::@6 - b6: - // if(i>=5) - // [23] if((byte) main::i1#10<(byte) 5) goto main::@7 -- vbuxx_lt_vbuc1_then_la1 - cpx #5 - bcc b7 - // main::@12 - // screen[11] = '+' - // [24] *((byte*) main::screen#1 + (byte) $b) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #$b - sta (screen),y - // main::@7 - b7: - // if(i>5) - // [25] if((byte) main::i1#10<(byte) 5+(byte) 1) goto main::@8 -- vbuxx_lt_vbuc1_then_la1 - cpx #5+1 - bcc b8 - // main::@13 - // screen[14] = '+' - // [26] *((byte*) main::screen#1 + (byte) $e) ← (byte) '+' -- pbuz1_derefidx_vbuc1=vbuc2 - lda #'+' - ldy #$e - sta (screen),y - // main::@8 - b8: - // for(byte i=0;i<=9;i++) - // [27] (byte) main::i1#1 ← ++ (byte) main::i1#10 -- vbuxx=_inc_vbuxx - inx - // [28] if((byte) main::i1#1<(byte) 9+(byte) 1) goto main::@3 -- vbuxx_lt_vbuc1_then_la1 - cpx #9+1 - bcc b3 - // main::@return - // } - // [29] return - rts + // [14] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + // [14] phi (byte*) main::screen#18 = (byte*) main::screen#1 [phi:main::@3->main::@9#0] -- register_copy + // [14] phi (byte) main::i1#18 = (byte) main::i1#1 [phi:main::@3->main::@9#1] -- register_copy + jmp b9 header: .text " < <= == >= >@" } // File Data diff --git a/src/test/ref/comparison-rewriting.sym b/src/test/ref/comparison-rewriting.sym index 345b5665b..e436fb1e4 100644 --- a/src/test/ref/comparison-rewriting.sym +++ b/src/test/ref/comparison-rewriting.sym @@ -2,7 +2,7 @@ (label) @begin (label) @end (void()) main() -(byte~) main::$3 reg byte a 22.0 +(byte~) main::$3 reg byte a 202.0 (label) main::@1 (label) main::@10 (label) main::@11 @@ -12,6 +12,7 @@ (label) main::@3 (label) main::@4 (label) main::@5 +(label) main::@5_1 (label) main::@6 (label) main::@7 (label) main::@8 @@ -23,17 +24,19 @@ (byte) main::i#1 reg byte x 16.5 (byte) main::i#2 reg byte x 22.0 (byte) main::i1 -(byte) main::i1#1 reg byte x 16.5 -(byte) main::i1#10 reg byte x 6.285714285714286 +(byte) main::i1#1 reg byte x 100.99999999999999 +(byte) main::i1#13 reg byte x 68.55555555555554 +(byte) main::i1#18 reg byte x 56.0 (byte*) main::sc (byte*) main::sc#1 sc zp ZP_WORD:2 16.5 (byte*) main::sc#2 sc zp ZP_WORD:2 16.5 (byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:4 5.866666666666666 -(byte*) main::screen#4 screen zp ZP_WORD:4 22.0 +(byte*) main::screen#1 screen zp ZP_WORD:4 101.0 +(byte*) main::screen#17 screen zp ZP_WORD:4 56.090909090909086 +(byte*) main::screen#18 screen zp ZP_WORD:4 61.5 zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] reg byte x [ main::i#2 main::i#1 ] -zp ZP_WORD:4 [ main::screen#4 main::screen#1 ] -reg byte x [ main::i1#10 main::i1#1 ] +reg byte x [ main::i1#13 main::i1#18 main::i1#1 ] +zp ZP_WORD:4 [ main::screen#17 main::screen#18 main::screen#1 ] reg byte a [ main::$3 ] diff --git a/src/test/ref/complex/tetris/tetris.asm b/src/test/ref/complex/tetris/tetris.asm index 89cd1a073..4a4ae4786 100644 --- a/src/test/ref/complex/tetris/tetris.asm +++ b/src/test/ref/complex/tetris/tetris.asm @@ -878,18 +878,13 @@ play_spawn_current: { lda #1 sta game_over b1: - lda #7 - sta piece_idx - b2: - lda #7 - cmp piece_idx - beq sid_rnd1 - rts - sid_rnd1: lda SID_VOICE3_OSC and #7 sta piece_idx - jmp b2 + lda #7 + cmp piece_idx + beq b1 + rts } // Update the score based on the number of lines removed // play_update_score(byte register(X) removed) diff --git a/src/test/ref/complex/tetris/tetris.cfg b/src/test/ref/complex/tetris/tetris.cfg index 11d8e9801..f8fe859c4 100644 --- a/src/test/ref/complex/tetris/tetris.cfg +++ b/src/test/ref/complex/tetris/tetris.cfg @@ -93,7 +93,7 @@ main::@15: scope:[main] from main::@14 [35] call render_moving to:main::@16 main::@16: scope:[main] from main::@15 - [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#2 + [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#1 [37] call render_next to:main::@17 main::@17: scope:[main] from main::@16 @@ -108,7 +108,7 @@ main::@1: scope:[main] from main::@17 main::@25 main::@6 [40] (byte) current_movedown_counter#16 ← phi( main::@6/(byte) current_movedown_counter#14 main::@17/(byte) 0 main::@25/(byte) current_movedown_counter#14 ) [40] (byte) keyboard_events_size#19 ← phi( main::@6/(byte) keyboard_events_size#16 main::@17/(byte) 0 main::@25/(byte) keyboard_events_size#16 ) [40] (byte) render_screen_showing#13 ← phi( main::@6/(byte) render_screen_showing#1 main::@17/(byte) render_screen_showing#0 main::@25/(byte) render_screen_showing#1 ) - [40] (byte) next_piece_idx#10 ← phi( main::@6/(byte) next_piece_idx#16 main::@17/(byte) play_spawn_current::piece_idx#2 main::@25/(byte) next_piece_idx#16 ) + [40] (byte) next_piece_idx#10 ← phi( main::@6/(byte) next_piece_idx#16 main::@17/(byte) play_spawn_current::piece_idx#1 main::@25/(byte) next_piece_idx#16 ) [40] (byte) game_over#10 ← phi( main::@6/(byte) game_over#15 main::@17/(byte) game_over#52 main::@25/(byte) game_over#15 ) [40] (byte) current_ypos#11 ← phi( main::@6/(byte) current_ypos#19 main::@17/(byte) current_ypos#6 main::@25/(byte) current_ypos#19 ) [40] (byte) current_xpos#14 ← phi( main::@6/(byte) current_xpos#19 main::@17/(byte) current_xpos#100 main::@25/(byte) current_xpos#19 ) @@ -603,7 +603,7 @@ play_move_down::@17: scope:[play_move_down] from play_move_down::@16 [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) to:play_move_down::@11 play_move_down::@11: scope:[play_move_down] from play_move_down::@10 play_move_down::@17 - [283] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#2 ) + [283] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#1 ) [283] (byte) game_over#27 ← phi( play_move_down::@10/(byte) game_over#10 play_move_down::@17/(byte) game_over#52 ) [283] (byte) current_xpos#43 ← phi( play_move_down::@10/(byte) current_xpos#14 play_move_down::@17/(byte) current_xpos#100 ) [283] (byte*) current_piece_gfx#35 ← phi( play_move_down::@10/(byte*) current_piece_gfx#13 play_move_down::@17/(byte*~) current_piece_gfx#117 ) @@ -640,7 +640,7 @@ play_move_down::@10: scope:[play_move_down] from play_move_down::@13 to:play_move_down::@11 play_spawn_current: scope:[play_spawn_current] from main::@12 main::@13 play_move_down::@16 [287] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) - [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) + [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#1 play_move_down::@16/(byte) next_piece_idx#10 ) [288] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [290] (byte) current_piece_char#5 ← *((const byte[]) PIECES_CHARS#0 + (byte) play_spawn_current::current_piece_idx#0) @@ -661,563 +661,562 @@ play_spawn_current::@5: scope:[play_spawn_current] from play_spawn_current::@4 to:play_spawn_current::@1 play_spawn_current::@1: scope:[play_spawn_current] from play_spawn_current::@4 play_spawn_current::@5 [301] (byte) game_over#52 ← phi( play_spawn_current::@5/(byte) game_over#65 play_spawn_current::@4/(byte) 1 ) - to:play_spawn_current::@2 -play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@1 play_spawn_current::@3 - [302] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current::@1/(byte) 7 play_spawn_current::@3/(byte) play_spawn_current::piece_idx#1 ) - [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 - to:play_spawn_current::@return -play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@2 - [304] return - to:@return -play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_current::@2 - [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:play_spawn_current::sid_rnd1 +play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_current::@1 play_spawn_current::@2 + [302] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:play_spawn_current::@3 play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::sid_rnd1 - [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 + [303] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 to:play_spawn_current::@2 +play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@3 + [304] if((byte) play_spawn_current::piece_idx#1==(byte) 7) goto play_spawn_current::sid_rnd1 + to:play_spawn_current::@return +play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@2 + [305] return + to:@return play_update_score: scope:[play_update_score] from play_move_down::@15 - [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return + [306] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return to:play_update_score::@1 play_update_score::@1: scope:[play_update_score] from play_update_score - [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 - [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 - [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 - [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) + [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 + [308] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 + [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 + [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) asm { sed } - [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 - [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 + [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 + [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 asm { cld } - [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 - [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 - [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return + [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 + [316] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 + [317] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return to:play_update_score::@2 play_update_score::@2: scope:[play_update_score] from play_update_score::@1 - [319] phi() - [320] call play_increase_level + [318] phi() + [319] call play_increase_level to:play_update_score::@return play_update_score::@return: scope:[play_update_score] from play_update_score play_update_score::@1 play_update_score::@2 - [321] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) - [321] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#66 ) - [321] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) - [321] (dword) score_bcd#16 ← phi( play_update_score/(dword) score_bcd#18 play_update_score::@1/(dword) score_bcd#29 play_update_score::@2/(dword) score_bcd#29 ) - [321] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) - [322] return + [320] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) + [320] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#66 ) + [320] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) + [320] (dword) score_bcd#16 ← phi( play_update_score/(dword) score_bcd#18 play_update_score::@1/(dword) score_bcd#29 play_update_score::@2/(dword) score_bcd#29 ) + [320] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) + [321] return to:@return play_increase_level: scope:[play_increase_level] from play_update_score::@2 - [323] (byte) level#21 ← ++ (byte) level#10 - [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 + [322] (byte) level#21 ← ++ (byte) level#10 + [323] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 to:play_increase_level::@3 play_increase_level::@3: scope:[play_increase_level] from play_increase_level - [325] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) + [324] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) to:play_increase_level::@1 play_increase_level::@1: scope:[play_increase_level] from play_increase_level play_increase_level::@3 - [326] (byte) current_movedown_slow#66 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) - [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 - [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f - [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 + [325] (byte) current_movedown_slow#66 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) + [326] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 + [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f + [328] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 to:play_increase_level::@4 play_increase_level::@4: scope:[play_increase_level] from play_increase_level::@1 - [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 + [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 to:play_increase_level::@2 play_increase_level::@2: scope:[play_increase_level] from play_increase_level::@1 play_increase_level::@4 - [331] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) + [330] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) asm { sed } to:play_increase_level::@5 play_increase_level::@5: scope:[play_increase_level] from play_increase_level::@2 play_increase_level::@5 - [333] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) - [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 - [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) - [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 - [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 + [332] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) + [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 + [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) + [335] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 + [336] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 to:play_increase_level::@6 play_increase_level::@6: scope:[play_increase_level] from play_increase_level::@5 asm { cld } to:play_increase_level::@return play_increase_level::@return: scope:[play_increase_level] from play_increase_level::@6 - [339] return + [338] return to:@return play_remove_lines: scope:[play_remove_lines] from play_move_down::@14 - [340] phi() + [339] phi() to:play_remove_lines::@1 play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_remove_lines::@6 - [341] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) - [341] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) - [341] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [341] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) + [340] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) + [340] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) + [340] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [340] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) to:play_remove_lines::@2 play_remove_lines::@2: scope:[play_remove_lines] from play_remove_lines::@1 play_remove_lines::@3 - [342] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) - [342] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) - [342] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) - [342] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) - [343] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) - [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 - [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 + [341] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) + [341] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) + [341] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) + [341] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) + [342] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) + [343] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 + [344] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 to:play_remove_lines::@3 play_remove_lines::@9: scope:[play_remove_lines] from play_remove_lines::@2 - [346] phi() + [345] phi() to:play_remove_lines::@3 play_remove_lines::@3: scope:[play_remove_lines] from play_remove_lines::@2 play_remove_lines::@9 - [347] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) - [348] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 - [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 - [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 - [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 + [346] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) + [347] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 + [348] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 + [349] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 + [350] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 to:play_remove_lines::@4 play_remove_lines::@4: scope:[play_remove_lines] from play_remove_lines::@3 - [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 + [351] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 to:play_remove_lines::@5 play_remove_lines::@5: scope:[play_remove_lines] from play_remove_lines::@4 - [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 - [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 + [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 + [353] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 to:play_remove_lines::@6 play_remove_lines::@6: scope:[play_remove_lines] from play_remove_lines::@4 play_remove_lines::@5 - [355] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) - [355] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) - [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 - [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 + [354] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) + [354] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) + [355] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 + [356] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 to:play_remove_lines::@7 play_remove_lines::@7: scope:[play_remove_lines] from play_remove_lines::@6 play_remove_lines::@8 - [358] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 + [357] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [358] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 to:play_remove_lines::@return play_remove_lines::@return: scope:[play_remove_lines] from play_remove_lines::@7 - [360] return + [359] return to:@return play_remove_lines::@8: scope:[play_remove_lines] from play_remove_lines::@7 - [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 - [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 + [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 + [361] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 to:play_remove_lines::@7 play_lock_current: scope:[play_lock_current] from play_move_down::@9 - [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + [362] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 to:play_lock_current::@1 play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lock_current::@6 - [364] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) - [364] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte~) play_lock_current::i#7 ) - [364] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) - [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 - [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) - [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 + [363] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) + [363] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte~) play_lock_current::i#7 ) + [363] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) + [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 + [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) + [366] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 to:play_lock_current::@2 play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@7 - [368] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) - [368] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) - [368] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte~) play_lock_current::i#9 ) - [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 - [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 + [367] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) + [367] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) + [367] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte~) play_lock_current::i#9 ) + [368] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 + [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 to:play_lock_current::@4 play_lock_current::@4: scope:[play_lock_current] from play_lock_current::@2 - [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 + [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 to:play_lock_current::@3 play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4 - [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 - [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 - [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 + [371] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 + [372] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 + [373] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 to:play_lock_current::@5 play_lock_current::@5: scope:[play_lock_current] from play_lock_current::@3 - [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 - [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 - [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 + [374] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 + [375] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 + [376] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 to:play_lock_current::@return play_lock_current::@return: scope:[play_lock_current] from play_lock_current::@5 - [378] return + [377] return to:@return play_lock_current::@6: scope:[play_lock_current] from play_lock_current::@5 - [379] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 + [378] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 to:play_lock_current::@1 play_lock_current::@7: scope:[play_lock_current] from play_lock_current::@3 - [380] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 + [379] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 to:play_lock_current::@2 keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 play_move_down::@1 - [381] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 play_move_down::@1/(const byte) KEY_SPACE#0 ) - [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 - [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) - [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 - [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) + [380] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 play_move_down::@1/(const byte) KEY_SPACE#0 ) + [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 + [382] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) + [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 + [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) to:keyboard_event_pressed::@return keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed - [386] return + [385] return to:@return keyboard_event_get: scope:[keyboard_event_get] from main::@19 - [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return + [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get - [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 - [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) + [387] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 + [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) to:keyboard_event_get::@return keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@1 - [390] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) - [390] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) - [391] return + [389] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) + [389] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) + [390] return to:@return keyboard_event_scan: scope:[keyboard_event_scan] from main::@18 - [392] phi() + [391] phi() to:keyboard_event_scan::@7 keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8 - [393] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) - [393] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) - [393] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) - [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 - [395] call keyboard_matrix_read - [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + [392] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) + [392] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) + [392] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) + [393] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + [394] call keyboard_matrix_read + [395] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 to:keyboard_event_scan::@19 keyboard_event_scan::@19: scope:[keyboard_event_scan] from keyboard_event_scan::@7 - [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 - [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 + [396] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 + [397] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 to:keyboard_event_scan::@16 keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@19 - [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 + [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 to:keyboard_event_scan::@8 keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@16 - [400] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) - [400] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) - [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 - [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 + [399] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) + [399] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) + [400] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 + [401] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 to:keyboard_event_scan::@17 keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@8 - [403] phi() - [404] call keyboard_event_pressed - [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + [402] phi() + [403] call keyboard_event_pressed + [404] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@20 keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@17 - [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 - [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 + [405] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + [406] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 to:keyboard_event_scan::@18 keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@20 - [408] phi() + [407] phi() to:keyboard_event_scan::@1 keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@20 - [409] phi() - [410] call keyboard_event_pressed - [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + [408] phi() + [409] call keyboard_event_pressed + [410] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@21 keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@1 - [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 - [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 + [411] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + [412] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 to:keyboard_event_scan::@4 keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@21 - [414] phi() + [413] phi() to:keyboard_event_scan::@2 keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@4 - [415] phi() - [416] call keyboard_event_pressed - [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + [414] phi() + [415] call keyboard_event_pressed + [416] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@22 keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@2 - [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 - [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 + [417] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + [418] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 to:keyboard_event_scan::@5 keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@22 - [420] phi() + [419] phi() to:keyboard_event_scan::@3 keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@5 - [421] phi() - [422] call keyboard_event_pressed - [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + [420] phi() + [421] call keyboard_event_pressed + [422] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@23 keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@3 - [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 - [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return + [423] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + [424] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return to:keyboard_event_scan::@6 keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@23 - [426] phi() + [425] phi() to:keyboard_event_scan::@return keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@6 - [427] return + [426] return to:@return keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@19 - [428] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) - [428] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) - [428] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) - [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) - [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) - [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 + [427] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) + [427] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) + [427] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) + [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) + [429] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [430] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 to:keyboard_event_scan::@12 keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@9 - [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 + [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 to:keyboard_event_scan::@13 keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@12 - [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) - [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 + [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [433] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 to:keyboard_event_scan::@14 keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 - [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 + [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 + [435] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 - [437] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) - [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 - [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 - [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 + [436] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) + [437] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 + [438] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 + [439] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 to:keyboard_event_scan::@15 keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@10 - [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 + [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 to:keyboard_event_scan::@8 keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 - [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 - [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 + [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 + [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 + [443] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 - [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) - [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) + [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) + [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) to:keyboard_matrix_read::@return keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read - [447] return + [446] return to:@return render_show: scope:[render_show] from main::@3 - [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 + [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 to:render_show::toD0182 render_show::toD0182: scope:[render_show] from render_show - [449] phi() + [448] phi() to:render_show::@1 render_show::@1: scope:[render_show] from render_show::toD0181 render_show::toD0182 - [450] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) - [451] *((const byte*) D018#0) ← (byte) render_show::d018val#3 - [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) - [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) - [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 + [449] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) + [450] *((const byte*) D018#0) ← (byte) render_show::d018val#3 + [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) + [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) + [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 to:render_show::@return render_show::@return: scope:[render_show] from render_show::@1 - [455] return + [454] return to:@return render_show::toD0181: scope:[render_show] from render_show - [456] phi() + [455] phi() to:render_show::@1 play_init: scope:[play_init] from main::@11 - [457] phi() + [456] phi() to:play_init::@1 play_init::@1: scope:[play_init] from play_init play_init::@1 - [458] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) - [458] (byte*) play_init::pli#2 ← phi( play_init/(const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 play_init::@1/(byte*) play_init::pli#1 ) - [458] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) - [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 - [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 - [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 - [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 - [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 - [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 - [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 + [457] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) + [457] (byte*) play_init::pli#2 ← phi( play_init/(const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 play_init::@1/(byte*) play_init::pli#1 ) + [457] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) + [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 + [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 + [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 + [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 + [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 + [463] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 + [464] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 to:play_init::@2 play_init::@2: scope:[play_init] from play_init::@1 - [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 - [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) + [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 + [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) to:play_init::@3 play_init::@3: scope:[play_init] from play_init::@2 play_init::@3 - [468] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) - [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 - [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) - [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 - [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 + [467] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) + [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 + [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) + [470] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 + [471] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 to:play_init::@return play_init::@return: scope:[play_init] from play_init::@3 - [473] return + [472] return to:@return sprites_irq_init: scope:[sprites_irq_init] from main::@10 asm { sei } - [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 asm { ldaCIA1_INTERRUPT } - [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 - [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 - [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 - [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f - [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 - [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 - [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() + [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 + [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 + [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f + [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 + [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 + [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() asm { cli } to:sprites_irq_init::@return sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init - [485] return + [484] return to:@return sprites_init: scope:[sprites_init] from main::@9 - [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f - [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 - [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) - [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) + [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f + [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 + [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) + [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) to:sprites_init::@1 sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 - [490] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) - [490] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) - [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 - [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 - [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 - [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 - [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 + [489] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) + [489] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) + [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 + [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 + [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 + [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 + [494] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 + [495] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 to:sprites_init::@return sprites_init::@return: scope:[sprites_init] from sprites_init::@1 - [497] return + [496] return to:@return render_init: scope:[render_init] from main::@8 - [498] phi() + [497] phi() to:render_init::vicSelectGfxBank1 render_init::vicSelectGfxBank1: scope:[render_init] from render_init - [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 + [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 to:render_init::vicSelectGfxBank1_toDd001 render_init::vicSelectGfxBank1_toDd001: scope:[render_init] from render_init::vicSelectGfxBank1 - [500] phi() + [499] phi() to:render_init::vicSelectGfxBank1_@1 render_init::vicSelectGfxBank1_@1: scope:[render_init] from render_init::vicSelectGfxBank1_toDd001 - [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 + [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 to:render_init::@2 render_init::@2: scope:[render_init] from render_init::vicSelectGfxBank1_@1 - [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 - [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 - [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 - [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) - [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) - [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 - [508] call render_screen_original + [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 + [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 + [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 + [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) + [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) + [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 + [507] call render_screen_original to:render_init::@3 render_init::@3: scope:[render_init] from render_init::@2 - [509] phi() - [510] call render_screen_original + [508] phi() + [509] call render_screen_original to:render_init::@1 render_init::@1: scope:[render_init] from render_init::@1 render_init::@3 - [511] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) - [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 - [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 - [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 - [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 - [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 - [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 - [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 + [510] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 ) + [510] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 ) + [510] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) + [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 + [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 + [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 + [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 + [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 + [516] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 + [517] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 to:render_init::@return render_init::@return: scope:[render_init] from render_init::@1 - [519] return + [518] return to:@return render_screen_original: scope:[render_screen_original] from render_init::@2 render_init::@3 - [520] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1#0 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0 ) + [519] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1#0 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0 ) to:render_screen_original::@1 render_screen_original::@1: scope:[render_screen_original] from render_screen_original render_screen_original::@5 - [521] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) - [521] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) - [521] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) - [521] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS#0 render_screen_original::@5/(byte*) render_screen_original::cols#3 ) - [521] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) + [520] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) + [520] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) + [520] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) + [520] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS#0 render_screen_original::@5/(byte*) render_screen_original::cols#3 ) + [520] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) to:render_screen_original::@2 render_screen_original::@2: scope:[render_screen_original] from render_screen_original::@1 render_screen_original::@2 - [522] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) - [522] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) - [522] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) - [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 - [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 - [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 - [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 - [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 - [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 + [521] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) + [521] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) + [521] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) + [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 + [523] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 + [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 + [525] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 + [526] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 + [527] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 to:render_screen_original::@3 render_screen_original::@3: scope:[render_screen_original] from render_screen_original::@2 render_screen_original::@3 - [529] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) - [529] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) - [529] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) - [529] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) - [529] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) - [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) - [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 - [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 - [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) - [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 - [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 - [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 - [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 + [528] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) + [528] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) + [528] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) + [528] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) + [528] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) + [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) + [530] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 + [531] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 + [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) + [533] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 + [534] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 + [535] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 + [536] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 to:render_screen_original::@4 render_screen_original::@4: scope:[render_screen_original] from render_screen_original::@3 render_screen_original::@4 - [538] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) - [538] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) - [538] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) - [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 - [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 - [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 - [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 - [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 - [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 + [537] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) + [537] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) + [537] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) + [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 + [539] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 + [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 + [541] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 + [542] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 + [543] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 to:render_screen_original::@5 render_screen_original::@5: scope:[render_screen_original] from render_screen_original::@4 - [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 - [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 + [544] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 + [545] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 to:render_screen_original::@return render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@5 - [547] return + [546] return to:@return sid_rnd_init: scope:[sid_rnd_init] from main - [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff - [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 to:sid_rnd_init::@return sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init - [550] return + [549] return to:@return sprites_irq: scope:[sprites_irq] from asm { cld } - [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 - [553] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 - [554] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 - [555] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 - [556] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 - [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 - [558] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 + [551] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 + [552] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 + [553] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 + [554] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 + [555] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 + [556] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 + [557] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 to:sprites_irq::@8 sprites_irq::@8: scope:[sprites_irq] from sprites_irq sprites_irq::@8 - [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 + [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 to:sprites_irq::@9 sprites_irq::@9: scope:[sprites_irq] from sprites_irq::@8 - [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 - [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 + [559] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 + [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 to:sprites_irq::@10 sprites_irq::@10: scope:[sprites_irq] from sprites_irq::@9 - [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 - [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 - [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 - [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 - [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 - [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 + [561] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 + [562] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 + [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 + [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 + [565] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 + [566] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 to:sprites_irq::@2 sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@10 - [568] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 - [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 + [567] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 + [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 to:sprites_irq::@6 sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@2 - [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 + [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 to:sprites_irq::@7 sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@6 - [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 - [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 - [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 + [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 + [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 + [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 to:sprites_irq::@5 sprites_irq::@5: scope:[sprites_irq] from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 - [574] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@7/(byte) irq_sprite_ptr#3 ) - [574] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@7/(byte) irq_sprite_ypos#3 ) - [574] (byte) irq_cnt#3 ← phi( sprites_irq::@11/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@7/(byte) irq_cnt#1 ) - [574] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 ) - [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 - [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [573] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@7/(byte) irq_sprite_ptr#3 ) + [573] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@7/(byte) irq_sprite_ypos#3 ) + [573] (byte) irq_cnt#3 ← phi( sprites_irq::@11/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@7/(byte) irq_cnt#1 ) + [573] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 ) + [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 + [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:sprites_irq::@return sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@5 - [577] return + [576] return to:@return sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@6 - [578] (byte) irq_cnt#2 ← (byte) 0 - [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 - [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 - [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 + [577] (byte) irq_cnt#2 ← (byte) 0 + [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 + [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 + [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 to:sprites_irq::@5 sprites_irq::@3: scope:[sprites_irq] from sprites_irq::@2 - [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 - [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 + [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 + [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 to:sprites_irq::toSpritePtr2 sprites_irq::toSpritePtr2: scope:[sprites_irq] from sprites_irq::@3 - [584] phi() + [583] phi() to:sprites_irq::@11 sprites_irq::@11: scope:[sprites_irq] from sprites_irq::toSpritePtr2 - [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 + [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 to:sprites_irq::@5 sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@9 - [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 - [587] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 - [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 - [589] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 - [590] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 - [591] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 + [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 + [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 + [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 + [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 + [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 + [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 to:sprites_irq::@2 diff --git a/src/test/ref/complex/tetris/tetris.log b/src/test/ref/complex/tetris/tetris.log index 28094e6a5..c8fac53ec 100644 --- a/src/test/ref/complex/tetris/tetris.log +++ b/src/test/ref/complex/tetris/tetris.log @@ -9995,6 +9995,1342 @@ Eliminating unused constant (const byte) KEY_MODIFIER_LSHIFT#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks +GRAPH (NEW VERSIONS for play_spawn_current::piece_idx#2) +@begin: scope:[] from + to:@4 +@4: scope:[] from @begin + to:@8 +keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@8 + [0] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) + [1] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) + to:keyboard_matrix_read::@return +keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read + [2] return + to:@return +@8: scope:[] from @4 + to:@11 +keyboard_event_scan: scope:[keyboard_event_scan] from main::@35 + to:keyboard_event_scan::@8 +keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@10 + [3] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@10/(byte) keyboard_events_size#13 ) + [3] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(const byte) keyboard_event_scan::keycode#0 keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#13 ) + [3] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(const byte) keyboard_event_scan::row#0 keyboard_event_scan::@10/(byte) keyboard_event_scan::row#1 ) + [4] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + [5] call keyboard_matrix_read + [6] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + to:keyboard_event_scan::@25 +keyboard_event_scan::@25: scope:[keyboard_event_scan] from keyboard_event_scan::@8 + [7] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 + [8] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 + to:keyboard_event_scan::@21 +keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@25 + to:keyboard_event_scan::@11 +keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@25 + [9] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 + to:keyboard_event_scan::@10 +keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@20 keyboard_event_scan::@21 + [10] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@20/(byte) keyboard_events_size#29 keyboard_event_scan::@21/(byte) keyboard_events_size#30 ) + [10] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@20/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@21/(byte) keyboard_event_scan::keycode#1 ) + [11] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 + [12] if((byte) keyboard_event_scan::row#1!=(number) 8) goto keyboard_event_scan::@8 + to:keyboard_event_scan::@23 +keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@12 keyboard_event_scan::@9 + [13] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@12/(byte) keyboard_events_size#29 keyboard_event_scan::@9/(byte) keyboard_events_size#30 ) + [13] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@12/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@9/(byte) keyboard_event_scan::keycode#11 ) + [13] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@12/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@9/(const byte) keyboard_event_scan::col#0 ) + [14] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) + [15] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [16] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@12 + to:keyboard_event_scan::@16 +keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@14 keyboard_event_scan::@16 keyboard_event_scan::@18 + [17] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@11/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#1 keyboard_event_scan::@16/(byte) keyboard_events_size#10 keyboard_event_scan::@18/(byte) keyboard_events_size#2 ) + [18] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 + [19] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 + [20] if((byte) keyboard_event_scan::col#1!=(number) 8) goto keyboard_event_scan::@11 + to:keyboard_event_scan::@20 +keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@11 + [21] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@12 + to:keyboard_event_scan::@17 +keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@16 + [22] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [23] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@14 + to:keyboard_event_scan::@18 +keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@17 + [24] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 + [25] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 + [26] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 + to:keyboard_event_scan::@12 +keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@17 + [27] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 + [28] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 + to:keyboard_event_scan::@12 +keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@12 + [29] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 + to:keyboard_event_scan::@10 +keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@10 + [30] call keyboard_event_pressed + [31] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@26 +keyboard_event_scan::@26: scope:[keyboard_event_scan] from keyboard_event_scan::@23 + [32] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + [33] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 + to:keyboard_event_scan::@24 +keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan::@24 keyboard_event_scan::@26 + [34] phi() + [35] call keyboard_event_pressed + [36] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@27 +keyboard_event_scan::@27: scope:[keyboard_event_scan] from keyboard_event_scan::@1 + [37] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + [38] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 + to:keyboard_event_scan::@5 +keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@26 + to:keyboard_event_scan::@1 +keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@27 keyboard_event_scan::@5 + [39] phi() + [40] call keyboard_event_pressed + [41] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@28 +keyboard_event_scan::@28: scope:[keyboard_event_scan] from keyboard_event_scan::@2 + [42] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + [43] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 + to:keyboard_event_scan::@6 +keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@27 + to:keyboard_event_scan::@2 +keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@28 keyboard_event_scan::@6 + [44] phi() + [45] call keyboard_event_pressed + [46] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@29 +keyboard_event_scan::@29: scope:[keyboard_event_scan] from keyboard_event_scan::@3 + [47] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + [48] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return + to:keyboard_event_scan::@7 +keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@28 + to:keyboard_event_scan::@3 +keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan::@29 + to:keyboard_event_scan::@return +keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@29 keyboard_event_scan::@7 + [49] phi() + [50] return + to:@return +keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@2 keyboard_event_scan::@23 keyboard_event_scan::@3 play_move_down::@1 + [51] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) keyboard_event_pressed::keycode#1 keyboard_event_scan::@2/(const byte) keyboard_event_pressed::keycode#2 keyboard_event_scan::@23/(const byte) keyboard_event_pressed::keycode#0 keyboard_event_scan::@3/(const byte) keyboard_event_pressed::keycode#3 play_move_down::@1/(const byte) keyboard_event_pressed::keycode#4 ) + [52] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 + [53] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) + [54] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 + [55] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) + to:keyboard_event_pressed::@return +keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed + [56] return + to:@return +keyboard_event_get: scope:[keyboard_event_get] from main::@36 + [57] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@1 + to:keyboard_event_get::@3 +keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get + to:keyboard_event_get::@return +keyboard_event_get::@3: scope:[keyboard_event_get] from keyboard_event_get + [58] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 + [59] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) + to:keyboard_event_get::@return +keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get::@1 keyboard_event_get::@3 + [60] (byte) keyboard_events_size#16 ← phi( keyboard_event_get::@1/(byte) keyboard_events_size#13 keyboard_event_get::@3/(byte) keyboard_events_size#4 ) + [60] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get::@1/(const byte) keyboard_event_get::return#0 keyboard_event_get::@3/(byte) keyboard_event_get::return#1 ) + [61] return + to:@return +@11: scope:[] from @8 + to:@13 +sid_rnd_init: scope:[sid_rnd_init] from main + [62] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [63] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [64] return + to:@return +@13: scope:[] from @11 + [65] (byte*) PLAYFIELD_SPRITE_PTRS_1#0 ← (const byte*) PLAYFIELD_SCREEN_1#0 + (const word) SPRITE_PTRS#0 + [66] (byte*) PLAYFIELD_SPRITE_PTRS_2#0 ← (const byte*) PLAYFIELD_SCREEN_2#0 + (const word) SPRITE_PTRS#0 + [67] (byte~) $3 ← (const byte) PLAYFIELD_LINES#0 * (const byte) PLAYFIELD_COLS#0 + [68] (byte[$3]) playfield#0 ← { fill( $3, 0) } + [69] (byte) render_screen_showing#0 ← (byte) 0 + [70] (dword) score_bcd#0 ← (byte) 0 + kickasm(location (const byte*) PLAYFIELD_CHARSET#0) {{ .fill 8,$00 // Place a filled char at the start of the charset + .import binary "playfield-screen.imap" + }} + kickasm(location (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0) {{ // Load chars for the screen + .var screen = LoadBinary("playfield-screen.iscr") + // Load extended colors for the screen + .var extended = LoadBinary("playfield-extended.col") + // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 + // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) + // <<6 to move extended colors to the upper 2 bits + .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) + }} + kickasm(location (const byte*) PLAYFIELD_COLORS_ORIGINAL#0) {{ .import binary "playfield-screen.col" + }} + [74] (byte[]) PIECES_COLORS_1#0 ← (byte[]){ (const byte) BLUE#0, (const byte) GREEN#0, (const byte) PURPLE#0, (const byte) BLUE#0, (const byte) RED#0, (const byte) LIGHT_GREEN#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) LIGHT_BLUE#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) GREEN#0, (const byte) PURPLE#0, (const byte) BLUE#0, (const byte) RED#0, (const byte) LIGHT_GREEN#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) LIGHT_BLUE#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) GREEN#0, (const byte) PURPLE#0, (const byte) BLUE#0, (const byte) RED#0, (const byte) LIGHT_GREEN#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) LIGHT_BLUE#0, (const byte) RED#0 } + [75] (byte[]) PIECES_COLORS_2#0 ← (byte[]){ (const byte) CYAN#0, (const byte) LIGHT_GREEN#0, (const byte) PINK#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_BLUE#0, (const byte) DARK_GREY#0, (const byte) PURPLE#0, (const byte) RED#0, (const byte) ORANGE#0, (const byte) CYAN#0, (const byte) LIGHT_GREEN#0, (const byte) PINK#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_BLUE#0, (const byte) DARK_GREY#0, (const byte) PURPLE#0, (const byte) RED#0, (const byte) ORANGE#0, (const byte) CYAN#0, (const byte) LIGHT_GREEN#0, (const byte) PINK#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_BLUE#0, (const byte) DARK_GREY#0, (const byte) PURPLE#0, (const byte) RED#0, (const byte) ORANGE#0 } + [76] (byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 ← { fill( PLAYFIELD_LINES#0, 0) } + [77] (byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 ← { fill( PLAYFIELD_LINES#0, 0) } + to:@22 +render_init: scope:[render_init] from main::@25 + to:render_init::vicSelectGfxBank1 +render_init::vicSelectGfxBank1: scope:[render_init] from render_init + [78] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 + to:render_init::vicSelectGfxBank1_toDd001 +render_init::vicSelectGfxBank1_toDd001: scope:[render_init] from render_init::vicSelectGfxBank1 + [79] (word~) render_init::vicSelectGfxBank1_toDd001_$0#0 ← (word)(const byte*) render_init::vicSelectGfxBank1_gfx#0 + [80] (byte~) render_init::vicSelectGfxBank1_toDd001_$1#0 ← > (word~) render_init::vicSelectGfxBank1_toDd001_$0#0 + [81] (byte~) render_init::vicSelectGfxBank1_toDd001_$2#0 ← (byte~) render_init::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40 + [82] (byte) render_init::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (byte~) render_init::vicSelectGfxBank1_toDd001_$2#0 + to:render_init::vicSelectGfxBank1_toDd001_@return +render_init::vicSelectGfxBank1_toDd001_@return: scope:[render_init] from render_init::vicSelectGfxBank1_toDd001 + to:render_init::vicSelectGfxBank1_@1 +render_init::vicSelectGfxBank1_@1: scope:[render_init] from render_init::vicSelectGfxBank1_toDd001_@return + [83] *((const byte*) CIA2_PORT_A#0) ← (byte) render_init::vicSelectGfxBank1_toDd001_return#0 + to:render_init::@3 +render_init::@3: scope:[render_init] from render_init::vicSelectGfxBank1_@1 + [84] (byte~) render_init::$1 ← (const byte) VIC_ECM#0 | (const byte) VIC_DEN#0 + [85] (byte~) render_init::$2 ← (byte~) render_init::$1 | (const byte) VIC_RSEL#0 + [86] (byte~) render_init::$3 ← (byte~) render_init::$2 | (byte) 3 + [87] *((const byte*) D011#0) ← (byte~) render_init::$3 + [88] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 + [89] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 + [90] *((const byte*) BGCOL2#0) ← *((byte[]) PIECES_COLORS_1#0) + [91] *((const byte*) BGCOL3#0) ← *((byte[]) PIECES_COLORS_2#0) + [92] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 + [93] call render_screen_original + to:render_init::@4 +render_init::@4: scope:[render_init] from render_init::@3 + [94] call render_screen_original + to:render_init::@5 +render_init::@5: scope:[render_init] from render_init::@4 + [95] (byte*~) render_init::$6 ← (const byte*) PLAYFIELD_SCREEN_1#0 + (byte)(number) 2*(number) $28 + [96] (byte*) render_init::li_1#0 ← (byte*~) render_init::$6 + (byte) $10 + [97] (byte*~) render_init::$8 ← (const byte*) PLAYFIELD_SCREEN_2#0 + (byte)(number) 2*(number) $28 + [98] (byte*) render_init::li_2#0 ← (byte*~) render_init::$8 + (byte) $10 + [99] (byte~) render_init::$10 ← (const byte) PLAYFIELD_LINES#0 - (byte) 1 + to:render_init::@1 +render_init::@1: scope:[render_init] from render_init::@1 render_init::@5 + [100] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@5/(byte*) render_init::li_2#0 ) + [100] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@5/(byte*) render_init::li_1#0 ) + [100] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@5/(const byte) render_init::i#0 ) + [101] (byte~) render_init::$12 ← (byte) render_init::i#2 * (const byte) SIZEOF_POINTER + [102] *((byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$12) ← (byte*) render_init::li_1#2 + [103] (byte~) render_init::$13 ← (byte~) render_init::$12 + [104] *((byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 + [105] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 + [106] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 + [107] (byte) render_init::i#1 ← (byte) render_init::i#2 + rangenext(0,render_init::$10) + [108] if((byte) render_init::i#1!=rangelast(0,render_init::$10)) goto render_init::@1 + to:render_init::@2 +render_init::@2: scope:[render_init] from render_init::@1 + to:render_init::@return +render_init::@return: scope:[render_init] from render_init::@2 + [109] return + to:@return +render_show: scope:[render_show] from main::@6 + [110] if((byte) render_screen_show#16==(byte) 0) goto render_show::@1 + to:render_show::@3 +render_show::@1: scope:[render_show] from render_show + to:render_show::toD0181 +render_show::toD0181: scope:[render_show] from render_show::@1 + [111] (word~) render_show::toD0181_$0#0 ← (word)(const byte*) render_show::toD0181_screen#0 + [112] (word~) render_show::toD0181_$1#0 ← (word~) render_show::toD0181_$0#0 & (word) $3fff + [113] (word~) render_show::toD0181_$2#0 ← (word~) render_show::toD0181_$1#0 * (byte) 4 + [114] (byte~) render_show::toD0181_$3#0 ← > (word~) render_show::toD0181_$2#0 + [115] (word~) render_show::toD0181_$4#0 ← (word)(const byte*) render_show::toD0181_gfx#0 + [116] (byte~) render_show::toD0181_$5#0 ← > (word~) render_show::toD0181_$4#0 + [117] (byte~) render_show::toD0181_$6#0 ← (byte~) render_show::toD0181_$5#0 / (byte) 4 + [118] (byte~) render_show::toD0181_$7#0 ← (byte~) render_show::toD0181_$6#0 & (byte) $f + [119] (byte) render_show::toD0181_return#0 ← (byte~) render_show::toD0181_$3#0 | (byte~) render_show::toD0181_$7#0 + to:render_show::toD0181_@return +render_show::toD0181_@return: scope:[render_show] from render_show::toD0181 + to:render_show::@5 +render_show::@5: scope:[render_show] from render_show::toD0181_@return + to:render_show::@2 +render_show::@3: scope:[render_show] from render_show + to:render_show::toD0182 +render_show::toD0182: scope:[render_show] from render_show::@3 + [120] (word~) render_show::toD0182_$0#0 ← (word)(const byte*) render_show::toD0182_screen#0 + [121] (word~) render_show::toD0182_$1#0 ← (word~) render_show::toD0182_$0#0 & (word) $3fff + [122] (word~) render_show::toD0182_$2#0 ← (word~) render_show::toD0182_$1#0 * (byte) 4 + [123] (byte~) render_show::toD0182_$3#0 ← > (word~) render_show::toD0182_$2#0 + [124] (word~) render_show::toD0182_$4#0 ← (word)(const byte*) render_show::toD0182_gfx#0 + [125] (byte~) render_show::toD0182_$5#0 ← > (word~) render_show::toD0182_$4#0 + [126] (byte~) render_show::toD0182_$6#0 ← (byte~) render_show::toD0182_$5#0 / (byte) 4 + [127] (byte~) render_show::toD0182_$7#0 ← (byte~) render_show::toD0182_$6#0 & (byte) $f + [128] (byte) render_show::toD0182_return#0 ← (byte~) render_show::toD0182_$3#0 | (byte~) render_show::toD0182_$7#0 + to:render_show::toD0182_@return +render_show::toD0182_@return: scope:[render_show] from render_show::toD0182 + to:render_show::@6 +render_show::@6: scope:[render_show] from render_show::toD0182_@return + to:render_show::@2 +render_show::@2: scope:[render_show] from render_show::@5 render_show::@6 + [129] (byte) render_show::d018val#3 ← phi( render_show::@5/(byte) render_show::toD0181_return#0 render_show::@6/(byte) render_show::toD0182_return#0 ) + [130] *((const byte*) D018#0) ← (byte) render_show::d018val#3 + [131] *((const byte*) BGCOL2#0) ← *((byte[]) PIECES_COLORS_1#0 + (byte) level#10) + [132] *((const byte*) BGCOL3#0) ← *((byte[]) PIECES_COLORS_2#0 + (byte) level#10) + [133] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 + to:render_show::@return +render_show::@return: scope:[render_show] from render_show::@2 + [134] (byte) render_screen_showing#2 ← (byte) render_screen_showing#1 + [135] return + to:@return +render_screen_swap: scope:[render_screen_swap] from main::@42 + [136] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 + [137] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 + to:render_screen_swap::@return +render_screen_swap::@return: scope:[render_screen_swap] from render_screen_swap + [138] return + to:@return +render_score: scope:[render_score] from main::@41 + [139] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 + to:render_score::@3 +render_score::@1: scope:[render_score] from render_score + to:render_score::@2 +render_score::@3: scope:[render_score] from render_score + to:render_score::@2 +render_score::@2: scope:[render_score] from render_score::@1 render_score::@3 + [140] (byte*) render_score::screen#3 ← phi( render_score::@1/(const byte*) render_score::screen#1 render_score::@3/(const byte*) render_score::screen#2 ) + [141] (byte*) render_score::score_bytes#0 ← (byte*)(const dword*) render_score::$1 + [142] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 + [143] (byte) render_bcd::bcd#0 ← *((byte*) render_score::score_bytes#0 + (byte) 2) + [144] call render_bcd + to:render_score::@5 +render_score::@5: scope:[render_score] from render_score::@2 + [145] (word) render_bcd::offset#1 ← (const word) render_score::score_offset#0 + (byte) 2 + [146] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 + [147] (byte) render_bcd::bcd#1 ← *((byte*) render_score::score_bytes#0 + (byte) 1) + [148] call render_bcd + to:render_score::@6 +render_score::@6: scope:[render_score] from render_score::@5 + [149] (word) render_bcd::offset#2 ← (const word) render_score::score_offset#0 + (byte) 4 + [150] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 + [151] (byte) render_bcd::bcd#2 ← *((byte*) render_score::score_bytes#0) + [152] call render_bcd + to:render_score::@7 +render_score::@7: scope:[render_score] from render_score::@6 + [153] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#40 + [154] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 + [155] call render_bcd + to:render_score::@8 +render_score::@8: scope:[render_score] from render_score::@7 + [156] (word) render_bcd::offset#4 ← (const word) render_score::lines_offset#0 + (byte) 1 + [157] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#40 + [158] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 + [159] call render_bcd + to:render_score::@9 +render_score::@9: scope:[render_score] from render_score::@8 + [160] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 + [161] (byte) render_bcd::bcd#5 ← (byte) level_bcd#50 + [162] call render_bcd + to:render_score::@10 +render_score::@10: scope:[render_score] from render_score::@9 + to:render_score::@return +render_score::@return: scope:[render_score] from render_score::@10 + [163] return + to:@return +render_bcd: scope:[render_bcd] from render_score::@2 render_score::@5 render_score::@6 render_score::@7 render_score::@8 render_score::@9 + [164] (byte) render_bcd::bcd#6 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@5/(byte) render_bcd::bcd#1 render_score::@6/(byte) render_bcd::bcd#2 render_score::@7/(byte) render_bcd::bcd#3 render_score::@8/(byte) render_bcd::bcd#4 render_score::@9/(byte) render_bcd::bcd#5 ) + [164] (byte) render_bcd::only_low#6 ← phi( render_score::@2/(const byte) render_bcd::only_low#0 render_score::@5/(const byte) render_bcd::only_low#1 render_score::@6/(const byte) render_bcd::only_low#2 render_score::@7/(const byte) render_bcd::only_low#3 render_score::@8/(const byte) render_bcd::only_low#4 render_score::@9/(const byte) render_bcd::only_low#5 ) + [164] (word) render_bcd::offset#6 ← phi( render_score::@2/(const word) render_bcd::offset#0 render_score::@5/(word) render_bcd::offset#1 render_score::@6/(word) render_bcd::offset#2 render_score::@7/(const word) render_bcd::offset#3 render_score::@8/(word) render_bcd::offset#4 render_score::@9/(const word) render_bcd::offset#5 ) + [164] (byte*) render_bcd::screen#6 ← phi( render_score::@2/(byte*) render_bcd::screen#0 render_score::@5/(byte*) render_bcd::screen#1 render_score::@6/(byte*) render_bcd::screen#2 render_score::@7/(byte*) render_bcd::screen#3 render_score::@8/(byte*) render_bcd::screen#4 render_score::@9/(byte*) render_bcd::screen#5 ) + [165] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 + [166] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 + to:render_bcd::@2 +render_bcd::@1: scope:[render_bcd] from render_bcd render_bcd::@2 + [167] (byte*) render_bcd::screen_pos#3 ← phi( render_bcd/(byte*) render_bcd::screen_pos#0 render_bcd::@2/(byte*) render_bcd::screen_pos#2 ) + [168] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f + [169] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR#0 + (byte~) render_bcd::$3 + [170] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 + to:render_bcd::@return +render_bcd::@2: scope:[render_bcd] from render_bcd + [171] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 + [172] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR#0 + (byte~) render_bcd::$5 + [173] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 + [174] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 + to:render_bcd::@1 +render_bcd::@return: scope:[render_bcd] from render_bcd::@1 + [175] return + to:@return +render_screen_original: scope:[render_screen_original] from render_init::@3 render_init::@4 + [176] (byte*) render_screen_original::screen#9 ← phi( render_init::@3/(const byte*) render_screen_original::screen#0 render_init::@4/(const byte*) render_screen_original::screen#1 ) + [177] (byte*) render_screen_original::oscr#0 ← (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0 + (byte)(number) $20*(number) 2 + [178] (byte*) render_screen_original::ocols#0 ← (const byte*) PLAYFIELD_COLORS_ORIGINAL#0 + (byte)(number) $20*(number) 2 + to:render_screen_original::@1 +render_screen_original::@1: scope:[render_screen_original] from render_screen_original render_screen_original::@7 + [179] (byte) render_screen_original::y#6 ← phi( render_screen_original/(const byte) render_screen_original::y#0 render_screen_original::@7/(byte) render_screen_original::y#1 ) + [179] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(byte*) render_screen_original::ocols#0 render_screen_original::@7/(byte*) render_screen_original::ocols#1 ) + [179] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(byte*) render_screen_original::oscr#0 render_screen_original::@7/(byte*) render_screen_original::oscr#1 ) + [179] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) render_screen_original::cols#0 render_screen_original::@7/(byte*) render_screen_original::cols#3 ) + [179] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@7/(byte*) render_screen_original::screen#10 ) + to:render_screen_original::@2 +render_screen_original::@2: scope:[render_screen_original] from render_screen_original::@1 render_screen_original::@2 + [180] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(const byte) render_screen_original::x#0 render_screen_original::@2/(byte) render_screen_original::x#1 ) + [180] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) + [180] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) + [181] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 + [182] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 + [183] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 + [184] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 + [185] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 + [186] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 + to:render_screen_original::@4 +render_screen_original::@4: scope:[render_screen_original] from render_screen_original::@2 render_screen_original::@4 + [187] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@4/(byte) render_screen_original::x#2 ) + [187] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@4/(byte*) render_screen_original::cols#2 ) + [187] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@4/(byte*) render_screen_original::ocols#1 ) + [187] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@4/(byte*) render_screen_original::screen#3 ) + [187] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@4/(byte*) render_screen_original::oscr#1 ) + [188] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) + [189] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 + [190] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 + [191] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) + [192] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 + [193] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 + [194] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 + [195] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@4 + to:render_screen_original::@6 +render_screen_original::@6: scope:[render_screen_original] from render_screen_original::@4 render_screen_original::@6 + [196] (byte) render_screen_original::x#6 ← phi( render_screen_original::@4/(byte) render_screen_original::x#2 render_screen_original::@6/(byte) render_screen_original::x#3 ) + [196] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@4/(byte*) render_screen_original::cols#2 render_screen_original::@6/(byte*) render_screen_original::cols#3 ) + [196] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@4/(byte*) render_screen_original::screen#3 render_screen_original::@6/(byte*) render_screen_original::screen#10 ) + [197] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 + [198] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 + [199] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 + [200] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 + [201] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 + [202] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@6 + to:render_screen_original::@7 +render_screen_original::@7: scope:[render_screen_original] from render_screen_original::@6 + [203] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 + [204] if((byte) render_screen_original::y#1!=(number) $19) goto render_screen_original::@1 + to:render_screen_original::@return +render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@7 + [205] return + to:@return +render_playfield: scope:[render_playfield] from main::@23 main::@31 + [206] (byte) render_screen_render#22 ← phi( main::@23/(byte) render_screen_render#18 main::@31/(const byte) render_screen_render#1 ) + [207] (byte) render_playfield::i#0 ← (const byte) PLAYFIELD_COLS#0 * (byte) 2 + [208] (byte~) render_playfield::$1 ← (const byte) PLAYFIELD_LINES#0 - (byte) 1 + to:render_playfield::@1 +render_playfield::@1: scope:[render_playfield] from render_playfield render_playfield::@3 + [209] (byte) render_playfield::i#3 ← phi( render_playfield/(byte) render_playfield::i#0 render_playfield::@3/(byte) render_playfield::i#1 ) + [209] (byte) render_playfield::l#2 ← phi( render_playfield/(const byte) render_playfield::l#0 render_playfield::@3/(byte) render_playfield::l#1 ) + [210] (byte~) render_playfield::$2 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 + [211] (byte~) render_playfield::$6 ← (byte~) render_playfield::$2 * (const byte) SIZEOF_POINTER + [212] (byte*) render_playfield::screen_line#0 ← *((byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6) + [213] (byte~) render_playfield::$3 ← (const byte) PLAYFIELD_COLS#0 - (byte) 1 + to:render_playfield::@2 +render_playfield::@2: scope:[render_playfield] from render_playfield::@1 render_playfield::@2 + [214] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(const byte) render_playfield::c#0 render_playfield::@2/(byte) render_playfield::c#1 ) + [214] (byte*) render_playfield::screen_line#2 ← phi( render_playfield::@1/(byte*) render_playfield::screen_line#0 render_playfield::@2/(byte*) render_playfield::screen_line#1 ) + [214] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) + [215] *((byte*) render_playfield::screen_line#2) ← *((byte[$3]) playfield#0 + (byte) render_playfield::i#2) + [216] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 + [217] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 + [218] (byte) render_playfield::c#1 ← (byte) render_playfield::c#2 + rangenext(0,render_playfield::$3) + [219] if((byte) render_playfield::c#1!=rangelast(0,render_playfield::$3)) goto render_playfield::@2 + to:render_playfield::@3 +render_playfield::@3: scope:[render_playfield] from render_playfield::@2 + [220] (byte) render_playfield::l#1 ← (byte) render_playfield::l#2 + rangenext(2,render_playfield::$1) + [221] if((byte) render_playfield::l#1!=rangelast(2,render_playfield::$1)) goto render_playfield::@1 + to:render_playfield::@return +render_playfield::@return: scope:[render_playfield] from render_playfield::@3 + [222] return + to:@return +render_moving: scope:[render_moving] from main::@32 main::@39 + [223] (byte) current_piece_char#68 ← phi( main::@32/(byte) current_piece_char#5 main::@39/(byte) current_piece_char#47 ) + [223] (byte*) current_piece_gfx#64 ← phi( main::@32/(byte*) current_piece_gfx#74 main::@39/(byte*) current_piece_gfx#103 ) + [223] (byte) current_xpos#59 ← phi( main::@32/(byte) current_xpos#100 main::@39/(byte) current_xpos#105 ) + [223] (byte) render_screen_render#33 ← phi( main::@32/(const byte) render_screen_render#1 main::@39/(byte) render_screen_render#18 ) + [223] (byte) current_ypos#13 ← phi( main::@32/(byte) current_ypos#6 main::@39/(byte) current_ypos#31 ) + [224] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 + to:render_moving::@1 +render_moving::@1: scope:[render_moving] from render_moving render_moving::@3 + [225] (byte) render_moving::l#4 ← phi( render_moving/(const byte) render_moving::l#0 render_moving::@3/(byte) render_moving::l#1 ) + [225] (byte) render_moving::i#3 ← phi( render_moving/(const byte) render_moving::i#0 render_moving::@3/(byte) render_moving::i#8 ) + [225] (byte) render_moving::ypos#2 ← phi( render_moving/(byte) render_moving::ypos#0 render_moving::@3/(byte) render_moving::ypos#1 ) + [226] if((byte) render_moving::ypos#2>=(byte) 1+(number) 1) goto render_moving::@2 + to:render_moving::@8 +render_moving::@2: scope:[render_moving] from render_moving::@1 + [227] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 + [228] (byte~) render_moving::$6 ← (byte~) render_moving::$1 * (const byte) SIZEOF_POINTER + [229] (byte*) render_moving::screen_line#0 ← *((byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6) + [230] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 + to:render_moving::@4 +render_moving::@8: scope:[render_moving] from render_moving::@1 + [231] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 + to:render_moving::@3 +render_moving::@3: scope:[render_moving] from render_moving::@5 render_moving::@8 + [232] (byte) render_moving::i#8 ← phi( render_moving::@5/(byte) render_moving::i#2 render_moving::@8/(byte) render_moving::i#1 ) + [233] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 + [234] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 + [235] if((byte) render_moving::l#1!=(number) 4) goto render_moving::@1 + to:render_moving::@return +render_moving::@4: scope:[render_moving] from render_moving::@2 render_moving::@5 + [236] (byte) render_moving::c#2 ← phi( render_moving::@2/(const byte) render_moving::c#0 render_moving::@5/(byte) render_moving::c#1 ) + [236] (byte) render_moving::xpos#2 ← phi( render_moving::@2/(byte) render_moving::xpos#0 render_moving::@5/(byte) render_moving::xpos#1 ) + [236] (byte) render_moving::i#4 ← phi( render_moving::@2/(byte) render_moving::i#3 render_moving::@5/(byte) render_moving::i#2 ) + [237] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) + [238] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 + [239] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 + to:render_moving::@6 +render_moving::@5: scope:[render_moving] from render_moving::@4 render_moving::@6 + [240] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 + [241] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 + [242] if((byte) render_moving::c#1!=(number) 4) goto render_moving::@4 + to:render_moving::@3 +render_moving::@6: scope:[render_moving] from render_moving::@4 + [243] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 + to:render_moving::@5 +render_moving::@return: scope:[render_moving] from render_moving::@3 + [244] return + to:@return +render_next: scope:[render_next] from main::@33 main::@40 + [245] (byte) next_piece_idx#12 ← phi( main::@33/(byte) next_piece_idx#18 main::@40/(byte) next_piece_idx#42 ) + [245] (byte) render_screen_render#15 ← phi( main::@33/(const byte) render_screen_render#1 main::@40/(byte) render_screen_render#18 ) + [246] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 + to:render_next::@3 +render_next::@1: scope:[render_next] from render_next + [247] (byte*) render_next::screen_next_area#1 ← (const byte*) PLAYFIELD_SCREEN_1#0 + (const word) render_next::next_area_offset#0 + to:render_next::@2 +render_next::@3: scope:[render_next] from render_next + [248] (byte*) render_next::screen_next_area#2 ← (const byte*) PLAYFIELD_SCREEN_2#0 + (const word) render_next::next_area_offset#0 + to:render_next::@2 +render_next::@2: scope:[render_next] from render_next::@1 render_next::@3 + [249] (byte*) render_next::screen_next_area#11 ← phi( render_next::@1/(byte*) render_next::screen_next_area#1 render_next::@3/(byte*) render_next::screen_next_area#2 ) + [250] (byte~) render_next::$6 ← (byte) next_piece_idx#12 * (const byte) SIZEOF_WORD + [251] (byte*) render_next::next_piece_gfx#0 ← (byte*)*((word[]) PIECES#0 + (byte~) render_next::$6) + [252] (byte) render_next::next_piece_char#0 ← *((const byte[]) PIECES_NEXT_CHARS#0 + (byte) next_piece_idx#12) + to:render_next::@5 +render_next::@5: scope:[render_next] from render_next::@11 render_next::@2 + [253] (byte) render_next::l#7 ← phi( render_next::@11/(byte) render_next::l#1 render_next::@2/(const byte) render_next::l#0 ) + [253] (byte*) render_next::screen_next_area#10 ← phi( render_next::@11/(byte*) render_next::screen_next_area#4 render_next::@2/(byte*) render_next::screen_next_area#11 ) + [253] (byte*) render_next::next_piece_gfx#3 ← phi( render_next::@11/(byte*) render_next::next_piece_gfx#1 render_next::@2/(byte*) render_next::next_piece_gfx#0 ) + to:render_next::@6 +render_next::@6: scope:[render_next] from render_next::@5 render_next::@8 + [254] (byte) render_next::c#2 ← phi( render_next::@5/(const byte) render_next::c#0 render_next::@8/(byte) render_next::c#1 ) + [254] (byte*) render_next::screen_next_area#5 ← phi( render_next::@5/(byte*) render_next::screen_next_area#10 render_next::@8/(byte*) render_next::screen_next_area#3 ) + [254] (byte*) render_next::next_piece_gfx#2 ← phi( render_next::@5/(byte*) render_next::next_piece_gfx#3 render_next::@8/(byte*) render_next::next_piece_gfx#1 ) + [255] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) + [256] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 + [257] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@7 + to:render_next::@9 +render_next::@7: scope:[render_next] from render_next::@6 + [258] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 + to:render_next::@8 +render_next::@9: scope:[render_next] from render_next::@6 + [259] *((byte*) render_next::screen_next_area#5) ← (byte) 0 + to:render_next::@8 +render_next::@8: scope:[render_next] from render_next::@7 render_next::@9 + [260] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 + [261] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 + [262] if((byte) render_next::c#1!=(number) 4) goto render_next::@6 + to:render_next::@11 +render_next::@11: scope:[render_next] from render_next::@8 + [263] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 + [264] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 + [265] if((byte) render_next::l#1!=(number) 4) goto render_next::@5 + to:render_next::@return +render_next::@return: scope:[render_next] from render_next::@11 + [266] return + to:@return +@22: scope:[] from @13 + kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) + // Put the sprites into memory + .for(var sy=0;sy<10;sy++) { + .var sprite_gfx_y = sy*20 + .for(var sx=0;sx<3;sx++) { + .for (var y=0;y<21; y++) { + .var gfx_y = sprite_gfx_y + mod(2100+y-sprite_gfx_y,21) + .for (var c=0; c<3; c++) { + .byte sprites.getSinglecolorByte(sx*3+c,gfx_y) + } + } + .byte 0 + } + } + }} + to:@23 +sprites_init: scope:[sprites_init] from main::@26 + [268] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f + [269] *((const byte*) SPRITES_MC#0) ← (byte) 0 + [270] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) + [271] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) + to:sprites_init::@1 +sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 + [272] (byte) sprites_init::xpos#2 ← phi( sprites_init/(const byte) sprites_init::xpos#0 sprites_init::@1/(byte) sprites_init::xpos#1 ) + [272] (byte) sprites_init::s#2 ← phi( sprites_init/(const byte) sprites_init::s#0 sprites_init::@1/(byte) sprites_init::s#1 ) + [273] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 * (byte) 2 + [274] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 + [275] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 + [276] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 + [277] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 + [278] if((byte) sprites_init::s#1!=(number) 4) goto sprites_init::@1 + to:sprites_init::@return +sprites_init::@return: scope:[sprites_init] from sprites_init::@1 + [279] return + to:@return +@23: scope:[] from @22 + [280] (byte~) $4 ← (const byte) SPRITES_FIRST_YPOS#0 + (byte) $13 + [281] (byte) IRQ_RASTER_FIRST#0 ← (byte~) $4 + [282] (byte) irq_raster_next#0 ← (byte) IRQ_RASTER_FIRST#0 + [283] (byte~) $5 ← (const byte) SPRITES_FIRST_YPOS#0 + (byte) $15 + [284] (byte) irq_sprite_ypos#0 ← (byte~) $5 + to:toSpritePtr1 +toSpritePtr1: scope:[] from @23 + [285] (word~) toSpritePtr1_$0#0 ← (word)(const byte*) PLAYFIELD_SPRITES#0 + [286] (word~) toSpritePtr1_$1#0 ← (word~) toSpritePtr1_$0#0 / (byte) $40 + [287] (byte) toSpritePtr1_return#0 ← (byte)(word~) toSpritePtr1_$1#0 + to:toSpritePtr1_@return +toSpritePtr1_@return: scope:[] from toSpritePtr1 + to:@38 +@38: scope:[] from toSpritePtr1_@return + [288] (byte~) $7 ← (byte) toSpritePtr1_return#0 + (byte) 3 + [289] (byte) irq_sprite_ptr#0 ← (byte~) $7 + [290] (byte) irq_cnt#0 ← (byte) 0 + to:@25 +sprites_irq_init: scope:[sprites_irq_init] from main::@27 + asm { sei } + [292] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + asm { ldaCIA1_INTERRUPT } + [294] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 + [295] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 + [296] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [297] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f + [298] *((const byte*) RASTER#0) ← (byte) IRQ_RASTER_FIRST#0 + [299] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 + [300] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) sprites_irq_init::$0 + asm { cli } + to:sprites_irq_init::@return +sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init + [302] return + to:@return +sprites_irq: scope:[sprites_irq] from + asm { cld } + [304] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 + [305] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 + [306] *((const byte*) SPRITES_YPOS#0 + (byte) 2) ← (byte) sprites_irq::ypos#0 + [307] *((const byte*) SPRITES_YPOS#0 + (byte) 4) ← (byte) sprites_irq::ypos#0 + [308] *((const byte*) SPRITES_YPOS#0 + (byte) 6) ← (byte) sprites_irq::ypos#0 + [309] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 + [310] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 + to:sprites_irq::@11 +sprites_irq::@11: scope:[sprites_irq] from sprites_irq sprites_irq::@11 + [311] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@11 + to:sprites_irq::@12 +sprites_irq::@12: scope:[sprites_irq] from sprites_irq::@11 + [312] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 + [313] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 + to:sprites_irq::@13 +sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@12 + [314] *((byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 + [315] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 + [316] *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) 1) ← (byte) sprites_irq::ptr#1 + [317] *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) 2) ← (byte) sprites_irq::ptr#1 + [318] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 + [319] *((byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) 3) ← (byte) sprites_irq::ptr#2 + to:sprites_irq::@2 +sprites_irq::@13: scope:[sprites_irq] from sprites_irq::@12 + [320] *((byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 + [321] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 + [322] *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte) 1) ← (byte) sprites_irq::ptr#3 + [323] *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte) 2) ← (byte) sprites_irq::ptr#3 + [324] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 + [325] *((byte*) PLAYFIELD_SPRITE_PTRS_2#0 + (byte) 3) ← (byte) sprites_irq::ptr#4 + to:sprites_irq::@2 +sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@13 + [326] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 + [327] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 + to:sprites_irq::@7 +sprites_irq::@3: scope:[sprites_irq] from sprites_irq::@2 + [328] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 + [329] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 + to:sprites_irq::toSpritePtr2 +sprites_irq::toSpritePtr2: scope:[sprites_irq] from sprites_irq::@3 + [330] (word~) sprites_irq::toSpritePtr2_$0#0 ← (word)(const byte*) sprites_irq::toSpritePtr2_sprite#0 + [331] (word~) sprites_irq::toSpritePtr2_$1#0 ← (word~) sprites_irq::toSpritePtr2_$0#0 / (byte) $40 + [332] (byte~) sprites_irq::toSpritePtr2_$2#0 ← (byte)(word~) sprites_irq::toSpritePtr2_$1#0 + [333] (byte) sprites_irq::toSpritePtr2_return#0 ← (byte~) sprites_irq::toSpritePtr2_$2#0 + to:sprites_irq::toSpritePtr2_@return +sprites_irq::toSpritePtr2_@return: scope:[sprites_irq] from sprites_irq::toSpritePtr2 + [334] (byte) sprites_irq::toSpritePtr2_return#1 ← (byte) sprites_irq::toSpritePtr2_return#0 + to:sprites_irq::@15 +sprites_irq::@15: scope:[sprites_irq] from sprites_irq::toSpritePtr2_@return + [335] (byte~) sprites_irq::$5 ← (byte) sprites_irq::toSpritePtr2_return#1 + [336] (byte) irq_sprite_ptr#1 ← (byte~) sprites_irq::$5 + to:sprites_irq::@6 +sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@2 + [337] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 + to:sprites_irq::@8 +sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@7 + [338] (byte) irq_cnt#2 ← (byte) 0 + [339] (byte) irq_raster_next#2 ← (byte) IRQ_RASTER_FIRST#0 + [340] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 + [341] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 + to:sprites_irq::@6 +sprites_irq::@8: scope:[sprites_irq] from sprites_irq::@7 + [342] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 + [343] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 + [344] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 + to:sprites_irq::@6 +sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@15 sprites_irq::@4 sprites_irq::@8 + [345] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@15/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@8/(byte) irq_sprite_ptr#3 ) + [345] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@15/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@8/(byte) irq_sprite_ypos#3 ) + [345] (byte) irq_cnt#3 ← phi( sprites_irq::@15/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@8/(byte) irq_cnt#1 ) + [345] (byte) irq_raster_next#4 ← phi( sprites_irq::@15/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@8/(byte) irq_raster_next#3 ) + [346] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 + [347] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + to:sprites_irq::@return +sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@6 + [348] return + to:@return +@25: scope:[] from @38 + [349] (word~) $8 ← (word)(const byte[4*4*4]) PIECE_T#0 + [350] (word~) $9 ← (word)(const byte[4*4*4]) PIECE_S#0 + [351] (word~) $10 ← (word)(const byte[4*4*4]) PIECE_Z#0 + [352] (word~) $11 ← (word)(const byte[4*4*4]) PIECE_J#0 + [353] (word~) $12 ← (word)(const byte[4*4*4]) PIECE_O#0 + [354] (word~) $13 ← (word)(const byte[4*4*4]) PIECE_I#0 + [355] (word~) $14 ← (word)(const byte[4*4*4]) PIECE_L#0 + [356] (word[]) PIECES#0 ← (word[]){ (word~) $8, (word~) $9, (word~) $10, (word~) $11, (word~) $12, (word~) $13, (word~) $14 } + [357] (byte*[PLAYFIELD_LINES#0]) playfield_lines#0 ← { fill( PLAYFIELD_LINES#0, 0) } + [358] (byte~) $15 ← (const byte) PLAYFIELD_LINES#0 + (byte) 1 + [359] (byte[$15]) playfield_lines_idx#0 ← { fill( $15, 0) } + to:@30 +play_init: scope:[play_init] from main::@28 + [360] (byte*) play_init::pli#0 ← (byte[$3]) playfield#0 + [361] (byte~) play_init::$1 ← (const byte) PLAYFIELD_LINES#0 - (byte) 1 + to:play_init::@1 +play_init::@1: scope:[play_init] from play_init play_init::@1 + [362] (byte) play_init::idx#2 ← phi( play_init/(const byte) play_init::idx#0 play_init::@1/(byte) play_init::idx#1 ) + [362] (byte*) play_init::pli#2 ← phi( play_init/(byte*) play_init::pli#0 play_init::@1/(byte*) play_init::pli#1 ) + [362] (byte) play_init::j#2 ← phi( play_init/(const byte) play_init::j#0 play_init::@1/(byte) play_init::j#1 ) + [363] (byte~) play_init::$4 ← (byte) play_init::j#2 * (const byte) SIZEOF_POINTER + [364] *((byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 + [365] *((byte[$15]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 + [366] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 + [367] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 + [368] (byte) play_init::j#1 ← (byte) play_init::j#2 + rangenext(0,play_init::$1) + [369] if((byte) play_init::j#1!=rangelast(0,play_init::$1)) goto play_init::@1 + to:play_init::@2 +play_init::@2: scope:[play_init] from play_init::@1 + [370] (byte~) play_init::$0 ← (const byte) PLAYFIELD_COLS#0 * (const byte) PLAYFIELD_LINES#0 + [371] *((byte[$15]) playfield_lines_idx#0 + (const byte) PLAYFIELD_LINES#0) ← (byte~) play_init::$0 + [372] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) + to:play_init::@3 +play_init::@3: scope:[play_init] from play_init::@2 play_init::@3 + [373] (byte) play_init::b#2 ← phi( play_init::@2/(const byte) play_init::b#0 play_init::@3/(byte) play_init::b#1 ) + [374] (byte~) play_init::$5 ← (byte) play_init::b#2 * (const byte) SIZEOF_DWORD + [375] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) + [376] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 + [377] if((byte) play_init::b#1!=(number) 5) goto play_init::@3 + to:play_init::@return +play_init::@return: scope:[play_init] from play_init::@3 + [378] return + to:@return +play_movement: scope:[play_movement] from main::@11 + [379] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 + [380] call play_move_down + [381] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 + to:play_movement::@5 +play_movement::@5: scope:[play_movement] from play_movement + [382] (byte~) play_movement::$0 ← (byte) play_move_down::return#0 + [383] (byte) play_movement::render#1 ← (byte~) play_movement::$0 + [384] if((byte) game_over#15==(byte) 0) goto play_movement::@1 + to:play_movement::@2 +play_movement::@1: scope:[play_movement] from play_movement::@5 + [385] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 + [386] call play_move_leftright + [387] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 + to:play_movement::@6 +play_movement::@6: scope:[play_movement] from play_movement::@1 + [388] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 + [389] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 + [390] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 + [391] call play_move_rotate + [392] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 + to:play_movement::@7 +play_movement::@7: scope:[play_movement] from play_movement::@6 + [393] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 + [394] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 + to:play_movement::@return +play_movement::@2: scope:[play_movement] from play_movement::@5 + to:play_movement::@return +play_movement::@return: scope:[play_movement] from play_movement::@2 play_movement::@7 + [395] (byte) current_xpos#19 ← phi( play_movement::@2/(byte) current_xpos#22 play_movement::@7/(byte) current_xpos#26 ) + [395] (byte*) current_piece_gfx#18 ← phi( play_movement::@2/(byte*) current_piece_gfx#20 play_movement::@7/(byte*) current_piece_gfx#21 ) + [395] (byte) current_orientation#17 ← phi( play_movement::@2/(byte) current_orientation#20 play_movement::@7/(byte) current_orientation#25 ) + [395] (byte) play_movement::return#2 ← phi( play_movement::@2/(byte) play_movement::render#1 play_movement::@7/(byte) play_movement::return#0 ) + [396] return + to:@return +play_move_down: scope:[play_move_down] from play_movement + [397] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 + [398] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE#0) goto play_move_down::@1 + to:play_move_down::@5 +play_move_down::@1: scope:[play_move_down] from play_move_down play_move_down::@5 + [399] (byte) play_move_down::movedown#10 ← phi( play_move_down/(const byte) play_move_down::movedown#0 play_move_down::@5/(byte) play_move_down::movedown#1 ) + [400] call keyboard_event_pressed + [401] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + to:play_move_down::@17 +play_move_down::@17: scope:[play_move_down] from play_move_down::@1 + [402] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 + [403] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 + to:play_move_down::@6 +play_move_down::@5: scope:[play_move_down] from play_move_down + [404] (byte) play_move_down::movedown#1 ← ++ (const byte) play_move_down::movedown#0 + to:play_move_down::@1 +play_move_down::@2: scope:[play_move_down] from play_move_down::@17 play_move_down::@6 play_move_down::@7 + [405] (byte) play_move_down::movedown#7 ← phi( play_move_down::@17/(byte) play_move_down::movedown#10 play_move_down::@6/(byte) play_move_down::movedown#10 play_move_down::@7/(byte) play_move_down::movedown#2 ) + [406] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 + to:play_move_down::@8 +play_move_down::@6: scope:[play_move_down] from play_move_down::@17 + [407] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast#0) goto play_move_down::@2 + to:play_move_down::@7 +play_move_down::@7: scope:[play_move_down] from play_move_down::@6 + [408] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 + to:play_move_down::@2 +play_move_down::@3: scope:[play_move_down] from play_move_down::@2 play_move_down::@8 + [409] (byte) play_move_down::movedown#6 ← phi( play_move_down::@2/(byte) play_move_down::movedown#7 play_move_down::@8/(byte) play_move_down::movedown#3 ) + [410] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@4 + to:play_move_down::@9 +play_move_down::@8: scope:[play_move_down] from play_move_down::@2 + [411] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 + to:play_move_down::@3 +play_move_down::@4: scope:[play_move_down] from play_move_down::@3 + to:play_move_down::@return +play_move_down::@9: scope:[play_move_down] from play_move_down::@3 + [412] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 + [413] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 + [414] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 + [415] call play_collision + [416] (byte) play_collision::return#0 ← (byte) play_collision::return#15 + to:play_move_down::@18 +play_move_down::@18: scope:[play_move_down] from play_move_down::@9 + [417] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 + [418] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE#0) goto play_move_down::@14 + to:play_move_down::@10 +play_move_down::@14: scope:[play_move_down] from play_move_down::@18 + [419] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 + to:play_move_down::@15 +play_move_down::@10: scope:[play_move_down] from play_move_down::@18 + [420] call play_lock_current + to:play_move_down::@19 +play_move_down::@19: scope:[play_move_down] from play_move_down::@10 + [421] call play_remove_lines + [422] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 + to:play_move_down::@20 +play_move_down::@20: scope:[play_move_down] from play_move_down::@19 + [423] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 + [424] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 + [425] call play_update_score + to:play_move_down::@21 +play_move_down::@21: scope:[play_move_down] from play_move_down::@20 + [426] call play_spawn_current + to:play_move_down::@22 +play_move_down::@22: scope:[play_move_down] from play_move_down::@21 + to:play_move_down::@15 +play_move_down::@15: scope:[play_move_down] from play_move_down::@14 play_move_down::@22 + [427] (byte) next_piece_idx#30 ← phi( play_move_down::@14/(byte) next_piece_idx#10 play_move_down::@22/(byte) next_piece_idx#18 ) + [427] (byte) game_over#27 ← phi( play_move_down::@14/(byte) game_over#10 play_move_down::@22/(byte) game_over#52 ) + [427] (byte) current_xpos#43 ← phi( play_move_down::@14/(byte) current_xpos#14 play_move_down::@22/(byte) current_xpos#100 ) + [427] (byte*) current_piece_gfx#35 ← phi( play_move_down::@14/(byte*) current_piece_gfx#13 play_move_down::@22/(byte*) current_piece_gfx#74 ) + [427] (byte) current_orientation#37 ← phi( play_move_down::@14/(byte) current_orientation#13 play_move_down::@22/(const byte) current_orientation#69 ) + [427] (byte) current_piece_char#29 ← phi( play_move_down::@14/(byte) current_piece_char#10 play_move_down::@22/(byte) current_piece_char#5 ) + [427] (byte*) current_piece#28 ← phi( play_move_down::@14/(byte*) current_piece#10 play_move_down::@22/(byte*) current_piece#5 ) + [427] (byte) level_bcd#31 ← phi( play_move_down::@14/(byte) level_bcd#11 play_move_down::@22/(byte) level_bcd#19 ) + [427] (byte) current_movedown_slow#37 ← phi( play_move_down::@14/(byte) current_movedown_slow#14 play_move_down::@22/(byte) current_movedown_slow#23 ) + [427] (byte) level#33 ← phi( play_move_down::@14/(byte) level#10 play_move_down::@22/(byte) level#19 ) + [427] (dword) score_bcd#26 ← phi( play_move_down::@14/(dword) score_bcd#18 play_move_down::@22/(dword) score_bcd#16 ) + [427] (word) lines_bcd#26 ← phi( play_move_down::@14/(word) lines_bcd#19 play_move_down::@22/(word) lines_bcd#17 ) + [427] (byte) current_ypos#38 ← phi( play_move_down::@14/(byte) current_ypos#3 play_move_down::@22/(byte) current_ypos#6 ) + to:play_move_down::@return +play_move_down::@return: scope:[play_move_down] from play_move_down::@15 play_move_down::@4 + [428] (byte) next_piece_idx#16 ← phi( play_move_down::@15/(byte) next_piece_idx#30 play_move_down::@4/(byte) next_piece_idx#10 ) + [428] (byte) game_over#15 ← phi( play_move_down::@15/(byte) game_over#27 play_move_down::@4/(byte) game_over#10 ) + [428] (byte) current_xpos#22 ← phi( play_move_down::@15/(byte) current_xpos#43 play_move_down::@4/(byte) current_xpos#14 ) + [428] (byte*) current_piece_gfx#20 ← phi( play_move_down::@15/(byte*) current_piece_gfx#35 play_move_down::@4/(byte*) current_piece_gfx#13 ) + [428] (byte) current_orientation#20 ← phi( play_move_down::@15/(byte) current_orientation#37 play_move_down::@4/(byte) current_orientation#13 ) + [428] (byte) current_piece_char#16 ← phi( play_move_down::@15/(byte) current_piece_char#29 play_move_down::@4/(byte) current_piece_char#10 ) + [428] (byte*) current_piece#15 ← phi( play_move_down::@15/(byte*) current_piece#28 play_move_down::@4/(byte*) current_piece#10 ) + [428] (byte) level_bcd#17 ← phi( play_move_down::@15/(byte) level_bcd#31 play_move_down::@4/(byte) level_bcd#11 ) + [428] (byte) current_movedown_slow#21 ← phi( play_move_down::@15/(byte) current_movedown_slow#37 play_move_down::@4/(byte) current_movedown_slow#14 ) + [428] (byte) level#17 ← phi( play_move_down::@15/(byte) level#33 play_move_down::@4/(byte) level#10 ) + [428] (dword) score_bcd#14 ← phi( play_move_down::@15/(dword) score_bcd#26 play_move_down::@4/(dword) score_bcd#18 ) + [428] (word) lines_bcd#15 ← phi( play_move_down::@15/(word) lines_bcd#26 play_move_down::@4/(word) lines_bcd#19 ) + [428] (byte) current_ypos#19 ← phi( play_move_down::@15/(byte) current_ypos#38 play_move_down::@4/(byte) current_ypos#11 ) + [428] (byte) current_movedown_counter#14 ← phi( play_move_down::@15/(const byte) current_movedown_counter#4 play_move_down::@4/(byte) current_movedown_counter#12 ) + [428] (byte) play_move_down::return#3 ← phi( play_move_down::@15/(const byte) play_move_down::return#2 play_move_down::@4/(const byte) play_move_down::return#1 ) + [429] return + to:@return +play_move_leftright: scope:[play_move_leftright] from play_movement::@1 + [430] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA#0) goto play_move_leftright::@1 + to:play_move_leftright::@4 +play_move_leftright::@1: scope:[play_move_leftright] from play_move_leftright + [431] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 + [432] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 + [433] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 + [434] call play_collision + [435] (byte) play_collision::return#1 ← (byte) play_collision::return#15 + to:play_move_leftright::@14 +play_move_leftright::@14: scope:[play_move_leftright] from play_move_leftright::@1 + [436] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 + [437] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE#0) goto play_move_leftright::@3 + to:play_move_leftright::@9 +play_move_leftright::@4: scope:[play_move_leftright] from play_move_leftright + [438] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT#0) goto play_move_leftright::@3 + to:play_move_leftright::@5 +play_move_leftright::@5: scope:[play_move_leftright] from play_move_leftright::@4 + [439] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 + [440] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 + [441] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 + [442] call play_collision + [443] (byte) play_collision::return#13 ← (byte) play_collision::return#15 + to:play_move_leftright::@15 +play_move_leftright::@15: scope:[play_move_leftright] from play_move_leftright::@5 + [444] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 + [445] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE#0) goto play_move_leftright::@3 + to:play_move_leftright::@6 +play_move_leftright::@6: scope:[play_move_leftright] from play_move_leftright::@15 + [446] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 + to:play_move_leftright::@return +play_move_leftright::@return: scope:[play_move_leftright] from play_move_leftright::@3 play_move_leftright::@6 play_move_leftright::@9 + [447] (byte) current_xpos#26 ← phi( play_move_leftright::@3/(byte) current_xpos#22 play_move_leftright::@6/(byte) current_xpos#6 play_move_leftright::@9/(byte) current_xpos#8 ) + [447] (byte) play_move_leftright::return#2 ← phi( play_move_leftright::@3/(const byte) play_move_leftright::return#3 play_move_leftright::@6/(const byte) play_move_leftright::return#1 play_move_leftright::@9/(const byte) play_move_leftright::return#4 ) + [448] return + to:@return +play_move_leftright::@3: scope:[play_move_leftright] from play_move_leftright::@14 play_move_leftright::@15 play_move_leftright::@4 + to:play_move_leftright::@return +play_move_leftright::@9: scope:[play_move_leftright] from play_move_leftright::@14 + [449] (byte) current_xpos#8 ← -- (byte) current_xpos#22 + to:play_move_leftright::@return +play_move_rotate: scope:[play_move_rotate] from play_movement::@6 + [450] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z#0) goto play_move_rotate::@1 + to:play_move_rotate::@6 +play_move_rotate::@1: scope:[play_move_rotate] from play_move_rotate + [451] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 + [452] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f + to:play_move_rotate::@4 +play_move_rotate::@6: scope:[play_move_rotate] from play_move_rotate + [453] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X#0) goto play_move_rotate::@2 + to:play_move_rotate::@7 +play_move_rotate::@2: scope:[play_move_rotate] from play_move_rotate::@6 + [454] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 + [455] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f + to:play_move_rotate::@4 +play_move_rotate::@7: scope:[play_move_rotate] from play_move_rotate::@6 + to:play_move_rotate::@return +play_move_rotate::@return: scope:[play_move_rotate] from play_move_rotate::@11 play_move_rotate::@5 play_move_rotate::@7 + [456] (byte*) current_piece_gfx#21 ← phi( play_move_rotate::@11/(byte*) current_piece_gfx#7 play_move_rotate::@5/(byte*) current_piece_gfx#20 play_move_rotate::@7/(byte*) current_piece_gfx#20 ) + [456] (byte) current_orientation#25 ← phi( play_move_rotate::@11/(byte) current_orientation#7 play_move_rotate::@5/(byte) current_orientation#20 play_move_rotate::@7/(byte) current_orientation#20 ) + [456] (byte) play_move_rotate::return#2 ← phi( play_move_rotate::@11/(const byte) play_move_rotate::return#4 play_move_rotate::@5/(const byte) play_move_rotate::return#3 play_move_rotate::@7/(const byte) play_move_rotate::return#1 ) + [457] return + to:@return +play_move_rotate::@4: scope:[play_move_rotate] from play_move_rotate::@1 play_move_rotate::@2 + [458] (byte) play_move_rotate::orientation#3 ← phi( play_move_rotate::@1/(byte) play_move_rotate::orientation#1 play_move_rotate::@2/(byte) play_move_rotate::orientation#2 ) + [459] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 + [460] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 + [461] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 + [462] call play_collision + [463] (byte) play_collision::return#14 ← (byte) play_collision::return#15 + to:play_move_rotate::@14 +play_move_rotate::@14: scope:[play_move_rotate] from play_move_rotate::@4 + [464] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 + [465] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE#0) goto play_move_rotate::@5 + to:play_move_rotate::@11 +play_move_rotate::@5: scope:[play_move_rotate] from play_move_rotate::@14 + to:play_move_rotate::@return +play_move_rotate::@11: scope:[play_move_rotate] from play_move_rotate::@14 + [466] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 + [467] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 + to:play_move_rotate::@return +@30: scope:[] from @25 + to:@37 +play_collision: scope:[play_collision] from play_move_down::@9 play_move_leftright::@1 play_move_leftright::@5 play_move_rotate::@4 play_spawn_current + [468] (byte) play_collision::xpos#6 ← phi( play_move_down::@9/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@5/(byte) play_collision::xpos#2 play_move_rotate::@4/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) + [468] (byte) play_collision::yp#0 ← phi( play_move_down::@9/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@5/(byte) play_collision::ypos#2 play_move_rotate::@4/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) + [468] (byte) play_collision::orientation#5 ← phi( play_move_down::@9/(byte) play_collision::orientation#0 play_move_leftright::@1/(byte) play_collision::orientation#1 play_move_leftright::@5/(byte) play_collision::orientation#2 play_move_rotate::@4/(byte) play_collision::orientation#3 play_spawn_current/(const byte) play_collision::orientation#4 ) + [468] (byte*) current_piece#17 ← phi( play_move_down::@9/(byte*) current_piece#10 play_move_leftright::@1/(byte*) current_piece#15 play_move_leftright::@5/(byte*) current_piece#15 play_move_rotate::@4/(byte*) current_piece#15 play_spawn_current/(byte*) current_piece#5 ) + [469] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 + to:play_collision::@1 +play_collision::@1: scope:[play_collision] from play_collision play_collision::@17 + [470] (byte) play_collision::l#6 ← phi( play_collision/(const byte) play_collision::l#0 play_collision::@17/(byte) play_collision::l#1 ) + [470] (byte) play_collision::i#3 ← phi( play_collision/(const byte) play_collision::i#0 play_collision::@17/(byte) play_collision::i#1 ) + [470] (byte) play_collision::yp#2 ← phi( play_collision/(byte) play_collision::yp#0 play_collision::@17/(byte) play_collision::yp#1 ) + [471] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 * (const byte) SIZEOF_POINTER + [472] (byte*) play_collision::playfield_line#0 ← *((byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_collision::$14) + to:play_collision::@2 +play_collision::@2: scope:[play_collision] from play_collision::@1 play_collision::@3 + [473] (byte) play_collision::c#2 ← phi( play_collision::@1/(const byte) play_collision::c#0 play_collision::@3/(byte) play_collision::c#1 ) + [473] (byte) play_collision::xp#2 ← phi( play_collision::@1/(byte) play_collision::xpos#6 play_collision::@3/(byte) play_collision::xp#1 ) + [473] (byte) play_collision::i#2 ← phi( play_collision::@1/(byte) play_collision::i#3 play_collision::@3/(byte) play_collision::i#1 ) + [474] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 + [475] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 + to:play_collision::@14 +play_collision::@3: scope:[play_collision] from play_collision::@2 play_collision::@6 + [476] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 + [477] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 + [478] if((byte) play_collision::c#1!=(number) 4) goto play_collision::@2 + to:play_collision::@17 +play_collision::@14: scope:[play_collision] from play_collision::@2 + [479] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES#0) goto play_collision::@4 + to:play_collision::@15 +play_collision::@4: scope:[play_collision] from play_collision::@14 + [480] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 + [481] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 + to:play_collision::@8 +play_collision::@15: scope:[play_collision] from play_collision::@14 + to:play_collision::@return +play_collision::@return: scope:[play_collision] from play_collision::@10 play_collision::@12 play_collision::@15 play_collision::@18 play_collision::@8 + [482] (byte) play_collision::return#15 ← phi( play_collision::@10/(const byte) play_collision::return#7 play_collision::@12/(const byte) play_collision::return#8 play_collision::@15/(const byte) play_collision::return#4 play_collision::@18/(const byte) play_collision::return#9 play_collision::@8/(const byte) play_collision::return#6 ) + [483] return + to:@return +play_collision::@5: scope:[play_collision] from play_collision::@4 + [484] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS#0) goto play_collision::@6 + to:play_collision::@10 +play_collision::@8: scope:[play_collision] from play_collision::@4 + to:play_collision::@return +play_collision::@6: scope:[play_collision] from play_collision::@5 + [485] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 + to:play_collision::@12 +play_collision::@10: scope:[play_collision] from play_collision::@5 + to:play_collision::@return +play_collision::@12: scope:[play_collision] from play_collision::@6 + to:play_collision::@return +play_collision::@17: scope:[play_collision] from play_collision::@3 + [486] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 + [487] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 + [488] if((byte) play_collision::l#1!=(number) 4) goto play_collision::@1 + to:play_collision::@18 +play_collision::@18: scope:[play_collision] from play_collision::@17 + to:play_collision::@return +play_lock_current: scope:[play_lock_current] from play_move_down::@10 + [489] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + to:play_lock_current::@1 +play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lock_current::@5 + [490] (byte) play_lock_current::l#6 ← phi( play_lock_current/(const byte) play_lock_current::l#0 play_lock_current::@5/(byte) play_lock_current::l#1 ) + [490] (byte) play_lock_current::i#3 ← phi( play_lock_current/(const byte) play_lock_current::i#0 play_lock_current::@5/(byte) play_lock_current::i#1 ) + [490] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@5/(byte) play_lock_current::yp#1 ) + [491] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 * (const byte) SIZEOF_POINTER + [492] (byte*) play_lock_current::playfield_line#0 ← *((byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) + [493] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 + to:play_lock_current::@2 +play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@3 + [494] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(const byte) play_lock_current::c#0 play_lock_current::@3/(byte) play_lock_current::c#1 ) + [494] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@3/(byte) play_lock_current::xp#1 ) + [494] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@3/(byte) play_lock_current::i#1 ) + [495] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 + [496] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 + to:play_lock_current::@4 +play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4 + [497] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 + [498] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 + [499] if((byte) play_lock_current::c#1!=(number) 4) goto play_lock_current::@2 + to:play_lock_current::@5 +play_lock_current::@4: scope:[play_lock_current] from play_lock_current::@2 + [500] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 + to:play_lock_current::@3 +play_lock_current::@5: scope:[play_lock_current] from play_lock_current::@3 + [501] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 + [502] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 + [503] if((byte) play_lock_current::l#1!=(number) 4) goto play_lock_current::@1 + to:play_lock_current::@return +play_lock_current::@return: scope:[play_lock_current] from play_lock_current::@5 + [504] return + to:@return +play_spawn_current: scope:[play_spawn_current] from main::@29 main::@30 play_move_down::@21 + [505] (byte) game_over#65 ← phi( main::@29/(const byte) game_over#0 main::@30/(byte) game_over#52 play_move_down::@21/(byte) game_over#10 ) + [505] (byte) next_piece_idx#17 ← phi( main::@29/(const byte) next_piece_idx#0 main::@30/(byte) next_piece_idx#18 play_move_down::@21/(byte) next_piece_idx#10 ) + [506] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 + [507] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 * (const byte) SIZEOF_WORD + [508] (byte*) current_piece#5 ← (byte*)*((word[]) PIECES#0 + (byte~) play_spawn_current::$7) + [509] (byte) current_piece_char#5 ← *((const byte[]) PIECES_CHARS#0 + (byte) play_spawn_current::current_piece_idx#0) + [510] (byte*) current_piece_gfx#74 ← (byte*) current_piece#5 + [511] (byte) current_xpos#100 ← *((const byte[]) PIECES_START_X#0 + (byte) play_spawn_current::current_piece_idx#0) + [512] (byte) current_ypos#6 ← *((const byte[]) PIECES_START_Y#0 + (byte) play_spawn_current::current_piece_idx#0) + [513] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 + [514] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 + [515] call play_collision + [516] (byte) play_collision::return#10 ← (byte) play_collision::return#15 + to:play_spawn_current::@10 +play_spawn_current::@10: scope:[play_spawn_current] from play_spawn_current + [517] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 + [518] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD#0) goto play_spawn_current::@1 + to:play_spawn_current::@2 +play_spawn_current::@1: scope:[play_spawn_current] from play_spawn_current::@10 play_spawn_current::@2 + [519] (byte) game_over#52 ← phi( play_spawn_current::@10/(byte) game_over#65 play_spawn_current::@2/(const byte) game_over#5 ) + to:play_spawn_current::@3 +play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@10 + to:play_spawn_current::@1 +play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::@1 play_spawn_current::@9 + [520] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current::@1/(const byte) play_spawn_current::piece_idx#0 play_spawn_current::@9/(byte) play_spawn_current::piece_idx#1 ) + [521] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 + to:play_spawn_current::@5 +play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_current::@3 + [522] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:play_spawn_current::sid_rnd1_@return +play_spawn_current::sid_rnd1_@return: scope:[play_spawn_current] from play_spawn_current::sid_rnd1 + to:play_spawn_current::@9 +play_spawn_current::@9: scope:[play_spawn_current] from play_spawn_current::sid_rnd1_@return + [523] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 + to:play_spawn_current::@3 +play_spawn_current::@5: scope:[play_spawn_current] from play_spawn_current::@3 + (byte) play_spawn_current::piece_idx#4 ← phi( ) + [524] (byte) next_piece_idx#18 ← (byte) play_spawn_current::piece_idx#4 + to:play_spawn_current::@return +play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@5 + [525] return + to:@return +play_remove_lines: scope:[play_remove_lines] from play_move_down::@19 + [526] (byte~) play_remove_lines::$0 ← (const byte) PLAYFIELD_LINES#0 * (const byte) PLAYFIELD_COLS#0 + [527] (byte) play_remove_lines::r#0 ← (byte~) play_remove_lines::$0 - (byte) 1 + [528] (byte~) play_remove_lines::$2 ← (byte~) play_remove_lines::$0 + [529] (byte) play_remove_lines::w#0 ← (byte~) play_remove_lines::$2 - (byte) 1 + [530] (byte~) play_remove_lines::$4 ← (const byte) PLAYFIELD_LINES#0 - (byte) 1 + to:play_remove_lines::@1 +play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_remove_lines::@7 + [531] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(const byte) play_remove_lines::removed#0 play_remove_lines::@7/(byte) play_remove_lines::removed#8 ) + [531] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(const byte) play_remove_lines::y#0 play_remove_lines::@7/(byte) play_remove_lines::y#1 ) + [531] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(byte) play_remove_lines::w#0 play_remove_lines::@7/(byte) play_remove_lines::w#11 ) + [531] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(byte) play_remove_lines::r#0 play_remove_lines::@7/(byte) play_remove_lines::r#1 ) + [532] (byte~) play_remove_lines::$5 ← (const byte) PLAYFIELD_COLS#0 - (byte) 1 + to:play_remove_lines::@2 +play_remove_lines::@2: scope:[play_remove_lines] from play_remove_lines::@1 play_remove_lines::@3 + [533] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(const byte) play_remove_lines::full#0 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) + [533] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(const byte) play_remove_lines::x#0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) + [533] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) + [533] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) + [534] (byte) play_remove_lines::c#0 ← *((byte[$3]) playfield#0 + (byte) play_remove_lines::r#2) + [535] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 + [536] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@3 + to:play_remove_lines::@4 +play_remove_lines::@3: scope:[play_remove_lines] from play_remove_lines::@2 play_remove_lines::@4 + [537] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@2/(byte) play_remove_lines::full#4 play_remove_lines::@4/(const byte) play_remove_lines::full#1 ) + [538] *((byte[$3]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 + [539] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 + [540] (byte) play_remove_lines::x#1 ← (byte) play_remove_lines::x#2 + rangenext(0,play_remove_lines::$5) + [541] if((byte) play_remove_lines::x#1!=rangelast(0,play_remove_lines::$5)) goto play_remove_lines::@2 + to:play_remove_lines::@5 +play_remove_lines::@4: scope:[play_remove_lines] from play_remove_lines::@2 + to:play_remove_lines::@3 +play_remove_lines::@5: scope:[play_remove_lines] from play_remove_lines::@3 + [542] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@7 + to:play_remove_lines::@6 +play_remove_lines::@7: scope:[play_remove_lines] from play_remove_lines::@5 play_remove_lines::@6 + [543] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@5/(byte) play_remove_lines::removed#11 play_remove_lines::@6/(byte) play_remove_lines::removed#1 ) + [543] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@5/(byte) play_remove_lines::w#1 play_remove_lines::@6/(byte) play_remove_lines::w#2 ) + [544] (byte) play_remove_lines::y#1 ← (byte) play_remove_lines::y#8 + rangenext(0,play_remove_lines::$4) + [545] if((byte) play_remove_lines::y#1!=rangelast(0,play_remove_lines::$4)) goto play_remove_lines::@1 + to:play_remove_lines::@9 +play_remove_lines::@6: scope:[play_remove_lines] from play_remove_lines::@5 + [546] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 + [547] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 + to:play_remove_lines::@7 +play_remove_lines::@9: scope:[play_remove_lines] from play_remove_lines::@10 play_remove_lines::@7 + [548] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@10/(byte) play_remove_lines::w#3 play_remove_lines::@7/(byte) play_remove_lines::w#11 ) + [549] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@10 + to:play_remove_lines::@11 +play_remove_lines::@10: scope:[play_remove_lines] from play_remove_lines::@9 + [550] *((byte[$3]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 + [551] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 + to:play_remove_lines::@9 +play_remove_lines::@11: scope:[play_remove_lines] from play_remove_lines::@9 + to:play_remove_lines::@return +play_remove_lines::@return: scope:[play_remove_lines] from play_remove_lines::@11 + [552] return + to:@return +play_update_score: scope:[play_update_score] from play_move_down::@20 + [553] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return + to:play_update_score::@2 +play_update_score::@2: scope:[play_update_score] from play_update_score + [554] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 + [555] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 + [556] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 * (const byte) SIZEOF_DWORD + [557] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) + asm { sed } + [559] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 + [560] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 + asm { cld } + [562] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 + [563] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 + [564] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return + to:play_update_score::@3 +play_update_score::@3: scope:[play_update_score] from play_update_score::@2 + [565] call play_increase_level + to:play_update_score::@5 +play_update_score::@5: scope:[play_update_score] from play_update_score::@3 + to:play_update_score::@return +play_update_score::@return: scope:[play_update_score] from play_update_score play_update_score::@2 play_update_score::@5 + [566] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#11 play_update_score::@5/(byte) level_bcd#62 ) + [566] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#14 play_update_score::@5/(byte) current_movedown_slow#66 ) + [566] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@2/(byte) level#10 play_update_score::@5/(byte) level#21 ) + [566] (dword) score_bcd#16 ← phi( play_update_score/(dword) score_bcd#18 play_update_score::@2/(dword) score_bcd#29 play_update_score::@5/(dword) score_bcd#29 ) + [566] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@2/(word) lines_bcd#29 play_update_score::@5/(word) lines_bcd#29 ) + [567] return + to:@return +play_increase_level: scope:[play_increase_level] from play_update_score::@3 + [568] (byte) level#21 ← ++ (byte) level#10 + [569] if((byte) level#21>=(byte) $1d+(number) 1) goto play_increase_level::@1 + to:play_increase_level::@4 +play_increase_level::@1: scope:[play_increase_level] from play_increase_level + to:play_increase_level::@2 +play_increase_level::@4: scope:[play_increase_level] from play_increase_level + [570] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) + to:play_increase_level::@2 +play_increase_level::@2: scope:[play_increase_level] from play_increase_level::@1 play_increase_level::@4 + [571] (byte) current_movedown_slow#66 ← phi( play_increase_level::@1/(const byte) current_movedown_slow#9 play_increase_level::@4/(byte) current_movedown_slow#10 ) + [572] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 + [573] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f + [574] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@3 + to:play_increase_level::@6 +play_increase_level::@3: scope:[play_increase_level] from play_increase_level::@2 play_increase_level::@6 + [575] (byte) level_bcd#62 ← phi( play_increase_level::@2/(byte) level_bcd#21 play_increase_level::@6/(byte) level_bcd#8 ) + asm { sed } + to:play_increase_level::@7 +play_increase_level::@6: scope:[play_increase_level] from play_increase_level::@2 + [577] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 + to:play_increase_level::@3 +play_increase_level::@7: scope:[play_increase_level] from play_increase_level::@3 play_increase_level::@7 + [578] (byte) play_increase_level::b#2 ← phi( play_increase_level::@3/(const byte) play_increase_level::b#0 play_increase_level::@7/(byte) play_increase_level::b#1 ) + [579] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 * (const byte) SIZEOF_DWORD + [580] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) + [581] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 + [582] if((byte) play_increase_level::b#1!=(number) 5) goto play_increase_level::@7 + to:play_increase_level::@8 +play_increase_level::@8: scope:[play_increase_level] from play_increase_level::@7 + asm { cld } + to:play_increase_level::@return +play_increase_level::@return: scope:[play_increase_level] from play_increase_level::@8 + [584] return + to:@return +main: scope:[main] from @37 + [585] call sid_rnd_init + to:main::@25 +main::@25: scope:[main] from main + asm { sei } + [587] call render_init + to:main::@26 +main::@26: scope:[main] from main::@25 + [588] call sprites_init + to:main::@27 +main::@27: scope:[main] from main::@26 + [589] call sprites_irq_init + to:main::@28 +main::@28: scope:[main] from main::@27 + [590] call play_init + to:main::@29 +main::@29: scope:[main] from main::@28 + [591] call play_spawn_current + to:main::@30 +main::@30: scope:[main] from main::@29 + [592] call play_spawn_current + to:main::@31 +main::@31: scope:[main] from main::@30 + [593] call render_playfield + to:main::@32 +main::@32: scope:[main] from main::@31 + [594] call render_moving + to:main::@33 +main::@33: scope:[main] from main::@32 + [595] call render_next + to:main::@34 +main::@34: scope:[main] from main::@33 + to:main::@1 +main::@1: scope:[main] from main::@19 main::@34 main::@43 + [596] (byte) level_bcd#11 ← phi( main::@19/(byte) level_bcd#50 main::@34/(const byte) level_bcd#0 main::@43/(byte) level_bcd#50 ) + [596] (byte) level#10 ← phi( main::@19/(byte) level#102 main::@34/(const byte) level#0 main::@43/(byte) level#102 ) + [596] (dword) score_bcd#18 ← phi( main::@19/(dword) score_bcd#40 main::@34/(dword) score_bcd#0 main::@43/(dword) score_bcd#40 ) + [596] (word) lines_bcd#19 ← phi( main::@19/(word) lines_bcd#40 main::@34/(const word) lines_bcd#0 main::@43/(word) lines_bcd#40 ) + [596] (byte) current_movedown_counter#16 ← phi( main::@19/(byte) current_movedown_counter#30 main::@34/(const byte) current_movedown_counter#0 main::@43/(byte) current_movedown_counter#30 ) + [596] (byte) keyboard_events_size#19 ← phi( main::@19/(byte) keyboard_events_size#16 main::@34/(const byte) keyboard_events_size#0 main::@43/(byte) keyboard_events_size#16 ) + [596] (byte) render_screen_showing#13 ← phi( main::@19/(byte) render_screen_showing#2 main::@34/(byte) render_screen_showing#0 main::@43/(byte) render_screen_showing#2 ) + [596] (byte) next_piece_idx#10 ← phi( main::@19/(byte) next_piece_idx#42 main::@34/(byte) next_piece_idx#18 main::@43/(byte) next_piece_idx#42 ) + [596] (byte) game_over#10 ← phi( main::@19/(byte) game_over#41 main::@34/(byte) game_over#52 main::@43/(byte) game_over#41 ) + [596] (byte) current_ypos#11 ← phi( main::@19/(byte) current_ypos#31 main::@34/(byte) current_ypos#6 main::@43/(byte) current_ypos#31 ) + [596] (byte) current_xpos#14 ← phi( main::@19/(byte) current_xpos#105 main::@34/(byte) current_xpos#100 main::@43/(byte) current_xpos#105 ) + [596] (byte*) current_piece_gfx#13 ← phi( main::@19/(byte*) current_piece_gfx#103 main::@34/(byte*) current_piece_gfx#74 main::@43/(byte*) current_piece_gfx#103 ) + [596] (byte) current_orientation#13 ← phi( main::@19/(byte) current_orientation#58 main::@34/(const byte) current_orientation#69 main::@43/(byte) current_orientation#58 ) + [596] (byte) current_piece_char#10 ← phi( main::@19/(byte) current_piece_char#47 main::@34/(byte) current_piece_char#5 main::@43/(byte) current_piece_char#47 ) + [596] (byte*) current_piece#10 ← phi( main::@19/(byte*) current_piece#50 main::@34/(byte*) current_piece#5 main::@43/(byte*) current_piece#50 ) + [596] (byte) current_movedown_slow#14 ← phi( main::@19/(byte) current_movedown_slow#55 main::@34/(byte) current_movedown_slow#1 main::@43/(byte) current_movedown_slow#55 ) + [596] (byte) render_screen_render#18 ← phi( main::@19/(byte) render_screen_render#18 main::@34/(const byte) render_screen_render#1 main::@43/(byte) render_screen_render#11 ) + [596] (byte) render_screen_show#16 ← phi( main::@19/(byte) render_screen_show#16 main::@34/(const byte) render_screen_show#1 main::@43/(byte) render_screen_show#13 ) + to:main::@4 +main::@4: scope:[main] from main::@1 main::@4 + [597] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@4 + to:main::@6 +main::@6: scope:[main] from main::@4 + [598] call render_show + to:main::@35 +main::@35: scope:[main] from main::@6 + [599] call keyboard_event_scan + to:main::@36 +main::@36: scope:[main] from main::@35 + [600] call keyboard_event_get + [601] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + to:main::@37 +main::@37: scope:[main] from main::@36 + [602] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 + [603] if((byte) game_over#10==(byte) 0) goto main::@11 + to:main::@12 +main::@11: scope:[main] from main::@37 + [604] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 + [605] call play_movement + [606] (byte) play_movement::return#3 ← (byte) play_movement::return#2 + to:main::@38 +main::@38: scope:[main] from main::@11 + [607] (byte) main::render#1 ← (byte) play_movement::return#3 + to:main::@19 +main::@12: scope:[main] from main::@13 main::@37 + to:main::@13 +main::@13: scope:[main] from main::@12 + [608] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + to:main::@12 +main::@19: scope:[main] from main::@38 + [609] (byte) level_bcd#50 ← phi( main::@38/(byte) level_bcd#17 ) + [609] (byte) level#102 ← phi( main::@38/(byte) level#17 ) + [609] (dword) score_bcd#40 ← phi( main::@38/(dword) score_bcd#14 ) + [609] (word) lines_bcd#40 ← phi( main::@38/(word) lines_bcd#15 ) + [609] (byte) current_movedown_counter#30 ← phi( main::@38/(byte) current_movedown_counter#14 ) + [609] (byte) next_piece_idx#42 ← phi( main::@38/(byte) next_piece_idx#16 ) + [609] (byte) game_over#41 ← phi( main::@38/(byte) game_over#15 ) + [609] (byte) current_ypos#31 ← phi( main::@38/(byte) current_ypos#19 ) + [609] (byte) current_xpos#105 ← phi( main::@38/(byte) current_xpos#19 ) + [609] (byte*) current_piece_gfx#103 ← phi( main::@38/(byte*) current_piece_gfx#18 ) + [609] (byte) current_orientation#58 ← phi( main::@38/(byte) current_orientation#17 ) + [609] (byte) current_piece_char#47 ← phi( main::@38/(byte) current_piece_char#16 ) + [609] (byte*) current_piece#50 ← phi( main::@38/(byte*) current_piece#15 ) + [609] (byte) current_movedown_slow#55 ← phi( main::@38/(byte) current_movedown_slow#21 ) + [609] (byte) main::render#2 ← phi( main::@38/(byte) main::render#1 ) + [610] if((byte) main::render#2==(byte) 0) goto main::@1 + to:main::@23 +main::@23: scope:[main] from main::@19 + [611] call render_playfield + to:main::@39 +main::@39: scope:[main] from main::@23 + [612] call render_moving + to:main::@40 +main::@40: scope:[main] from main::@39 + [613] call render_next + to:main::@41 +main::@41: scope:[main] from main::@40 + [614] call render_score + to:main::@42 +main::@42: scope:[main] from main::@41 + [615] call render_screen_swap + to:main::@43 +main::@43: scope:[main] from main::@42 + to:main::@1 +@37: scope:[] from @30 + [616] call main + to:@39 +@39: scope:[] from @37 + to:@end +@end: scope:[] from @39 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 8 in if((byte) keyboard_event_scan::row#1!=(number) 8) goto keyboard_event_scan::@8 Adding number conversion cast (unumber) 8 in if((byte) keyboard_event_scan::col#1!=(number) 8) goto keyboard_event_scan::@11 Adding number conversion cast (unumber) $19 in if((byte) render_screen_original::y#1!=(number) $19) goto render_screen_original::@1 @@ -10059,6 +11395,7 @@ Alias (byte~) render_init::$13 = (byte~) render_init::$12 Alias (byte) render_screen_showing#1 = (byte) render_screen_showing#2 Alias (byte) play_movement::render#1 = (byte~) play_movement::$0 Alias (byte*) current_piece_gfx#74 = (byte*) current_piece#5 +Alias (byte) play_spawn_current::piece_idx#1 = (byte) play_spawn_current::piece_idx#2 Alias (byte~) play_remove_lines::$2 = (byte~) play_remove_lines::$0 Alias (byte) main::render#1 = (byte) main::render#2 Successful SSA optimization Pass2AliasElimination @@ -10081,6 +11418,7 @@ Identical Phi Values (word) lines_bcd#40 (word) lines_bcd#15 Identical Phi Values (dword) score_bcd#40 (dword) score_bcd#14 Identical Phi Values (byte) level#102 (byte) level#17 Identical Phi Values (byte) level_bcd#50 (byte) level_bcd#17 +Identical Phi Values (byte) play_spawn_current::piece_idx#5 (const byte) play_spawn_current::piece_idx#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [65] (byte*) PLAYFIELD_SPRITE_PTRS_1#0 ← (const byte*) PLAYFIELD_SCREEN_1#0 + (const word) SPRITE_PTRS#0 Constant right-side identified [66] (byte*) PLAYFIELD_SPRITE_PTRS_2#0 ← (const byte*) PLAYFIELD_SCREEN_2#0 + (const word) SPRITE_PTRS#0 @@ -10105,9 +11443,9 @@ Constant right-side identified [358] (byte~) $15 ← (const byte) PLAYFIELD_LINE Constant right-side identified [361] (byte~) play_init::$1 ← (const byte) PLAYFIELD_LINES#0 - (byte) 1 Constant right-side identified [370] (byte~) play_init::$0 ← (const byte) PLAYFIELD_COLS#0 * (const byte) PLAYFIELD_LINES#0 Constant right-side identified [404] (byte) play_move_down::movedown#1 ← ++ (const byte) play_move_down::movedown#0 -Constant right-side identified [526] (byte~) play_remove_lines::$2 ← (const byte) PLAYFIELD_LINES#0 * (const byte) PLAYFIELD_COLS#0 -Constant right-side identified [530] (byte~) play_remove_lines::$4 ← (const byte) PLAYFIELD_LINES#0 - (byte) 1 -Constant right-side identified [532] (byte~) play_remove_lines::$5 ← (const byte) PLAYFIELD_COLS#0 - (byte) 1 +Constant right-side identified [528] (byte~) play_remove_lines::$2 ← (const byte) PLAYFIELD_LINES#0 * (const byte) PLAYFIELD_COLS#0 +Constant right-side identified [532] (byte~) play_remove_lines::$4 ← (const byte) PLAYFIELD_LINES#0 - (byte) 1 +Constant right-side identified [534] (byte~) play_remove_lines::$5 ← (const byte) PLAYFIELD_COLS#0 - (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Identified constant from value list (byte[]) { (const byte) BLUE#0, (const byte) GREEN#0, (const byte) PURPLE#0, (const byte) BLUE#0, (const byte) RED#0, (const byte) LIGHT_GREEN#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) LIGHT_BLUE#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) GREEN#0, (const byte) PURPLE#0, (const byte) BLUE#0, (const byte) RED#0, (const byte) LIGHT_GREEN#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) LIGHT_BLUE#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) GREEN#0, (const byte) PURPLE#0, (const byte) BLUE#0, (const byte) RED#0, (const byte) LIGHT_GREEN#0, (const byte) RED#0, (const byte) BLUE#0, (const byte) LIGHT_BLUE#0, (const byte) RED#0 } Identified constant from value list (byte[]) { (const byte) CYAN#0, (const byte) LIGHT_GREEN#0, (const byte) PINK#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_BLUE#0, (const byte) DARK_GREY#0, (const byte) PURPLE#0, (const byte) RED#0, (const byte) ORANGE#0, (const byte) CYAN#0, (const byte) LIGHT_GREEN#0, (const byte) PINK#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_BLUE#0, (const byte) DARK_GREY#0, (const byte) PURPLE#0, (const byte) RED#0, (const byte) ORANGE#0, (const byte) CYAN#0, (const byte) LIGHT_GREEN#0, (const byte) PINK#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_GREEN#0, (const byte) LIGHT_BLUE#0, (const byte) DARK_GREY#0, (const byte) PURPLE#0, (const byte) RED#0, (const byte) ORANGE#0 } @@ -10164,6 +11502,9 @@ Successful SSA optimization Pass2ConstantIdentification Constant value identified { fill( $3, 0) } in [68] (byte[$3]) playfield#0 ← { fill( $3, 0) } Constant value identified { fill( $15, 0) } in [359] (byte[$15]) playfield_lines_idx#0 ← { fill( $15, 0) } Successful SSA optimization Pass2ConstantValues +Removing PHI-reference to removed block (play_spawn_current::@3_1) in block play_spawn_current::@5 +if() condition always true - replacing block destination [620] if((const byte) play_spawn_current::piece_idx#0==(byte) 7) goto play_spawn_current::sid_rnd1 +Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [107] render_init::i#1 ← ++ render_init::i#2 to ++ Resolved ranged comparison value [108] if(render_init::i#1!=rangelast(0,render_init::$10)) goto render_init::@1 to (const byte) render_init::$10+(number) 1 Resolved ranged next value [218] render_playfield::c#1 ← ++ render_playfield::c#2 to ++ @@ -10172,10 +11513,12 @@ Resolved ranged next value [220] render_playfield::l#1 ← ++ render_playfield:: Resolved ranged comparison value [221] if(render_playfield::l#1!=rangelast(2,render_playfield::$1)) goto render_playfield::@1 to (const byte) render_playfield::$1+(number) 1 Resolved ranged next value [368] play_init::j#1 ← ++ play_init::j#2 to ++ Resolved ranged comparison value [369] if(play_init::j#1!=rangelast(0,play_init::$1)) goto play_init::@1 to (const byte) play_init::$1+(number) 1 -Resolved ranged next value [540] play_remove_lines::x#1 ← ++ play_remove_lines::x#2 to ++ -Resolved ranged comparison value [541] if(play_remove_lines::x#1!=rangelast(0,play_remove_lines::$5)) goto play_remove_lines::@2 to (const byte) play_remove_lines::$5+(number) 1 -Resolved ranged next value [544] play_remove_lines::y#1 ← ++ play_remove_lines::y#8 to ++ -Resolved ranged comparison value [545] if(play_remove_lines::y#1!=rangelast(0,play_remove_lines::$4)) goto play_remove_lines::@1 to (const byte) play_remove_lines::$4+(number) 1 +Resolved ranged next value [542] play_remove_lines::x#1 ← ++ play_remove_lines::x#2 to ++ +Resolved ranged comparison value [543] if(play_remove_lines::x#1!=rangelast(0,play_remove_lines::$5)) goto play_remove_lines::@2 to (const byte) play_remove_lines::$5+(number) 1 +Resolved ranged next value [546] play_remove_lines::y#1 ← ++ play_remove_lines::y#8 to ++ +Resolved ranged comparison value [547] if(play_remove_lines::y#1!=rangelast(0,play_remove_lines::$4)) goto play_remove_lines::@1 to (const byte) play_remove_lines::$4+(number) 1 +Eliminating unused constant (const byte) play_spawn_current::piece_idx#0 +Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) render_init::$10+1 in if((byte) render_init::i#1!=(const byte) render_init::$10+(number) 1) goto render_init::@1 Adding number conversion cast (unumber) 1 in if((byte) render_init::i#1!=(unumber)(const byte) render_init::$10+(number) 1) goto render_init::@1 Adding number conversion cast (unumber) render_playfield::$3+1 in if((byte) render_playfield::c#1!=(const byte) render_playfield::$3+(number) 1) goto render_playfield::@2 @@ -10212,6 +11555,11 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte~) $7 Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte~) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#1 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 +Alias (byte) play_spawn_current::piece_idx#1 = (byte) play_spawn_current::piece_idx#4 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)(byte) irq_sprite_ptr#0 = (byte~) $7 +Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte~) sprites_irq::$0 +Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte~) sprites_irq::toSpritePtr2_$2#0 (byte) sprites_irq::toSpritePtr2_return#1 (byte~) sprites_irq::$5 (byte) irq_sprite_ptr#1 Constant right-side identified [68] (byte~) render_init::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) render_init::vicSelectGfxBank1_toDd001_$0#0 Constant right-side identified [72] (byte~) render_init::$2 ← (const byte) render_init::$1 | (const byte) VIC_RSEL#0 Constant right-side identified [82] (byte*) render_init::li_1#0 ← (const byte*) render_init::$6 + (byte) $10 @@ -10320,8 +11668,8 @@ Rewriting multiplication to use shift [292] (byte~) play_init::$5 ← (byte) pla Rewriting multiplication to use shift [387] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 * (const byte) SIZEOF_POINTER Rewriting multiplication to use shift [407] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 * (const byte) SIZEOF_POINTER Rewriting multiplication to use shift [423] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [465] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 * (const byte) SIZEOF_DWORD -Rewriting multiplication to use shift [488] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 * (const byte) SIZEOF_DWORD +Rewriting multiplication to use shift [464] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 * (const byte) SIZEOF_DWORD +Rewriting multiplication to use shift [487] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 * (const byte) SIZEOF_DWORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) keyboard_event_scan::keycode#0 Inlining constant with var siblings (const byte) keyboard_event_scan::row#0 @@ -10395,7 +11743,6 @@ Inlining constant with var siblings (const byte) play_collision::orientation#4 Inlining constant with var siblings (const byte) play_lock_current::i#0 Inlining constant with var siblings (const byte) play_lock_current::l#0 Inlining constant with var siblings (const byte) play_lock_current::c#0 -Inlining constant with var siblings (const byte) play_spawn_current::piece_idx#0 Inlining constant with var siblings (const byte) play_remove_lines::removed#0 Inlining constant with var siblings (const byte) play_remove_lines::y#0 Inlining constant with var siblings (const byte) play_remove_lines::full#0 @@ -10515,7 +11862,6 @@ Constant inlined $7 = (const byte) toSpritePtr1_return#0+(byte) 3 Constant inlined $8 = (word)(const byte[4*4*4]) PIECE_T#0 Constant inlined $9 = (word)(const byte[4*4*4]) PIECE_S#0 Constant inlined render_playfield::c#0 = (byte) 0 -Constant inlined play_spawn_current::piece_idx#0 = (byte) 7 Constant inlined play_remove_lines::removed#0 = (byte) 0 Constant inlined play_remove_lines::full#1 = (byte) 0 Constant inlined play_remove_lines::full#0 = (byte) 1 @@ -10664,6 +12010,7 @@ Adding NOP phi() at start of play_move_down::@5 Adding NOP phi() at start of play_move_down::@10 Adding NOP phi() at start of play_move_down::@19 Adding NOP phi() at start of play_spawn_current::@2 +Adding NOP phi() at start of play_spawn_current::@3_1 Adding NOP phi() at start of play_spawn_current::sid_rnd1_@return Adding NOP phi() at start of play_update_score::@3 Adding NOP phi() at start of play_increase_level::@1 @@ -10704,11 +12051,11 @@ Calls in [play_move_rotate] to play_collision:305 Calls in [play_move_leftright] to play_collision:362 play_collision:378 Calls in [play_move_down] to keyboard_event_pressed:388 play_collision:408 play_lock_current:413 play_remove_lines:415 play_update_score:419 play_spawn_current:422 Calls in [play_spawn_current] to play_collision:493 -Calls in [play_update_score] to play_increase_level:521 -Calls in [keyboard_event_scan] to keyboard_matrix_read:644 keyboard_event_pressed:655 keyboard_event_pressed:661 keyboard_event_pressed:667 keyboard_event_pressed:673 -Calls in [render_init] to render_screen_original:786 render_screen_original:788 +Calls in [play_update_score] to play_increase_level:520 +Calls in [keyboard_event_scan] to keyboard_matrix_read:643 keyboard_event_pressed:654 keyboard_event_pressed:660 keyboard_event_pressed:666 keyboard_event_pressed:672 +Calls in [render_init] to render_screen_original:785 render_screen_original:787 -Created 176 initial phi equivalence classes +Created 175 initial phi equivalence classes Coalesced [34] next_piece_idx#83 ← next_piece_idx#18 Coalesced [35] game_over#90 ← game_over#52 Not coalescing [39] current_ypos#98 ← current_ypos#6 @@ -10911,123 +12258,122 @@ Coalesced [480] play_move_down::movedown#13 ← play_move_down::movedown#10 Coalesced (already) [481] play_move_down::movedown#12 ← play_move_down::movedown#10 Coalesced [491] play_collision::yp#14 ← play_collision::ypos#4 Coalesced [492] play_collision::xpos#18 ← play_collision::xpos#4 -Coalesced [501] next_piece_idx#18 ← play_spawn_current::piece_idx#2 -Coalesced [506] play_spawn_current::piece_idx#4 ← play_spawn_current::piece_idx#1 -Coalesced (already) [507] game_over#92 ← game_over#65 -Coalesced [522] lines_bcd#94 ← lines_bcd#29 -Coalesced [523] score_bcd#90 ← score_bcd#29 -Coalesced [524] level#110 ← level#21 -Coalesced [525] current_movedown_slow#94 ← current_movedown_slow#66 -Coalesced [526] level_bcd#107 ← level_bcd#62 -Coalesced (already) [529] lines_bcd#93 ← lines_bcd#29 -Coalesced (already) [530] score_bcd#89 ← score_bcd#29 -Coalesced (already) [531] level#109 ← level#10 -Coalesced (already) [532] current_movedown_slow#93 ← current_movedown_slow#14 -Coalesced (already) [533] level_bcd#106 ← level_bcd#11 -Coalesced (already) [534] lines_bcd#92 ← lines_bcd#19 -Coalesced (already) [535] score_bcd#88 ← score_bcd#18 -Coalesced (already) [536] level#108 ← level#10 -Coalesced (already) [537] current_movedown_slow#92 ← current_movedown_slow#14 -Coalesced (already) [538] level_bcd#105 ← level_bcd#11 -Coalesced [542] current_movedown_slow#95 ← current_movedown_slow#10 -Coalesced [548] level_bcd#109 ← level_bcd#8 -Coalesced [558] play_increase_level::b#3 ← play_increase_level::b#1 -Coalesced [559] level_bcd#108 ← level_bcd#21 -Coalesced [563] play_remove_lines::r#10 ← play_remove_lines::r#3 -Coalesced [564] play_remove_lines::w#14 ← play_remove_lines::w#12 -Coalesced [578] play_remove_lines::w#17 ← play_remove_lines::w#2 -Coalesced [579] play_remove_lines::removed#14 ← play_remove_lines::removed#1 -Coalesced [583] play_remove_lines::w#19 ← play_remove_lines::w#11 -Coalesced [590] play_remove_lines::w#18 ← play_remove_lines::w#3 -Coalesced [591] play_remove_lines::r#9 ← play_remove_lines::r#1 -Coalesced [592] play_remove_lines::w#13 ← play_remove_lines::w#11 -Coalesced [593] play_remove_lines::y#9 ← play_remove_lines::y#1 -Coalesced [594] play_remove_lines::removed#12 ← play_remove_lines::removed#8 -Coalesced [595] play_remove_lines::w#16 ← play_remove_lines::w#1 -Coalesced (already) [596] play_remove_lines::removed#13 ← play_remove_lines::removed#11 -Coalesced (already) [597] play_remove_lines::r#11 ← play_remove_lines::r#1 -Coalesced (already) [598] play_remove_lines::w#15 ← play_remove_lines::w#1 -Coalesced [599] play_remove_lines::x#5 ← play_remove_lines::x#1 -Coalesced [600] play_remove_lines::full#5 ← play_remove_lines::full#2 -Coalesced (already) [601] play_remove_lines::full#6 ← play_remove_lines::full#4 -Coalesced [603] play_lock_current::yp#7 ← play_lock_current::yp#0 -Coalesced [608] play_lock_current::i#8 ← play_lock_current::i#3 -Coalesced [609] play_lock_current::xp#5 ← play_lock_current::xp#0 -Coalesced [621] play_lock_current::yp#8 ← play_lock_current::yp#1 -Not coalescing [622] play_lock_current::i#7 ← play_lock_current::i#1 -Coalesced [623] play_lock_current::l#7 ← play_lock_current::l#1 -Not coalescing [624] play_lock_current::i#9 ← play_lock_current::i#1 -Coalesced [625] play_lock_current::xp#6 ← play_lock_current::xp#1 -Coalesced [626] play_lock_current::c#5 ← play_lock_current::c#1 -Coalesced [636] keyboard_event_get::return#6 ← keyboard_event_get::return#1 -Coalesced [637] keyboard_events_size#91 ← keyboard_events_size#4 -Coalesced [640] keyboard_events_size#90 ← keyboard_events_size#13 -Coalesced [641] keyboard_events_size#80 ← keyboard_events_size#19 -Coalesced [649] keyboard_event_scan::keycode#17 ← keyboard_event_scan::keycode#1 -Coalesced (already) [650] keyboard_events_size#83 ← keyboard_events_size#30 -Coalesced [679] keyboard_event_scan::row#14 ← keyboard_event_scan::row#1 -Coalesced [680] keyboard_event_scan::keycode#15 ← keyboard_event_scan::keycode#13 -Coalesced (already) [681] keyboard_events_size#81 ← keyboard_events_size#13 -Coalesced [682] keyboard_event_scan::keycode#19 ← keyboard_event_scan::keycode#11 -Coalesced [683] keyboard_events_size#85 ← keyboard_events_size#30 -Coalesced [693] keyboard_events_size#89 ← keyboard_events_size#2 -Coalesced [699] keyboard_event_scan::keycode#16 ← keyboard_event_scan::keycode#14 -Coalesced [700] keyboard_events_size#82 ← keyboard_events_size#29 -Coalesced [701] keyboard_event_scan::col#8 ← keyboard_event_scan::col#1 -Coalesced (already) [702] keyboard_event_scan::keycode#18 ← keyboard_event_scan::keycode#14 -Coalesced (already) [703] keyboard_events_size#84 ← keyboard_events_size#29 -Coalesced [707] keyboard_events_size#87 ← keyboard_events_size#1 -Coalesced (already) [708] keyboard_events_size#88 ← keyboard_events_size#10 -Coalesced (already) [709] keyboard_events_size#86 ← keyboard_events_size#10 -Not coalescing [722] render_screen_showing#1 ← render_screen_show#16 -Coalesced [745] play_init::b#3 ← play_init::b#1 -Coalesced [746] play_init::j#3 ← play_init::j#1 -Coalesced [747] play_init::pli#3 ← play_init::pli#1 -Coalesced [748] play_init::idx#3 ← play_init::idx#1 -Coalesced [773] sprites_init::s#3 ← sprites_init::s#1 -Coalesced [774] sprites_init::xpos#3 ← sprites_init::xpos#1 -Coalesced [800] render_init::i#3 ← render_init::i#1 -Coalesced [801] render_init::li_1#3 ← render_init::li_1#1 -Coalesced [802] render_init::li_2#3 ← render_init::li_2#1 -Coalesced [804] render_screen_original::screen#11 ← render_screen_original::screen#9 -Coalesced [806] render_screen_original::screen#13 ← render_screen_original::screen#8 -Coalesced [807] render_screen_original::cols#10 ← render_screen_original::cols#7 -Coalesced [815] render_screen_original::oscr#8 ← render_screen_original::oscr#4 -Coalesced [816] render_screen_original::screen#15 ← render_screen_original::screen#2 -Coalesced [817] render_screen_original::ocols#8 ← render_screen_original::ocols#4 -Coalesced [818] render_screen_original::cols#12 ← render_screen_original::cols#1 -Coalesced [819] render_screen_original::x#8 ← render_screen_original::x#1 -Coalesced [829] render_screen_original::screen#17 ← render_screen_original::screen#3 -Coalesced [830] render_screen_original::cols#14 ← render_screen_original::cols#2 -Coalesced [831] render_screen_original::x#10 ← render_screen_original::x#2 -Coalesced [842] render_screen_original::screen#12 ← render_screen_original::screen#10 -Coalesced [843] render_screen_original::cols#9 ← render_screen_original::cols#3 -Coalesced [844] render_screen_original::oscr#7 ← render_screen_original::oscr#1 -Coalesced [845] render_screen_original::ocols#7 ← render_screen_original::ocols#1 -Coalesced [846] render_screen_original::y#7 ← render_screen_original::y#1 -Coalesced [847] render_screen_original::screen#18 ← render_screen_original::screen#10 -Coalesced [848] render_screen_original::cols#15 ← render_screen_original::cols#3 -Coalesced [849] render_screen_original::x#11 ← render_screen_original::x#3 -Coalesced (already) [850] render_screen_original::oscr#9 ← render_screen_original::oscr#1 -Coalesced [851] render_screen_original::screen#16 ← render_screen_original::screen#3 -Coalesced (already) [852] render_screen_original::ocols#9 ← render_screen_original::ocols#1 -Coalesced [853] render_screen_original::cols#13 ← render_screen_original::cols#2 -Coalesced [854] render_screen_original::x#9 ← render_screen_original::x#2 -Coalesced (already) [855] render_screen_original::screen#14 ← render_screen_original::screen#2 -Coalesced (already) [856] render_screen_original::cols#11 ← render_screen_original::cols#1 -Coalesced [857] render_screen_original::x#7 ← render_screen_original::x#1 -Coalesced [884] irq_raster_next#27 ← irq_raster_next#3 -Coalesced [885] irq_cnt#23 ← irq_cnt#1 -Coalesced [886] irq_sprite_ypos#27 ← irq_sprite_ypos#3 -Coalesced [887] irq_sprite_ptr#21 ← irq_sprite_ptr#3 -Coalesced [896] irq_raster_next#26 ← irq_raster_next#2 -Coalesced [897] irq_cnt#22 ← irq_cnt#2 -Coalesced [898] irq_sprite_ypos#26 ← irq_sprite_ypos#2 -Coalesced [899] irq_sprite_ptr#20 ← irq_sprite_ptr#2 -Coalesced [905] irq_raster_next#25 ← irq_raster_next#1 -Coalesced (already) [906] irq_cnt#21 ← irq_cnt#1 -Coalesced [907] irq_sprite_ypos#25 ← irq_sprite_ypos#1 -Coalesced [908] irq_sprite_ptr#19 ← irq_sprite_ptr#1 +Coalesced [504] next_piece_idx#18 ← play_spawn_current::piece_idx#1 +Coalesced (already) [506] game_over#92 ← game_over#65 +Coalesced [521] lines_bcd#94 ← lines_bcd#29 +Coalesced [522] score_bcd#90 ← score_bcd#29 +Coalesced [523] level#110 ← level#21 +Coalesced [524] current_movedown_slow#94 ← current_movedown_slow#66 +Coalesced [525] level_bcd#107 ← level_bcd#62 +Coalesced (already) [528] lines_bcd#93 ← lines_bcd#29 +Coalesced (already) [529] score_bcd#89 ← score_bcd#29 +Coalesced (already) [530] level#109 ← level#10 +Coalesced (already) [531] current_movedown_slow#93 ← current_movedown_slow#14 +Coalesced (already) [532] level_bcd#106 ← level_bcd#11 +Coalesced (already) [533] lines_bcd#92 ← lines_bcd#19 +Coalesced (already) [534] score_bcd#88 ← score_bcd#18 +Coalesced (already) [535] level#108 ← level#10 +Coalesced (already) [536] current_movedown_slow#92 ← current_movedown_slow#14 +Coalesced (already) [537] level_bcd#105 ← level_bcd#11 +Coalesced [541] current_movedown_slow#95 ← current_movedown_slow#10 +Coalesced [547] level_bcd#109 ← level_bcd#8 +Coalesced [557] play_increase_level::b#3 ← play_increase_level::b#1 +Coalesced [558] level_bcd#108 ← level_bcd#21 +Coalesced [562] play_remove_lines::r#10 ← play_remove_lines::r#3 +Coalesced [563] play_remove_lines::w#14 ← play_remove_lines::w#12 +Coalesced [577] play_remove_lines::w#17 ← play_remove_lines::w#2 +Coalesced [578] play_remove_lines::removed#14 ← play_remove_lines::removed#1 +Coalesced [582] play_remove_lines::w#19 ← play_remove_lines::w#11 +Coalesced [589] play_remove_lines::w#18 ← play_remove_lines::w#3 +Coalesced [590] play_remove_lines::r#9 ← play_remove_lines::r#1 +Coalesced [591] play_remove_lines::w#13 ← play_remove_lines::w#11 +Coalesced [592] play_remove_lines::y#9 ← play_remove_lines::y#1 +Coalesced [593] play_remove_lines::removed#12 ← play_remove_lines::removed#8 +Coalesced [594] play_remove_lines::w#16 ← play_remove_lines::w#1 +Coalesced (already) [595] play_remove_lines::removed#13 ← play_remove_lines::removed#11 +Coalesced (already) [596] play_remove_lines::r#11 ← play_remove_lines::r#1 +Coalesced (already) [597] play_remove_lines::w#15 ← play_remove_lines::w#1 +Coalesced [598] play_remove_lines::x#5 ← play_remove_lines::x#1 +Coalesced [599] play_remove_lines::full#5 ← play_remove_lines::full#2 +Coalesced (already) [600] play_remove_lines::full#6 ← play_remove_lines::full#4 +Coalesced [602] play_lock_current::yp#7 ← play_lock_current::yp#0 +Coalesced [607] play_lock_current::i#8 ← play_lock_current::i#3 +Coalesced [608] play_lock_current::xp#5 ← play_lock_current::xp#0 +Coalesced [620] play_lock_current::yp#8 ← play_lock_current::yp#1 +Not coalescing [621] play_lock_current::i#7 ← play_lock_current::i#1 +Coalesced [622] play_lock_current::l#7 ← play_lock_current::l#1 +Not coalescing [623] play_lock_current::i#9 ← play_lock_current::i#1 +Coalesced [624] play_lock_current::xp#6 ← play_lock_current::xp#1 +Coalesced [625] play_lock_current::c#5 ← play_lock_current::c#1 +Coalesced [635] keyboard_event_get::return#6 ← keyboard_event_get::return#1 +Coalesced [636] keyboard_events_size#91 ← keyboard_events_size#4 +Coalesced [639] keyboard_events_size#90 ← keyboard_events_size#13 +Coalesced [640] keyboard_events_size#80 ← keyboard_events_size#19 +Coalesced [648] keyboard_event_scan::keycode#17 ← keyboard_event_scan::keycode#1 +Coalesced (already) [649] keyboard_events_size#83 ← keyboard_events_size#30 +Coalesced [678] keyboard_event_scan::row#14 ← keyboard_event_scan::row#1 +Coalesced [679] keyboard_event_scan::keycode#15 ← keyboard_event_scan::keycode#13 +Coalesced (already) [680] keyboard_events_size#81 ← keyboard_events_size#13 +Coalesced [681] keyboard_event_scan::keycode#19 ← keyboard_event_scan::keycode#11 +Coalesced [682] keyboard_events_size#85 ← keyboard_events_size#30 +Coalesced [692] keyboard_events_size#89 ← keyboard_events_size#2 +Coalesced [698] keyboard_event_scan::keycode#16 ← keyboard_event_scan::keycode#14 +Coalesced [699] keyboard_events_size#82 ← keyboard_events_size#29 +Coalesced [700] keyboard_event_scan::col#8 ← keyboard_event_scan::col#1 +Coalesced (already) [701] keyboard_event_scan::keycode#18 ← keyboard_event_scan::keycode#14 +Coalesced (already) [702] keyboard_events_size#84 ← keyboard_events_size#29 +Coalesced [706] keyboard_events_size#87 ← keyboard_events_size#1 +Coalesced (already) [707] keyboard_events_size#88 ← keyboard_events_size#10 +Coalesced (already) [708] keyboard_events_size#86 ← keyboard_events_size#10 +Not coalescing [721] render_screen_showing#1 ← render_screen_show#16 +Coalesced [744] play_init::b#3 ← play_init::b#1 +Coalesced [745] play_init::j#3 ← play_init::j#1 +Coalesced [746] play_init::pli#3 ← play_init::pli#1 +Coalesced [747] play_init::idx#3 ← play_init::idx#1 +Coalesced [772] sprites_init::s#3 ← sprites_init::s#1 +Coalesced [773] sprites_init::xpos#3 ← sprites_init::xpos#1 +Coalesced [799] render_init::i#3 ← render_init::i#1 +Coalesced [800] render_init::li_1#3 ← render_init::li_1#1 +Coalesced [801] render_init::li_2#3 ← render_init::li_2#1 +Coalesced [803] render_screen_original::screen#11 ← render_screen_original::screen#9 +Coalesced [805] render_screen_original::screen#13 ← render_screen_original::screen#8 +Coalesced [806] render_screen_original::cols#10 ← render_screen_original::cols#7 +Coalesced [814] render_screen_original::oscr#8 ← render_screen_original::oscr#4 +Coalesced [815] render_screen_original::screen#15 ← render_screen_original::screen#2 +Coalesced [816] render_screen_original::ocols#8 ← render_screen_original::ocols#4 +Coalesced [817] render_screen_original::cols#12 ← render_screen_original::cols#1 +Coalesced [818] render_screen_original::x#8 ← render_screen_original::x#1 +Coalesced [828] render_screen_original::screen#17 ← render_screen_original::screen#3 +Coalesced [829] render_screen_original::cols#14 ← render_screen_original::cols#2 +Coalesced [830] render_screen_original::x#10 ← render_screen_original::x#2 +Coalesced [841] render_screen_original::screen#12 ← render_screen_original::screen#10 +Coalesced [842] render_screen_original::cols#9 ← render_screen_original::cols#3 +Coalesced [843] render_screen_original::oscr#7 ← render_screen_original::oscr#1 +Coalesced [844] render_screen_original::ocols#7 ← render_screen_original::ocols#1 +Coalesced [845] render_screen_original::y#7 ← render_screen_original::y#1 +Coalesced [846] render_screen_original::screen#18 ← render_screen_original::screen#10 +Coalesced [847] render_screen_original::cols#15 ← render_screen_original::cols#3 +Coalesced [848] render_screen_original::x#11 ← render_screen_original::x#3 +Coalesced (already) [849] render_screen_original::oscr#9 ← render_screen_original::oscr#1 +Coalesced [850] render_screen_original::screen#16 ← render_screen_original::screen#3 +Coalesced (already) [851] render_screen_original::ocols#9 ← render_screen_original::ocols#1 +Coalesced [852] render_screen_original::cols#13 ← render_screen_original::cols#2 +Coalesced [853] render_screen_original::x#9 ← render_screen_original::x#2 +Coalesced (already) [854] render_screen_original::screen#14 ← render_screen_original::screen#2 +Coalesced (already) [855] render_screen_original::cols#11 ← render_screen_original::cols#1 +Coalesced [856] render_screen_original::x#7 ← render_screen_original::x#1 +Coalesced [883] irq_raster_next#27 ← irq_raster_next#3 +Coalesced [884] irq_cnt#23 ← irq_cnt#1 +Coalesced [885] irq_sprite_ypos#27 ← irq_sprite_ypos#3 +Coalesced [886] irq_sprite_ptr#21 ← irq_sprite_ptr#3 +Coalesced [895] irq_raster_next#26 ← irq_raster_next#2 +Coalesced [896] irq_cnt#22 ← irq_cnt#2 +Coalesced [897] irq_sprite_ypos#26 ← irq_sprite_ypos#2 +Coalesced [898] irq_sprite_ptr#20 ← irq_sprite_ptr#2 +Coalesced [904] irq_raster_next#25 ← irq_raster_next#1 +Coalesced (already) [905] irq_cnt#21 ← irq_cnt#1 +Coalesced [906] irq_sprite_ypos#25 ← irq_sprite_ypos#1 +Coalesced [907] irq_sprite_ptr#19 ← irq_sprite_ptr#1 Coalesced down to 99 phi equivalence classes Culled Empty Block (label) @4 Culled Empty Block (label) @8 @@ -11064,8 +12410,9 @@ Culled Empty Block (label) play_move_down::@25 Culled Empty Block (label) play_move_down::@24 Culled Empty Block (label) play_move_down::@23 Culled Empty Block (label) play_spawn_current::@2 -Culled Empty Block (label) play_spawn_current::@5 +Culled Empty Block (label) play_spawn_current::@3_1 Culled Empty Block (label) play_spawn_current::sid_rnd1_@return +Culled Empty Block (label) play_spawn_current::@5 Culled Empty Block (label) play_update_score::@5 Culled Empty Block (label) play_update_score::@7 Culled Empty Block (label) play_update_score::@6 @@ -11369,7 +12716,7 @@ main::@15: scope:[main] from main::@14 [35] call render_moving to:main::@16 main::@16: scope:[main] from main::@15 - [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#2 + [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#1 [37] call render_next to:main::@17 main::@17: scope:[main] from main::@16 @@ -11384,7 +12731,7 @@ main::@1: scope:[main] from main::@17 main::@25 main::@6 [40] (byte) current_movedown_counter#16 ← phi( main::@6/(byte) current_movedown_counter#14 main::@17/(byte) 0 main::@25/(byte) current_movedown_counter#14 ) [40] (byte) keyboard_events_size#19 ← phi( main::@6/(byte) keyboard_events_size#16 main::@17/(byte) 0 main::@25/(byte) keyboard_events_size#16 ) [40] (byte) render_screen_showing#13 ← phi( main::@6/(byte) render_screen_showing#1 main::@17/(byte) render_screen_showing#0 main::@25/(byte) render_screen_showing#1 ) - [40] (byte) next_piece_idx#10 ← phi( main::@6/(byte) next_piece_idx#16 main::@17/(byte) play_spawn_current::piece_idx#2 main::@25/(byte) next_piece_idx#16 ) + [40] (byte) next_piece_idx#10 ← phi( main::@6/(byte) next_piece_idx#16 main::@17/(byte) play_spawn_current::piece_idx#1 main::@25/(byte) next_piece_idx#16 ) [40] (byte) game_over#10 ← phi( main::@6/(byte) game_over#15 main::@17/(byte) game_over#52 main::@25/(byte) game_over#15 ) [40] (byte) current_ypos#11 ← phi( main::@6/(byte) current_ypos#19 main::@17/(byte) current_ypos#6 main::@25/(byte) current_ypos#19 ) [40] (byte) current_xpos#14 ← phi( main::@6/(byte) current_xpos#19 main::@17/(byte) current_xpos#100 main::@25/(byte) current_xpos#19 ) @@ -11879,7 +13226,7 @@ play_move_down::@17: scope:[play_move_down] from play_move_down::@16 [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) to:play_move_down::@11 play_move_down::@11: scope:[play_move_down] from play_move_down::@10 play_move_down::@17 - [283] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#2 ) + [283] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#1 ) [283] (byte) game_over#27 ← phi( play_move_down::@10/(byte) game_over#10 play_move_down::@17/(byte) game_over#52 ) [283] (byte) current_xpos#43 ← phi( play_move_down::@10/(byte) current_xpos#14 play_move_down::@17/(byte) current_xpos#100 ) [283] (byte*) current_piece_gfx#35 ← phi( play_move_down::@10/(byte*) current_piece_gfx#13 play_move_down::@17/(byte*~) current_piece_gfx#117 ) @@ -11916,7 +13263,7 @@ play_move_down::@10: scope:[play_move_down] from play_move_down::@13 to:play_move_down::@11 play_spawn_current: scope:[play_spawn_current] from main::@12 main::@13 play_move_down::@16 [287] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) - [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) + [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#1 play_move_down::@16/(byte) next_piece_idx#10 ) [288] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [290] (byte) current_piece_char#5 ← *((const byte[]) PIECES_CHARS#0 + (byte) play_spawn_current::current_piece_idx#0) @@ -11937,565 +13284,564 @@ play_spawn_current::@5: scope:[play_spawn_current] from play_spawn_current::@4 to:play_spawn_current::@1 play_spawn_current::@1: scope:[play_spawn_current] from play_spawn_current::@4 play_spawn_current::@5 [301] (byte) game_over#52 ← phi( play_spawn_current::@5/(byte) game_over#65 play_spawn_current::@4/(byte) 1 ) - to:play_spawn_current::@2 -play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@1 play_spawn_current::@3 - [302] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current::@1/(byte) 7 play_spawn_current::@3/(byte) play_spawn_current::piece_idx#1 ) - [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 - to:play_spawn_current::@return -play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@2 - [304] return - to:@return -play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_current::@2 - [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:play_spawn_current::sid_rnd1 +play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_current::@1 play_spawn_current::@2 + [302] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:play_spawn_current::@3 play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::sid_rnd1 - [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 + [303] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 to:play_spawn_current::@2 +play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@3 + [304] if((byte) play_spawn_current::piece_idx#1==(byte) 7) goto play_spawn_current::sid_rnd1 + to:play_spawn_current::@return +play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@2 + [305] return + to:@return play_update_score: scope:[play_update_score] from play_move_down::@15 - [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return + [306] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return to:play_update_score::@1 play_update_score::@1: scope:[play_update_score] from play_update_score - [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 - [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 - [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 - [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) + [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 + [308] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 + [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 + [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) asm { sed } - [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 - [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 + [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 + [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 asm { cld } - [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 - [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 - [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return + [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 + [316] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 + [317] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return to:play_update_score::@2 play_update_score::@2: scope:[play_update_score] from play_update_score::@1 - [319] phi() - [320] call play_increase_level + [318] phi() + [319] call play_increase_level to:play_update_score::@return play_update_score::@return: scope:[play_update_score] from play_update_score play_update_score::@1 play_update_score::@2 - [321] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) - [321] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#66 ) - [321] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) - [321] (dword) score_bcd#16 ← phi( play_update_score/(dword) score_bcd#18 play_update_score::@1/(dword) score_bcd#29 play_update_score::@2/(dword) score_bcd#29 ) - [321] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) - [322] return + [320] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) + [320] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#66 ) + [320] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) + [320] (dword) score_bcd#16 ← phi( play_update_score/(dword) score_bcd#18 play_update_score::@1/(dword) score_bcd#29 play_update_score::@2/(dword) score_bcd#29 ) + [320] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) + [321] return to:@return play_increase_level: scope:[play_increase_level] from play_update_score::@2 - [323] (byte) level#21 ← ++ (byte) level#10 - [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 + [322] (byte) level#21 ← ++ (byte) level#10 + [323] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 to:play_increase_level::@3 play_increase_level::@3: scope:[play_increase_level] from play_increase_level - [325] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) + [324] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) to:play_increase_level::@1 play_increase_level::@1: scope:[play_increase_level] from play_increase_level play_increase_level::@3 - [326] (byte) current_movedown_slow#66 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) - [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 - [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f - [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 + [325] (byte) current_movedown_slow#66 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) + [326] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 + [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f + [328] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 to:play_increase_level::@4 play_increase_level::@4: scope:[play_increase_level] from play_increase_level::@1 - [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 + [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 to:play_increase_level::@2 play_increase_level::@2: scope:[play_increase_level] from play_increase_level::@1 play_increase_level::@4 - [331] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) + [330] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) asm { sed } to:play_increase_level::@5 play_increase_level::@5: scope:[play_increase_level] from play_increase_level::@2 play_increase_level::@5 - [333] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) - [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 - [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) - [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 - [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 + [332] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) + [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 + [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) + [335] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 + [336] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 to:play_increase_level::@6 play_increase_level::@6: scope:[play_increase_level] from play_increase_level::@5 asm { cld } to:play_increase_level::@return play_increase_level::@return: scope:[play_increase_level] from play_increase_level::@6 - [339] return + [338] return to:@return play_remove_lines: scope:[play_remove_lines] from play_move_down::@14 - [340] phi() + [339] phi() to:play_remove_lines::@1 play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_remove_lines::@6 - [341] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) - [341] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) - [341] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [341] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) + [340] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) + [340] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) + [340] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [340] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) to:play_remove_lines::@2 play_remove_lines::@2: scope:[play_remove_lines] from play_remove_lines::@1 play_remove_lines::@3 - [342] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) - [342] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) - [342] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) - [342] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) - [343] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) - [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 - [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 + [341] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) + [341] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) + [341] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) + [341] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) + [342] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) + [343] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 + [344] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 to:play_remove_lines::@3 play_remove_lines::@9: scope:[play_remove_lines] from play_remove_lines::@2 - [346] phi() + [345] phi() to:play_remove_lines::@3 play_remove_lines::@3: scope:[play_remove_lines] from play_remove_lines::@2 play_remove_lines::@9 - [347] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) - [348] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 - [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 - [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 - [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 + [346] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) + [347] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 + [348] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 + [349] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 + [350] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 to:play_remove_lines::@4 play_remove_lines::@4: scope:[play_remove_lines] from play_remove_lines::@3 - [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 + [351] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 to:play_remove_lines::@5 play_remove_lines::@5: scope:[play_remove_lines] from play_remove_lines::@4 - [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 - [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 + [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 + [353] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 to:play_remove_lines::@6 play_remove_lines::@6: scope:[play_remove_lines] from play_remove_lines::@4 play_remove_lines::@5 - [355] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) - [355] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) - [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 - [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 + [354] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) + [354] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) + [355] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 + [356] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 to:play_remove_lines::@7 play_remove_lines::@7: scope:[play_remove_lines] from play_remove_lines::@6 play_remove_lines::@8 - [358] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 + [357] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [358] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 to:play_remove_lines::@return play_remove_lines::@return: scope:[play_remove_lines] from play_remove_lines::@7 - [360] return + [359] return to:@return play_remove_lines::@8: scope:[play_remove_lines] from play_remove_lines::@7 - [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 - [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 + [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 + [361] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 to:play_remove_lines::@7 play_lock_current: scope:[play_lock_current] from play_move_down::@9 - [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + [362] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 to:play_lock_current::@1 play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lock_current::@6 - [364] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) - [364] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte~) play_lock_current::i#7 ) - [364] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) - [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 - [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) - [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 + [363] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) + [363] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte~) play_lock_current::i#7 ) + [363] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) + [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 + [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) + [366] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 to:play_lock_current::@2 play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@7 - [368] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) - [368] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) - [368] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte~) play_lock_current::i#9 ) - [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 - [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 + [367] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) + [367] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) + [367] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte~) play_lock_current::i#9 ) + [368] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 + [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 to:play_lock_current::@4 play_lock_current::@4: scope:[play_lock_current] from play_lock_current::@2 - [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 + [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 to:play_lock_current::@3 play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4 - [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 - [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 - [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 + [371] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 + [372] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 + [373] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 to:play_lock_current::@5 play_lock_current::@5: scope:[play_lock_current] from play_lock_current::@3 - [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 - [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 - [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 + [374] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 + [375] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 + [376] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 to:play_lock_current::@return play_lock_current::@return: scope:[play_lock_current] from play_lock_current::@5 - [378] return + [377] return to:@return play_lock_current::@6: scope:[play_lock_current] from play_lock_current::@5 - [379] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 + [378] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 to:play_lock_current::@1 play_lock_current::@7: scope:[play_lock_current] from play_lock_current::@3 - [380] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 + [379] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 to:play_lock_current::@2 keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 play_move_down::@1 - [381] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 play_move_down::@1/(const byte) KEY_SPACE#0 ) - [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 - [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) - [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 - [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) + [380] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 play_move_down::@1/(const byte) KEY_SPACE#0 ) + [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 + [382] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) + [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 + [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) to:keyboard_event_pressed::@return keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed - [386] return + [385] return to:@return keyboard_event_get: scope:[keyboard_event_get] from main::@19 - [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return + [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get - [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 - [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) + [387] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 + [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) to:keyboard_event_get::@return keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@1 - [390] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) - [390] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) - [391] return + [389] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) + [389] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) + [390] return to:@return keyboard_event_scan: scope:[keyboard_event_scan] from main::@18 - [392] phi() + [391] phi() to:keyboard_event_scan::@7 keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8 - [393] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) - [393] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) - [393] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) - [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 - [395] call keyboard_matrix_read - [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + [392] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) + [392] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) + [392] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) + [393] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + [394] call keyboard_matrix_read + [395] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 to:keyboard_event_scan::@19 keyboard_event_scan::@19: scope:[keyboard_event_scan] from keyboard_event_scan::@7 - [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 - [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 + [396] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 + [397] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 to:keyboard_event_scan::@16 keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@19 - [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 + [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 to:keyboard_event_scan::@8 keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@16 - [400] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) - [400] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) - [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 - [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 + [399] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) + [399] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) + [400] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 + [401] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 to:keyboard_event_scan::@17 keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@8 - [403] phi() - [404] call keyboard_event_pressed - [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + [402] phi() + [403] call keyboard_event_pressed + [404] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@20 keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@17 - [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 - [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 + [405] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + [406] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 to:keyboard_event_scan::@18 keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@20 - [408] phi() + [407] phi() to:keyboard_event_scan::@1 keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@20 - [409] phi() - [410] call keyboard_event_pressed - [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + [408] phi() + [409] call keyboard_event_pressed + [410] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@21 keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@1 - [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 - [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 + [411] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + [412] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 to:keyboard_event_scan::@4 keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@21 - [414] phi() + [413] phi() to:keyboard_event_scan::@2 keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@4 - [415] phi() - [416] call keyboard_event_pressed - [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + [414] phi() + [415] call keyboard_event_pressed + [416] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@22 keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@2 - [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 - [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 + [417] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + [418] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 to:keyboard_event_scan::@5 keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@22 - [420] phi() + [419] phi() to:keyboard_event_scan::@3 keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@5 - [421] phi() - [422] call keyboard_event_pressed - [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + [420] phi() + [421] call keyboard_event_pressed + [422] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@23 keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@3 - [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 - [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return + [423] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + [424] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return to:keyboard_event_scan::@6 keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@23 - [426] phi() + [425] phi() to:keyboard_event_scan::@return keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@6 - [427] return + [426] return to:@return keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@19 - [428] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) - [428] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) - [428] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) - [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) - [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) - [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 + [427] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) + [427] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) + [427] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) + [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) + [429] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [430] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 to:keyboard_event_scan::@12 keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@9 - [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 + [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 to:keyboard_event_scan::@13 keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@12 - [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) - [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 + [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [433] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 to:keyboard_event_scan::@14 keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 - [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 + [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 + [435] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 - [437] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) - [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 - [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 - [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 + [436] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) + [437] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 + [438] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 + [439] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 to:keyboard_event_scan::@15 keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@10 - [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 + [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 to:keyboard_event_scan::@8 keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 - [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 - [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 + [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 + [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 + [443] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 - [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) - [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) + [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) + [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) to:keyboard_matrix_read::@return keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read - [447] return + [446] return to:@return render_show: scope:[render_show] from main::@3 - [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 + [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 to:render_show::toD0182 render_show::toD0182: scope:[render_show] from render_show - [449] phi() + [448] phi() to:render_show::@1 render_show::@1: scope:[render_show] from render_show::toD0181 render_show::toD0182 - [450] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) - [451] *((const byte*) D018#0) ← (byte) render_show::d018val#3 - [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) - [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) - [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 + [449] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) + [450] *((const byte*) D018#0) ← (byte) render_show::d018val#3 + [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) + [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) + [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 to:render_show::@return render_show::@return: scope:[render_show] from render_show::@1 - [455] return + [454] return to:@return render_show::toD0181: scope:[render_show] from render_show - [456] phi() + [455] phi() to:render_show::@1 play_init: scope:[play_init] from main::@11 - [457] phi() + [456] phi() to:play_init::@1 play_init::@1: scope:[play_init] from play_init play_init::@1 - [458] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) - [458] (byte*) play_init::pli#2 ← phi( play_init/(const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 play_init::@1/(byte*) play_init::pli#1 ) - [458] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) - [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 - [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 - [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 - [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 - [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 - [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 - [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 + [457] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) + [457] (byte*) play_init::pli#2 ← phi( play_init/(const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 play_init::@1/(byte*) play_init::pli#1 ) + [457] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) + [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 + [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 + [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 + [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 + [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 + [463] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 + [464] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 to:play_init::@2 play_init::@2: scope:[play_init] from play_init::@1 - [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 - [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) + [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 + [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) to:play_init::@3 play_init::@3: scope:[play_init] from play_init::@2 play_init::@3 - [468] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) - [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 - [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) - [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 - [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 + [467] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) + [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 + [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) + [470] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 + [471] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 to:play_init::@return play_init::@return: scope:[play_init] from play_init::@3 - [473] return + [472] return to:@return sprites_irq_init: scope:[sprites_irq_init] from main::@10 asm { sei } - [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 asm { ldaCIA1_INTERRUPT } - [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 - [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 - [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 - [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f - [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 - [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 - [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() + [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 + [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 + [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f + [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 + [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 + [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() asm { cli } to:sprites_irq_init::@return sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init - [485] return + [484] return to:@return sprites_init: scope:[sprites_init] from main::@9 - [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f - [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 - [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) - [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) + [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f + [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 + [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) + [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) to:sprites_init::@1 sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 - [490] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) - [490] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) - [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 - [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 - [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 - [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 - [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 + [489] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) + [489] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) + [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 + [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 + [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 + [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 + [494] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 + [495] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 to:sprites_init::@return sprites_init::@return: scope:[sprites_init] from sprites_init::@1 - [497] return + [496] return to:@return render_init: scope:[render_init] from main::@8 - [498] phi() + [497] phi() to:render_init::vicSelectGfxBank1 render_init::vicSelectGfxBank1: scope:[render_init] from render_init - [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 + [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 to:render_init::vicSelectGfxBank1_toDd001 render_init::vicSelectGfxBank1_toDd001: scope:[render_init] from render_init::vicSelectGfxBank1 - [500] phi() + [499] phi() to:render_init::vicSelectGfxBank1_@1 render_init::vicSelectGfxBank1_@1: scope:[render_init] from render_init::vicSelectGfxBank1_toDd001 - [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 + [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 to:render_init::@2 render_init::@2: scope:[render_init] from render_init::vicSelectGfxBank1_@1 - [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 - [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 - [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 - [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) - [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) - [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 - [508] call render_screen_original + [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 + [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 + [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 + [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) + [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) + [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 + [507] call render_screen_original to:render_init::@3 render_init::@3: scope:[render_init] from render_init::@2 - [509] phi() - [510] call render_screen_original + [508] phi() + [509] call render_screen_original to:render_init::@1 render_init::@1: scope:[render_init] from render_init::@1 render_init::@3 - [511] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) - [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 - [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 - [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 - [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 - [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 - [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 - [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 + [510] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 ) + [510] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 ) + [510] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) + [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 + [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 + [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 + [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 + [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 + [516] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 + [517] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 to:render_init::@return render_init::@return: scope:[render_init] from render_init::@1 - [519] return + [518] return to:@return render_screen_original: scope:[render_screen_original] from render_init::@2 render_init::@3 - [520] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1#0 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0 ) + [519] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1#0 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0 ) to:render_screen_original::@1 render_screen_original::@1: scope:[render_screen_original] from render_screen_original render_screen_original::@5 - [521] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) - [521] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) - [521] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) - [521] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS#0 render_screen_original::@5/(byte*) render_screen_original::cols#3 ) - [521] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) + [520] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) + [520] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) + [520] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) + [520] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS#0 render_screen_original::@5/(byte*) render_screen_original::cols#3 ) + [520] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) to:render_screen_original::@2 render_screen_original::@2: scope:[render_screen_original] from render_screen_original::@1 render_screen_original::@2 - [522] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) - [522] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) - [522] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) - [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 - [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 - [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 - [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 - [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 - [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 + [521] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) + [521] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) + [521] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) + [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 + [523] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 + [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 + [525] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 + [526] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 + [527] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 to:render_screen_original::@3 render_screen_original::@3: scope:[render_screen_original] from render_screen_original::@2 render_screen_original::@3 - [529] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) - [529] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) - [529] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) - [529] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) - [529] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) - [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) - [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 - [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 - [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) - [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 - [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 - [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 - [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 + [528] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) + [528] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) + [528] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) + [528] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) + [528] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) + [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) + [530] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 + [531] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 + [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) + [533] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 + [534] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 + [535] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 + [536] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 to:render_screen_original::@4 render_screen_original::@4: scope:[render_screen_original] from render_screen_original::@3 render_screen_original::@4 - [538] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) - [538] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) - [538] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) - [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 - [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 - [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 - [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 - [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 - [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 + [537] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) + [537] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) + [537] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) + [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 + [539] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 + [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 + [541] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 + [542] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 + [543] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 to:render_screen_original::@5 render_screen_original::@5: scope:[render_screen_original] from render_screen_original::@4 - [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 - [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 + [544] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 + [545] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 to:render_screen_original::@return render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@5 - [547] return + [546] return to:@return sid_rnd_init: scope:[sid_rnd_init] from main - [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff - [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 to:sid_rnd_init::@return sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init - [550] return + [549] return to:@return sprites_irq: scope:[sprites_irq] from asm { cld } - [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 - [553] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 - [554] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 - [555] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 - [556] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 - [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 - [558] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 + [551] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 + [552] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 + [553] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 + [554] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 + [555] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 + [556] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 + [557] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 to:sprites_irq::@8 sprites_irq::@8: scope:[sprites_irq] from sprites_irq sprites_irq::@8 - [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 + [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 to:sprites_irq::@9 sprites_irq::@9: scope:[sprites_irq] from sprites_irq::@8 - [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 - [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 + [559] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 + [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 to:sprites_irq::@10 sprites_irq::@10: scope:[sprites_irq] from sprites_irq::@9 - [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 - [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 - [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 - [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 - [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 - [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 + [561] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 + [562] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 + [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 + [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 + [565] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 + [566] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 to:sprites_irq::@2 sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@10 - [568] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 - [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 + [567] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 + [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 to:sprites_irq::@6 sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@2 - [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 + [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 to:sprites_irq::@7 sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@6 - [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 - [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 - [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 + [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 + [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 + [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 to:sprites_irq::@5 sprites_irq::@5: scope:[sprites_irq] from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 - [574] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@7/(byte) irq_sprite_ptr#3 ) - [574] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@7/(byte) irq_sprite_ypos#3 ) - [574] (byte) irq_cnt#3 ← phi( sprites_irq::@11/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@7/(byte) irq_cnt#1 ) - [574] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 ) - [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 - [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [573] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@7/(byte) irq_sprite_ptr#3 ) + [573] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@7/(byte) irq_sprite_ypos#3 ) + [573] (byte) irq_cnt#3 ← phi( sprites_irq::@11/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@7/(byte) irq_cnt#1 ) + [573] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 ) + [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 + [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:sprites_irq::@return sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@5 - [577] return + [576] return to:@return sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@6 - [578] (byte) irq_cnt#2 ← (byte) 0 - [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 - [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 - [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 + [577] (byte) irq_cnt#2 ← (byte) 0 + [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 + [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 + [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 to:sprites_irq::@5 sprites_irq::@3: scope:[sprites_irq] from sprites_irq::@2 - [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 - [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 + [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 + [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 to:sprites_irq::toSpritePtr2 sprites_irq::toSpritePtr2: scope:[sprites_irq] from sprites_irq::@3 - [584] phi() + [583] phi() to:sprites_irq::@11 sprites_irq::@11: scope:[sprites_irq] from sprites_irq::toSpritePtr2 - [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 + [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 to:sprites_irq::@5 sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@9 - [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 - [587] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 - [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 - [589] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 - [590] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 - [591] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 + [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 + [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 + [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 + [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 + [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 + [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 to:sprites_irq::@2 @@ -12635,7 +13981,7 @@ VARIABLE REGISTER WEIGHTS (byte~) current_piece_char#101 22.0 (byte) current_piece_char#16 3.4324324324324325 (byte) current_piece_char#29 6.0 -(byte) current_piece_char#5 0.25 +(byte) current_piece_char#5 0.25806451612903225 (byte) current_piece_char#68 48.285714285714285 (byte*) current_piece_gfx (byte*~) current_piece_gfx#112 2.0 @@ -12650,7 +13996,7 @@ VARIABLE REGISTER WEIGHTS (byte*) current_piece_gfx#64 48.285714285714285 (byte*) current_piece_gfx#7 4.0 (byte) current_xpos -(byte) current_xpos#100 0.3225806451612903 +(byte) current_xpos#100 0.3333333333333333 (byte~) current_xpos#119 1.3333333333333333 (byte~) current_xpos#120 7.333333333333333 (byte) current_xpos#14 20.38181818181818 @@ -12667,14 +14013,14 @@ VARIABLE REGISTER WEIGHTS (byte) current_ypos#19 1.7051282051282046 (byte) current_ypos#3 4.0 (byte) current_ypos#38 6.0 -(byte) current_ypos#6 0.3333333333333333 +(byte) current_ypos#6 0.3448275862068966 (byte~) current_ypos#98 1.0 (byte~) current_ypos#99 4.4 (byte) game_over (byte) game_over#10 4.804347826086958 (byte) game_over#15 3.189189189189189 (byte) game_over#27 6.0 -(byte) game_over#52 0.34782608695652173 +(byte) game_over#52 0.36363636363636365 (byte) game_over#65 0.42857142857142855 (byte) irq_cnt (byte) irq_cnt#0 0.17391304347826086 @@ -12976,12 +14322,11 @@ VARIABLE REGISTER WEIGHTS (byte) play_remove_lines::y#8 133.46666666666667 (void()) play_spawn_current() (byte~) play_spawn_current::$1 4.0 -(byte~) play_spawn_current::$7 0.06451612903225806 +(byte~) play_spawn_current::$7 0.06666666666666667 (byte) play_spawn_current::current_piece_idx (byte) play_spawn_current::current_piece_idx#0 2.5 (byte) play_spawn_current::piece_idx -(byte) play_spawn_current::piece_idx#1 2002.0 -(byte) play_spawn_current::piece_idx#2 100.5 +(byte) play_spawn_current::piece_idx#1 100.5 (byte) play_spawn_current::sid_rnd1_return (byte) play_spawn_current::sid_rnd1_return#0 2002.0 (void()) play_update_score((byte) play_update_score::removed) @@ -13306,7 +14651,7 @@ Initial phi equivalence classes [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] [ play_move_down::return#3 ] -[ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +[ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] [ play_increase_level::b#2 play_increase_level::b#1 ] [ play_remove_lines::y#8 play_remove_lines::y#1 ] @@ -13503,7 +14848,7 @@ Complete equivalence classes [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] [ play_move_down::return#3 ] -[ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +[ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] [ play_increase_level::b#2 play_increase_level::b#1 ] [ play_remove_lines::y#8 play_remove_lines::y#1 ] @@ -13696,7 +15041,7 @@ Allocated zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_ Allocated zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] Allocated zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] Allocated zp ZP_BYTE:73 [ play_move_down::return#3 ] -Allocated zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +Allocated zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] Allocated zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] Allocated zp ZP_BYTE:76 [ play_increase_level::b#2 play_increase_level::b#1 ] Allocated zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] @@ -14085,7 +15430,7 @@ main: { // asm { sei } sei // [18] call render_init - // [498] phi from main::@8 to render_init [phi:main::@8->render_init] + // [497] phi from main::@8 to render_init [phi:main::@8->render_init] render_init_from_b8: jsr render_init // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9] @@ -14108,7 +15453,7 @@ main: { // main::@11 b11: // [24] call play_init - // [457] phi from main::@11 to play_init [phi:main::@11->play_init] + // [456] phi from main::@11 to play_init [phi:main::@11->play_init] play_init_from_b11: jsr play_init // [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12] @@ -14135,7 +15480,7 @@ main: { // [287] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] play_spawn_current_from_b13: // [287] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy + // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#1 [phi:main::@13->play_spawn_current#1] -- register_copy jsr play_spawn_current // [29] phi from main::@13 to main::@14 [phi:main::@13->main::@14] b14_from_b13: @@ -14181,7 +15526,7 @@ main: { jmp b16 // main::@16 b16: - // [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#2 -- vbuz1=vbuz2 + // [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#1 -- vbuz1=vbuz2 lda play_spawn_current.piece_idx sta next_piece_idx_77 // [37] call render_next @@ -14228,7 +15573,7 @@ main: { lda #0 sta keyboard_events_size // [40] phi (byte) render_screen_showing#13 = (byte) render_screen_showing#0 [phi:main::@17->main::@1#6] -- register_copy - // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#7] -- register_copy + // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#1 [phi:main::@17->main::@1#7] -- register_copy // [40] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#8] -- register_copy // [40] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#9] -- register_copy // [40] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#10] -- register_copy @@ -14291,7 +15636,7 @@ main: { // main::@18 b18: // [45] call keyboard_event_scan - // [392] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] + // [391] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] keyboard_event_scan_from_b18: jsr keyboard_event_scan // [46] phi from main::@18 to main::@19 [phi:main::@18->main::@19] @@ -15630,9 +16975,9 @@ play_move_down: { // play_move_down::@1 b1: // [252] call keyboard_event_pressed - // [381] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] + // [380] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] keyboard_event_pressed_from_b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_SPACE sta keyboard_event_pressed.keycode jsr keyboard_event_pressed @@ -15741,7 +17086,7 @@ play_move_down: { // play_move_down::@14 b14: // [274] call play_remove_lines - // [340] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] + // [339] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] play_remove_lines_from_b14: jsr play_remove_lines // [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuz1=vbuz2 @@ -15786,7 +17131,7 @@ play_move_down: { sta current_piece_gfx+1 // [283] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] b11_from_b17: - // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy + // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#1 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy // [283] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy // [283] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy // [283] phi (byte*) current_piece_gfx#35 = (byte*~) current_piece_gfx#117 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy @@ -15952,39 +17297,31 @@ play_spawn_current: { jmp b1 // play_spawn_current::@1 b1: - // [302] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] - b2_from_b1: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 + jmp sid_rnd1 + // play_spawn_current::sid_rnd1 + sid_rnd1: + // [302] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 + lda SID_VOICE3_OSC + sta sid_rnd1_return + jmp b3 + // play_spawn_current::@3 + b3: + // [303] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 + and sid_rnd1_return sta piece_idx jmp b2 // play_spawn_current::@2 b2: - // [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 + // [304] if((byte) play_spawn_current::piece_idx#1==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 lda #7 cmp piece_idx beq sid_rnd1 jmp breturn // play_spawn_current::@return breturn: - // [304] return + // [305] return rts - // play_spawn_current::sid_rnd1 - sid_rnd1: - // [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 - lda SID_VOICE3_OSC - sta sid_rnd1_return - jmp b3 - // play_spawn_current::@3 - b3: - // [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 - lda #7 - and sid_rnd1_return - sta piece_idx - // [302] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] - b2_from_b3: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy - jmp b2 } // play_update_score // Update the score based on the number of lines removed @@ -15997,26 +17334,26 @@ play_update_score: { .label lines_before = $b2 .label add_bcd = $b4 .label lines_after = $b9 - // [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuz1_eq_0_then_la1 + // [306] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuz1_eq_0_then_la1 lda removed cmp #0 beq breturn_from_play_update_score jmp b1 // play_update_score::@1 b1: - // [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuz1=_lo_vwuz2 + // [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuz1=_lo_vwuz2 lda lines_bcd sta _2 - // [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 + // [308] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 lda #$f0 and _2 sta lines_before - // [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuz1=vbuz2_rol_2 + // [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuz1=vbuz2_rol_2 lda removed asl asl sta _9 - // [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuz2 + // [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuz2 ldy _9 lda score_add_bcd,y sta add_bcd @@ -16028,7 +17365,7 @@ play_update_score: { sta add_bcd+3 // asm { sed } sed - // [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuz2 + // [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuz2 lda removed clc adc lines_bcd @@ -16036,7 +17373,7 @@ play_update_score: { bcc !+ inc lines_bcd+1 !: - // [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 + // [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 lda score_bcd clc adc add_bcd @@ -16052,37 +17389,37 @@ play_update_score: { sta score_bcd+3 // asm { cld } cld - // [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuz1=_lo_vwuz2 + // [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuz1=_lo_vwuz2 lda lines_bcd sta _4 - // [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 + // [316] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 lda #$f0 and _4 sta lines_after - // [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuz2_then_la1 + // [317] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuz2_then_la1 lda lines_before cmp lines_after beq breturn_from_b1 - // [319] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] + // [318] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] b2_from_b1: jmp b2 // play_update_score::@2 b2: - // [320] call play_increase_level + // [319] call play_increase_level jsr play_increase_level - // [321] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] + // [320] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] breturn_from_play_update_score: breturn_from_b1: breturn_from_b2: - // [321] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy - // [321] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy - // [321] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy - // [321] phi (dword) score_bcd#16 = (dword) score_bcd#18 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy - // [321] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#4] -- register_copy + // [320] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy + // [320] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy + // [320] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy + // [320] phi (dword) score_bcd#16 = (dword) score_bcd#18 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy + // [320] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#4] -- register_copy jmp breturn // play_update_score::@return breturn: - // [322] return + // [321] return rts } // play_increase_level @@ -16091,9 +17428,9 @@ play_increase_level: { .label _1 = $ba .label _5 = $bb .label b = $4c - // [323] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 + // [322] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 inc level - // [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 + // [323] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 // Update speed of moving tetrominos down lda level cmp #$1d+1 @@ -16101,68 +17438,68 @@ play_increase_level: { jmp b3 // play_increase_level::@3 b3: - // [325] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 + // [324] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 ldy level lda MOVEDOWN_SLOW_SPEEDS,y sta current_movedown_slow - // [326] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] + // [325] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] b1_from_b3: - // [326] phi (byte) current_movedown_slow#66 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy + // [325] phi (byte) current_movedown_slow#66 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy jmp b1 - // [326] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] + // [325] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] b1_from_play_increase_level: - // [326] phi (byte) current_movedown_slow#66 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 + // [325] phi (byte) current_movedown_slow#66 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 lda #1 sta current_movedown_slow jmp b1 // play_increase_level::@1 b1: - // [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 + // [326] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 inc level_bcd - // [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + // [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 lda #$f and level_bcd sta _1 - // [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuz1_neq_vbuc1_then_la1 + // [328] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$a cmp _1 bne b2_from_b1 jmp b4 // play_increase_level::@4 b4: - // [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 + // [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 // If level low nybble hits $a change to $10 lax level_bcd axs #-[6] stx level_bcd - // [331] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] + // [330] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] b2_from_b1: b2_from_b4: - // [331] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy + // [330] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy jmp b2 // play_increase_level::@2 b2: // asm { sed } // Increase the score values gained sed - // [333] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] + // [332] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] b5_from_b2: - // [333] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuz1=vbuc1 + // [332] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuz1=vbuc1 lda #0 sta b jmp b5 - // [333] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] + // [332] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] b5_from_b5: - // [333] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy + // [332] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy jmp b5 // play_increase_level::@5 b5: - // [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 + // [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 lda b asl asl sta _5 - // [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuz1=pduc1_derefidx_vbuz1_plus_pduc2_derefidx_vbuz1 + // [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuz1=pduc1_derefidx_vbuz1_plus_pduc2_derefidx_vbuz1 ldy _5 clc lda score_add_bcd,y @@ -16177,9 +17514,9 @@ play_increase_level: { lda score_add_bcd+3,y adc SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuz1=_inc_vbuz1 + // [335] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuz1=_inc_vbuz1 inc b - // [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuz1_neq_vbuc1_then_la1 + // [336] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp b bne b5_from_b5 @@ -16191,7 +17528,7 @@ play_increase_level: { jmp breturn // play_increase_level::@return breturn: - // [339] return + // [338] return rts } // play_remove_lines @@ -16208,144 +17545,144 @@ play_remove_lines: { .label y = $4d .label removed = $4e .label full = $51 - // [341] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] + // [340] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] b1_from_play_remove_lines: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 lda #0 sta removed - // [341] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 lda #0 sta y - // [341] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuz1=vbuc1 lda #PLAYFIELD_LINES*PLAYFIELD_COLS-1 sta w - // [341] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuz1=vbuc1 lda #PLAYFIELD_LINES*PLAYFIELD_COLS-1 sta r jmp b1 // Read all lines and rewrite them - // [341] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] + // [340] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] b1_from_b6: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy - // [341] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy - // [341] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy - // [341] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy + // [340] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy + // [340] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy + // [340] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy jmp b1 // play_remove_lines::@1 b1: - // [342] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] + // [341] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] b2_from_b1: - // [342] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 + // [341] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 lda #1 sta full - // [342] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 + // [341] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 lda #0 sta x - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy + // [341] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy + // [341] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy jmp b2 - // [342] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] + // [341] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] b2_from_b3: - // [342] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy - // [342] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy + // [341] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy + // [341] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy + // [341] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy + // [341] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy jmp b2 // play_remove_lines::@2 b2: - // [343] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [342] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy r lda playfield,y sta c - // [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuz1=_dec_vbuz1 + // [343] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuz1=_dec_vbuz1 dec r - // [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 + // [344] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 lda c cmp #0 bne b9_from_b2 - // [347] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] + // [346] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] b3_from_b2: - // [347] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 + // [346] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 lda #0 sta full jmp b3 - // [346] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] + // [345] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] b9_from_b2: jmp b9 // play_remove_lines::@9 b9: - // [347] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] + // [346] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] b3_from_b9: - // [347] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy + // [346] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy jmp b3 // play_remove_lines::@3 b3: - // [348] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [347] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda c ldy w sta playfield,y - // [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuz1=_dec_vbuz1 + // [348] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuz1=_dec_vbuz1 dec w - // [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 + // [349] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 inc x - // [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 + // [350] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp x bne b2_from_b3 jmp b4 // play_remove_lines::@4 b4: - // [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 + // [351] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 lda #1 cmp full bne b6_from_b4 jmp b5 // play_remove_lines::@5 b5: - // [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 + // [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 lax w axs #-[PLAYFIELD_COLS] stx w - // [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 + // [353] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 inc removed - // [355] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] + // [354] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] b6_from_b4: b6_from_b5: - // [355] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy - // [355] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy + // [354] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy + // [354] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy jmp b6 // play_remove_lines::@6 b6: - // [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 + // [355] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 inc y - // [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 + // [356] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp y bne b1_from_b6 - // [358] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] + // [357] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] b7_from_b6: b7_from_b8: - // [358] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy + // [357] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy jmp b7 // Write zeros in the rest of the lines // play_remove_lines::@7 b7: - // [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuz1_neq_vbuc1_then_la1 + // [358] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp w bne b8 jmp breturn // play_remove_lines::@return breturn: - // [360] return + // [359] return rts // play_remove_lines::@8 b8: - // [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy w sta playfield,y - // [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuz1=_dec_vbuz1 + // [361] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuz1=_dec_vbuz1 dec w jmp b7_from_b8 } @@ -16363,49 +17700,49 @@ play_lock_current: { .label i_3 = $55 .label i_7 = $55 .label i_9 = $55 - // [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 -- vbuz1=vbuz2 + // [362] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 -- vbuz1=vbuz2 lda current_ypos sta yp - // [364] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] + // [363] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] b1_from_play_lock_current: - // [364] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 + // [363] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 lda #0 sta l - // [364] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 + // [363] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 lda #0 sta i_3 - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy + // [363] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy jmp b1 // play_lock_current::@1 b1: - // [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda yp asl sta _4 - // [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuz2 + // [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuz2 ldy _4 lda playfield_lines,y sta playfield_line lda playfield_lines+1,y sta playfield_line+1 - // [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [366] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda current_xpos sta xp - // [368] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] + // [367] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] b2_from_b1: - // [368] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuz1=vbuc1 + // [367] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuz1=vbuc1 lda #0 sta c - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy + // [367] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy + // [367] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy jmp b2 // play_lock_current::@2 b2: - // [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 + // [368] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 ldy i_2 iny sty i - // [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy i_2 lda (current_piece_gfx),y cmp #0 @@ -16413,58 +17750,58 @@ play_lock_current: { jmp b4 // play_lock_current::@4 b4: - // [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 + // [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 lda current_piece_char ldy xp sta (playfield_line),y jmp b3 // play_lock_current::@3 b3: - // [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 + // [371] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 inc xp - // [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuz1=_inc_vbuz1 + // [372] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuz1=_inc_vbuz1 inc c - // [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuz1_neq_vbuc1_then_la1 + // [373] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp c bne b7 jmp b5 // play_lock_current::@5 b5: - // [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 + // [374] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 inc yp - // [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 + // [375] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 inc l - // [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 + // [376] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp l bne b6 jmp breturn // play_lock_current::@return breturn: - // [378] return + // [377] return rts // play_lock_current::@6 b6: - // [379] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [378] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda i sta i_7 - // [364] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] + // [363] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] b1_from_b6: - // [364] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy - // [364] phi (byte) play_lock_current::i#3 = (byte~) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy + // [363] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy + // [363] phi (byte) play_lock_current::i#3 = (byte~) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy + // [363] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy jmp b1 // play_lock_current::@7 b7: - // [380] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [379] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda i sta i_9 - // [368] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] + // [367] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] b2_from_b7: - // [368] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte~) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy + // [367] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy + // [367] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy + // [367] phi (byte) play_lock_current::i#2 = (byte~) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy jmp b2 } // keyboard_event_pressed @@ -16482,21 +17819,21 @@ keyboard_event_pressed: { .label keycode = $58 .label return_11 = $c4 .label return_12 = $a5 - // [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuz1=vbuz2_ror_3 + // [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuz1=vbuz2_ror_3 lda keycode lsr lsr lsr sta _0 - // [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [382] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy _0 lda keyboard_scan_values,y sta row_bits - // [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and keycode sta _1 - // [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + // [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 lda row_bits ldy _1 and keyboard_matrix_col_bitmask,y @@ -16504,7 +17841,7 @@ keyboard_event_pressed: { jmp breturn // keyboard_event_pressed::@return breturn: - // [386] return + // [385] return rts } // keyboard_event_get @@ -16514,34 +17851,34 @@ keyboard_event_pressed: { keyboard_event_get: { .label return = $59 .label return_3 = $7a - // [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 + // [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 lda keyboard_events_size cmp #0 beq breturn_from_keyboard_event_get jmp b1 // keyboard_event_get::@1 b1: - // [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 + // [387] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 dec keyboard_events_size - // [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuz1=pbuc1_derefidx_vbuz2 + // [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuz1=pbuc1_derefidx_vbuz2 ldy keyboard_events_size lda keyboard_events,y sta return - // [390] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] + // [389] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] breturn_from_b1: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy + // [389] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy + // [389] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy jmp breturn - // [390] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + // [389] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] breturn_from_keyboard_event_get: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuz1=vbuc1 + // [389] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + // [389] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuz1=vbuc1 lda #$ff sta return jmp breturn // keyboard_event_get::@return breturn: - // [391] return + // [390] return rts } // keyboard_event_scan @@ -16562,39 +17899,39 @@ keyboard_event_scan: { .label row = $5a .label col = $5b .label event_type = $d2 - // [393] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] + // [392] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] b7_from_keyboard_event_scan: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 + // [392] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy + // [392] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 lda #0 sta keycode - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 + // [392] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 lda #0 sta row jmp b7 - // [393] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] + // [392] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] b7_from_b8: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy + // [392] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy + // [392] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy + // [392] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy jmp b7 // keyboard_event_scan::@7 b7: - // [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuz1=vbuz2 + // [393] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuz1=vbuz2 lda row sta keyboard_matrix_read.rowid - // [395] call keyboard_matrix_read + // [394] call keyboard_matrix_read jsr keyboard_matrix_read - // [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 + // [395] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 lda keyboard_matrix_read.return sta keyboard_matrix_read.return_2 jmp b19 // keyboard_event_scan::@19 b19: - // [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 + // [396] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 lda keyboard_matrix_read.return_2 sta row_scan - // [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + // [397] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 lda row_scan ldy row cmp keyboard_scan_values,y @@ -16602,143 +17939,143 @@ keyboard_event_scan: { jmp b16 // keyboard_event_scan::@16 b16: - // [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 + // [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 lax keycode axs #-[8] stx keycode - // [400] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] + // [399] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] b8_from_b15: b8_from_b16: - // [400] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy - // [400] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy + // [399] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy + // [399] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy jmp b8 // keyboard_event_scan::@8 b8: - // [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + // [400] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 inc row - // [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 + // [401] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp row bne b7_from_b8 - // [403] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] + // [402] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] b17_from_b8: jmp b17 // keyboard_event_scan::@17 b17: - // [404] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] + // [403] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] keyboard_event_pressed_from_b17: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_LSHIFT sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [404] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda keyboard_event_pressed.return_11 sta keyboard_event_pressed.return jmp b20 // keyboard_event_scan::@20 b20: - // [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 -- vbuz1=vbuz2 + // [405] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 -- vbuz1=vbuz2 lda keyboard_event_pressed.return sta _0 - // [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuz1_eq_0_then_la1 + // [406] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuz1_eq_0_then_la1 lda _0 cmp #0 beq b1_from_b20 - // [408] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] + // [407] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] b18_from_b20: jmp b18 // keyboard_event_scan::@18 b18: - // [409] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] + // [408] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] b1_from_b18: b1_from_b20: jmp b1 // keyboard_event_scan::@1 b1: - // [410] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] + // [409] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] keyboard_event_pressed_from_b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_RSHIFT sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [410] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda keyboard_event_pressed.return_11 sta keyboard_event_pressed.return_1 jmp b21 // keyboard_event_scan::@21 b21: - // [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 -- vbuz1=vbuz2 + // [411] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 -- vbuz1=vbuz2 lda keyboard_event_pressed.return_1 sta _3 - // [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuz1_eq_0_then_la1 + // [412] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuz1_eq_0_then_la1 lda _3 cmp #0 beq b2_from_b21 - // [414] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] + // [413] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] b4_from_b21: jmp b4 // keyboard_event_scan::@4 b4: - // [415] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] + // [414] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] b2_from_b21: b2_from_b4: jmp b2 // keyboard_event_scan::@2 b2: - // [416] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] + // [415] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] keyboard_event_pressed_from_b2: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_CTRL sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [416] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda keyboard_event_pressed.return_11 sta keyboard_event_pressed.return_2 jmp b22 // keyboard_event_scan::@22 b22: - // [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 -- vbuz1=vbuz2 + // [417] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 -- vbuz1=vbuz2 lda keyboard_event_pressed.return_2 sta _6 - // [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuz1_eq_0_then_la1 + // [418] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuz1_eq_0_then_la1 lda _6 cmp #0 beq b3_from_b22 - // [420] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] + // [419] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] b5_from_b22: jmp b5 // keyboard_event_scan::@5 b5: - // [421] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] + // [420] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] b3_from_b22: b3_from_b5: jmp b3 // keyboard_event_scan::@3 b3: - // [422] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] + // [421] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] keyboard_event_pressed_from_b3: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_COMMODORE sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [422] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda keyboard_event_pressed.return_11 sta keyboard_event_pressed.return_10 jmp b23 // keyboard_event_scan::@23 b23: - // [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 -- vbuz1=vbuz2 + // [423] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 -- vbuz1=vbuz2 lda keyboard_event_pressed.return_10 sta _9 - // [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuz1_eq_0_then_la1 + // [424] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuz1_eq_0_then_la1 lda _9 cmp #0 beq breturn - // [426] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] + // [425] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] b6_from_b23: jmp b6 // keyboard_event_scan::@6 @@ -16746,89 +18083,89 @@ keyboard_event_scan: { jmp breturn // keyboard_event_scan::@return breturn: - // [427] return + // [426] return rts // Something has changed on the keyboard row - check each column - // [428] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] + // [427] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] b9_from_b10: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy + // [427] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy + // [427] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy + // [427] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy jmp b9 - // [428] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] + // [427] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] b9_from_b19: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuz1=vbuc1 + // [427] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy + // [427] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy + // [427] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuz1=vbuc1 lda #0 sta col jmp b9 // keyboard_event_scan::@9 b9: - // [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuz3 + // [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuz3 lda row_scan ldy row eor keyboard_scan_values,y sta _15 - // [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + // [429] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 lda _15 ldy col and keyboard_matrix_col_bitmask,y sta _16 - // [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuz1_eq_0_then_la1 + // [430] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuz1_eq_0_then_la1 lda _16 cmp #0 beq b10_from_b9 jmp b12 // keyboard_event_scan::@12 b12: - // [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 + // [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 lda #8 cmp keyboard_events_size beq b10_from_b12 jmp b13 // keyboard_event_scan::@13 b13: - // [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + // [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 lda row_scan ldy col and keyboard_matrix_col_bitmask,y sta event_type - // [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuz1_eq_0_then_la1 + // [433] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuz1_eq_0_then_la1 lda event_type cmp #0 beq b11 jmp b14 // keyboard_event_scan::@14 b14: - // [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 + // [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 // Key pressed lda keycode ldy keyboard_events_size sta keyboard_events,y - // [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [435] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc keyboard_events_size - // [437] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] + // [436] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] b10_from_b11: b10_from_b12: b10_from_b14: b10_from_b9: - // [437] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy + // [436] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy jmp b10 // keyboard_event_scan::@10 b10: - // [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + // [437] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 inc keycode - // [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuz1=_inc_vbuz1 + // [438] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuz1=_inc_vbuz1 inc col - // [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuz1_neq_vbuc1_then_la1 + // [439] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp col bne b9_from_b10 jmp b15 // keyboard_event_scan::@15 b15: - // [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 // Store the current keyboard status for the row to debounce lda row_scan ldy row @@ -16836,16 +18173,16 @@ keyboard_event_scan: { jmp b8_from_b15 // keyboard_event_scan::@11 b11: - // [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuz1=vbuz2_bor_vbuc1 + // [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuz1=vbuz2_bor_vbuc1 lda #$40 ora keycode sta _23 - // [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuz2 + // [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuz2 // Key released lda _23 ldy keyboard_events_size sta keyboard_events,y - // [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [443] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc keyboard_events_size jmp b10_from_b11 } @@ -16860,18 +18197,18 @@ keyboard_matrix_read: { .label return = $d4 .label rowid = $c5 .label return_2 = $c6 - // [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy rowid lda keyboard_matrix_row_bitmask,y sta CIA1_PORT_A - // [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuz1=_bnot__deref_pbuc1 + // [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuz1=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff sta return jmp breturn // keyboard_matrix_read::@return breturn: - // [447] return + // [446] return rts } // render_show @@ -16880,50 +18217,50 @@ render_show: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .const toD0182_return = (>(PLAYFIELD_SCREEN_2&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .label d018val = $5e - // [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 + // [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 lda render_screen_show cmp #0 beq toD0181_from_render_show - // [449] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] + // [448] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] toD0182_from_render_show: jmp toD0182 // render_show::toD0182 toD0182: - // [450] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] + // [449] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] b1_from_toD0182: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuz1=vbuc1 + // [449] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuz1=vbuc1 lda #toD0182_return sta d018val jmp b1 // render_show::@1 b1: - // [451] *((const byte*) D018#0) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuz1 + // [450] *((const byte*) D018#0) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuz1 lda d018val sta D018 - // [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy level lda PIECES_COLORS_1,y sta BGCOL2 - // [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy level lda PIECES_COLORS_2,y sta BGCOL3 - // [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 -- vbuz1=vbuz2 + // [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda render_screen_show sta render_screen_showing jmp breturn // render_show::@return breturn: - // [455] return + // [454] return rts - // [456] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] + // [455] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] toD0181_from_render_show: jmp toD0181 // render_show::toD0181 toD0181: - // [450] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] + // [449] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] b1_from_toD0181: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuz1=vbuc1 + // [449] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuz1=vbuc1 lda #toD0181_return sta d018val jmp b1 @@ -16937,43 +18274,43 @@ play_init: { .label idx = $62 .label j = $5f .label b = $63 - // [458] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] + // [457] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] b1_from_play_init: - // [458] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 + // [457] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 lda #0 sta idx - // [458] phi (byte*) play_init::pli#2 = (const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 + // [457] phi (byte*) play_init::pli#2 = (const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 lda #<playfield sta pli lda #>playfield sta pli+1 - // [458] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuz1=vbuc1 + // [457] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuz1=vbuc1 lda #0 sta j jmp b1 - // [458] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] + // [457] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] b1_from_b1: - // [458] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy - // [458] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy - // [458] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy + // [457] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy + // [457] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy + // [457] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy jmp b1 // play_init::@1 b1: - // [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda j asl sta _4 - // [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuz1=pbuz2 + // [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuz1=pbuz2 ldy _4 lda pli sta playfield_lines,y lda pli+1 sta playfield_lines+1,y - // [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda idx ldy j sta playfield_lines_idx,y - // [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 -- pbuz1=pbuz1_plus_vbuc1 + // [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 -- pbuz1=pbuz1_plus_vbuc1 lda #PLAYFIELD_COLS clc adc pli @@ -16981,45 +18318,45 @@ play_init: { bcc !+ inc pli+1 !: - // [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 + // [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 lax idx axs #-[PLAYFIELD_COLS] stx idx - // [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuz1=_inc_vbuz1 + // [463] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuz1=_inc_vbuz1 inc j - // [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [464] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp j bne b1_from_b1 jmp b2 // play_init::@2 b2: - // [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 -- _deref_pbuc1=vbuc2 + // [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 -- _deref_pbuc1=vbuc2 lda #PLAYFIELD_COLS*PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES - // [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) -- vbuz1=_deref_pbuc1 + // [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) -- vbuz1=_deref_pbuc1 // Set initial speed of moving down a tetromino lda MOVEDOWN_SLOW_SPEEDS sta current_movedown_slow - // [468] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] + // [467] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] b3_from_b2: - // [468] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuz1=vbuc1 + // [467] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuz1=vbuc1 lda #0 sta b jmp b3 // Set the initial score add values - // [468] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] + // [467] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] b3_from_b3: - // [468] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy + // [467] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy jmp b3 // play_init::@3 b3: - // [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 + // [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 lda b asl asl sta _5 - // [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) -- pduc1_derefidx_vbuz1=pduc2_derefidx_vbuz1 + // [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) -- pduc1_derefidx_vbuz1=pduc2_derefidx_vbuz1 ldy _5 lda SCORE_BASE_BCD,y sta score_add_bcd,y @@ -17029,16 +18366,16 @@ play_init: { sta score_add_bcd+2,y lda SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuz1=_inc_vbuz1 + // [470] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuz1=_inc_vbuz1 inc b - // [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuz1_neq_vbuc1_then_la1 + // [471] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp b bne b3_from_b3 jmp breturn // play_init::@return breturn: - // [473] return + // [472] return rts } // sprites_irq_init @@ -17046,36 +18383,36 @@ play_init: { sprites_irq_init: { // asm { sei } sei - // [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS // asm { ldaCIA1_INTERRUPT } lda CIA1_INTERRUPT - // [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR - // [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + // [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - // [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT - // [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL - // [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 + // [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER_FIRST sta RASTER - // [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - // [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 + // [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #<sprites_irq sta HARDWARE_IRQ @@ -17086,7 +18423,7 @@ sprites_irq_init: { jmp breturn // sprites_irq_init::@return breturn: - // [485] return + // [484] return rts } // sprites_init @@ -17095,60 +18432,60 @@ sprites_init: { .label s2 = $d7 .label xpos = $65 .label s = $64 - // [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f sta SPRITES_ENABLE - // [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC - // [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 + // [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 lda SPRITES_MC sta SPRITES_EXPAND_Y - // [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 + // [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 lda SPRITES_EXPAND_Y sta SPRITES_EXPAND_X - // [490] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] + // [489] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] b1_from_sprites_init: - // [490] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 + // [489] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 lda #$18+$f*8 sta xpos - // [490] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuz1=vbuc1 + // [489] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuz1=vbuc1 lda #0 sta s jmp b1 - // [490] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] + // [489] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] b1_from_b1: - // [490] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy - // [490] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy + // [489] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy + // [489] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy jmp b1 // sprites_init::@1 b1: - // [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda s asl sta s2 - // [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda xpos ldy s2 sta SPRITES_XPOS,y - // [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #BLACK ldy s sta SPRITES_COLS,y - // [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 + // [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax xpos axs #-[$18] stx xpos - // [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuz1=_inc_vbuz1 + // [494] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuz1=_inc_vbuz1 inc s - // [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [495] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp s bne b1_from_b1 jmp breturn // sprites_init::@return breturn: - // [497] return + // [496] return rts } // render_init @@ -17162,10 +18499,10 @@ render_init: { jmp vicSelectGfxBank1 // render_init::vicSelectGfxBank1 vicSelectGfxBank1: - // [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta CIA2_PORT_A_DDR - // [500] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] + // [499] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1: jmp vicSelectGfxBank1_toDd001 // render_init::vicSelectGfxBank1_toDd001 @@ -17173,95 +18510,95 @@ render_init: { jmp vicSelectGfxBank1_b1 // render_init::vicSelectGfxBank1_@1 vicSelectGfxBank1_b1: - // [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + // [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A jmp b2 // render_init::@2 b2: - // [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 + // [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL1 - // [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) -- _deref_pbuc1=_deref_pbuc2 + // [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 sta BGCOL2 - // [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) -- _deref_pbuc1=_deref_pbuc2 + // [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 sta BGCOL3 - // [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 -- _deref_pbuc1=vbuc2 + // [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 -- _deref_pbuc1=vbuc2 lda #GREY sta BGCOL4 - // [508] call render_screen_original - // [520] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] + // [507] call render_screen_original + // [519] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] render_screen_original_from_b2: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1#0 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1#0 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_1 sta render_screen_original.screen lda #>PLAYFIELD_SCREEN_1 sta render_screen_original.screen+1 jsr render_screen_original - // [509] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] + // [508] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] b3_from_b2: jmp b3 // render_init::@3 b3: - // [510] call render_screen_original - // [520] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] + // [509] call render_screen_original + // [519] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] render_screen_original_from_b3: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2#0 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2#0 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_2 sta render_screen_original.screen lda #>PLAYFIELD_SCREEN_2 sta render_screen_original.screen+1 jsr render_screen_original - // [511] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] + // [510] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] b1_from_b3: - // [511] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 + // [510] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_2+2*$28+$10 sta li_2 lda #>PLAYFIELD_SCREEN_2+2*$28+$10 sta li_2+1 - // [511] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 + // [510] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_1+2*$28+$10 sta li_1 lda #>PLAYFIELD_SCREEN_1+2*$28+$10 sta li_1+1 - // [511] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuz1=vbuc1 + // [510] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - // [511] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] + // [510] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] b1_from_b1: - // [511] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy - // [511] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy - // [511] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy + // [510] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy + // [510] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy + // [510] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy jmp b1 // render_init::@1 b1: - // [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _13 - // [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuz1=pbuz2 + // [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuz1=pbuz2 ldy _13 lda li_1 sta screen_lines_1,y lda li_1+1 sta screen_lines_1+1,y - // [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuz1=pbuz2 + // [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuz1=pbuz2 ldy _13 lda li_2 sta screen_lines_2,y lda li_2+1 sta screen_lines_2+1,y - // [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc li_1 @@ -17269,7 +18606,7 @@ render_init: { bcc !+ inc li_1+1 !: - // [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc li_2 @@ -17277,16 +18614,16 @@ render_init: { bcc !+ inc li_2+1 !: - // [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuz1=_inc_vbuz1 + // [516] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuz1=_inc_vbuz1 inc i - // [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [517] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp i bne b1_from_b1 jmp breturn // render_init::@return breturn: - // [519] return + // [518] return rts } // render_screen_original @@ -17301,188 +18638,188 @@ render_screen_original: { .label oscr = $6c .label ocols = $6e .label y = $6b - // [521] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] + // [520] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] b1_from_render_screen_original: - // [521] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 + // [520] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 lda #0 sta y - // [521] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 lda #<PLAYFIELD_COLORS_ORIGINAL+$20*2 sta ocols lda #>PLAYFIELD_COLORS_ORIGINAL+$20*2 sta ocols+1 - // [521] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta oscr lda #>PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta oscr+1 - // [521] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS#0 [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS#0 [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 lda #<COLS sta cols lda #>COLS sta cols+1 - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy + // [520] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy jmp b1 - // [521] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] + // [520] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] b1_from_b5: - // [521] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy - // [521] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy - // [521] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy - // [521] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy + // [520] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy + // [520] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy + // [520] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy + // [520] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy + // [520] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy jmp b1 // render_screen_original::@1 b1: - // [522] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] + // [521] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] b2_from_b1: - // [522] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuz1=vbuc1 + // [521] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuz1=vbuc1 lda #0 sta x - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy + // [521] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy + // [521] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy jmp b2 - // [522] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] + // [521] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] b2_from_b2: - // [522] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy + // [521] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy + // [521] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy + // [521] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy jmp b2 // render_screen_original::@2 b2: - // [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 + // [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 + // [523] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + // [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 + // [525] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: - // [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuz1=_inc_vbuz1 + // [526] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuz1=_inc_vbuz1 inc x - // [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuz1_neq_vbuc1_then_la1 + // [527] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp x bne b2_from_b2 - // [529] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] + // [528] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] b3_from_b2: b3_from_b3: - // [529] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy - // [529] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy - // [529] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy - // [529] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy - // [529] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy + // [528] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy + // [528] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy + // [528] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy + // [528] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy + // [528] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy jmp b3 // render_screen_original::@3 b3: - // [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 + // [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (oscr),y ldy #0 sta (screen),y - // [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 + // [530] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 + // [531] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 inc oscr bne !+ inc oscr+1 !: - // [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 + // [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (ocols),y ldy #0 sta (cols),y - // [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 + // [533] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: - // [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 + // [534] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 inc ocols bne !+ inc ocols+1 !: - // [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuz1=_inc_vbuz1 + // [535] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuz1=_inc_vbuz1 inc x - // [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuz1_neq_vbuc1_then_la1 + // [536] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuz1_neq_vbuc1_then_la1 lda #$24 cmp x bne b3_from_b3 - // [538] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] + // [537] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] b4_from_b3: b4_from_b4: - // [538] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy - // [538] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy - // [538] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy + // [537] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy + // [537] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy + // [537] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy jmp b4 // render_screen_original::@4 b4: - // [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 + // [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 + // [539] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + // [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 + // [541] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: - // [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuz1=_inc_vbuz1 + // [542] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuz1=_inc_vbuz1 inc x - // [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuz1_neq_vbuc1_then_la1 + // [543] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b4_from_b4 jmp b5 // render_screen_original::@5 b5: - // [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 + // [544] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 inc y - // [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 + // [545] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b1_from_b5 jmp breturn // render_screen_original::@return breturn: - // [547] return + // [546] return rts } // sid_rnd_init // Initialize SID voice 3 for random number generation sid_rnd_init: { - // [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff -- _deref_pwuc1=vwuc2 + // [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff -- _deref_pwuc1=vwuc2 lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 - // [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + // [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL jmp breturn // sid_rnd_init::@return breturn: - // [550] return + // [549] return rts } // sprites_irq @@ -17507,124 +18844,124 @@ sprites_irq: { //(*BGCOL)++; // Clear decimal flag (because it is used by the score algorithm) cld - // [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuz1=vbuz2 + // [551] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuz1=vbuz2 // Place the sprites lda irq_sprite_ypos sta ypos - // [553] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [552] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda ypos sta SPRITES_YPOS - // [554] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [553] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda ypos sta SPRITES_YPOS+2 - // [555] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [554] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda ypos sta SPRITES_YPOS+4 - // [556] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [555] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda ypos sta SPRITES_YPOS+6 - // [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [556] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy irq_raster_next iny sty _0 - // [558] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuz2 + // [557] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuz2 // Wait for the y-position before changing sprite pointers lda _0 sta raster_sprite_gfx_modify jmp b8 // sprites_irq::@8 b8: - // [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp raster_sprite_gfx_modify bcc b8 jmp b9 // sprites_irq::@9 b9: - // [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuz1=vbuz2 + // [559] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuz1=vbuz2 lda irq_sprite_ptr sta ptr - // [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 + // [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 lda render_screen_showing cmp #0 beq b1 jmp b10 // sprites_irq::@10 b10: - // [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 + // [561] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 lda ptr sta PLAYFIELD_SPRITE_PTRS_2 - // [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 + // [562] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 ldy ptr iny sty ptr_3 - // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 + // [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 lda ptr_3 sta PLAYFIELD_SPRITE_PTRS_2+1 - // [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 + // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 lda ptr_3 sta PLAYFIELD_SPRITE_PTRS_2+2 - // [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuz1=_inc_vbuz2 + // [565] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuz1=_inc_vbuz2 ldy ptr_3 iny sty ptr_4 - // [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuz1 + // [566] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuz1 lda ptr_4 sta PLAYFIELD_SPRITE_PTRS_2+3 jmp b2 // sprites_irq::@2 b2: - // [568] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 + // [567] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 inc irq_cnt - // [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 + // [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 lda #9 cmp irq_cnt beq b3 jmp b6 // sprites_irq::@6 b6: - // [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 + // [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 lda #$a cmp irq_cnt beq b4 jmp b7 // sprites_irq::@7 b7: - // [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 + // [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 lax irq_raster_next axs #-[$14] stx irq_raster_next - // [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ypos axs #-[$15] stx irq_sprite_ypos - // [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ptr axs #-[3] stx irq_sprite_ptr - // [574] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5] + // [573] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5] b5_from_b11: b5_from_b4: b5_from_b7: - // [574] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy - // [574] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy - // [574] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy - // [574] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy + // [573] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy + // [573] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy + // [573] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy + // [573] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy jmp b5 // sprites_irq::@5 b5: - // [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 + // [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 // Setup next interrupt lda irq_raster_next sta RASTER - // [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // sprites_irq::@return breturn: - // [577] return - exit interrupt(HARDWARE_CLOBBER) + // [576] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -17634,31 +18971,31 @@ sprites_irq: { rti // sprites_irq::@4 b4: - // [578] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 + // [577] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta irq_cnt - // [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 + // [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 lda #IRQ_RASTER_FIRST sta irq_raster_next - // [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ypos axs #-[$15] stx irq_sprite_ypos - // [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ptr axs #-[3] stx irq_sprite_ptr jmp b5_from_b4 // sprites_irq::@3 b3: - // [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_raster_next axs #-[$15] stx irq_raster_next - // [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 + // [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 lda #SPRITES_FIRST_YPOS sta irq_sprite_ypos - // [584] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] + // [583] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] toSpritePtr2_from_b3: jmp toSpritePtr2 // sprites_irq::toSpritePtr2 @@ -17666,30 +19003,30 @@ sprites_irq: { jmp b11 // sprites_irq::@11 b11: - // [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 + // [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 lda #toSpritePtr2_return sta irq_sprite_ptr jmp b5_from_b11 // sprites_irq::@1 b1: - // [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 + // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 lda ptr sta PLAYFIELD_SPRITE_PTRS_1 - // [587] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 + // [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 ldy ptr iny sty ptr_1 - // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 + // [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 lda ptr_1 sta PLAYFIELD_SPRITE_PTRS_1+1 - // [589] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 + // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 lda ptr_1 sta PLAYFIELD_SPRITE_PTRS_1+2 - // [590] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuz1=_inc_vbuz2 + // [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuz1=_inc_vbuz2 ldy ptr_1 iny sty ptr_2 - // [591] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuz1 + // [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuz1 lda ptr_2 sta PLAYFIELD_SPRITE_PTRS_1+3 jmp b2 @@ -17800,18 +19137,18 @@ Statement [7] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ren Statement [8] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte) $15 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [10] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [11] (byte) irq_cnt#0 ← (byte) 0 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [33] (byte*~) current_piece_gfx#112 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [33] (byte*~) current_piece_gfx#112 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ current_ypos#13 current_ypos#98 current_ypos#99 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:173 [ play_spawn_current::$7 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] -Statement [38] (byte*~) current_piece#102 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [39] (byte*~) current_piece_gfx#124 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [38] (byte*~) current_piece#102 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [39] (byte*~) current_piece_gfx#124 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a Statement [41] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 ] ( main:13 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] @@ -17844,7 +19181,7 @@ Removing always clobbered register reg byte y as potential for zp ZP_BYTE:69 [ c Removing always clobbered register reg byte y as potential for zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] @@ -17853,39 +19190,39 @@ Removing always clobbered register reg byte y as potential for zp ZP_BYTE:65 [ l Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ render_bcd::bcd#6 render_bcd::bcd#0 render_bcd::bcd#1 render_bcd::bcd#2 render_bcd::bcd#3 render_bcd::bcd#4 render_bcd::bcd#5 ] Statement [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a Statement [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y -Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a +Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ] -Statement [115] (byte*~) render_next::next_piece_gfx#9 ← (byte*)*((const word[]) PIECES#0 + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a +Statement [115] (byte*~) render_next::next_piece_gfx#9 ← (byte*)*((const word[]) PIECES#0 + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] -Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y +Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:173 [ play_spawn_current::$7 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ render_next::c#2 render_next::c#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:23 [ render_next::c#2 render_next::c#1 ] -Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a -Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a +Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a +Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] -Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a +Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] -Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a -Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a -Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a +Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a +Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a +Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ render_moving::c#2 render_moving::c#1 ] -Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a -Statement [154] (byte~) render_playfield::$2 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ) always clobbers reg byte a +Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a +Statement [154] (byte~) render_playfield::$2 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:35 [ render_screen_render#22 render_screen_render#64 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Statement [155] (byte~) render_playfield::$6 ← (byte~) render_playfield::$2 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ) always clobbers reg byte a -Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a -Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y +Statement [155] (byte~) render_playfield::$6 ← (byte~) render_playfield::$2 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ) always clobbers reg byte a +Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a +Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:35 [ render_screen_render#22 render_screen_render#64 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] @@ -17918,163 +19255,163 @@ Statement [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_coll Statement [231] (byte*~) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#98 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#98 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a Statement [242] (byte*~) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a Statement [266] (byte*~) current_piece#96 ← (byte*) current_piece#10 [ current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece#96 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece#96 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a -Statement [281] (byte*~) current_piece#93 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [281] (byte*~) current_piece#93 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a Statement [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:172 [ play_spawn_current::current_piece_idx#0 ] Statement [295] (byte*~) current_piece#100 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a -Statement [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a +Statement [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:171 [ play_update_score::removed#0 ] -Statement [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a +Statement [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:178 [ play_update_score::lines_before#0 ] -Statement [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a -Statement [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ) always clobbers reg byte a -Statement [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a -Statement [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a -Statement [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#66 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#8 ] ) always clobbers reg byte a reg byte x +Statement [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a +Statement [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ) always clobbers reg byte a +Statement [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a +Statement [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a +Statement [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#66 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#8 ] ) always clobbers reg byte a reg byte x Removing always clobbered register reg byte x as potential for zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:124 [ play_movement::key_event#0 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] -Removing always clobbered register reg byte x as potential for zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +Removing always clobbered register reg byte x as potential for zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] -Statement [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a +Statement [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:76 [ play_increase_level::b#2 play_increase_level::b#1 ] -Statement [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a -Statement [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a +Statement [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a +Statement [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:79 [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ] -Statement [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a +Statement [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:82 [ play_remove_lines::w#6 play_remove_lines::w#3 play_remove_lines::w#4 play_remove_lines::w#12 play_remove_lines::w#11 play_remove_lines::w#1 play_remove_lines::w#2 ] -Statement [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a +Statement [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] -Statement [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a -Statement [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a +Statement [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:87 [ play_lock_current::c#2 play_lock_current::c#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:192 [ play_lock_current::i#1 ] -Statement [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:55 [ play_move_down::movedown#6 play_move_down::movedown#7 play_move_down::movedown#10 play_move_down::movedown#2 play_move_down::movedown#3 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ] -Statement [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] -Statement [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a -Statement [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 ] ) always clobbers reg byte a -Statement [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y -Statement [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a +Statement [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 ] ) always clobbers reg byte a +Statement [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y +Statement [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Statement [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] -Statement [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a -Statement [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y +Statement [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] -Statement [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a -Statement [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y -Statement [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a -Statement [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a -Statement [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 render_screen_showing#1 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 render_screen_showing#1 ] ) always clobbers reg byte a -Statement [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ) always clobbers reg byte a +Statement [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a +Statement [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y +Statement [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:394 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:394 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 render_screen_showing#1 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 render_screen_showing#1 ] ) always clobbers reg byte a +Statement [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:95 [ play_init::j#2 play_init::j#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] -Statement [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a -Statement [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a -Statement [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 [ ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 ] ) always clobbers reg byte a -Statement [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$5 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 play_init::$5 ] ) always clobbers reg byte a +Statement [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a +Statement [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a +Statement [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 [ ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 ] ) always clobbers reg byte a +Statement [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$5 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 play_init::$5 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:99 [ play_init::b#2 play_init::b#1 ] -Statement [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a -Statement [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a +Statement [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a -Statement [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a +Statement [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:100 [ sprites_init::s#2 sprites_init::s#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ] -Statement [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a -Statement [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a +Statement [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a +Statement [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:102 [ render_init::i#2 render_init::i#1 ] -Statement [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a +Statement [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:216 [ render_init::$13 ] -Statement [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a -Statement [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a -Statement [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a -Statement [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y +Statement [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a +Statement [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a +Statement [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a +Statement [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:116 [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:116 [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] -Statement [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y -Statement [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y -Statement [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ( [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a -Statement [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a +Statement [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y +Statement [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y +Statement [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y +Statement [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ( [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a +Statement [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:219 [ sprites_irq::ptr#0 ] -Statement [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a -Statement [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a -Statement [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x -Statement [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ( [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x -Statement [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ( [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x -Statement [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] ( [ ] ) always clobbers reg byte a -Statement [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [577] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [578] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a -Statement [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a -Statement [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x -Statement [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ( [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x -Statement [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] ( [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x -Statement [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a -Statement [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ) always clobbers reg byte a +Statement [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a +Statement [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a +Statement [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x +Statement [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ( [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x +Statement [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ( [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x +Statement [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] ( [ ] ) always clobbers reg byte a +Statement [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [576] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [577] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a +Statement [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a +Statement [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x +Statement [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ( [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x +Statement [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] ( [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x +Statement [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a +Statement [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ) always clobbers reg byte a Statement [1] (byte) render_screen_showing#0 ← (byte) 0 [ render_screen_showing#0 ] ( [ render_screen_showing#0 ] ) always clobbers reg byte a Statement [2] (dword) score_bcd#0 ← (byte) 0 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [7] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [8] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte) $15 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [10] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [11] (byte) irq_cnt#0 ← (byte) 0 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [33] (byte*~) current_piece_gfx#112 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [38] (byte*~) current_piece#102 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [39] (byte*~) current_piece_gfx#124 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [33] (byte*~) current_piece_gfx#112 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [38] (byte*~) current_piece#102 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [39] (byte*~) current_piece_gfx#124 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a Statement [41] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 ] ( main:13 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 ] ) always clobbers reg byte a Statement [50] if((byte) game_over#10==(byte) 0) goto main::@4 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#16 main::key_event#0 ] ( main:13 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#16 main::key_event#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:123 [ main::key_event#0 ] @@ -18095,22 +19432,22 @@ Statement [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 Statement [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y Statement [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a Statement [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y -Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a -Statement [115] (byte*~) render_next::next_piece_gfx#9 ← (byte*)*((const word[]) PIECES#0 + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a -Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y -Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a -Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a -Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a -Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a -Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a -Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a -Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a -Statement [154] (byte~) render_playfield::$2 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ) always clobbers reg byte a -Statement [155] (byte~) render_playfield::$6 ← (byte~) render_playfield::$2 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ) always clobbers reg byte a -Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a -Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y +Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a +Statement [115] (byte*~) render_next::next_piece_gfx#9 ← (byte*)*((const word[]) PIECES#0 + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a +Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y +Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a +Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a +Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a +Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a +Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a +Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a +Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a +Statement [154] (byte~) render_playfield::$2 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ) always clobbers reg byte a +Statement [155] (byte~) render_playfield::$6 ← (byte~) render_playfield::$2 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ) always clobbers reg byte a +Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a +Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y Statement [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 [ current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ) always clobbers reg byte a Statement [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a Statement [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a @@ -18127,38 +19464,38 @@ Statement [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_coll Statement [231] (byte*~) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#98 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#98 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a Statement [242] (byte*~) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a Statement [266] (byte*~) current_piece#96 ← (byte*) current_piece#10 [ current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece#96 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece#96 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a -Statement [281] (byte*~) current_piece#93 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [281] (byte*~) current_piece#93 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a Statement [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a Statement [295] (byte*~) current_piece#100 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a -Statement [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ) always clobbers reg byte a -Statement [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ) always clobbers reg byte a -Statement [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a -Statement [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a -Statement [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a -Statement [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ) always clobbers reg byte a -Statement [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a -Statement [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a -Statement [325] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y +Statement [303] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ) always clobbers reg byte a +Statement [304] if((byte) play_spawn_current::piece_idx#1==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ) always clobbers reg byte a +Statement [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a +Statement [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a +Statement [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a +Statement [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ) always clobbers reg byte a +Statement [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a +Statement [323] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a +Statement [324] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:124 [ play_movement::key_event#0 ] -Statement [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a -Statement [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#66 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#8 ] ) always clobbers reg byte a reg byte x -Statement [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a -Statement [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a -Statement [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a -Statement [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a -Statement [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a -Statement [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a -Statement [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a -Statement [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a -Statement [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a -Statement [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 ] ) always clobbers reg byte a -Statement [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y -Statement [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a -Statement [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x +Statement [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a +Statement [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#66 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#8 ] ) always clobbers reg byte a reg byte x +Statement [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a +Statement [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a +Statement [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a +Statement [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a +Statement [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a +Statement [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a +Statement [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 ] ) always clobbers reg byte a +Statement [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y +Statement [397] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a +Statement [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x Removing always clobbered register reg byte x as potential for zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] @@ -18166,94 +19503,94 @@ Removing always clobbered register reg byte x as potential for zp ZP_BYTE:56 [ c Removing always clobbered register reg byte x as potential for zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] Removing always clobbered register reg byte x as potential for zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Statement [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a -Statement [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a -Statement [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a -Statement [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a -Statement [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y -Statement [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y -Statement [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y -Statement [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a -Statement [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a -Statement [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 render_screen_showing#1 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 render_screen_showing#1 ] ) always clobbers reg byte a -Statement [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ) always clobbers reg byte a -Statement [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a -Statement [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a -Statement [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 [ ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 ] ) always clobbers reg byte a -Statement [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$5 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 play_init::$5 ] ) always clobbers reg byte a -Statement [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a -Statement [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [401] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a +Statement [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [429] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a +Statement [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y +Statement [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y +Statement [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y +Statement [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:394 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:394 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 render_screen_showing#1 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 render_screen_showing#1 ] ) always clobbers reg byte a +Statement [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ) always clobbers reg byte a +Statement [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a +Statement [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a +Statement [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 [ ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 ] ) always clobbers reg byte a +Statement [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$5 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 play_init::$5 ] ) always clobbers reg byte a +Statement [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a +Statement [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a -Statement [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a -Statement [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a -Statement [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a -Statement [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a -Statement [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a -Statement [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a -Statement [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a -Statement [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y -Statement [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y -Statement [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y -Statement [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ( [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a -Statement [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a -Statement [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a -Statement [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a -Statement [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x -Statement [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ( [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x -Statement [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ( [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x -Statement [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] ( [ ] ) always clobbers reg byte a -Statement [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [577] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [578] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a -Statement [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a -Statement [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x -Statement [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ( [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x -Statement [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] ( [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x -Statement [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a -Statement [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ) always clobbers reg byte a +Statement [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a +Statement [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a +Statement [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a +Statement [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a +Statement [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a +Statement [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a +Statement [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a +Statement [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y +Statement [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y +Statement [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y +Statement [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y +Statement [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ( [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a +Statement [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a +Statement [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a +Statement [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a +Statement [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x +Statement [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ( [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x +Statement [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ( [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x +Statement [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] ( [ ] ) always clobbers reg byte a +Statement [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [576] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [577] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a +Statement [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a +Statement [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x +Statement [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ( [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x +Statement [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] ( [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x +Statement [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a +Statement [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ) always clobbers reg byte a Statement [1] (byte) render_screen_showing#0 ← (byte) 0 [ render_screen_showing#0 ] ( [ render_screen_showing#0 ] ) always clobbers reg byte a Statement [2] (dword) score_bcd#0 ← (byte) 0 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [7] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [8] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte) $15 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [10] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte) 3 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement [11] (byte) irq_cnt#0 ← (byte) 0 [ render_screen_showing#0 score_bcd#0 ] ( [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [33] (byte*~) current_piece_gfx#112 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [38] (byte*~) current_piece#102 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [39] (byte*~) current_piece_gfx#124 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [33] (byte*~) current_piece_gfx#112 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#98 current_ypos#6 current_xpos#119 current_xpos#100 current_piece_gfx#112 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [38] (byte*~) current_piece#102 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [39] (byte*~) current_piece_gfx#124 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ( main:13 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 current_piece#102 current_piece_gfx#124 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a Statement [41] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 ] ( main:13 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 ] ) always clobbers reg byte a Statement [50] if((byte) game_over#10==(byte) 0) goto main::@4 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#16 main::key_event#0 ] ( main:13 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#16 main::key_event#0 ] ) always clobbers reg byte a Statement [62] (byte*~) current_piece_gfx#113 ← (byte*) current_piece_gfx#18 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 current_ypos#99 render_screen_render#65 current_xpos#120 current_piece_gfx#113 ] ( main:13 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 current_ypos#99 render_screen_render#65 current_xpos#120 current_piece_gfx#113 ] ) always clobbers reg byte a @@ -18273,22 +19610,22 @@ Statement [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 Statement [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y Statement [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a Statement [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:13::render_score:69::render_bcd:80 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:83 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:86 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:89 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:92 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:95 [ render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 score_bcd#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y -Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a -Statement [115] (byte*~) render_next::next_piece_gfx#9 ← (byte*)*((const word[]) PIECES#0 + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a -Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y -Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a -Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a -Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a -Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a -Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a -Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a -Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a -Statement [154] (byte~) render_playfield::$2 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ) always clobbers reg byte a -Statement [155] (byte~) render_playfield::$6 ← (byte~) render_playfield::$2 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ) always clobbers reg byte a -Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a -Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y +Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a +Statement [115] (byte*~) render_next::next_piece_gfx#9 ← (byte*)*((const word[]) PIECES#0 + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a +Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y +Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a +Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a +Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a +Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a +Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a +Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a +Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a +Statement [154] (byte~) render_playfield::$2 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$2 ] ) always clobbers reg byte a +Statement [155] (byte~) render_playfield::$6 ← (byte~) render_playfield::$2 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$6 ] ) always clobbers reg byte a +Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_playfield::$6) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a +Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ render_screen_showing#0 score_bcd#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 render_screen_showing#1 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y Statement [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 [ current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ) always clobbers reg byte a Statement [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a Statement [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 score_bcd#14 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a @@ -18307,119 +19644,119 @@ Statement [242] (byte*~) current_piece#97 ← (byte*) current_piece#15 [ current Statement [256] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast#0) goto play_move_down::@2 [ current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 ] ) always clobbers reg byte a Statement [259] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 [ current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#7 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#7 ] ) always clobbers reg byte a Statement [266] (byte*~) current_piece#96 ← (byte*) current_piece#10 [ current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece#96 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece#96 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a -Statement [281] (byte*~) current_piece#93 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [281] (byte*~) current_piece#93 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [282] (byte*~) current_piece_gfx#117 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 current_piece#93 current_piece_gfx#117 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a Statement [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a Statement [290] (byte) current_piece_char#5 ← *((const byte[]) PIECES_CHARS#0 + (byte) play_spawn_current::current_piece_idx#0) [ play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a Statement [291] (byte) current_xpos#100 ← *((const byte[]) PIECES_START_X#0 + (byte) play_spawn_current::current_piece_idx#0) [ current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a Statement [292] (byte) current_ypos#6 ← *((const byte[]) PIECES_START_Y#0 + (byte) play_spawn_current::current_piece_idx#0) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] ) always clobbers reg byte a Statement [295] (byte*~) current_piece#100 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#100 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a -Statement [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ) always clobbers reg byte a -Statement [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ) always clobbers reg byte a -Statement [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a -Statement [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a -Statement [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a -Statement [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ) always clobbers reg byte a -Statement [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a -Statement [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a -Statement [325] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y -Statement [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a -Statement [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#66 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#8 ] ) always clobbers reg byte a reg byte x -Statement [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a -Statement [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a -Statement [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a -Statement [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a -Statement [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a -Statement [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a -Statement [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a -Statement [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a -Statement [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a -Statement [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 ] ) always clobbers reg byte a -Statement [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y -Statement [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a reg byte y -Statement [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x -Statement [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a -Statement [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a -Statement [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a -Statement [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a -Statement [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y -Statement [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y -Statement [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y -Statement [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a -Statement [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a -Statement [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 render_screen_showing#1 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 render_screen_showing#1 ] ) always clobbers reg byte a -Statement [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ) always clobbers reg byte a -Statement [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a -Statement [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a -Statement [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 [ ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 ] ) always clobbers reg byte a -Statement [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$5 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 play_init::$5 ] ) always clobbers reg byte a -Statement [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a -Statement [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [303] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ) always clobbers reg byte a +Statement [304] if((byte) play_spawn_current::piece_idx#1==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ( main:13::play_spawn_current:26 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_spawn_current:28 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 lines_bcd#17 score_bcd#16 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#1 game_over#52 ] ) always clobbers reg byte a +Statement [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a +Statement [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a +Statement [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) [ current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a +Statement [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 score_bcd#18 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 ] ) always clobbers reg byte a +Statement [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 score_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a +Statement [323] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a +Statement [324] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y +Statement [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a +Statement [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#66 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#8 ] ) always clobbers reg byte a reg byte x +Statement [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a +Statement [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:319 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 lines_bcd#29 score_bcd#29 level#21 current_movedown_slow#66 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a +Statement [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a +Statement [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a +Statement [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a +Statement [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a +Statement [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 render_screen_showing#1 keyboard_events_size#16 play_movement::key_event#0 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:403 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:409 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:415 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:421 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 ] ) always clobbers reg byte a +Statement [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y +Statement [397] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a reg byte y +Statement [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x +Statement [401] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a +Statement [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [429] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a +Statement [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y +Statement [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y +Statement [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y +Statement [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:394 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:394 [ render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level#10 level_bcd#11 render_screen_showing#1 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 render_screen_showing#1 ] ( main:13::render_show:43 [ render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 score_bcd#18 level_bcd#11 render_screen_show#16 level#10 render_screen_showing#1 ] ) always clobbers reg byte a +Statement [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$4 ] ) always clobbers reg byte a +Statement [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a +Statement [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a +Statement [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 [ ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 ] ) always clobbers reg byte a +Statement [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$5 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 play_init::$5 ] ) always clobbers reg byte a +Statement [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ render_screen_showing#0 score_bcd#0 current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a +Statement [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a -Statement [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a -Statement [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a -Statement [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a -Statement [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a -Statement [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a -Statement [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a -Statement [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a -Statement [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y -Statement [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y -Statement [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y -Statement [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a -Statement [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ( [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a -Statement [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a -Statement [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a -Statement [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a -Statement [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x -Statement [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ( [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x -Statement [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ( [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x -Statement [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] ( [ ] ) always clobbers reg byte a -Statement [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [577] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [578] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a -Statement [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a -Statement [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x -Statement [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ( [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x -Statement [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] ( [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x -Statement [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a -Statement [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ) always clobbers reg byte a +Statement [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) [ ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a +Statement [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ render_screen_showing#0 score_bcd#0 sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a +Statement [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 [ ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a +Statement [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$13 ] ) always clobbers reg byte a +Statement [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a +Statement [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a +Statement [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ render_screen_showing#0 score_bcd#0 render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a +Statement [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y +Statement [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y +Statement [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y +Statement [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y +Statement [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:507 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:509 [ render_screen_showing#0 score_bcd#0 render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:13::sid_rnd_init:16 [ render_screen_showing#0 score_bcd#0 ] ) always clobbers reg byte a +Statement [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ( [ render_screen_showing#0 irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::raster_sprite_gfx_modify#0 ] ) always clobbers reg byte a +Statement [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 sprites_irq::ptr#0 ] ) always clobbers reg byte a +Statement [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a +Statement [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte a +Statement [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 ] ) always clobbers reg byte a reg byte x +Statement [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ( [ irq_sprite_ptr#0 irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 ] ) always clobbers reg byte a reg byte x +Statement [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ( [ irq_cnt#1 irq_raster_next#3 irq_sprite_ypos#3 irq_sprite_ptr#3 ] ) always clobbers reg byte a reg byte x +Statement [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 [ ] ( [ ] ) always clobbers reg byte a +Statement [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [576] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [577] (byte) irq_cnt#2 ← (byte) 0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#2 ] ) always clobbers reg byte a +Statement [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 ] ) always clobbers reg byte a +Statement [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 ] ) always clobbers reg byte a reg byte x +Statement [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ( [ irq_raster_next#2 irq_cnt#2 irq_sprite_ypos#2 irq_sprite_ptr#2 ] ) always clobbers reg byte a reg byte x +Statement [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 [ irq_cnt#1 irq_raster_next#1 ] ( [ irq_cnt#1 irq_raster_next#1 ] ) always clobbers reg byte a reg byte x +Statement [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 ] ) always clobbers reg byte a +Statement [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ( [ irq_cnt#1 irq_raster_next#1 irq_sprite_ypos#1 irq_sprite_ptr#1 ] ) always clobbers reg byte a Potential registers zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] : zp ZP_BYTE:2 , Potential registers zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] : zp ZP_BYTE:3 , Potential registers zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] : zp ZP_BYTE:4 , @@ -18477,7 +19814,7 @@ Potential registers zp ZP_BYTE:69 [ current_orientation#37 current_orientation#1 Potential registers zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] : zp ZP_WORD:70 , Potential registers zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] : zp ZP_BYTE:72 , Potential registers zp ZP_BYTE:73 [ play_move_down::return#3 ] : zp ZP_BYTE:73 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] : zp ZP_BYTE:74 , +Potential registers zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] : zp ZP_BYTE:74 , Potential registers zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] : zp ZP_BYTE:75 , Potential registers zp ZP_BYTE:76 [ play_increase_level::b#2 play_increase_level::b#1 ] : zp ZP_BYTE:76 , reg byte x , reg byte y , Potential registers zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] : zp ZP_BYTE:77 , reg byte x , reg byte y , @@ -18619,14 +19956,14 @@ Uplift Scope [keyboard_event_scan] 20,002: zp ZP_BYTE:208 [ keyboard_event_scan: Uplift Scope [play_collision] 38,006.5: zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] 20,002: zp ZP_BYTE:160 [ play_collision::$5 ] 13,378.25: zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] 12,223.44: zp ZP_BYTE:52 [ play_collision::c#2 play_collision::c#1 ] 2,002: zp ZP_BYTE:156 [ play_collision::$14 ] 1,615.62: zp ZP_BYTE:159 [ play_collision::i#1 ] 1,326.38: zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] 1,118.76: zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] 785.86: zp ZP_WORD:157 [ play_collision::playfield_line#0 ] 476.33: zp ZP_WORD:154 [ play_collision::piece_gfx#0 ] 51.62: zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] 18: zp ZP_BYTE:46 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] 4: zp ZP_BYTE:151 [ play_collision::return#14 ] 4: zp ZP_BYTE:161 [ play_collision::return#13 ] 4: zp ZP_BYTE:163 [ play_collision::return#1 ] 4: zp ZP_BYTE:167 [ play_collision::return#0 ] 4: zp ZP_BYTE:174 [ play_collision::return#10 ] 1.43: zp ZP_BYTE:53 [ play_collision::return#15 ] Uplift Scope [play_lock_current] 38,006.5: zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] 14,753.5: zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] 14,001.4: zp ZP_BYTE:87 [ play_lock_current::c#2 play_lock_current::c#1 ] 2,333.67: zp ZP_BYTE:192 [ play_lock_current::i#1 ] 2,002: zp ZP_BYTE:189 [ play_lock_current::$4 ] 1,155: zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] 1,100.2: zp ZP_WORD:190 [ play_lock_current::playfield_line#0 ] 754.92: zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] Uplift Scope [play_remove_lines] 19,004.21: zp ZP_BYTE:79 [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ] 17,938.14: zp ZP_BYTE:82 [ play_remove_lines::w#6 play_remove_lines::w#3 play_remove_lines::w#4 play_remove_lines::w#12 play_remove_lines::w#11 play_remove_lines::w#1 play_remove_lines::w#2 ] 17,501.75: zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] 8,201: zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] 6,000.6: zp ZP_BYTE:188 [ play_remove_lines::c#0 ] 2,566.89: zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] 1,634.97: zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] 4: zp ZP_BYTE:169 [ play_remove_lines::return#0 ] -Uplift Scope [] 58,858.91: zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] 2,120.54: zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] 1,143.93: zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] 209.73: zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] 193.66: zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] 74.29: zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] 72.26: zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] 65.61: zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] 62.17: zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] 61.29: zp ZP_WORD:27 [ current_piece_gfx#64 current_piece_gfx#112 current_piece_gfx#113 ] 42.02: zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] 32: zp ZP_WORD:44 [ current_piece#17 current_piece#96 current_piece#97 current_piece#98 current_piece#99 current_piece#100 ] 30.62: zp ZP_BYTE:35 [ render_screen_render#22 render_screen_render#64 ] 29.4: zp ZP_BYTE:17 [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ] 24: zp ZP_BYTE:16 [ render_screen_render#15 render_screen_render#66 ] 20.4: zp ZP_BYTE:24 [ current_ypos#13 current_ypos#98 current_ypos#99 ] 18.41: zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] 17.41: zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] 16.93: zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] 15.34: zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] 14.83: zp ZP_WORD:66 [ current_piece#28 current_piece#10 current_piece#15 current_piece#102 current_piece#93 ] 14.77: zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] 14.1: zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] 13.64: zp ZP_DWORD:59 [ score_bcd#26 score_bcd#18 score_bcd#14 score_bcd#0 score_bcd#16 score_bcd#29 ] 12.63: zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] 12.62: zp ZP_WORD:57 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] 12.38: zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] 11.97: zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] 10.83: zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] 9.81: zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] 8.06: zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] +Uplift Scope [] 58,858.91: zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] 1,143.93: zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] 209.73: zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] 193.67: zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] 118.54: zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] 74.29: zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] 72.26: zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] 65.61: zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] 62.17: zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] 61.29: zp ZP_WORD:27 [ current_piece_gfx#64 current_piece_gfx#112 current_piece_gfx#113 ] 42.03: zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] 32: zp ZP_WORD:44 [ current_piece#17 current_piece#96 current_piece#97 current_piece#98 current_piece#99 current_piece#100 ] 30.62: zp ZP_BYTE:35 [ render_screen_render#22 render_screen_render#64 ] 29.4: zp ZP_BYTE:17 [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ] 24: zp ZP_BYTE:16 [ render_screen_render#15 render_screen_render#66 ] 20.4: zp ZP_BYTE:24 [ current_ypos#13 current_ypos#98 current_ypos#99 ] 18.41: zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] 17.41: zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] 16.93: zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] 15.35: zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] 14.83: zp ZP_WORD:66 [ current_piece#28 current_piece#10 current_piece#15 current_piece#102 current_piece#93 ] 14.79: zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] 14.1: zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] 13.64: zp ZP_DWORD:59 [ score_bcd#26 score_bcd#18 score_bcd#14 score_bcd#0 score_bcd#16 score_bcd#29 ] 12.63: zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] 12.62: zp ZP_WORD:57 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] 12.38: zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] 11.97: zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] 10.83: zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] 9.81: zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] 8.06: zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] Uplift Scope [render_moving] 2,605.75: zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] 1,835.17: zp ZP_BYTE:34 [ render_moving::c#2 render_moving::c#1 ] 1,490.13: zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] 1,001: zp ZP_BYTE:138 [ render_moving::current_cell#0 ] 202: zp ZP_BYTE:134 [ render_moving::$1 ] 202: zp ZP_BYTE:135 [ render_moving::$6 ] 163.38: zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] 110.2: zp ZP_WORD:136 [ render_moving::screen_line#0 ] 96.71: zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] Uplift Scope [render_next] 1,970.3: zp ZP_WORD:19 [ render_next::next_piece_gfx#2 render_next::next_piece_gfx#3 render_next::next_piece_gfx#1 render_next::next_piece_gfx#9 ] 1,787.5: zp ZP_BYTE:23 [ render_next::c#2 render_next::c#1 ] 1,657: zp ZP_WORD:21 [ render_next::screen_next_area#5 render_next::screen_next_area#10 render_next::screen_next_area#4 render_next::screen_next_area#11 render_next::screen_next_area#3 ] 1,001: zp ZP_BYTE:133 [ render_next::cell#0 ] 169.86: zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] 66.87: zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] 1: zp ZP_BYTE:131 [ render_next::$6 ] Uplift Scope [play_increase_level] 4,004: zp ZP_BYTE:187 [ play_increase_level::$5 ] 2,502.5: zp ZP_BYTE:76 [ play_increase_level::b#2 play_increase_level::b#1 ] 4: zp ZP_BYTE:186 [ play_increase_level::$1 ] Uplift Scope [render_playfield] 2,254.5: zp ZP_WORD:38 [ render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 ] 2,002: zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] 1,505.77: zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] 202: zp ZP_BYTE:139 [ render_playfield::$2 ] 202: zp ZP_BYTE:140 [ render_playfield::$6 ] 181.8: zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] Uplift Scope [keyboard_matrix_read] 2,002: zp ZP_BYTE:198 [ keyboard_matrix_read::return#2 ] 1,003: zp ZP_BYTE:197 [ keyboard_matrix_read::rowid#0 ] 334.33: zp ZP_BYTE:212 [ keyboard_matrix_read::return#0 ] Uplift Scope [render_screen_original] 721.31: zp ZP_WORD:112 [ render_screen_original::screen#7 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#8 render_screen_original::screen#9 render_screen_original::screen#10 render_screen_original::screen#2 render_screen_original::screen#3 ] 699.79: zp ZP_BYTE:116 [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] 501.65: zp ZP_WORD:114 [ render_screen_original::cols#6 render_screen_original::cols#5 render_screen_original::cols#4 render_screen_original::cols#7 render_screen_original::cols#3 render_screen_original::cols#1 render_screen_original::cols#2 ] 162.87: zp ZP_WORD:108 [ render_screen_original::oscr#2 render_screen_original::oscr#4 render_screen_original::oscr#1 ] 99.08: zp ZP_WORD:110 [ render_screen_original::ocols#2 render_screen_original::ocols#4 render_screen_original::ocols#1 ] 17.42: zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] -Uplift Scope [play_spawn_current] 2,002: zp ZP_BYTE:176 [ play_spawn_current::sid_rnd1_return#0 ] 4: zp ZP_BYTE:175 [ play_spawn_current::$1 ] 2.5: zp ZP_BYTE:172 [ play_spawn_current::current_piece_idx#0 ] 0.06: zp ZP_BYTE:173 [ play_spawn_current::$7 ] +Uplift Scope [play_spawn_current] 2,002: zp ZP_BYTE:176 [ play_spawn_current::sid_rnd1_return#0 ] 4: zp ZP_BYTE:175 [ play_spawn_current::$1 ] 2.5: zp ZP_BYTE:172 [ play_spawn_current::current_piece_idx#0 ] 0.07: zp ZP_BYTE:173 [ play_spawn_current::$7 ] Uplift Scope [main] 202: zp ZP_BYTE:126 [ main::render#1 ] 101: zp ZP_BYTE:123 [ main::key_event#0 ] Uplift Scope [play_movement] 202: zp ZP_BYTE:125 [ play_movement::return#3 ] 40: zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] 9.73: zp ZP_BYTE:124 [ play_movement::key_event#0 ] 4: zp ZP_BYTE:145 [ play_movement::$3 ] 4: zp ZP_BYTE:149 [ play_movement::$4 ] 0.8: zp ZP_BYTE:146 [ play_movement::render#2 ] Uplift Scope [keyboard_event_get] 202: zp ZP_BYTE:122 [ keyboard_event_get::return#3 ] 38.33: zp ZP_BYTE:89 [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] @@ -18646,243 +19983,243 @@ Uplift Scope [sid_rnd_init] Uplift Scope [render_screen_swap] Uplift Scope [sprites_irq_init] -Uplifting [keyboard_event_scan] best 4708854 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] reg byte a [ keyboard_event_scan::event_type#0 ] reg byte a [ keyboard_event_scan::$23 ] zp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] zp ZP_BYTE:201 [ keyboard_event_scan::$0 ] zp ZP_BYTE:203 [ keyboard_event_scan::$3 ] zp ZP_BYTE:205 [ keyboard_event_scan::$6 ] zp ZP_BYTE:207 [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 4700884 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] reg byte a [ keyboard_event_scan::event_type#0 ] reg byte a [ keyboard_event_scan::$23 ] zp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] zp ZP_BYTE:201 [ keyboard_event_scan::$0 ] zp ZP_BYTE:203 [ keyboard_event_scan::$3 ] zp ZP_BYTE:205 [ keyboard_event_scan::$6 ] zp ZP_BYTE:207 [ keyboard_event_scan::$9 ] Limited combination testing to 100 combinations of 524288 possible. -Uplifting [play_collision] best 4558854 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] reg byte a [ play_collision::$5 ] zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] reg byte x [ play_collision::c#2 play_collision::c#1 ] zp ZP_BYTE:156 [ play_collision::$14 ] zp ZP_BYTE:159 [ play_collision::i#1 ] zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] zp ZP_WORD:157 [ play_collision::playfield_line#0 ] zp ZP_WORD:154 [ play_collision::piece_gfx#0 ] zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] zp ZP_BYTE:46 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] zp ZP_BYTE:151 [ play_collision::return#14 ] zp ZP_BYTE:161 [ play_collision::return#13 ] zp ZP_BYTE:163 [ play_collision::return#1 ] zp ZP_BYTE:167 [ play_collision::return#0 ] zp ZP_BYTE:174 [ play_collision::return#10 ] zp ZP_BYTE:53 [ play_collision::return#15 ] +Uplifting [play_collision] best 4550884 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] reg byte a [ play_collision::$5 ] zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] reg byte x [ play_collision::c#2 play_collision::c#1 ] zp ZP_BYTE:156 [ play_collision::$14 ] zp ZP_BYTE:159 [ play_collision::i#1 ] zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] zp ZP_WORD:157 [ play_collision::playfield_line#0 ] zp ZP_WORD:154 [ play_collision::piece_gfx#0 ] zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] zp ZP_BYTE:46 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] zp ZP_BYTE:151 [ play_collision::return#14 ] zp ZP_BYTE:161 [ play_collision::return#13 ] zp ZP_BYTE:163 [ play_collision::return#1 ] zp ZP_BYTE:167 [ play_collision::return#0 ] zp ZP_BYTE:174 [ play_collision::return#10 ] zp ZP_BYTE:53 [ play_collision::return#15 ] Limited combination testing to 100 combinations of 429981696 possible. -Uplifting [play_lock_current] best 4464854 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] reg byte x [ play_lock_current::c#2 play_lock_current::c#1 ] zp ZP_BYTE:192 [ play_lock_current::i#1 ] reg byte a [ play_lock_current::$4 ] zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] zp ZP_WORD:190 [ play_lock_current::playfield_line#0 ] zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] +Uplifting [play_lock_current] best 4456884 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] reg byte x [ play_lock_current::c#2 play_lock_current::c#1 ] zp ZP_BYTE:192 [ play_lock_current::i#1 ] reg byte a [ play_lock_current::$4 ] zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] zp ZP_WORD:190 [ play_lock_current::playfield_line#0 ] zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] Limited combination testing to 100 combinations of 2916 possible. -Uplifting [play_remove_lines] best 4325854 combination reg byte y [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ] reg byte x [ play_remove_lines::w#6 play_remove_lines::w#3 play_remove_lines::w#4 play_remove_lines::w#12 play_remove_lines::w#11 play_remove_lines::w#1 play_remove_lines::w#2 ] zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] zp ZP_BYTE:188 [ play_remove_lines::c#0 ] zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] zp ZP_BYTE:169 [ play_remove_lines::return#0 ] +Uplifting [play_remove_lines] best 4317884 combination reg byte y [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ] reg byte x [ play_remove_lines::w#6 play_remove_lines::w#3 play_remove_lines::w#4 play_remove_lines::w#12 play_remove_lines::w#11 play_remove_lines::w#1 play_remove_lines::w#2 ] zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] zp ZP_BYTE:188 [ play_remove_lines::c#0 ] zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] zp ZP_BYTE:169 [ play_remove_lines::return#0 ] Limited combination testing to 100 combinations of 20736 possible. -Uplifting [] best 4325612 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] zp ZP_WORD:27 [ current_piece_gfx#64 current_piece_gfx#112 current_piece_gfx#113 ] zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] zp ZP_WORD:44 [ current_piece#17 current_piece#96 current_piece#97 current_piece#98 current_piece#99 current_piece#100 ] reg byte x [ render_screen_render#22 render_screen_render#64 ] reg byte x [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ] reg byte a [ render_screen_render#15 render_screen_render#66 ] reg byte x [ current_ypos#13 current_ypos#98 current_ypos#99 ] zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] zp ZP_WORD:66 [ current_piece#28 current_piece#10 current_piece#15 current_piece#102 current_piece#93 ] zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] zp ZP_DWORD:59 [ score_bcd#26 score_bcd#18 score_bcd#14 score_bcd#0 score_bcd#16 score_bcd#29 ] zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] zp ZP_WORD:57 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] +Uplifting [] best 4317642 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] zp ZP_WORD:27 [ current_piece_gfx#64 current_piece_gfx#112 current_piece_gfx#113 ] zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] zp ZP_WORD:44 [ current_piece#17 current_piece#96 current_piece#97 current_piece#98 current_piece#99 current_piece#100 ] reg byte x [ render_screen_render#22 render_screen_render#64 ] reg byte x [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ] reg byte a [ render_screen_render#15 render_screen_render#66 ] reg byte x [ current_ypos#13 current_ypos#98 current_ypos#99 ] zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] zp ZP_WORD:66 [ current_piece#28 current_piece#10 current_piece#15 current_piece#102 current_piece#93 ] zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] zp ZP_DWORD:59 [ score_bcd#26 score_bcd#18 score_bcd#14 score_bcd#0 score_bcd#16 score_bcd#29 ] zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] zp ZP_WORD:57 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] Limited combination testing to 100 combinations of 1944 possible. -Uplifting [render_moving] best 4310612 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] reg byte x [ render_moving::c#2 render_moving::c#1 ] zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] reg byte a [ render_moving::current_cell#0 ] zp ZP_BYTE:134 [ render_moving::$1 ] zp ZP_BYTE:135 [ render_moving::$6 ] zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] zp ZP_WORD:136 [ render_moving::screen_line#0 ] zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] +Uplifting [render_moving] best 4302642 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] reg byte x [ render_moving::c#2 render_moving::c#1 ] zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] reg byte a [ render_moving::current_cell#0 ] zp ZP_BYTE:134 [ render_moving::$1 ] zp ZP_BYTE:135 [ render_moving::$6 ] zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] zp ZP_WORD:136 [ render_moving::screen_line#0 ] zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] Limited combination testing to 100 combinations of 15552 possible. -Uplifting [render_next] best 4295608 combination zp ZP_WORD:19 [ render_next::next_piece_gfx#2 render_next::next_piece_gfx#3 render_next::next_piece_gfx#1 render_next::next_piece_gfx#9 ] reg byte x [ render_next::c#2 render_next::c#1 ] zp ZP_WORD:21 [ render_next::screen_next_area#5 render_next::screen_next_area#10 render_next::screen_next_area#4 render_next::screen_next_area#11 render_next::screen_next_area#3 ] reg byte a [ render_next::cell#0 ] zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] reg byte y [ render_next::$6 ] +Uplifting [render_next] best 4287638 combination zp ZP_WORD:19 [ render_next::next_piece_gfx#2 render_next::next_piece_gfx#3 render_next::next_piece_gfx#1 render_next::next_piece_gfx#9 ] reg byte x [ render_next::c#2 render_next::c#1 ] zp ZP_WORD:21 [ render_next::screen_next_area#5 render_next::screen_next_area#10 render_next::screen_next_area#4 render_next::screen_next_area#11 render_next::screen_next_area#3 ] reg byte a [ render_next::cell#0 ] zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] reg byte y [ render_next::$6 ] Limited combination testing to 100 combinations of 128 possible. -Uplifting [play_increase_level] best 4281602 combination reg byte a [ play_increase_level::$5 ] reg byte x [ play_increase_level::b#2 play_increase_level::b#1 ] reg byte a [ play_increase_level::$1 ] -Uplifting [render_playfield] best 4280602 combination zp ZP_WORD:38 [ render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 ] zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$2 ] reg byte a [ render_playfield::$6 ] zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] +Uplifting [play_increase_level] best 4273632 combination reg byte a [ play_increase_level::$5 ] reg byte x [ play_increase_level::b#2 play_increase_level::b#1 ] reg byte a [ play_increase_level::$1 ] +Uplifting [render_playfield] best 4272632 combination zp ZP_WORD:38 [ render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 ] zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$2 ] reg byte a [ render_playfield::$6 ] zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] Limited combination testing to 100 combinations of 128 possible. -Uplifting [keyboard_matrix_read] best 4268596 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#0 ] -Uplifting [render_screen_original] best 4266496 combination zp ZP_WORD:112 [ render_screen_original::screen#7 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#8 render_screen_original::screen#9 render_screen_original::screen#10 render_screen_original::screen#2 render_screen_original::screen#3 ] reg byte x [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] zp ZP_WORD:114 [ render_screen_original::cols#6 render_screen_original::cols#5 render_screen_original::cols#4 render_screen_original::cols#7 render_screen_original::cols#3 render_screen_original::cols#1 render_screen_original::cols#2 ] zp ZP_WORD:108 [ render_screen_original::oscr#2 render_screen_original::oscr#4 render_screen_original::oscr#1 ] zp ZP_WORD:110 [ render_screen_original::ocols#2 render_screen_original::ocols#4 render_screen_original::ocols#1 ] zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] -Uplifting [play_spawn_current] best 4260477 combination reg byte a [ play_spawn_current::sid_rnd1_return#0 ] reg byte a [ play_spawn_current::$1 ] reg byte x [ play_spawn_current::current_piece_idx#0 ] zp ZP_BYTE:173 [ play_spawn_current::$7 ] -Uplifting [main] best 4259277 combination reg byte a [ main::render#1 ] reg byte x [ main::key_event#0 ] -Uplifting [play_movement] best 4258665 combination reg byte a [ play_movement::return#3 ] zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] zp ZP_BYTE:124 [ play_movement::key_event#0 ] reg byte a [ play_movement::$3 ] reg byte a [ play_movement::$4 ] zp ZP_BYTE:146 [ play_movement::render#2 ] +Uplifting [keyboard_matrix_read] best 4260626 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#0 ] +Uplifting [render_screen_original] best 4258526 combination zp ZP_WORD:112 [ render_screen_original::screen#7 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#8 render_screen_original::screen#9 render_screen_original::screen#10 render_screen_original::screen#2 render_screen_original::screen#3 ] reg byte x [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] zp ZP_WORD:114 [ render_screen_original::cols#6 render_screen_original::cols#5 render_screen_original::cols#4 render_screen_original::cols#7 render_screen_original::cols#3 render_screen_original::cols#1 render_screen_original::cols#2 ] zp ZP_WORD:108 [ render_screen_original::oscr#2 render_screen_original::oscr#4 render_screen_original::oscr#1 ] zp ZP_WORD:110 [ render_screen_original::ocols#2 render_screen_original::ocols#4 render_screen_original::ocols#1 ] zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] +Uplifting [play_spawn_current] best 4252507 combination reg byte a [ play_spawn_current::sid_rnd1_return#0 ] reg byte a [ play_spawn_current::$1 ] reg byte x [ play_spawn_current::current_piece_idx#0 ] zp ZP_BYTE:173 [ play_spawn_current::$7 ] +Uplifting [main] best 4251307 combination reg byte a [ main::render#1 ] reg byte x [ main::key_event#0 ] +Uplifting [play_movement] best 4250695 combination reg byte a [ play_movement::return#3 ] zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] zp ZP_BYTE:124 [ play_movement::key_event#0 ] reg byte a [ play_movement::$3 ] reg byte a [ play_movement::$4 ] zp ZP_BYTE:146 [ play_movement::render#2 ] Limited combination testing to 100 combinations of 576 possible. -Uplifting [keyboard_event_get] best 4257759 combination reg byte x [ keyboard_event_get::return#3 ] reg byte x [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] -Uplifting [play_init] best 4257549 combination reg byte a [ play_init::$5 ] zp ZP_BYTE:99 [ play_init::b#2 play_init::b#1 ] reg byte y [ play_init::j#2 play_init::j#1 ] reg byte x [ play_init::$4 ] zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] zp ZP_WORD:96 [ play_init::pli#2 play_init::pli#1 ] +Uplifting [keyboard_event_get] best 4249789 combination reg byte x [ keyboard_event_get::return#3 ] reg byte x [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +Uplifting [play_init] best 4249579 combination reg byte a [ play_init::$5 ] zp ZP_BYTE:99 [ play_init::b#2 play_init::b#1 ] reg byte y [ play_init::j#2 play_init::j#1 ] reg byte x [ play_init::$4 ] zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] zp ZP_WORD:96 [ play_init::pli#2 play_init::pli#1 ] Limited combination testing to 100 combinations of 432 possible. -Uplifting [render_bcd] best 4257519 combination zp ZP_WORD:8 [ render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ] reg byte x [ render_bcd::bcd#6 render_bcd::bcd#0 render_bcd::bcd#1 render_bcd::bcd#2 render_bcd::bcd#3 render_bcd::bcd#4 render_bcd::bcd#5 ] zp ZP_WORD:14 [ render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ] reg byte a [ render_bcd::$5 ] reg byte a [ render_bcd::$6 ] reg byte a [ render_bcd::$3 ] zp ZP_BYTE:130 [ render_bcd::$4 ] zp ZP_WORD:10 [ render_bcd::offset#6 ] zp ZP_BYTE:12 [ render_bcd::only_low#6 ] +Uplifting [render_bcd] best 4249549 combination zp ZP_WORD:8 [ render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ] reg byte x [ render_bcd::bcd#6 render_bcd::bcd#0 render_bcd::bcd#1 render_bcd::bcd#2 render_bcd::bcd#3 render_bcd::bcd#4 render_bcd::bcd#5 ] zp ZP_WORD:14 [ render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ] reg byte a [ render_bcd::$5 ] reg byte a [ render_bcd::$6 ] reg byte a [ render_bcd::$3 ] zp ZP_BYTE:130 [ render_bcd::$4 ] zp ZP_WORD:10 [ render_bcd::offset#6 ] zp ZP_BYTE:12 [ render_bcd::only_low#6 ] Limited combination testing to 100 combinations of 1536 possible. -Uplifting [render_init] best 4257349 combination reg byte y [ render_init::i#2 render_init::i#1 ] reg byte x [ render_init::$13 ] zp ZP_WORD:105 [ render_init::li_2#2 render_init::li_2#1 ] zp ZP_WORD:103 [ render_init::li_1#2 render_init::li_1#1 ] -Uplifting [sprites_init] best 4257179 combination reg byte y [ sprites_init::s#2 sprites_init::s#1 ] reg byte x [ sprites_init::s2#0 ] zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ] -Uplifting [play_move_down] best 4257146 combination reg byte x [ play_move_down::movedown#6 play_move_down::movedown#7 play_move_down::movedown#10 play_move_down::movedown#2 play_move_down::movedown#3 ] reg byte a [ play_move_down::return#0 ] reg byte a [ play_move_down::$2 ] reg byte a [ play_move_down::$12 ] zp ZP_BYTE:170 [ play_move_down::removed#0 ] zp ZP_BYTE:141 [ play_move_down::key_event#0 ] zp ZP_BYTE:73 [ play_move_down::return#3 ] +Uplifting [render_init] best 4249379 combination reg byte y [ render_init::i#2 render_init::i#1 ] reg byte x [ render_init::$13 ] zp ZP_WORD:105 [ render_init::li_2#2 render_init::li_2#1 ] zp ZP_WORD:103 [ render_init::li_1#2 render_init::li_1#1 ] +Uplifting [sprites_init] best 4249209 combination reg byte y [ sprites_init::s#2 sprites_init::s#1 ] reg byte x [ sprites_init::s2#0 ] zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ] +Uplifting [play_move_down] best 4249176 combination reg byte x [ play_move_down::movedown#6 play_move_down::movedown#7 play_move_down::movedown#10 play_move_down::movedown#2 play_move_down::movedown#3 ] reg byte a [ play_move_down::return#0 ] reg byte a [ play_move_down::$2 ] reg byte a [ play_move_down::$12 ] zp ZP_BYTE:170 [ play_move_down::removed#0 ] zp ZP_BYTE:141 [ play_move_down::key_event#0 ] zp ZP_BYTE:73 [ play_move_down::return#3 ] Limited combination testing to 100 combinations of 12288 possible. -Uplifting [keyboard_event_pressed] best 4257126 combination reg byte a [ keyboard_event_pressed::return#12 ] reg byte a [ keyboard_event_pressed::$0 ] reg byte a [ keyboard_event_pressed::$1 ] reg byte a [ keyboard_event_pressed::return#0 ] zp ZP_BYTE:202 [ keyboard_event_pressed::return#1 ] zp ZP_BYTE:204 [ keyboard_event_pressed::return#2 ] zp ZP_BYTE:206 [ keyboard_event_pressed::return#10 ] zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:196 [ keyboard_event_pressed::return#11 ] zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ] +Uplifting [keyboard_event_pressed] best 4249156 combination reg byte a [ keyboard_event_pressed::return#12 ] reg byte a [ keyboard_event_pressed::$0 ] reg byte a [ keyboard_event_pressed::$1 ] reg byte a [ keyboard_event_pressed::return#0 ] zp ZP_BYTE:202 [ keyboard_event_pressed::return#1 ] zp ZP_BYTE:204 [ keyboard_event_pressed::return#2 ] zp ZP_BYTE:206 [ keyboard_event_pressed::return#10 ] zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:196 [ keyboard_event_pressed::return#11 ] zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ] Limited combination testing to 100 combinations of 589824 possible. -Uplifting [sprites_irq] best 4257102 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ] reg byte x [ sprites_irq::$0 ] reg byte a [ sprites_irq::ptr#4 ] reg byte a [ sprites_irq::ptr#2 ] reg byte a [ sprites_irq::ptr#3 ] zp ZP_BYTE:222 [ sprites_irq::ptr#1 ] zp ZP_BYTE:217 [ sprites_irq::ypos#0 ] zp ZP_BYTE:219 [ sprites_irq::ptr#0 ] +Uplifting [sprites_irq] best 4249132 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ] reg byte x [ sprites_irq::$0 ] reg byte a [ sprites_irq::ptr#4 ] reg byte a [ sprites_irq::ptr#2 ] reg byte a [ sprites_irq::ptr#3 ] zp ZP_BYTE:222 [ sprites_irq::ptr#1 ] zp ZP_BYTE:217 [ sprites_irq::ypos#0 ] zp ZP_BYTE:219 [ sprites_irq::ptr#0 ] Limited combination testing to 100 combinations of 12288 possible. -Uplifting [play_move_rotate] best 4257084 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] reg byte a [ play_move_rotate::return#0 ] reg byte x [ play_move_rotate::$5 ] reg byte a [ play_move_rotate::$2 ] zp ZP_BYTE:153 [ play_move_rotate::$7 ] zp ZP_BYTE:147 [ play_move_rotate::key_event#0 ] zp ZP_BYTE:42 [ play_move_rotate::return#2 ] +Uplifting [play_move_rotate] best 4249114 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] reg byte a [ play_move_rotate::return#0 ] reg byte x [ play_move_rotate::$5 ] reg byte a [ play_move_rotate::$2 ] zp ZP_BYTE:153 [ play_move_rotate::$7 ] zp ZP_BYTE:147 [ play_move_rotate::key_event#0 ] zp ZP_BYTE:42 [ play_move_rotate::return#2 ] Limited combination testing to 100 combinations of 12288 possible. -Uplifting [play_update_score] best 4257062 combination reg byte a [ play_update_score::$2 ] reg byte a [ play_update_score::$9 ] reg byte a [ play_update_score::$4 ] reg byte a [ play_update_score::lines_after#0 ] zp ZP_DWORD:180 [ play_update_score::add_bcd#0 ] zp ZP_BYTE:171 [ play_update_score::removed#0 ] zp ZP_BYTE:178 [ play_update_score::lines_before#0 ] +Uplifting [play_update_score] best 4249092 combination reg byte a [ play_update_score::$2 ] reg byte a [ play_update_score::$9 ] reg byte a [ play_update_score::$4 ] reg byte a [ play_update_score::lines_after#0 ] zp ZP_DWORD:180 [ play_update_score::add_bcd#0 ] zp ZP_BYTE:171 [ play_update_score::removed#0 ] zp ZP_BYTE:178 [ play_update_score::lines_before#0 ] Limited combination testing to 100 combinations of 2304 possible. -Uplifting [play_move_leftright] best 4257035 combination reg byte a [ play_move_leftright::return#0 ] reg byte a [ play_move_leftright::$4 ] reg byte a [ play_move_leftright::$8 ] reg byte a [ play_move_leftright::key_event#0 ] zp ZP_BYTE:54 [ play_move_leftright::return#2 ] +Uplifting [play_move_leftright] best 4249065 combination reg byte a [ play_move_leftright::return#0 ] reg byte a [ play_move_leftright::$4 ] reg byte a [ play_move_leftright::$8 ] reg byte a [ play_move_leftright::key_event#0 ] zp ZP_BYTE:54 [ play_move_leftright::return#2 ] Limited combination testing to 100 combinations of 1024 possible. -Uplifting [render_show] best 4257026 combination reg byte a [ render_show::d018val#3 ] -Uplifting [render_score] best 4257026 combination zp ZP_WORD:6 [ render_score::screen#3 ] -Uplifting [sid_rnd_init] best 4257026 combination -Uplifting [render_screen_swap] best 4257026 combination -Uplifting [sprites_irq_init] best 4257026 combination +Uplifting [render_show] best 4249056 combination reg byte a [ render_show::d018val#3 ] +Uplifting [render_score] best 4249056 combination zp ZP_WORD:6 [ render_score::screen#3 ] +Uplifting [sid_rnd_init] best 4249056 combination +Uplifting [render_screen_swap] best 4249056 combination +Uplifting [sprites_irq_init] best 4249056 combination Attempting to uplift remaining variables inzp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] -Uplifting [] best 4257026 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] +Uplifting [] best 4249056 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] -Uplifting [play_collision] best 4257026 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] +Uplifting [play_collision] best 4249056 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] Attempting to uplift remaining variables inzp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] -Uplifting [play_lock_current] best 4257026 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] +Uplifting [play_lock_current] best 4249056 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] Attempting to uplift remaining variables inzp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] -Uplifting [keyboard_event_scan] best 4107026 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Uplifting [keyboard_event_scan] best 4099056 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] -Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] +Uplifting [play_remove_lines] best 4099056 combination zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] -Uplifting [play_lock_current] best 4107026 combination zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] +Uplifting [play_lock_current] best 4099056 combination zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] -Uplifting [play_collision] best 4107026 combination zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] +Uplifting [play_collision] best 4099056 combination zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] -Uplifting [keyboard_event_scan] best 4107026 combination zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] +Uplifting [keyboard_event_scan] best 4099056 combination zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] -Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] +Uplifting [play_remove_lines] best 4099056 combination zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:188 [ play_remove_lines::c#0 ] -Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:188 [ play_remove_lines::c#0 ] +Uplifting [play_remove_lines] best 4099056 combination zp ZP_BYTE:188 [ play_remove_lines::c#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] -Uplifting [render_moving] best 4107026 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] +Uplifting [render_moving] best 4099056 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] -Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] +Uplifting [play_remove_lines] best 4099056 combination zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:192 [ play_lock_current::i#1 ] -Uplifting [play_lock_current] best 4107026 combination zp ZP_BYTE:192 [ play_lock_current::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] -Uplifting [] best 4107026 combination zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +Uplifting [play_lock_current] best 4099056 combination zp ZP_BYTE:192 [ play_lock_current::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Uplifting [keyboard_event_scan] best 4107026 combination zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Uplifting [keyboard_event_scan] best 4099056 combination zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] -Uplifting [render_playfield] best 4107026 combination zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] +Uplifting [render_playfield] best 4099056 combination zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:156 [ play_collision::$14 ] -Uplifting [play_collision] best 4103026 combination reg byte a [ play_collision::$14 ] +Uplifting [play_collision] best 4095056 combination reg byte a [ play_collision::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] -Uplifting [play_remove_lines] best 4103026 combination zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] +Uplifting [play_remove_lines] best 4095056 combination zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:159 [ play_collision::i#1 ] -Uplifting [play_collision] best 4103026 combination zp ZP_BYTE:159 [ play_collision::i#1 ] +Uplifting [play_collision] best 4095056 combination zp ZP_BYTE:159 [ play_collision::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Uplifting [render_playfield] best 4103026 combination zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +Uplifting [render_playfield] best 4095056 combination zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] -Uplifting [render_moving] best 4103026 combination zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] +Uplifting [render_moving] best 4095056 combination zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] -Uplifting [play_collision] best 4103026 combination zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] +Uplifting [play_collision] best 4095056 combination zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] -Uplifting [keyboard_event_scan] best 4103026 combination zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] +Uplifting [keyboard_event_scan] best 4095056 combination zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] -Uplifting [play_lock_current] best 4103026 combination zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] +Uplifting [play_lock_current] best 4095056 combination zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] -Uplifting [] best 4103026 combination zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] +Uplifting [] best 4095056 combination zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] -Uplifting [play_collision] best 4103026 combination zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] +Uplifting [play_collision] best 4095056 combination zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] -Uplifting [play_lock_current] best 4103026 combination zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] +Uplifting [play_lock_current] best 4095056 combination zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:134 [ render_moving::$1 ] -Uplifting [render_moving] best 4102426 combination reg byte a [ render_moving::$1 ] +Uplifting [render_moving] best 4094456 combination reg byte a [ render_moving::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:135 [ render_moving::$6 ] -Uplifting [render_moving] best 4102026 combination reg byte a [ render_moving::$6 ] +Uplifting [render_moving] best 4094056 combination reg byte a [ render_moving::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] -Uplifting [] best 4102026 combination zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] +Uplifting [] best 4094056 combination zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] -Uplifting [render_playfield] best 4102026 combination zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] +Uplifting [render_playfield] best 4094056 combination zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] -Uplifting [render_next] best 4102026 combination zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] +Uplifting [render_next] best 4094056 combination zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] -Uplifting [render_moving] best 4102026 combination zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] +Uplifting [render_moving] best 4094056 combination zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] +Uplifting [] best 4094056 combination zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] -Uplifting [render_moving] best 4102026 combination zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] +Uplifting [render_moving] best 4094056 combination zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] -Uplifting [] best 4102026 combination zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] +Uplifting [] best 4094056 combination zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] Attempting to uplift remaining variables inzp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] -Uplifting [] best 4102026 combination zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] +Uplifting [] best 4094056 combination zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:132 [ render_next::next_piece_char#0 ] -Uplifting [render_next] best 4102026 combination zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] +Uplifting [render_next] best 4094056 combination zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] -Uplifting [] best 4102026 combination zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] +Uplifting [] best 4094056 combination zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] -Uplifting [] best 4102026 combination zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] +Uplifting [] best 4094056 combination zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] -Uplifting [play_collision] best 4102026 combination zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] +Uplifting [play_collision] best 4094056 combination zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] -Uplifting [] best 4102026 combination zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] +Uplifting [] best 4094056 combination zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] Attempting to uplift remaining variables inzp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] -Uplifting [play_movement] best 4102026 combination zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] +Uplifting [play_movement] best 4094056 combination zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:99 [ play_init::b#2 play_init::b#1 ] -Uplifting [play_init] best 4101926 combination reg byte x [ play_init::b#2 play_init::b#1 ] +Uplifting [play_init] best 4093956 combination reg byte x [ play_init::b#2 play_init::b#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] -Uplifting [] best 4101926 combination zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] +Uplifting [] best 4093956 combination zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] Attempting to uplift remaining variables inzp ZP_BYTE:46 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] -Uplifting [play_collision] best 4101910 combination reg byte x [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] +Uplifting [play_collision] best 4093940 combination reg byte x [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] -Uplifting [render_screen_original] best 4101910 combination zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] +Uplifting [render_screen_original] best 4093940 combination zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] Attempting to uplift remaining variables inzp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ] -Uplifting [sprites_init] best 4101910 combination zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ] +Uplifting [sprites_init] best 4093940 combination zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] Attempting to uplift remaining variables inzp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] Attempting to uplift remaining variables inzp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] Attempting to uplift remaining variables inzp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] -Uplifting [play_init] best 4101910 combination zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] +Uplifting [play_init] best 4093940 combination zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] Attempting to uplift remaining variables inzp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] Attempting to uplift remaining variables inzp ZP_BYTE:124 [ play_movement::key_event#0 ] -Uplifting [play_movement] best 4101910 combination zp ZP_BYTE:124 [ play_movement::key_event#0 ] +Uplifting [play_movement] best 4093940 combination zp ZP_BYTE:124 [ play_movement::key_event#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] -Uplifting [play_move_rotate] best 4101910 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] +Uplifting [play_move_rotate] best 4093940 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] -Uplifting [] best 4101910 combination zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] +Uplifting [] best 4093940 combination zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ] Attempting to uplift remaining variables inzp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ] -Uplifting [sprites_irq] best 4101910 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ] +Uplifting [sprites_irq] best 4093940 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:130 [ render_bcd::$4 ] -Uplifting [render_bcd] best 4101904 combination reg byte a [ render_bcd::$4 ] +Uplifting [render_bcd] best 4093934 combination reg byte a [ render_bcd::$4 ] Attempting to uplift remaining variables inzp ZP_BYTE:151 [ play_collision::return#14 ] -Uplifting [play_collision] best 4101898 combination reg byte a [ play_collision::return#14 ] +Uplifting [play_collision] best 4093928 combination reg byte a [ play_collision::return#14 ] Attempting to uplift remaining variables inzp ZP_BYTE:153 [ play_move_rotate::$7 ] -Uplifting [play_move_rotate] best 4101892 combination reg byte x [ play_move_rotate::$7 ] +Uplifting [play_move_rotate] best 4093922 combination reg byte x [ play_move_rotate::$7 ] Attempting to uplift remaining variables inzp ZP_BYTE:161 [ play_collision::return#13 ] -Uplifting [play_collision] best 4101886 combination reg byte a [ play_collision::return#13 ] +Uplifting [play_collision] best 4093916 combination reg byte a [ play_collision::return#13 ] Attempting to uplift remaining variables inzp ZP_BYTE:163 [ play_collision::return#1 ] -Uplifting [play_collision] best 4101880 combination reg byte a [ play_collision::return#1 ] +Uplifting [play_collision] best 4093910 combination reg byte a [ play_collision::return#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:167 [ play_collision::return#0 ] -Uplifting [play_collision] best 4101874 combination reg byte a [ play_collision::return#0 ] +Uplifting [play_collision] best 4093904 combination reg byte a [ play_collision::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:169 [ play_remove_lines::return#0 ] -Uplifting [play_remove_lines] best 4101868 combination reg byte a [ play_remove_lines::return#0 ] +Uplifting [play_remove_lines] best 4093898 combination reg byte a [ play_remove_lines::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:170 [ play_move_down::removed#0 ] -Uplifting [play_move_down] best 4101862 combination reg byte a [ play_move_down::removed#0 ] +Uplifting [play_move_down] best 4093892 combination reg byte a [ play_move_down::removed#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:174 [ play_collision::return#10 ] -Uplifting [play_collision] best 4101856 combination reg byte a [ play_collision::return#10 ] +Uplifting [play_collision] best 4093886 combination reg byte a [ play_collision::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:201 [ keyboard_event_scan::$0 ] -Uplifting [keyboard_event_scan] best 4101850 combination reg byte a [ keyboard_event_scan::$0 ] +Uplifting [keyboard_event_scan] best 4093880 combination reg byte a [ keyboard_event_scan::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:202 [ keyboard_event_pressed::return#1 ] -Uplifting [keyboard_event_pressed] best 4101844 combination reg byte a [ keyboard_event_pressed::return#1 ] +Uplifting [keyboard_event_pressed] best 4093874 combination reg byte a [ keyboard_event_pressed::return#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:203 [ keyboard_event_scan::$3 ] -Uplifting [keyboard_event_scan] best 4101838 combination reg byte a [ keyboard_event_scan::$3 ] +Uplifting [keyboard_event_scan] best 4093868 combination reg byte a [ keyboard_event_scan::$3 ] Attempting to uplift remaining variables inzp ZP_BYTE:204 [ keyboard_event_pressed::return#2 ] -Uplifting [keyboard_event_pressed] best 4101832 combination reg byte a [ keyboard_event_pressed::return#2 ] +Uplifting [keyboard_event_pressed] best 4093862 combination reg byte a [ keyboard_event_pressed::return#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:205 [ keyboard_event_scan::$6 ] -Uplifting [keyboard_event_scan] best 4101826 combination reg byte a [ keyboard_event_scan::$6 ] +Uplifting [keyboard_event_scan] best 4093856 combination reg byte a [ keyboard_event_scan::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:206 [ keyboard_event_pressed::return#10 ] -Uplifting [keyboard_event_pressed] best 4101820 combination reg byte a [ keyboard_event_pressed::return#10 ] +Uplifting [keyboard_event_pressed] best 4093850 combination reg byte a [ keyboard_event_pressed::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:207 [ keyboard_event_scan::$9 ] -Uplifting [keyboard_event_scan] best 4101814 combination reg byte a [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 4093844 combination reg byte a [ keyboard_event_scan::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:147 [ play_move_rotate::key_event#0 ] -Uplifting [play_move_rotate] best 4101805 combination reg byte a [ play_move_rotate::key_event#0 ] +Uplifting [play_move_rotate] best 4093835 combination reg byte a [ play_move_rotate::key_event#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:222 [ sprites_irq::ptr#1 ] -Uplifting [sprites_irq] best 4101793 combination reg byte x [ sprites_irq::ptr#1 ] +Uplifting [sprites_irq] best 4093823 combination reg byte x [ sprites_irq::ptr#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:217 [ sprites_irq::ypos#0 ] -Uplifting [sprites_irq] best 4101778 combination reg byte a [ sprites_irq::ypos#0 ] +Uplifting [sprites_irq] best 4093808 combination reg byte a [ sprites_irq::ypos#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:219 [ sprites_irq::ptr#0 ] -Uplifting [sprites_irq] best 4101763 combination reg byte x [ sprites_irq::ptr#0 ] +Uplifting [sprites_irq] best 4093793 combination reg byte x [ sprites_irq::ptr#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:141 [ play_move_down::key_event#0 ] -Uplifting [play_move_down] best 4101757 combination reg byte a [ play_move_down::key_event#0 ] +Uplifting [play_move_down] best 4093787 combination reg byte a [ play_move_down::key_event#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] -Uplifting [keyboard_event_pressed] best 4101757 combination zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] +Uplifting [keyboard_event_pressed] best 4093787 combination zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:196 [ keyboard_event_pressed::return#11 ] -Uplifting [keyboard_event_pressed] best 4101739 combination reg byte a [ keyboard_event_pressed::return#11 ] +Uplifting [keyboard_event_pressed] best 4093769 combination reg byte a [ keyboard_event_pressed::return#11 ] Attempting to uplift remaining variables inzp ZP_BYTE:53 [ play_collision::return#15 ] -Uplifting [play_collision] best 4101709 combination reg byte a [ play_collision::return#15 ] +Uplifting [play_collision] best 4093739 combination reg byte a [ play_collision::return#15 ] Attempting to uplift remaining variables inzp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ] -Uplifting [keyboard_event_pressed] best 4101709 combination zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ] +Uplifting [keyboard_event_pressed] best 4093739 combination zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:171 [ play_update_score::removed#0 ] -Uplifting [play_update_score] best 4101703 combination reg byte x [ play_update_score::removed#0 ] +Uplifting [play_update_score] best 4093733 combination reg byte x [ play_update_score::removed#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ render_bcd::only_low#6 ] -Uplifting [render_bcd] best 4101682 combination reg byte y [ render_bcd::only_low#6 ] +Uplifting [render_bcd] best 4093712 combination reg byte y [ render_bcd::only_low#6 ] Attempting to uplift remaining variables inzp ZP_BYTE:146 [ play_movement::render#2 ] -Uplifting [play_movement] best 4101682 combination zp ZP_BYTE:146 [ play_movement::render#2 ] +Uplifting [play_movement] best 4093712 combination zp ZP_BYTE:146 [ play_movement::render#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:42 [ play_move_rotate::return#2 ] -Uplifting [play_move_rotate] best 4101673 combination reg byte a [ play_move_rotate::return#2 ] +Uplifting [play_move_rotate] best 4093703 combination reg byte a [ play_move_rotate::return#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:54 [ play_move_leftright::return#2 ] -Uplifting [play_move_leftright] best 4101664 combination reg byte a [ play_move_leftright::return#2 ] +Uplifting [play_move_leftright] best 4093694 combination reg byte a [ play_move_leftright::return#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ play_move_down::return#3 ] -Uplifting [play_move_down] best 4101657 combination reg byte x [ play_move_down::return#3 ] +Uplifting [play_move_down] best 4093687 combination reg byte x [ play_move_down::return#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:178 [ play_update_score::lines_before#0 ] -Uplifting [play_update_score] best 4101657 combination zp ZP_BYTE:178 [ play_update_score::lines_before#0 ] +Uplifting [play_update_score] best 4093687 combination zp ZP_BYTE:178 [ play_update_score::lines_before#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:173 [ play_spawn_current::$7 ] -Uplifting [play_spawn_current] best 4101657 combination zp ZP_BYTE:173 [ play_spawn_current::$7 ] +Uplifting [play_spawn_current] best 4093687 combination zp ZP_BYTE:173 [ play_spawn_current::$7 ] Coalescing zero page register [ zp ZP_WORD:6 [ render_score::screen#3 ] ] with [ zp ZP_WORD:8 [ render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ] ] - score: 6 Coalescing zero page register [ zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] ] with [ zp ZP_BYTE:146 [ play_movement::render#2 ] ] - score: 2 Coalescing zero page register [ zp ZP_WORD:10 [ render_bcd::offset#6 ] ] with [ zp ZP_WORD:14 [ render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ] ] - score: 1 @@ -18939,7 +20276,7 @@ Allocated (was zp ZP_DWORD:59) zp ZP_DWORD:3 [ score_bcd#26 score_bcd#18 score_b Allocated (was zp ZP_BYTE:63) zp ZP_BYTE:7 [ level#33 level#10 level#17 level#19 level#21 ] Allocated (was zp ZP_BYTE:64) zp ZP_BYTE:8 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] Allocated (was zp ZP_BYTE:65) zp ZP_BYTE:9 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] -Allocated (was zp ZP_BYTE:74) zp ZP_BYTE:10 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +Allocated (was zp ZP_BYTE:74) zp ZP_BYTE:10 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] Allocated (was zp ZP_BYTE:75) zp ZP_BYTE:11 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] Allocated (was zp ZP_BYTE:77) zp ZP_BYTE:12 [ play_remove_lines::y#8 play_remove_lines::y#1 current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] Allocated (was zp ZP_BYTE:78) zp ZP_BYTE:13 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 render_screen_render#33 render_screen_render#65 render_next::l#7 render_next::l#1 ] @@ -18970,9 +20307,9 @@ Allocated (was zp ZP_WORD:190) zp ZP_WORD:44 [ play_lock_current::playfield_line Allocated (was zp ZP_BYTE:194) zp ZP_BYTE:46 [ keyboard_event_pressed::row_bits#0 play_spawn_current::$7 ] Allocated (was zp ZP_BYTE:199) zp ZP_BYTE:47 [ keyboard_event_scan::row_scan#0 play_lock_current::i#1 play_collision::i#1 ] Interrupt procedure sprites_irq clobbers AXCNZV -Removing interrupt register storage sty regy+1 in SEG1194 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regy: in SEG1233 [577] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldy #00 in SEG1233 [577] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage sty regy+1 in SEG1190 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regy: in SEG1229 [576] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldy #00 in SEG1229 [576] return - exit interrupt(HARDWARE_CLOBBER) ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -19213,7 +20550,7 @@ main: { // asm { sei } sei // [18] call render_init - // [498] phi from main::@8 to render_init [phi:main::@8->render_init] + // [497] phi from main::@8 to render_init [phi:main::@8->render_init] render_init_from_b8: jsr render_init // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9] @@ -19236,7 +20573,7 @@ main: { // main::@11 b11: // [24] call play_init - // [457] phi from main::@11 to play_init [phi:main::@11->play_init] + // [456] phi from main::@11 to play_init [phi:main::@11->play_init] play_init_from_b11: jsr play_init // [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12] @@ -19263,7 +20600,7 @@ main: { // [287] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] play_spawn_current_from_b13: // [287] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy + // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#1 [phi:main::@13->play_spawn_current#1] -- register_copy jsr play_spawn_current // [29] phi from main::@13 to main::@14 [phi:main::@13->main::@14] b14_from_b13: @@ -19307,7 +20644,7 @@ main: { jmp b16 // main::@16 b16: - // [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#2 -- vbuxx=vbuz1 + // [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#1 -- vbuxx=vbuz1 ldx play_spawn_current.piece_idx // [37] call render_next // [109] phi from main::@16 to render_next [phi:main::@16->render_next] @@ -19352,7 +20689,7 @@ main: { lda #0 sta keyboard_events_size // [40] phi (byte) render_screen_showing#13 = (byte) render_screen_showing#0 [phi:main::@17->main::@1#6] -- register_copy - // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#7] -- register_copy + // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#1 [phi:main::@17->main::@1#7] -- register_copy // [40] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#8] -- register_copy // [40] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#9] -- register_copy // [40] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#10] -- register_copy @@ -19415,7 +20752,7 @@ main: { // main::@18 b18: // [45] call keyboard_event_scan - // [392] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] + // [391] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] keyboard_event_scan_from_b18: jsr keyboard_event_scan // [46] phi from main::@18 to main::@19 [phi:main::@18->main::@19] @@ -20577,9 +21914,9 @@ play_move_down: { // play_move_down::@1 b1: // [252] call keyboard_event_pressed - // [381] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] + // [380] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] keyboard_event_pressed_from_b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_SPACE sta keyboard_event_pressed.keycode jsr keyboard_event_pressed @@ -20676,7 +22013,7 @@ play_move_down: { // play_move_down::@14 b14: // [274] call play_remove_lines - // [340] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] + // [339] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] play_remove_lines_from_b14: jsr play_remove_lines // [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuaa=vbuz1 @@ -20717,7 +22054,7 @@ play_move_down: { sta current_piece_gfx+1 // [283] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] b11_from_b17: - // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy + // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#1 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy // [283] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy // [283] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy // [283] phi (byte*) current_piece_gfx#35 = (byte*~) current_piece_gfx#117 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy @@ -20868,37 +22205,29 @@ play_spawn_current: { jmp b1 // play_spawn_current::@1 b1: - // [302] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] - b2_from_b1: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 - lda #7 + jmp sid_rnd1 + // play_spawn_current::sid_rnd1 + sid_rnd1: + // [302] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + lda SID_VOICE3_OSC + jmp b3 + // play_spawn_current::@3 + b3: + // [303] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 + and #7 sta piece_idx jmp b2 // play_spawn_current::@2 b2: - // [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 + // [304] if((byte) play_spawn_current::piece_idx#1==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 lda #7 cmp piece_idx beq sid_rnd1 jmp breturn // play_spawn_current::@return breturn: - // [304] return + // [305] return rts - // play_spawn_current::sid_rnd1 - sid_rnd1: - // [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 - lda SID_VOICE3_OSC - jmp b3 - // play_spawn_current::@3 - b3: - // [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 - and #7 - sta piece_idx - // [302] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] - b2_from_b3: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy - jmp b2 } // play_update_score // Update the score based on the number of lines removed @@ -20906,22 +22235,22 @@ play_spawn_current: { play_update_score: { .label lines_before = $26 .label add_bcd = $27 - // [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 + // [306] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 cpx #0 beq breturn_from_play_update_score jmp b1 // play_update_score::@1 b1: - // [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuaa=_lo_vwuz1 + // [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuaa=_lo_vwuz1 lda lines_bcd - // [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuaa_band_vbuc1 + // [308] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuaa_band_vbuc1 and #$f0 sta lines_before - // [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuaa + // [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuaa tay lda score_add_bcd,y sta add_bcd @@ -20933,7 +22262,7 @@ play_update_score: { sta add_bcd+3 // asm { sed } sed - // [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuxx + // [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuxx txa clc adc lines_bcd @@ -20941,7 +22270,7 @@ play_update_score: { bcc !+ inc lines_bcd+1 !: - // [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 + // [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 lda score_bcd clc adc add_bcd @@ -20957,41 +22286,41 @@ play_update_score: { sta score_bcd+3 // asm { cld } cld - // [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuaa=_lo_vwuz1 + // [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuaa=_lo_vwuz1 lda lines_bcd - // [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuaa=vbuaa_band_vbuc1 + // [316] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuaa=vbuaa_band_vbuc1 and #$f0 - // [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuaa_then_la1 + // [317] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuaa_then_la1 cmp lines_before beq breturn_from_b1 - // [319] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] + // [318] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] b2_from_b1: jmp b2 // play_update_score::@2 b2: - // [320] call play_increase_level + // [319] call play_increase_level jsr play_increase_level - // [321] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] + // [320] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] breturn_from_play_update_score: breturn_from_b1: breturn_from_b2: - // [321] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy - // [321] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy - // [321] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy - // [321] phi (dword) score_bcd#16 = (dword) score_bcd#18 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy - // [321] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#4] -- register_copy + // [320] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy + // [320] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy + // [320] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy + // [320] phi (dword) score_bcd#16 = (dword) score_bcd#18 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy + // [320] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#4] -- register_copy jmp breturn // play_update_score::@return breturn: - // [322] return + // [321] return rts } // play_increase_level // Increase the level play_increase_level: { - // [323] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 + // [322] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 inc level - // [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 + // [323] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 // Update speed of moving tetrominos down lda level cmp #$1d+1 @@ -20999,64 +22328,64 @@ play_increase_level: { jmp b3 // play_increase_level::@3 b3: - // [325] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 + // [324] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 ldy level lda MOVEDOWN_SLOW_SPEEDS,y sta current_movedown_slow - // [326] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] + // [325] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] b1_from_b3: - // [326] phi (byte) current_movedown_slow#66 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy + // [325] phi (byte) current_movedown_slow#66 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy jmp b1 - // [326] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] + // [325] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] b1_from_play_increase_level: - // [326] phi (byte) current_movedown_slow#66 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 + // [325] phi (byte) current_movedown_slow#66 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 lda #1 sta current_movedown_slow jmp b1 // play_increase_level::@1 b1: - // [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 + // [326] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 inc level_bcd - // [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 + // [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 lda #$f and level_bcd - // [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 + // [328] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 cmp #$a bne b2_from_b1 jmp b4 // play_increase_level::@4 b4: - // [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 + // [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 // If level low nybble hits $a change to $10 lax level_bcd axs #-[6] stx level_bcd - // [331] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] + // [330] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] b2_from_b1: b2_from_b4: - // [331] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy + // [330] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy jmp b2 // play_increase_level::@2 b2: // asm { sed } // Increase the score values gained sed - // [333] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] + // [332] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] b5_from_b2: - // [333] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 + // [332] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 ldx #0 jmp b5 - // [333] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] + // [332] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] b5_from_b5: - // [333] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy + // [332] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy jmp b5 // play_increase_level::@5 b5: - // [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa + // [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa tay clc lda score_add_bcd,y @@ -21071,9 +22400,9 @@ play_increase_level: { lda score_add_bcd+3,y adc SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx + // [335] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx inx - // [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 + // [336] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b5_from_b5 jmp b6 @@ -21084,7 +22413,7 @@ play_increase_level: { jmp breturn // play_increase_level::@return breturn: - // [339] return + // [338] return rts } // play_remove_lines @@ -21098,137 +22427,137 @@ play_remove_lines: { .label y = $c .label removed = $d .label full = $f - // [341] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] + // [340] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] b1_from_play_remove_lines: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 lda #0 sta removed - // [341] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 lda #0 sta y - // [341] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 + // [340] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 ldx #PLAYFIELD_LINES*PLAYFIELD_COLS-1 - // [341] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 + // [340] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 ldy #PLAYFIELD_LINES*PLAYFIELD_COLS-1 jmp b1 // Read all lines and rewrite them - // [341] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] + // [340] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] b1_from_b6: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy - // [341] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy - // [341] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy - // [341] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy + // [340] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy + // [340] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy + // [340] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy jmp b1 // play_remove_lines::@1 b1: - // [342] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] + // [341] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] b2_from_b1: - // [342] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 + // [341] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 lda #1 sta full - // [342] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 + // [341] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 lda #0 sta x - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy + // [341] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy + // [341] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy jmp b2 - // [342] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] + // [341] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] b2_from_b3: - // [342] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy - // [342] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy + // [341] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy + // [341] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy + // [341] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy + // [341] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy jmp b2 // play_remove_lines::@2 b2: - // [343] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy + // [342] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy lda playfield,y sta c - // [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy + // [343] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy dey - // [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 + // [344] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 lda c cmp #0 bne b9_from_b2 - // [347] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] + // [346] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] b3_from_b2: - // [347] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 + // [346] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 lda #0 sta full jmp b3 - // [346] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] + // [345] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] b9_from_b2: jmp b9 // play_remove_lines::@9 b9: - // [347] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] + // [346] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] b3_from_b9: - // [347] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy + // [346] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy jmp b3 // play_remove_lines::@3 b3: - // [348] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 + // [347] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda c sta playfield,x - // [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx + // [348] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx dex - // [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 + // [349] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 inc x - // [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 + // [350] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp x bne b2_from_b3 jmp b4 // play_remove_lines::@4 b4: - // [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 + // [351] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 lda #1 cmp full bne b6_from_b4 jmp b5 // play_remove_lines::@5 b5: - // [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 -- vbuxx=vbuxx_plus_vbuc1 + // [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[PLAYFIELD_COLS] - // [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 + // [353] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 inc removed - // [355] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] + // [354] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] b6_from_b4: b6_from_b5: - // [355] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy - // [355] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy + // [354] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy + // [354] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy jmp b6 // play_remove_lines::@6 b6: - // [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 + // [355] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 inc y - // [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 + // [356] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp y bne b1_from_b6 - // [358] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] + // [357] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] b7_from_b6: b7_from_b8: - // [358] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy + // [357] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy jmp b7 // Write zeros in the rest of the lines // play_remove_lines::@7 b7: - // [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 + // [358] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 cpx #$ff bne b8 jmp breturn // play_remove_lines::@return breturn: - // [360] return + // [359] return rts // play_remove_lines::@8 b8: - // [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta playfield,x - // [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx + // [361] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx dex jmp b7_from_b8 } @@ -21244,45 +22573,45 @@ play_lock_current: { .label i_3 = $11 .label i_7 = $11 .label i_9 = $11 - // [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 - // [364] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] + // [362] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + // [363] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] b1_from_play_lock_current: - // [364] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 + // [363] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 lda #0 sta l - // [364] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 + // [363] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 lda #0 sta i_3 - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy + // [363] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy jmp b1 // play_lock_current::@1 b1: - // [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda yp asl - // [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa + // [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa tay lda playfield_lines,y sta playfield_line lda playfield_lines+1,y sta playfield_line+1 - // [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [366] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda current_xpos sta xp - // [368] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] + // [367] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] b2_from_b1: - // [368] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 + // [367] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 ldx #0 - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy + // [367] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy + // [367] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy jmp b2 // play_lock_current::@2 b2: - // [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 + // [368] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 ldy i_2 iny sty i - // [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy i_2 lda (current_piece_gfx),y cmp #0 @@ -21290,57 +22619,57 @@ play_lock_current: { jmp b4 // play_lock_current::@4 b4: - // [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 + // [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 lda current_piece_char ldy xp sta (playfield_line),y jmp b3 // play_lock_current::@3 b3: - // [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 + // [371] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 inc xp - // [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx + // [372] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx inx - // [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 + // [373] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne b7 jmp b5 // play_lock_current::@5 b5: - // [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 + // [374] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 inc yp - // [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 + // [375] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 inc l - // [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 + // [376] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp l bne b6 jmp breturn // play_lock_current::@return breturn: - // [378] return + // [377] return rts // play_lock_current::@6 b6: - // [379] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [378] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda i sta i_7 - // [364] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] + // [363] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] b1_from_b6: - // [364] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy - // [364] phi (byte) play_lock_current::i#3 = (byte~) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy + // [363] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy + // [363] phi (byte) play_lock_current::i#3 = (byte~) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy + // [363] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy jmp b1 // play_lock_current::@7 b7: - // [380] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [379] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda i sta i_9 - // [368] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] + // [367] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] b2_from_b7: - // [368] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte~) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy + // [367] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy + // [367] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy + // [367] phi (byte) play_lock_current::i#2 = (byte~) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy jmp b2 } // keyboard_event_pressed @@ -21350,26 +22679,26 @@ play_lock_current: { keyboard_event_pressed: { .label row_bits = $2e .label keycode = $12 - // [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 + // [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda keycode lsr lsr lsr - // [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa + // [382] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa tay lda keyboard_scan_values,y sta row_bits - // [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 + // [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 lda #7 and keycode - // [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa + // [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa tay lda keyboard_matrix_col_bitmask,y and row_bits jmp breturn // keyboard_event_pressed::@return breturn: - // [386] return + // [385] return rts } // keyboard_event_get @@ -21377,32 +22706,32 @@ keyboard_event_pressed: { // Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process. // The buffer is filled by keyboard_event_scan() keyboard_event_get: { - // [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 + // [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 lda keyboard_events_size cmp #0 beq breturn_from_keyboard_event_get jmp b1 // keyboard_event_get::@1 b1: - // [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 + // [387] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 dec keyboard_events_size - // [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 + // [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 ldy keyboard_events_size ldx keyboard_events,y - // [390] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] + // [389] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] breturn_from_b1: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy + // [389] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy + // [389] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy jmp breturn - // [390] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + // [389] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] breturn_from_keyboard_event_get: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 + // [389] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + // [389] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 ldx #$ff jmp breturn // keyboard_event_get::@return breturn: - // [391] return + // [390] return rts } // keyboard_event_scan @@ -21414,35 +22743,35 @@ keyboard_event_scan: { .label row_scan = $2f .label keycode = $21 .label row = $20 - // [393] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] + // [392] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] b7_from_keyboard_event_scan: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 + // [392] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy + // [392] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 lda #0 sta keycode - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 + // [392] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 lda #0 sta row jmp b7 - // [393] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] + // [392] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] b7_from_b8: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy + // [392] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy + // [392] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy + // [392] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy jmp b7 // keyboard_event_scan::@7 b7: - // [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 + // [393] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 ldx row - // [395] call keyboard_matrix_read + // [394] call keyboard_matrix_read jsr keyboard_matrix_read - // [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // [395] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 jmp b19 // keyboard_event_scan::@19 b19: - // [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa + // [396] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa sta row_scan - // [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + // [397] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 lda row_scan ldy row cmp keyboard_scan_values,y @@ -21450,123 +22779,123 @@ keyboard_event_scan: { jmp b16 // keyboard_event_scan::@16 b16: - // [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 + // [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 lax keycode axs #-[8] stx keycode - // [400] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] + // [399] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] b8_from_b15: b8_from_b16: - // [400] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy - // [400] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy + // [399] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy + // [399] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy jmp b8 // keyboard_event_scan::@8 b8: - // [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + // [400] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 inc row - // [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 + // [401] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp row bne b7_from_b8 - // [403] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] + // [402] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] b17_from_b8: jmp b17 // keyboard_event_scan::@17 b17: - // [404] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] + // [403] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] keyboard_event_pressed_from_b17: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_LSHIFT sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + // [404] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 jmp b20 // keyboard_event_scan::@20 b20: - // [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 - // [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 + // [405] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + // [406] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 cmp #0 beq b1_from_b20 - // [408] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] + // [407] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] b18_from_b20: jmp b18 // keyboard_event_scan::@18 b18: - // [409] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] + // [408] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] b1_from_b18: b1_from_b20: jmp b1 // keyboard_event_scan::@1 b1: - // [410] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] + // [409] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] keyboard_event_pressed_from_b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_RSHIFT sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + // [410] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 jmp b21 // keyboard_event_scan::@21 b21: - // [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 - // [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 + // [411] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + // [412] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2_from_b21 - // [414] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] + // [413] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] b4_from_b21: jmp b4 // keyboard_event_scan::@4 b4: - // [415] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] + // [414] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] b2_from_b21: b2_from_b4: jmp b2 // keyboard_event_scan::@2 b2: - // [416] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] + // [415] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] keyboard_event_pressed_from_b2: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_CTRL sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + // [416] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 jmp b22 // keyboard_event_scan::@22 b22: - // [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 - // [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 + // [417] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + // [418] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq b3_from_b22 - // [420] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] + // [419] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] b5_from_b22: jmp b5 // keyboard_event_scan::@5 b5: - // [421] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] + // [420] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] b3_from_b22: b3_from_b5: jmp b3 // keyboard_event_scan::@3 b3: - // [422] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] + // [421] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] keyboard_event_pressed_from_b3: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_COMMODORE sta keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + // [422] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 jmp b23 // keyboard_event_scan::@23 b23: - // [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 - // [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 + // [423] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + // [424] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 cmp #0 beq breturn - // [426] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] + // [425] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] b6_from_b23: jmp b6 // keyboard_event_scan::@6 @@ -21574,79 +22903,79 @@ keyboard_event_scan: { jmp breturn // keyboard_event_scan::@return breturn: - // [427] return + // [426] return rts // Something has changed on the keyboard row - check each column - // [428] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] + // [427] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] b9_from_b10: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy + // [427] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy + // [427] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy + // [427] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy jmp b9 - // [428] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] + // [427] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] b9_from_b19: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 + // [427] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy + // [427] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy + // [427] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 ldx #0 jmp b9 // keyboard_event_scan::@9 b9: - // [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 + // [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 lda row_scan ldy row eor keyboard_scan_values,y - // [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx + // [429] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx and keyboard_matrix_col_bitmask,x - // [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 + // [430] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 cmp #0 beq b10_from_b9 jmp b12 // keyboard_event_scan::@12 b12: - // [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 + // [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 lda #8 cmp keyboard_events_size beq b10_from_b12 jmp b13 // keyboard_event_scan::@13 b13: - // [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx + // [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx lda keyboard_matrix_col_bitmask,x and row_scan - // [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 + // [433] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 cmp #0 beq b11 jmp b14 // keyboard_event_scan::@14 b14: - // [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 + // [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 // Key pressed lda keycode ldy keyboard_events_size sta keyboard_events,y - // [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [435] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc keyboard_events_size - // [437] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] + // [436] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] b10_from_b11: b10_from_b12: b10_from_b14: b10_from_b9: - // [437] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy + // [436] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy jmp b10 // keyboard_event_scan::@10 b10: - // [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + // [437] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 inc keycode - // [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx + // [438] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx inx - // [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 + // [439] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b9_from_b10 jmp b15 // keyboard_event_scan::@15 b15: - // [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 // Store the current keyboard status for the row to debounce lda row_scan ldy row @@ -21654,14 +22983,14 @@ keyboard_event_scan: { jmp b8_from_b15 // keyboard_event_scan::@11 b11: - // [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 + // [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 lda #$40 ora keycode - // [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa + // [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa // Key released ldy keyboard_events_size sta keyboard_events,y - // [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [443] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc keyboard_events_size jmp b10_from_b11 } @@ -21673,16 +23002,16 @@ keyboard_event_scan: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { - // [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx + // [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A - // [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuaa=_bnot__deref_pbuc1 + // [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuaa=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff jmp breturn // keyboard_matrix_read::@return breturn: - // [447] return + // [446] return rts } // render_show @@ -21690,48 +23019,48 @@ keyboard_matrix_read: { render_show: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .const toD0182_return = (>(PLAYFIELD_SCREEN_2&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f - // [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 + // [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 lda render_screen_show cmp #0 beq toD0181_from_render_show - // [449] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] + // [448] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] toD0182_from_render_show: jmp toD0182 // render_show::toD0182 toD0182: - // [450] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] + // [449] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] b1_from_toD0182: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 + // [449] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0182_return jmp b1 // render_show::@1 b1: - // [451] *((const byte*) D018#0) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa + // [450] *((const byte*) D018#0) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa sta D018 - // [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy level lda PIECES_COLORS_1,y sta BGCOL2 - // [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy level lda PIECES_COLORS_2,y sta BGCOL3 - // [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 -- vbuz1=vbuz2 + // [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda render_screen_show sta render_screen_showing jmp breturn // render_show::@return breturn: - // [455] return + // [454] return rts - // [456] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] + // [455] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] toD0181_from_render_show: jmp toD0181 // render_show::toD0181 toD0181: - // [450] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] + // [449] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] b1_from_toD0181: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 + // [449] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0181_return jmp b1 } @@ -21740,40 +23069,40 @@ render_show: { play_init: { .label pli = $22 .label idx = $14 - // [458] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] + // [457] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] b1_from_play_init: - // [458] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 + // [457] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 lda #0 sta idx - // [458] phi (byte*) play_init::pli#2 = (const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 + // [457] phi (byte*) play_init::pli#2 = (const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 lda #<playfield sta pli lda #>playfield sta pli+1 - // [458] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 + // [457] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 ldy #0 jmp b1 - // [458] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] + // [457] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] b1_from_b1: - // [458] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy - // [458] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy - // [458] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy + // [457] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy + // [457] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy + // [457] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy jmp b1 // play_init::@1 b1: - // [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 lda pli sta playfield_lines,x lda pli+1 sta playfield_lines+1,x - // [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 + // [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 lda idx sta playfield_lines_idx,y - // [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 -- pbuz1=pbuz1_plus_vbuc1 + // [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 -- pbuz1=pbuz1_plus_vbuc1 lda #PLAYFIELD_COLS clc adc pli @@ -21781,42 +23110,42 @@ play_init: { bcc !+ inc pli+1 !: - // [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 + // [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 lax idx axs #-[PLAYFIELD_COLS] stx idx - // [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy + // [463] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy iny - // [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [464] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne b1_from_b1 jmp b2 // play_init::@2 b2: - // [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 -- _deref_pbuc1=vbuc2 + // [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 -- _deref_pbuc1=vbuc2 lda #PLAYFIELD_COLS*PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES - // [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) -- vbuz1=_deref_pbuc1 + // [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) -- vbuz1=_deref_pbuc1 // Set initial speed of moving down a tetromino lda MOVEDOWN_SLOW_SPEEDS sta current_movedown_slow - // [468] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] + // [467] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] b3_from_b2: - // [468] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 + // [467] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 ldx #0 jmp b3 // Set the initial score add values - // [468] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] + // [467] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] b3_from_b3: - // [468] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy + // [467] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy jmp b3 // play_init::@3 b3: - // [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa + // [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa tay lda SCORE_BASE_BCD,y sta score_add_bcd,y @@ -21826,15 +23155,15 @@ play_init: { sta score_add_bcd+2,y lda SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx + // [470] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx inx - // [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [471] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3_from_b3 jmp breturn // play_init::@return breturn: - // [473] return + // [472] return rts } // sprites_irq_init @@ -21842,36 +23171,36 @@ play_init: { sprites_irq_init: { // asm { sei } sei - // [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS // asm { ldaCIA1_INTERRUPT } lda CIA1_INTERRUPT - // [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR - // [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + // [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - // [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT - // [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL - // [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 + // [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER_FIRST sta RASTER - // [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - // [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 + // [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #<sprites_irq sta HARDWARE_IRQ @@ -21882,63 +23211,63 @@ sprites_irq_init: { jmp breturn // sprites_irq_init::@return breturn: - // [485] return + // [484] return rts } // sprites_init // Setup the sprites sprites_init: { .label xpos = $15 - // [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f sta SPRITES_ENABLE - // [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC - // [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 + // [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 lda SPRITES_MC sta SPRITES_EXPAND_Y - // [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 + // [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 lda SPRITES_EXPAND_Y sta SPRITES_EXPAND_X - // [490] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] + // [489] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] b1_from_sprites_init: - // [490] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 + // [489] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 lda #$18+$f*8 sta xpos - // [490] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 + // [489] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 ldy #0 jmp b1 - // [490] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] + // [489] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] b1_from_b1: - // [490] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy - // [490] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy + // [489] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy + // [489] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy jmp b1 // sprites_init::@1 b1: - // [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 + // [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda xpos sta SPRITES_XPOS,x - // [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuyy=vbuc2 + // [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK sta SPRITES_COLS,y - // [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 + // [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax xpos axs #-[$18] stx xpos - // [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy + // [494] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy iny - // [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [495] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #4 bne b1_from_b1 jmp breturn // sprites_init::@return breturn: - // [497] return + // [496] return rts } // render_init @@ -21950,10 +23279,10 @@ render_init: { jmp vicSelectGfxBank1 // render_init::vicSelectGfxBank1 vicSelectGfxBank1: - // [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta CIA2_PORT_A_DDR - // [500] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] + // [499] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1: jmp vicSelectGfxBank1_toDd001 // render_init::vicSelectGfxBank1_toDd001 @@ -21961,92 +23290,92 @@ render_init: { jmp vicSelectGfxBank1_b1 // render_init::vicSelectGfxBank1_@1 vicSelectGfxBank1_b1: - // [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + // [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A jmp b2 // render_init::@2 b2: - // [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 + // [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL1 - // [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) -- _deref_pbuc1=_deref_pbuc2 + // [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 sta BGCOL2 - // [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) -- _deref_pbuc1=_deref_pbuc2 + // [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 sta BGCOL3 - // [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 -- _deref_pbuc1=vbuc2 + // [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 -- _deref_pbuc1=vbuc2 lda #GREY sta BGCOL4 - // [508] call render_screen_original - // [520] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] + // [507] call render_screen_original + // [519] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] render_screen_original_from_b2: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1#0 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1#0 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_1 sta render_screen_original.screen lda #>PLAYFIELD_SCREEN_1 sta render_screen_original.screen+1 jsr render_screen_original - // [509] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] + // [508] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] b3_from_b2: jmp b3 // render_init::@3 b3: - // [510] call render_screen_original - // [520] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] + // [509] call render_screen_original + // [519] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] render_screen_original_from_b3: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2#0 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2#0 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_2 sta render_screen_original.screen lda #>PLAYFIELD_SCREEN_2 sta render_screen_original.screen+1 jsr render_screen_original - // [511] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] + // [510] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] b1_from_b3: - // [511] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 + // [510] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_2+2*$28+$10 sta li_2 lda #>PLAYFIELD_SCREEN_2+2*$28+$10 sta li_2+1 - // [511] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 + // [510] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_1+2*$28+$10 sta li_1 lda #>PLAYFIELD_SCREEN_1+2*$28+$10 sta li_1+1 - // [511] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 + // [510] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 ldy #0 jmp b1 - // [511] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] + // [510] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] b1_from_b1: - // [511] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy - // [511] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy - // [511] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy + // [510] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy + // [510] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy + // [510] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy jmp b1 // render_init::@1 b1: - // [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 lda li_1 sta screen_lines_1,x lda li_1+1 sta screen_lines_1+1,x - // [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 lda li_2 sta screen_lines_2,x lda li_2+1 sta screen_lines_2+1,x - // [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc li_1 @@ -22054,7 +23383,7 @@ render_init: { bcc !+ inc li_1+1 !: - // [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc li_2 @@ -22062,15 +23391,15 @@ render_init: { bcc !+ inc li_2+1 !: - // [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy + // [516] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy iny - // [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [517] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne b1_from_b1 jmp breturn // render_init::@return breturn: - // [519] return + // [518] return rts } // render_screen_original @@ -22084,184 +23413,184 @@ render_screen_original: { .label oscr = $19 .label ocols = $22 .label y = $18 - // [521] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] + // [520] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] b1_from_render_screen_original: - // [521] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 + // [520] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 lda #0 sta y - // [521] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 lda #<PLAYFIELD_COLORS_ORIGINAL+$20*2 sta ocols lda #>PLAYFIELD_COLORS_ORIGINAL+$20*2 sta ocols+1 - // [521] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta oscr lda #>PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta oscr+1 - // [521] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS#0 [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS#0 [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 lda #<COLS sta cols lda #>COLS sta cols+1 - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy + // [520] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy jmp b1 - // [521] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] + // [520] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] b1_from_b5: - // [521] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy - // [521] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy - // [521] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy - // [521] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy + // [520] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy + // [520] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy + // [520] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy + // [520] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy + // [520] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy jmp b1 // render_screen_original::@1 b1: - // [522] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] + // [521] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] b2_from_b1: - // [522] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 + // [521] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 ldx #0 - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy + // [521] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy + // [521] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy jmp b2 - // [522] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] + // [521] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] b2_from_b2: - // [522] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy + // [521] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy + // [521] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy + // [521] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy jmp b2 // render_screen_original::@2 b2: - // [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 + // [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 + // [523] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + // [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 + // [525] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: - // [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx + // [526] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx inx - // [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 + // [527] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne b2_from_b2 - // [529] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] + // [528] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] b3_from_b2: b3_from_b3: - // [529] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy - // [529] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy - // [529] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy - // [529] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy - // [529] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy + // [528] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy + // [528] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy + // [528] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy + // [528] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy + // [528] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy jmp b3 // render_screen_original::@3 b3: - // [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 + // [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (oscr),y ldy #0 sta (screen),y - // [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 + // [530] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 + // [531] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 inc oscr bne !+ inc oscr+1 !: - // [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 + // [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (ocols),y ldy #0 sta (cols),y - // [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 + // [533] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: - // [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 + // [534] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 inc ocols bne !+ inc ocols+1 !: - // [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx + // [535] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx inx - // [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 + // [536] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #$24 bne b3_from_b3 - // [538] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] + // [537] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] b4_from_b3: b4_from_b4: - // [538] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy - // [538] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy - // [538] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy + // [537] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy + // [537] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy + // [537] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy jmp b4 // render_screen_original::@4 b4: - // [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 + // [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 + // [539] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + // [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 + // [541] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: - // [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx + // [542] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx inx - // [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 + // [543] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne b4_from_b4 jmp b5 // render_screen_original::@5 b5: - // [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 + // [544] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 inc y - // [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 + // [545] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b1_from_b5 jmp breturn // render_screen_original::@return breturn: - // [547] return + // [546] return rts } // sid_rnd_init // Initialize SID voice 3 for random number generation sid_rnd_init: { - // [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff -- _deref_pwuc1=vwuc2 + // [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff -- _deref_pwuc1=vwuc2 lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 - // [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + // [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL jmp breturn // sid_rnd_init::@return breturn: - // [550] return + // [549] return rts } // sprites_irq @@ -22278,110 +23607,110 @@ sprites_irq: { //(*BGCOL)++; // Clear decimal flag (because it is used by the score algorithm) cld - // [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 + // [551] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 // Place the sprites lda irq_sprite_ypos - // [553] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [552] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS - // [554] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [553] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+2 - // [555] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [554] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+4 - // [556] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [555] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+6 - // [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [556] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx irq_raster_next inx - // [558] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx + // [557] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx // Wait for the y-position before changing sprite pointers stx raster_sprite_gfx_modify jmp b8 // sprites_irq::@8 b8: - // [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp raster_sprite_gfx_modify bcc b8 jmp b9 // sprites_irq::@9 b9: - // [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 + // [559] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 ldx irq_sprite_ptr - // [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 + // [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 lda render_screen_showing cmp #0 beq b1 jmp b10 // sprites_irq::@10 b10: - // [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx + // [561] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_2 - // [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx + // [562] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx inx txa - // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa + // [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+1 - // [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa + // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+2 - // [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa + // [565] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa clc adc #1 - // [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa + // [566] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+3 jmp b2 // sprites_irq::@2 b2: - // [568] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 + // [567] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 inc irq_cnt - // [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 + // [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 lda #9 cmp irq_cnt beq b3 jmp b6 // sprites_irq::@6 b6: - // [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 + // [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 lda #$a cmp irq_cnt beq b4 jmp b7 // sprites_irq::@7 b7: - // [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 + // [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 lax irq_raster_next axs #-[$14] stx irq_raster_next - // [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ypos axs #-[$15] stx irq_sprite_ypos - // [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ptr axs #-[3] stx irq_sprite_ptr - // [574] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5] + // [573] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5] b5_from_b11: b5_from_b4: b5_from_b7: - // [574] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy - // [574] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy - // [574] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy - // [574] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy + // [573] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy + // [573] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy + // [573] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy + // [573] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy jmp b5 // sprites_irq::@5 b5: - // [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 + // [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 // Setup next interrupt lda irq_raster_next sta RASTER - // [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // sprites_irq::@return breturn: - // [577] return - exit interrupt(HARDWARE_CLOBBER) + // [576] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -22389,31 +23718,31 @@ sprites_irq: { rti // sprites_irq::@4 b4: - // [578] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 + // [577] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta irq_cnt - // [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 + // [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 lda #IRQ_RASTER_FIRST sta irq_raster_next - // [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ypos axs #-[$15] stx irq_sprite_ypos - // [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ptr axs #-[3] stx irq_sprite_ptr jmp b5_from_b4 // sprites_irq::@3 b3: - // [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_raster_next axs #-[$15] stx irq_raster_next - // [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 + // [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 lda #SPRITES_FIRST_YPOS sta irq_sprite_ypos - // [584] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] + // [583] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] toSpritePtr2_from_b3: jmp toSpritePtr2 // sprites_irq::toSpritePtr2 @@ -22421,24 +23750,24 @@ sprites_irq: { jmp b11 // sprites_irq::@11 b11: - // [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 + // [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 lda #toSpritePtr2_return sta irq_sprite_ptr jmp b5_from_b11 // sprites_irq::@1 b1: - // [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx + // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1 - // [587] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx + // [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx inx - // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+1 - // [589] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+2 - // [590] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx + // [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx inx txa - // [591] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa + // [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_1+3 jmp b2 } @@ -22645,9 +23974,10 @@ Removing instruction jmp breturn Removing instruction jmp b4 Removing instruction jmp b5 Removing instruction jmp b1 +Removing instruction jmp sid_rnd1 +Removing instruction jmp b3 Removing instruction jmp b2 Removing instruction jmp breturn -Removing instruction jmp b3 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp breturn @@ -22783,6 +24113,7 @@ Replacing label b2_from_b12 with b2 Replacing label b2_from_b5 with b2 Replacing label b3_from_b2 with b3 Replacing label b5_from_b4 with b1 +Replacing label sid_rnd1 with b1 Replacing label breturn_from_play_update_score with breturn Replacing label breturn_from_b1 with breturn Replacing label b2_from_b1 with b2 @@ -22877,7 +24208,7 @@ Removing instruction breturn_from_b11: Removing instruction b5_from_b4: Removing instruction b5: Removing instruction b1_from_b5: -Removing instruction b2_from_b1: +Removing instruction sid_rnd1: Removing instruction b2_from_b1: Removing instruction breturn_from_play_update_score: Removing instruction breturn_from_b1: @@ -23052,9 +24383,9 @@ Removing instruction b11_from_b10: Removing instruction play_collision_from_play_spawn_current: Removing instruction b4: Removing instruction b1_from_b4: -Removing instruction breturn: Removing instruction b3: -Removing instruction b2_from_b3: +Removing instruction b2: +Removing instruction breturn: Removing instruction b1: Removing instruction b2: Removing instruction b3: @@ -23419,7 +24750,7 @@ FINAL SYMBOL TABLE (byte~) current_piece_char#101 current_piece_char#101 zp ZP_BYTE:15 22.0 (byte) current_piece_char#16 current_piece_char zp ZP_BYTE:38 3.4324324324324325 (byte) current_piece_char#29 current_piece_char zp ZP_BYTE:38 6.0 -(byte) current_piece_char#5 current_piece_char zp ZP_BYTE:38 0.25 +(byte) current_piece_char#5 current_piece_char zp ZP_BYTE:38 0.25806451612903225 (byte) current_piece_char#68 current_piece_char#68 zp ZP_BYTE:15 48.285714285714285 (byte*) current_piece_gfx (byte*~) current_piece_gfx#112 current_piece_gfx#112 zp ZP_WORD:36 2.0 @@ -23434,7 +24765,7 @@ FINAL SYMBOL TABLE (byte*) current_piece_gfx#64 current_piece_gfx#64 zp ZP_WORD:36 48.285714285714285 (byte*) current_piece_gfx#7 current_piece_gfx zp ZP_WORD:25 4.0 (byte) current_xpos -(byte) current_xpos#100 current_xpos zp ZP_BYTE:43 0.3225806451612903 +(byte) current_xpos#100 current_xpos zp ZP_BYTE:43 0.3333333333333333 (byte~) current_xpos#119 current_xpos#119 zp ZP_BYTE:14 1.3333333333333333 (byte~) current_xpos#120 current_xpos#120 zp ZP_BYTE:14 7.333333333333333 (byte) current_xpos#14 current_xpos zp ZP_BYTE:43 20.38181818181818 @@ -23451,14 +24782,14 @@ FINAL SYMBOL TABLE (byte) current_ypos#19 current_ypos zp ZP_BYTE:24 1.7051282051282046 (byte) current_ypos#3 current_ypos zp ZP_BYTE:24 4.0 (byte) current_ypos#38 current_ypos zp ZP_BYTE:24 6.0 -(byte) current_ypos#6 current_ypos zp ZP_BYTE:24 0.3333333333333333 +(byte) current_ypos#6 current_ypos zp ZP_BYTE:24 0.3448275862068966 (byte~) current_ypos#98 reg byte x 1.0 (byte~) current_ypos#99 reg byte x 4.4 (byte) game_over (byte) game_over#10 game_over zp ZP_BYTE:11 4.804347826086958 (byte) game_over#15 game_over zp ZP_BYTE:11 3.189189189189189 (byte) game_over#27 game_over zp ZP_BYTE:11 6.0 -(byte) game_over#52 game_over zp ZP_BYTE:11 0.34782608695652173 +(byte) game_over#52 game_over zp ZP_BYTE:11 0.36363636363636365 (byte) game_over#65 game_over zp ZP_BYTE:11 0.42857142857142855 (byte) irq_cnt (byte) irq_cnt#0 irq_cnt zp ZP_BYTE:31 0.17391304347826086 @@ -23895,7 +25226,7 @@ FINAL SYMBOL TABLE (byte) play_remove_lines::y#8 y zp ZP_BYTE:12 133.46666666666667 (void()) play_spawn_current() (byte~) play_spawn_current::$1 reg byte a 4.0 -(byte~) play_spawn_current::$7 $7 zp ZP_BYTE:46 0.06451612903225806 +(byte~) play_spawn_current::$7 $7 zp ZP_BYTE:46 0.06666666666666667 (label) play_spawn_current::@1 (label) play_spawn_current::@2 (label) play_spawn_current::@3 @@ -23905,8 +25236,7 @@ FINAL SYMBOL TABLE (byte) play_spawn_current::current_piece_idx (byte) play_spawn_current::current_piece_idx#0 reg byte x 2.5 (byte) play_spawn_current::piece_idx -(byte) play_spawn_current::piece_idx#1 piece_idx zp ZP_BYTE:10 2002.0 -(byte) play_spawn_current::piece_idx#2 piece_idx zp ZP_BYTE:10 100.5 +(byte) play_spawn_current::piece_idx#1 piece_idx zp ZP_BYTE:10 100.5 (label) play_spawn_current::sid_rnd1 (byte) play_spawn_current::sid_rnd1_return (byte) play_spawn_current::sid_rnd1_return#0 reg byte a 2002.0 @@ -24283,7 +25613,7 @@ zp ZP_BYTE:7 [ level#33 level#10 level#17 level#19 level#21 ] zp ZP_BYTE:8 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] zp ZP_BYTE:9 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] reg byte x [ play_move_down::return#3 ] -zp ZP_BYTE:10 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +zp ZP_BYTE:10 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] zp ZP_BYTE:11 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] reg byte x [ play_increase_level::b#2 play_increase_level::b#1 ] zp ZP_BYTE:12 [ play_remove_lines::y#8 play_remove_lines::y#1 current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] @@ -24408,7 +25738,7 @@ reg byte a [ sprites_irq::ptr#2 ] FINAL ASSEMBLER -Score: 3353852 +Score: 3345852 // File Comments // Tetris Game for the Commodore 64 @@ -24637,7 +25967,7 @@ main: { sei // render_init() // [18] call render_init - // [498] phi from main::@8 to render_init [phi:main::@8->render_init] + // [497] phi from main::@8 to render_init [phi:main::@8->render_init] jsr render_init // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9] // main::@9 @@ -24653,7 +25983,7 @@ main: { // main::@11 // play_init() // [24] call play_init - // [457] phi from main::@11 to play_init [phi:main::@11->play_init] + // [456] phi from main::@11 to play_init [phi:main::@11->play_init] jsr play_init // [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12] // main::@12 @@ -24672,7 +26002,7 @@ main: { // [28] call play_spawn_current // [287] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] // [287] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy + // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#1 [phi:main::@13->play_spawn_current#1] -- register_copy jsr play_spawn_current // [29] phi from main::@13 to main::@14 [phi:main::@13->main::@14] // main::@14 @@ -24709,7 +26039,7 @@ main: { // [130] phi (byte) current_ypos#13 = (byte~) current_ypos#98 [phi:main::@15->render_moving#4] -- register_copy jsr render_moving // main::@16 - // [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#2 -- vbuxx=vbuz1 + // [36] (byte~) next_piece_idx#77 ← (byte) play_spawn_current::piece_idx#1 -- vbuxx=vbuz1 ldx play_spawn_current.piece_idx // render_next() // [37] call render_next @@ -24745,7 +26075,7 @@ main: { // [40] phi (byte) keyboard_events_size#19 = (byte) 0 [phi:main::@17->main::@1#5] -- vbuz1=vbuc1 sta keyboard_events_size // [40] phi (byte) render_screen_showing#13 = (byte) render_screen_showing#0 [phi:main::@17->main::@1#6] -- register_copy - // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#7] -- register_copy + // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#1 [phi:main::@17->main::@1#7] -- register_copy // [40] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#8] -- register_copy // [40] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#9] -- register_copy // [40] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#10] -- register_copy @@ -24799,7 +26129,7 @@ main: { // main::@18 // keyboard_event_scan() // [45] call keyboard_event_scan - // [392] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] + // [391] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] jsr keyboard_event_scan // [46] phi from main::@18 to main::@19 [phi:main::@18->main::@19] // main::@19 @@ -25901,8 +27231,8 @@ play_move_down: { b1: // keyboard_event_pressed(KEY_SPACE) // [252] call keyboard_event_pressed - // [381] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [380] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_SPACE sta keyboard_event_pressed.keycode jsr keyboard_event_pressed @@ -25986,7 +27316,7 @@ play_move_down: { // play_move_down::@14 // play_remove_lines() // [274] call play_remove_lines - // [340] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] + // [339] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] jsr play_remove_lines // play_remove_lines() // [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuaa=vbuz1 @@ -26020,7 +27350,7 @@ play_move_down: { lda PIECES+1,y sta current_piece_gfx+1 // [283] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] - // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy + // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#1 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy // [283] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy // [283] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy // [283] phi (byte*) current_piece_gfx#35 = (byte*~) current_piece_gfx#117 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy @@ -26167,34 +27497,25 @@ play_spawn_current: { // [301] phi (byte) game_over#52 = (byte) game_over#65 [phi:play_spawn_current::@5->play_spawn_current::@1#0] -- register_copy // play_spawn_current::@1 b1: - // [302] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 - lda #7 - sta piece_idx - // play_spawn_current::@2 - b2: - // while(piece_idx==7) - // [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 - lda #7 - cmp piece_idx - beq sid_rnd1 - // play_spawn_current::@return - // } - // [304] return - rts // play_spawn_current::sid_rnd1 - sid_rnd1: // return *SID_VOICE3_OSC; - // [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + // [302] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 lda SID_VOICE3_OSC // play_spawn_current::@3 // piece_idx = sid_rnd()&7 - // [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 + // [303] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 and #7 sta piece_idx - // [302] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy - jmp b2 + // play_spawn_current::@2 + // while(piece_idx==7) + // [304] if((byte) play_spawn_current::piece_idx#1==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 + lda #7 + cmp piece_idx + beq b1 + // play_spawn_current::@return + // } + // [305] return + rts } // play_update_score // Update the score based on the number of lines removed @@ -26203,23 +27524,23 @@ play_update_score: { .label lines_before = $26 .label add_bcd = $27 // if(removed!=0) - // [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 + // [306] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 cpx #0 beq breturn // play_update_score::@1 // <lines_bcd - // [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuaa=_lo_vwuz1 + // [307] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuaa=_lo_vwuz1 lda lines_bcd // lines_before = <lines_bcd&$f0 - // [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuaa_band_vbuc1 + // [308] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuaa_band_vbuc1 and #$f0 sta lines_before // add_bcd = score_add_bcd[removed] - // [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [309] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [311] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuaa + // [310] (dword) play_update_score::add_bcd#0 ← *((const dword[5]) score_add_bcd#0 + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuaa tay lda score_add_bcd,y sta add_bcd @@ -26233,7 +27554,7 @@ play_update_score: { // asm { sed } sed // lines_bcd += removed - // [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuxx + // [312] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuxx txa clc adc lines_bcd @@ -26242,7 +27563,7 @@ play_update_score: { inc lines_bcd+1 !: // score_bcd += add_bcd - // [314] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 + // [313] (dword) score_bcd#29 ← (dword) score_bcd#18 + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 lda score_bcd clc adc add_bcd @@ -26260,99 +27581,99 @@ play_update_score: { // asm { cld } cld // <lines_bcd - // [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuaa=_lo_vwuz1 + // [315] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuaa=_lo_vwuz1 lda lines_bcd // lines_after = <lines_bcd&$f0 - // [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuaa=vbuaa_band_vbuc1 + // [316] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuaa=vbuaa_band_vbuc1 and #$f0 // if(lines_before!=lines_after) - // [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuaa_then_la1 + // [317] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuaa_then_la1 cmp lines_before beq breturn - // [319] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] + // [318] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] // play_update_score::@2 // play_increase_level() - // [320] call play_increase_level + // [319] call play_increase_level jsr play_increase_level - // [321] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] - // [321] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy - // [321] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy - // [321] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy - // [321] phi (dword) score_bcd#16 = (dword) score_bcd#18 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy - // [321] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#4] -- register_copy + // [320] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] + // [320] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy + // [320] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy + // [320] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy + // [320] phi (dword) score_bcd#16 = (dword) score_bcd#18 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy + // [320] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#4] -- register_copy // play_update_score::@return breturn: // } - // [322] return + // [321] return rts } // play_increase_level // Increase the level play_increase_level: { // level++; - // [323] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 + // [322] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 inc level // if(level>29) - // [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 + // [323] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 // Update speed of moving tetrominos down lda level cmp #$1d+1 bcs b3 // play_increase_level::@3 // current_movedown_slow = MOVEDOWN_SLOW_SPEEDS[level] - // [325] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 + // [324] (byte) current_movedown_slow#10 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0 + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 tay lda MOVEDOWN_SLOW_SPEEDS,y sta current_movedown_slow - // [326] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] - // [326] phi (byte) current_movedown_slow#66 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy + // [325] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] + // [325] phi (byte) current_movedown_slow#66 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy jmp b1 - // [326] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] + // [325] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] b3: - // [326] phi (byte) current_movedown_slow#66 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 + // [325] phi (byte) current_movedown_slow#66 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 lda #1 sta current_movedown_slow // play_increase_level::@1 b1: // level_bcd++; - // [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 + // [326] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 inc level_bcd // level_bcd&$f - // [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 + // [327] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 lda #$f and level_bcd // if((level_bcd&$f)==$a) - // [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 + // [328] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 cmp #$a bne b2 // play_increase_level::@4 // level_bcd += 6 - // [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 + // [329] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 // If level low nybble hits $a change to $10 lax level_bcd axs #-[6] stx level_bcd - // [331] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] - // [331] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy + // [330] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] + // [330] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy // play_increase_level::@2 b2: // asm // asm { sed } // Increase the score values gained sed - // [333] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] - // [333] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 + // [332] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] + // [332] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 ldx #0 - // [333] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] - // [333] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy + // [332] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] + // [332] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy // play_increase_level::@5 b5: // score_add_bcd[b] += SCORE_BASE_BCD[b] - // [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [333] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [335] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa + // [334] *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) ← *((const dword[5]) score_add_bcd#0 + (byte~) play_increase_level::$5) + *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa tay clc lda score_add_bcd,y @@ -26368,9 +27689,9 @@ play_increase_level: { adc SCORE_BASE_BCD+3,y sta score_add_bcd+3,y // for(byte b: 0..4) - // [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx + // [335] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx inx - // [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 + // [336] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b5 // play_increase_level::@6 @@ -26379,7 +27700,7 @@ play_increase_level: { cld // play_increase_level::@return // } - // [339] return + // [338] return rts } // play_remove_lines @@ -26393,121 +27714,121 @@ play_remove_lines: { .label y = $c .label removed = $d .label full = $f - // [341] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] - // [341] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 + // [340] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] + // [340] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 lda #0 sta removed - // [341] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 sta y - // [341] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 + // [340] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 ldx #PLAYFIELD_LINES*PLAYFIELD_COLS-1 - // [341] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 + // [340] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 ldy #PLAYFIELD_LINES*PLAYFIELD_COLS-1 // Read all lines and rewrite them - // [341] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] - // [341] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy - // [341] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy - // [341] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy - // [341] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy + // [340] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] + // [340] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy + // [340] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy + // [340] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy // play_remove_lines::@1 b1: - // [342] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] - // [342] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 + // [341] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] + // [341] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 lda #1 sta full - // [342] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 + // [341] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 lda #0 sta x - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy - // [342] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] - // [342] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy - // [342] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy + // [341] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy + // [341] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy + // [341] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] + // [341] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy + // [341] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy + // [341] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy + // [341] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy // play_remove_lines::@2 b2: // c = playfield[r--] - // [343] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy + // [342] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy lda playfield,y sta c - // [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy + // [343] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy dey // if(c==0) - // [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 + // [344] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 cmp #0 bne b3 - // [347] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] - // [347] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 + // [346] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] + // [346] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 lda #0 sta full - // [346] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] + // [345] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] // play_remove_lines::@9 - // [347] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] - // [347] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy + // [346] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] + // [346] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy // play_remove_lines::@3 b3: // playfield[w--] = c - // [348] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 + // [347] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda c sta playfield,x // playfield[w--] = c; - // [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx + // [348] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx dex // for(byte x:0..PLAYFIELD_COLS-1) - // [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 + // [349] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 inc x - // [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 + // [350] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp x bne b2 // play_remove_lines::@4 // if(full==1) - // [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 + // [351] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 lda #1 cmp full bne b6 // play_remove_lines::@5 // w = w + PLAYFIELD_COLS - // [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 -- vbuxx=vbuxx_plus_vbuc1 + // [352] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0 -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[PLAYFIELD_COLS] // removed++; - // [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 + // [353] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 inc removed - // [355] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] - // [355] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy - // [355] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy + // [354] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] + // [354] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy + // [354] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy // play_remove_lines::@6 b6: // for(byte y:0..PLAYFIELD_LINES-1) - // [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 + // [355] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 inc y - // [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 + // [356] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp y bne b1 - // [358] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] + // [357] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] b4: - // [358] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy + // [357] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy // Write zeros in the rest of the lines // play_remove_lines::@7 // while(w!=$ff) - // [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 + // [358] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 cpx #$ff bne b8 // play_remove_lines::@return // } - // [360] return + // [359] return rts // play_remove_lines::@8 b8: // playfield[w--] = 0 - // [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [360] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta playfield,x // playfield[w--] = 0; - // [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx + // [361] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx dex jmp b4 } @@ -26524,98 +27845,98 @@ play_lock_current: { .label i_7 = $11 .label i_9 = $11 // yp = current_ypos - // [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 - // [364] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] - // [364] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 + // [362] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + // [363] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] + // [363] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 lda #0 sta l - // [364] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 + // [363] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 sta i_3 - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy + // [363] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy // play_lock_current::@1 b1: // playfield_line = playfield_lines[yp] - // [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [364] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda yp asl - // [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa + // [365] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa tay lda playfield_lines,y sta playfield_line lda playfield_lines+1,y sta playfield_line+1 // xp = current_xpos - // [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [366] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda current_xpos sta xp - // [368] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] - // [368] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 + // [367] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] + // [367] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 ldx #0 - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy + // [367] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy + // [367] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy // play_lock_current::@2 b2: // if(current_piece_gfx[i++]!=0) - // [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 + // [368] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 ldy i_2 iny sty i - // [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [369] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy i_2 lda (current_piece_gfx),y cmp #0 beq b3 // play_lock_current::@4 // playfield_line[xp] = current_piece_char - // [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 + // [370] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 lda current_piece_char ldy xp sta (playfield_line),y // play_lock_current::@3 b3: // xp++; - // [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 + // [371] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 inc xp // for(byte c:0..3) - // [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx + // [372] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx inx - // [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 + // [373] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne b7 // play_lock_current::@5 // yp++; - // [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 + // [374] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 inc yp // for(byte l:0..3) - // [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 + // [375] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 inc l - // [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 + // [376] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp l bne b6 // play_lock_current::@return // } - // [378] return + // [377] return rts // play_lock_current::@6 b6: - // [379] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [378] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda i sta i_7 - // [364] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] - // [364] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy - // [364] phi (byte) play_lock_current::i#3 = (byte~) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy + // [363] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] + // [363] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy + // [363] phi (byte) play_lock_current::i#3 = (byte~) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy + // [363] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy jmp b1 // play_lock_current::@7 b7: - // [380] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [379] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda i sta i_9 - // [368] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] - // [368] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte~) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy + // [367] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] + // [367] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy + // [367] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy + // [367] phi (byte) play_lock_current::i#2 = (byte~) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy jmp b2 } // keyboard_event_pressed @@ -26626,28 +27947,28 @@ keyboard_event_pressed: { .label row_bits = $2e .label keycode = $12 // keycode>>3 - // [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 + // [381] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda keycode lsr lsr lsr // row_bits = keyboard_scan_values[keycode>>3] - // [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa + // [382] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa tay lda keyboard_scan_values,y sta row_bits // keycode&7 - // [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 + // [383] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 lda #7 and keycode // row_bits & keyboard_matrix_col_bitmask[keycode&7] - // [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa + // [384] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa tay lda keyboard_matrix_col_bitmask,y and row_bits // keyboard_event_pressed::@return // } - // [386] return + // [385] return rts } // keyboard_event_get @@ -26656,29 +27977,29 @@ keyboard_event_pressed: { // The buffer is filled by keyboard_event_scan() keyboard_event_get: { // if(keyboard_events_size==0) - // [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 + // [386] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 lda keyboard_events_size cmp #0 beq b1 // keyboard_event_get::@1 // return keyboard_events[--keyboard_events_size]; - // [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 + // [387] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 dec keyboard_events_size - // [389] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 + // [388] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 ldy keyboard_events_size ldx keyboard_events,y - // [390] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy + // [389] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] + // [389] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy + // [389] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy rts - // [390] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + // [389] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] b1: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 + // [389] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + // [389] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 ldx #$ff // keyboard_event_get::@return // } - // [391] return + // [390] return rts } // keyboard_event_scan @@ -26690,194 +28011,194 @@ keyboard_event_scan: { .label row_scan = $2f .label keycode = $21 .label row = $20 - // [393] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 + // [392] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] + // [392] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy + // [392] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 lda #0 sta keycode - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 + // [392] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 sta row - // [393] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy + // [392] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] + // [392] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy + // [392] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy + // [392] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy // keyboard_event_scan::@7 b7: // keyboard_matrix_read(row) - // [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 + // [393] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 ldx row - // [395] call keyboard_matrix_read + // [394] call keyboard_matrix_read jsr keyboard_matrix_read - // [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // [395] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 // keyboard_event_scan::@19 // row_scan = keyboard_matrix_read(row) - // [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa + // [396] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa sta row_scan // if(row_scan!=keyboard_scan_values[row]) - // [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + // [397] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 ldy row cmp keyboard_scan_values,y bne b5 // keyboard_event_scan::@16 // keycode = keycode + 8 - // [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 + // [398] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 lax keycode axs #-[8] stx keycode - // [400] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] - // [400] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy - // [400] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy + // [399] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] + // [399] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy + // [399] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy // keyboard_event_scan::@8 b8: // for(byte row : 0..7) - // [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + // [400] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 inc row - // [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 + // [401] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp row bne b7 - // [403] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] + // [402] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] // keyboard_event_scan::@17 // keyboard_event_pressed(KEY_LSHIFT) - // [404] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [403] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_LSHIFT sta keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_LSHIFT) - // [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + // [404] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@20 - // [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + // [405] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 // if(keyboard_event_pressed(KEY_LSHIFT)!= 0) - // [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 + // [406] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 cmp #0 - // [408] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] + // [407] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] // keyboard_event_scan::@18 - // [409] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] + // [408] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] // keyboard_event_scan::@1 // keyboard_event_pressed(KEY_RSHIFT) - // [410] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [409] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_RSHIFT sta keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_RSHIFT) - // [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + // [410] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@21 - // [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + // [411] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 // if(keyboard_event_pressed(KEY_RSHIFT)!= 0) - // [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 + // [412] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 cmp #0 - // [414] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] + // [413] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] // keyboard_event_scan::@4 - // [415] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] + // [414] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] // keyboard_event_scan::@2 // keyboard_event_pressed(KEY_CTRL) - // [416] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [415] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_CTRL sta keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_CTRL) - // [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + // [416] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@22 - // [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + // [417] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 // if(keyboard_event_pressed(KEY_CTRL)!= 0) - // [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 + // [418] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 cmp #0 - // [420] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] + // [419] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] // keyboard_event_scan::@5 - // [421] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] + // [420] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] // keyboard_event_scan::@3 // keyboard_event_pressed(KEY_COMMODORE) - // [422] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [421] call keyboard_event_pressed + // [380] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] + // [380] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_COMMODORE sta keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_COMMODORE) - // [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + // [422] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@23 - // [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + // [423] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 // if(keyboard_event_pressed(KEY_COMMODORE)!= 0) - // [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 + // [424] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 cmp #0 - // [426] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] + // [425] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] // keyboard_event_scan::@6 // keyboard_event_scan::@return // } - // [427] return + // [426] return rts // Something has changed on the keyboard row - check each column - // [428] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy - // [428] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] + // [427] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] + // [427] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy + // [427] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy + // [427] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy + // [427] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] b5: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 + // [427] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy + // [427] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy + // [427] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 ldx #0 // keyboard_event_scan::@9 b9: // row_scan^keyboard_scan_values[row] - // [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 + // [428] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 lda row_scan ldy row eor keyboard_scan_values,y // (row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col] - // [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx + // [429] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx and keyboard_matrix_col_bitmask,x // if(((row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col])!=0) - // [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 + // [430] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 cmp #0 beq b10 // keyboard_event_scan::@12 // if(keyboard_events_size!=8) - // [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 + // [431] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 lda #8 cmp keyboard_events_size beq b10 // keyboard_event_scan::@13 // event_type = row_scan&keyboard_matrix_col_bitmask[col] - // [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx + // [432] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx lda keyboard_matrix_col_bitmask,x and row_scan // if(event_type==0) - // [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 + // [433] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 cmp #0 beq b11 // keyboard_event_scan::@14 // keyboard_events[keyboard_events_size++] = keycode - // [435] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 + // [434] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 // Key pressed lda keycode ldy keyboard_events_size sta keyboard_events,y // keyboard_events[keyboard_events_size++] = keycode; - // [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [435] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc keyboard_events_size - // [437] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] - // [437] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy + // [436] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] + // [436] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy // keyboard_event_scan::@10 b10: // keycode++; - // [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + // [437] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 inc keycode // for(byte col : 0..7) - // [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx + // [438] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx inx - // [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 + // [439] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b9 // keyboard_event_scan::@15 // keyboard_scan_values[row] = row_scan - // [441] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [440] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 // Store the current keyboard status for the row to debounce lda row_scan ldy row @@ -26886,16 +28207,16 @@ keyboard_event_scan: { // keyboard_event_scan::@11 b11: // keycode|$40 - // [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 + // [441] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 lda #$40 ora keycode // keyboard_events[keyboard_events_size++] = keycode|$40 - // [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa + // [442] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa // Key released ldy keyboard_events_size sta keyboard_events,y // keyboard_events[keyboard_events_size++] = keycode|$40; - // [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [443] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc keyboard_events_size jmp b10 } @@ -26908,16 +28229,16 @@ keyboard_event_scan: { // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] - // [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx + // [444] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A // ~*CIA1_PORT_B - // [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuaa=_bnot__deref_pbuc1 + // [445] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuaa=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff // keyboard_matrix_read::@return // } - // [447] return + // [446] return rts } // render_show @@ -26926,42 +28247,42 @@ render_show: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .const toD0182_return = (>(PLAYFIELD_SCREEN_2&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f // if(render_screen_show==0) - // [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 + // [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 lda render_screen_show cmp #0 beq toD0181 - // [449] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] + // [448] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] // render_show::toD0182 - // [450] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 + // [449] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] + // [449] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0182_return // render_show::@1 b1: // *D018 = d018val - // [451] *((const byte*) D018#0) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa + // [450] *((const byte*) D018#0) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa sta D018 // *BGCOL2 = PIECES_COLORS_1[level] - // [452] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy level lda PIECES_COLORS_1,y sta BGCOL2 // *BGCOL3 = PIECES_COLORS_2[level] - // [453] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [452] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 lda PIECES_COLORS_2,y sta BGCOL3 // render_screen_showing = render_screen_show - // [454] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 -- vbuz1=vbuz2 + // [453] (byte) render_screen_showing#1 ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda render_screen_show sta render_screen_showing // render_show::@return // } - // [455] return + // [454] return rts - // [456] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] + // [455] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] // render_show::toD0181 toD0181: - // [450] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 + // [449] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] + // [449] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0181_return jmp b1 } @@ -26970,39 +28291,39 @@ render_show: { play_init: { .label pli = $22 .label idx = $14 - // [458] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] - // [458] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 + // [457] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] + // [457] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 lda #0 sta idx - // [458] phi (byte*) play_init::pli#2 = (const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 + // [457] phi (byte*) play_init::pli#2 = (const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 lda #<playfield sta pli lda #>playfield sta pli+1 - // [458] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 + // [457] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 ldy #0 - // [458] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] - // [458] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy - // [458] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy - // [458] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy + // [457] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] + // [457] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy + // [457] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy + // [457] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy // play_init::@1 b1: // playfield_lines[j] = pli - // [459] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [458] (byte~) play_init::$4 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [460] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [459] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$4) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 lda pli sta playfield_lines,x lda pli+1 sta playfield_lines+1,x // playfield_lines_idx[j] = idx - // [461] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 + // [460] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 lda idx sta playfield_lines_idx,y // pli += PLAYFIELD_COLS - // [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 -- pbuz1=pbuz1_plus_vbuc1 + // [461] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0 -- pbuz1=pbuz1_plus_vbuc1 lda #PLAYFIELD_COLS clc adc pli @@ -27011,40 +28332,40 @@ play_init: { inc pli+1 !: // idx += PLAYFIELD_COLS - // [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 + // [462] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0 -- vbuz1=vbuz1_plus_vbuc1 lax idx axs #-[PLAYFIELD_COLS] stx idx // for(byte j:0..PLAYFIELD_LINES-1) - // [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy + // [463] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy iny - // [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [464] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne b1 // play_init::@2 // playfield_lines_idx[PLAYFIELD_LINES] = PLAYFIELD_COLS*PLAYFIELD_LINES - // [466] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 -- _deref_pbuc1=vbuc2 + // [465] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0 -- _deref_pbuc1=vbuc2 lda #PLAYFIELD_COLS*PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES // current_movedown_slow = MOVEDOWN_SLOW_SPEEDS[level] - // [467] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) -- vbuz1=_deref_pbuc1 + // [466] (byte) current_movedown_slow#1 ← *((const byte[]) MOVEDOWN_SLOW_SPEEDS#0) -- vbuz1=_deref_pbuc1 // Set initial speed of moving down a tetromino lda MOVEDOWN_SLOW_SPEEDS sta current_movedown_slow - // [468] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] - // [468] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 + // [467] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] + // [467] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 ldx #0 // Set the initial score add values - // [468] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] - // [468] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy + // [467] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] + // [467] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy // play_init::@3 b3: // score_add_bcd[b] = SCORE_BASE_BCD[b] - // [469] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [468] (byte~) play_init::$5 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [470] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa + // [469] *((const dword[5]) score_add_bcd#0 + (byte~) play_init::$5) ← *((const dword[]) SCORE_BASE_BCD#0 + (byte~) play_init::$5) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa tay lda SCORE_BASE_BCD,y sta score_add_bcd,y @@ -27055,14 +28376,14 @@ play_init: { lda SCORE_BASE_BCD+3,y sta score_add_bcd+3,y // for(byte b: 0..4) - // [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx + // [470] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx inx - // [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [471] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 // play_init::@return // } - // [473] return + // [472] return rts } // sprites_irq_init @@ -27072,7 +28393,7 @@ sprites_irq_init: { // asm { sei } sei // *IRQ_STATUS = IRQ_RASTER - // [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [474] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS @@ -27080,36 +28401,36 @@ sprites_irq_init: { // asm { ldaCIA1_INTERRUPT } lda CIA1_INTERRUPT // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK - // [477] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // [476] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR // *PROCPORT = PROCPORT_RAM_IO - // [478] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + // [477] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR - // [479] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // [478] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT // *VIC_CONTROL &=$7f - // [480] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [479] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL // *RASTER = IRQ_RASTER_FIRST - // [481] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 + // [480] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER_FIRST sta RASTER // *IRQ_ENABLE = IRQ_RASTER - // [482] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [481] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE // *HARDWARE_IRQ = &sprites_irq - // [483] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 + // [482] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #<sprites_irq sta HARDWARE_IRQ @@ -27120,7 +28441,7 @@ sprites_irq_init: { cli // sprites_irq_init::@return // } - // [485] return + // [484] return rts } // sprites_init @@ -27128,57 +28449,57 @@ sprites_irq_init: { sprites_init: { .label xpos = $15 // *SPRITES_ENABLE = %00001111 - // [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [485] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f sta SPRITES_ENABLE // *SPRITES_MC = 0 - // [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [486] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC // *SPRITES_EXPAND_Y = *SPRITES_MC = 0 - // [488] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 + // [487] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0) -- _deref_pbuc1=_deref_pbuc2 sta SPRITES_EXPAND_Y // *SPRITES_EXPAND_X = *SPRITES_EXPAND_Y = *SPRITES_MC = 0 - // [489] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 + // [488] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0) -- _deref_pbuc1=_deref_pbuc2 sta SPRITES_EXPAND_X - // [490] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] - // [490] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 + // [489] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] + // [489] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 lda #$18+$f*8 sta xpos - // [490] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 + // [489] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 ldy #0 - // [490] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] - // [490] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy - // [490] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy + // [489] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] + // [489] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy + // [489] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy // sprites_init::@1 b1: // s2 = s*2 - // [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax // SPRITES_XPOS[s2] = xpos - // [492] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 + // [491] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda xpos sta SPRITES_XPOS,x // SPRITES_COLS[s] = BLACK - // [493] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuyy=vbuc2 + // [492] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0 -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK sta SPRITES_COLS,y // xpos = xpos+24 - // [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 + // [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax xpos axs #-[$18] stx xpos // for(byte s:0..3) - // [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy + // [494] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy iny - // [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [495] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #4 bne b1 // sprites_init::@return // } - // [497] return + // [496] return rts } // render_init @@ -27189,98 +28510,98 @@ render_init: { .label li_2 = $2c // render_init::vicSelectGfxBank1 // *CIA2_PORT_A_DDR = %00000011 - // [499] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [498] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta CIA2_PORT_A_DDR - // [500] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] + // [499] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] // render_init::vicSelectGfxBank1_toDd001 // render_init::vicSelectGfxBank1_@1 // *CIA2_PORT_A = toDd00(gfx) - // [501] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + // [500] *((const byte*) CIA2_PORT_A#0) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A // render_init::@2 // *D011 = VIC_ECM | VIC_DEN | VIC_RSEL | 3 - // [502] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 + // [501] *((const byte*) D011#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 // *BORDERCOL = BLACK - // [503] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [502] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL // *BGCOL1 = BLACK - // [504] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [503] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 sta BGCOL1 // *BGCOL2 = PIECES_COLORS_1[0] - // [505] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) -- _deref_pbuc1=_deref_pbuc2 + // [504] *((const byte*) BGCOL2#0) ← *((const byte[]) PIECES_COLORS_1#0) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 sta BGCOL2 // *BGCOL3 = PIECES_COLORS_2[0] - // [506] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) -- _deref_pbuc1=_deref_pbuc2 + // [505] *((const byte*) BGCOL3#0) ← *((const byte[]) PIECES_COLORS_2#0) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 sta BGCOL3 // *BGCOL4 = GREY - // [507] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 -- _deref_pbuc1=vbuc2 + // [506] *((const byte*) BGCOL4#0) ← (const byte) GREY#0 -- _deref_pbuc1=vbuc2 lda #GREY sta BGCOL4 // render_screen_original(PLAYFIELD_SCREEN_1) - // [508] call render_screen_original - // [520] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1#0 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 + // [507] call render_screen_original + // [519] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] + // [519] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1#0 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_1 sta render_screen_original.screen lda #>PLAYFIELD_SCREEN_1 sta render_screen_original.screen+1 jsr render_screen_original - // [509] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] + // [508] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] // render_init::@3 // render_screen_original(PLAYFIELD_SCREEN_2) - // [510] call render_screen_original - // [520] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2#0 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 + // [509] call render_screen_original + // [519] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] + // [519] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2#0 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_2 sta render_screen_original.screen lda #>PLAYFIELD_SCREEN_2 sta render_screen_original.screen+1 jsr render_screen_original - // [511] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] - // [511] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 + // [510] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] + // [510] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_2+2*$28+$10 sta li_2 lda #>PLAYFIELD_SCREEN_2+2*$28+$10 sta li_2+1 - // [511] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 + // [510] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1#0+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_1+2*$28+$10 sta li_1 lda #>PLAYFIELD_SCREEN_1+2*$28+$10 sta li_1+1 - // [511] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 + // [510] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 ldy #0 - // [511] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] - // [511] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy - // [511] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy - // [511] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy + // [510] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] + // [510] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy + // [510] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy + // [510] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy // render_init::@1 b1: // screen_lines_1[i] = li_1 - // [512] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [511] (byte~) render_init::$13 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [512] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 + (byte~) render_init::$13) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 lda li_1 sta screen_lines_1,x lda li_1+1 sta screen_lines_1+1,x // screen_lines_2[i] = li_2 - // [514] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [513] *((const byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 + (byte~) render_init::$13) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 lda li_2 sta screen_lines_2,x lda li_2+1 sta screen_lines_2+1,x // li_1 += 40 - // [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [514] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc li_1 @@ -27289,7 +28610,7 @@ render_init: { inc li_1+1 !: // li_2 += 40 - // [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [515] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc li_2 @@ -27298,14 +28619,14 @@ render_init: { inc li_2+1 !: // for(byte i:0..PLAYFIELD_LINES-1) - // [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy + // [516] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy iny - // [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [517] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES#0-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne b1 // render_init::@return // } - // [519] return + // [518] return rts } // render_screen_original @@ -27319,182 +28640,182 @@ render_screen_original: { .label oscr = $19 .label ocols = $22 .label y = $18 - // [521] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] - // [521] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 + // [520] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] + // [520] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 lda #0 sta y - // [521] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 lda #<PLAYFIELD_COLORS_ORIGINAL+$20*2 sta ocols lda #>PLAYFIELD_COLORS_ORIGINAL+$20*2 sta ocols+1 - // [521] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 lda #<PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta oscr lda #>PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta oscr+1 - // [521] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS#0 [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 + // [520] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS#0 [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 lda #<COLS sta cols lda #>COLS sta cols+1 - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy - // [521] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] - // [521] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy - // [521] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy - // [521] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy - // [521] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy + // [520] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy + // [520] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] + // [520] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy + // [520] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy + // [520] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy + // [520] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy + // [520] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy // render_screen_original::@1 b1: - // [522] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] - // [522] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 + // [521] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] + // [521] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 ldx #0 - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy - // [522] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] - // [522] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy + // [521] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy + // [521] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy + // [521] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] + // [521] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy + // [521] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy + // [521] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy // render_screen_original::@2 b2: // *screen++ = SPACE - // [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 + // [522] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y // *screen++ = SPACE; - // [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 + // [523] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: // *cols++ = BLACK - // [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + // [524] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y // *cols++ = BLACK; - // [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 + // [525] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: // while(++x!=4) - // [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx + // [526] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx inx - // [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 + // [527] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne b2 - // [529] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] - // [529] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy - // [529] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy - // [529] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy - // [529] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy - // [529] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy + // [528] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] + // [528] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy + // [528] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy + // [528] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy + // [528] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy + // [528] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy // render_screen_original::@3 b3: // *screen++ = *oscr++ - // [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 + // [529] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (oscr),y sta (screen),y // *screen++ = *oscr++; - // [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 + // [530] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 + // [531] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 inc oscr bne !+ inc oscr+1 !: // *cols++ = *ocols++ - // [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 + // [532] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (ocols),y sta (cols),y // *cols++ = *ocols++; - // [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 + // [533] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: - // [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 + // [534] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 inc ocols bne !+ inc ocols+1 !: // while(++x!=36) - // [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx + // [535] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx inx - // [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 + // [536] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #$24 bne b3 - // [538] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] - // [538] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy - // [538] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy - // [538] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy + // [537] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] + // [537] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy + // [537] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy + // [537] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy // render_screen_original::@4 b4: // *screen++ = SPACE - // [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 + // [538] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE#0 -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y // *screen++ = SPACE; - // [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 + // [539] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: // *cols++ = BLACK - // [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + // [540] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y // *cols++ = BLACK; - // [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 + // [541] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 inc cols bne !+ inc cols+1 !: // while(++x!=40) - // [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx + // [542] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx inx - // [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 + // [543] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne b4 // render_screen_original::@5 // for(byte y:0..24) - // [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 + // [544] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 inc y - // [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 + // [545] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b1 // render_screen_original::@return // } - // [547] return + // [546] return rts } // sid_rnd_init // Initialize SID voice 3 for random number generation sid_rnd_init: { // *SID_VOICE3_FREQ = $ffff - // [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff -- _deref_pwuc1=vwuc2 + // [547] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff -- _deref_pwuc1=vwuc2 lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 // *SID_VOICE3_CONTROL = SID_CONTROL_NOISE - // [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + // [548] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL // sid_rnd_init::@return // } - // [550] return + // [549] return rts } // sprites_irq @@ -27513,118 +28834,118 @@ sprites_irq: { // Clear decimal flag (because it is used by the score algorithm) cld // ypos = irq_sprite_ypos - // [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 + // [551] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1 // Place the sprites lda irq_sprite_ypos // SPRITES_YPOS[0] = ypos - // [553] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [552] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS // SPRITES_YPOS[2] = ypos - // [554] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [553] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+2 // SPRITES_YPOS[4] = ypos - // [555] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [554] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+4 // SPRITES_YPOS[6] = ypos - // [556] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [555] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+6 // irq_raster_next+1 - // [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [556] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx irq_raster_next inx // raster_sprite_gfx_modify = irq_raster_next+1 - // [558] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx + // [557] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx // Wait for the y-position before changing sprite pointers stx raster_sprite_gfx_modify // sprites_irq::@8 b8: // while(*RASTER<raster_sprite_gfx_modify) - // [559] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [558] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp raster_sprite_gfx_modify bcc b8 // sprites_irq::@9 // ptr = irq_sprite_ptr - // [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 + // [559] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuxx=vbuz1 ldx irq_sprite_ptr // if(render_screen_showing==0) - // [561] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 + // [560] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 lda render_screen_showing cmp #0 beq b1 // sprites_irq::@10 // PLAYFIELD_SPRITE_PTRS_2[0] = ptr++ - // [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx + // [561] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_2 // PLAYFIELD_SPRITE_PTRS_2[0] = ptr++; - // [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx + // [562] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx inx txa // PLAYFIELD_SPRITE_PTRS_2[1] = ptr - // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa + // [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+1 // PLAYFIELD_SPRITE_PTRS_2[2] = ptr++ - // [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa + // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+2 // PLAYFIELD_SPRITE_PTRS_2[2] = ptr++; - // [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa + // [565] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa clc adc #1 // PLAYFIELD_SPRITE_PTRS_2[3] = ptr - // [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa + // [566] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+3 // sprites_irq::@2 b2: // ++irq_cnt; - // [568] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 + // [567] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1 inc irq_cnt // if(irq_cnt==9) - // [569] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 + // [568] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 lda #9 cmp irq_cnt beq b3 // sprites_irq::@6 // if(irq_cnt==10) - // [570] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 + // [569] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 lda #$a cmp irq_cnt beq b4 // sprites_irq::@7 // irq_raster_next += 20 - // [571] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 + // [570] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 lax irq_raster_next axs #-[$14] stx irq_raster_next // irq_sprite_ypos += 21 - // [572] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [571] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ypos axs #-[$15] stx irq_sprite_ypos // irq_sprite_ptr += 3 - // [573] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [572] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ptr axs #-[3] stx irq_sprite_ptr - // [574] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5] - // [574] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy - // [574] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy - // [574] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy - // [574] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy + // [573] phi from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 to sprites_irq::@5 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5] + // [573] phi (byte) irq_sprite_ptr#11 = (byte) irq_sprite_ptr#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#0] -- register_copy + // [573] phi (byte) irq_sprite_ypos#11 = (byte) irq_sprite_ypos#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#1] -- register_copy + // [573] phi (byte) irq_cnt#3 = (byte) irq_cnt#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#2] -- register_copy + // [573] phi (byte) irq_raster_next#4 = (byte) irq_raster_next#1 [phi:sprites_irq::@11/sprites_irq::@4/sprites_irq::@7->sprites_irq::@5#3] -- register_copy // sprites_irq::@5 b5: // *RASTER = irq_raster_next - // [575] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 + // [574] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4 -- _deref_pbuc1=vbuz1 // Setup next interrupt lda irq_raster_next sta RASTER // *IRQ_STATUS = IRQ_RASTER - // [576] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [575] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS // sprites_irq::@return // } - // [577] return - exit interrupt(HARDWARE_CLOBBER) + // [576] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -27633,20 +28954,20 @@ sprites_irq: { // sprites_irq::@4 b4: // irq_cnt = 0 - // [578] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 + // [577] (byte) irq_cnt#2 ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta irq_cnt // irq_raster_next = IRQ_RASTER_FIRST - // [579] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 + // [578] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1 lda #IRQ_RASTER_FIRST sta irq_raster_next // irq_sprite_ypos += 21 - // [580] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [579] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ypos axs #-[$15] stx irq_sprite_ypos // irq_sprite_ptr += 3 - // [581] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [580] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax irq_sprite_ptr axs #-[3] stx irq_sprite_ptr @@ -27654,42 +28975,42 @@ sprites_irq: { // sprites_irq::@3 b3: // irq_raster_next += 21 - // [582] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [581] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax irq_raster_next axs #-[$15] stx irq_raster_next // irq_sprite_ypos = SPRITES_FIRST_YPOS - // [583] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 + // [582] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0 -- vbuz1=vbuc1 lda #SPRITES_FIRST_YPOS sta irq_sprite_ypos - // [584] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] + // [583] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] // sprites_irq::toSpritePtr2 // sprites_irq::@11 // irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES) - // [585] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 + // [584] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 lda #toSpritePtr2_return sta irq_sprite_ptr jmp b5 // sprites_irq::@1 b1: // PLAYFIELD_SPRITE_PTRS_1[0] = ptr++ - // [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx + // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1 // PLAYFIELD_SPRITE_PTRS_1[0] = ptr++; - // [587] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx + // [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx inx // PLAYFIELD_SPRITE_PTRS_1[1] = ptr - // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+1 // PLAYFIELD_SPRITE_PTRS_1[2] = ptr++ - // [589] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+2 // PLAYFIELD_SPRITE_PTRS_1[2] = ptr++; - // [590] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx + // [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx inx txa // PLAYFIELD_SPRITE_PTRS_1[3] = ptr - // [591] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa + // [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_1+3 jmp b2 } diff --git a/src/test/ref/complex/tetris/tetris.sym b/src/test/ref/complex/tetris/tetris.sym index 17cb49a54..0406cc4e3 100644 --- a/src/test/ref/complex/tetris/tetris.sym +++ b/src/test/ref/complex/tetris/tetris.sym @@ -234,7 +234,7 @@ (byte~) current_piece_char#101 current_piece_char#101 zp ZP_BYTE:15 22.0 (byte) current_piece_char#16 current_piece_char zp ZP_BYTE:38 3.4324324324324325 (byte) current_piece_char#29 current_piece_char zp ZP_BYTE:38 6.0 -(byte) current_piece_char#5 current_piece_char zp ZP_BYTE:38 0.25 +(byte) current_piece_char#5 current_piece_char zp ZP_BYTE:38 0.25806451612903225 (byte) current_piece_char#68 current_piece_char#68 zp ZP_BYTE:15 48.285714285714285 (byte*) current_piece_gfx (byte*~) current_piece_gfx#112 current_piece_gfx#112 zp ZP_WORD:36 2.0 @@ -249,7 +249,7 @@ (byte*) current_piece_gfx#64 current_piece_gfx#64 zp ZP_WORD:36 48.285714285714285 (byte*) current_piece_gfx#7 current_piece_gfx zp ZP_WORD:25 4.0 (byte) current_xpos -(byte) current_xpos#100 current_xpos zp ZP_BYTE:43 0.3225806451612903 +(byte) current_xpos#100 current_xpos zp ZP_BYTE:43 0.3333333333333333 (byte~) current_xpos#119 current_xpos#119 zp ZP_BYTE:14 1.3333333333333333 (byte~) current_xpos#120 current_xpos#120 zp ZP_BYTE:14 7.333333333333333 (byte) current_xpos#14 current_xpos zp ZP_BYTE:43 20.38181818181818 @@ -266,14 +266,14 @@ (byte) current_ypos#19 current_ypos zp ZP_BYTE:24 1.7051282051282046 (byte) current_ypos#3 current_ypos zp ZP_BYTE:24 4.0 (byte) current_ypos#38 current_ypos zp ZP_BYTE:24 6.0 -(byte) current_ypos#6 current_ypos zp ZP_BYTE:24 0.3333333333333333 +(byte) current_ypos#6 current_ypos zp ZP_BYTE:24 0.3448275862068966 (byte~) current_ypos#98 reg byte x 1.0 (byte~) current_ypos#99 reg byte x 4.4 (byte) game_over (byte) game_over#10 game_over zp ZP_BYTE:11 4.804347826086958 (byte) game_over#15 game_over zp ZP_BYTE:11 3.189189189189189 (byte) game_over#27 game_over zp ZP_BYTE:11 6.0 -(byte) game_over#52 game_over zp ZP_BYTE:11 0.34782608695652173 +(byte) game_over#52 game_over zp ZP_BYTE:11 0.36363636363636365 (byte) game_over#65 game_over zp ZP_BYTE:11 0.42857142857142855 (byte) irq_cnt (byte) irq_cnt#0 irq_cnt zp ZP_BYTE:31 0.17391304347826086 @@ -710,7 +710,7 @@ (byte) play_remove_lines::y#8 y zp ZP_BYTE:12 133.46666666666667 (void()) play_spawn_current() (byte~) play_spawn_current::$1 reg byte a 4.0 -(byte~) play_spawn_current::$7 $7 zp ZP_BYTE:46 0.06451612903225806 +(byte~) play_spawn_current::$7 $7 zp ZP_BYTE:46 0.06666666666666667 (label) play_spawn_current::@1 (label) play_spawn_current::@2 (label) play_spawn_current::@3 @@ -720,8 +720,7 @@ (byte) play_spawn_current::current_piece_idx (byte) play_spawn_current::current_piece_idx#0 reg byte x 2.5 (byte) play_spawn_current::piece_idx -(byte) play_spawn_current::piece_idx#1 piece_idx zp ZP_BYTE:10 2002.0 -(byte) play_spawn_current::piece_idx#2 piece_idx zp ZP_BYTE:10 100.5 +(byte) play_spawn_current::piece_idx#1 piece_idx zp ZP_BYTE:10 100.5 (label) play_spawn_current::sid_rnd1 (byte) play_spawn_current::sid_rnd1_return (byte) play_spawn_current::sid_rnd1_return#0 reg byte a 2002.0 @@ -1098,7 +1097,7 @@ zp ZP_BYTE:7 [ level#33 level#10 level#17 level#19 level#21 ] zp ZP_BYTE:8 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] zp ZP_BYTE:9 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] reg byte x [ play_move_down::return#3 ] -zp ZP_BYTE:10 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] +zp ZP_BYTE:10 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#1 ] zp ZP_BYTE:11 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] reg byte x [ play_increase_level::b#2 play_increase_level::b#1 ] zp ZP_BYTE:12 [ play_remove_lines::y#8 play_remove_lines::y#1 current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] diff --git a/src/test/ref/condition-integer-0.asm b/src/test/ref/condition-integer-0.asm index d9baaa994..9773d11f6 100644 --- a/src/test/ref/condition-integer-0.asm +++ b/src/test/ref/condition-integer-0.asm @@ -10,37 +10,18 @@ main: { sta SCREEN lda #' ' sta SCREEN+1 - ldy #2 - ldx #0 - // loop byte - b3: - cpx #0 - beq b4 - lda #'+' - sta SCREEN,y - iny + ldy #0 + ldx #2 b4: - inx - cpx #3 + iny + cpy #3 bne b3 lda #' ' - sta SCREEN,y - iny + sta SCREEN,x + inx lda #<0 sta i1 sta i1+1 - // loop word - b7: - lda i1 - cmp #<0 - bne !+ - lda i1+1 - cmp #>0 - beq b8 - !: - lda #'+' - sta SCREEN,y - iny b8: inc i1 bne !+ @@ -53,4 +34,25 @@ main: { cmp #<3 bne b7 rts + // loop word + b7: + lda i1 + cmp #<0 + bne !+ + lda i1+1 + cmp #>0 + beq b8 + !: + lda #'+' + sta SCREEN,x + inx + jmp b8 + // loop byte + b3: + cpy #0 + beq b4 + lda #'+' + sta SCREEN,x + inx + jmp b4 } diff --git a/src/test/ref/condition-integer-0.cfg b/src/test/ref/condition-integer-0.cfg index ceede22d2..47c04cdc5 100644 --- a/src/test/ref/condition-integer-0.cfg +++ b/src/test/ref/condition-integer-0.cfg @@ -15,39 +15,37 @@ main::@2: scope:[main] from main to:main::@1 main::@1: scope:[main] from main::@2 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' - to:main::@3 -main::@3: scope:[main] from main::@1 main::@4 - [7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 ) - [7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 ) - [8] if((byte) 0==(byte) main::i#2) goto main::@4 - to:main::@5 -main::@5: scope:[main] from main::@3 - [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' - [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 to:main::@4 -main::@4: scope:[main] from main::@3 main::@5 - [11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 ) - [12] (byte) main::i#1 ← ++ (byte) main::i#2 - [13] if((byte) main::i#1!=(byte) 3) goto main::@3 +main::@4: scope:[main] from main::@1 main::@3 main::@5 + [7] (byte) main::i#5 ← phi( main::@3/(byte) main::i#1 main::@1/(byte) 0 main::@5/(byte) main::i#1 ) + [7] (byte) main::idx#10 ← phi( main::@3/(byte) main::idx#10 main::@1/(byte) 2 main::@5/(byte) main::idx#4 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#5 + [9] if((byte) main::i#1!=(byte) 3) goto main::@3 to:main::@6 main::@6: scope:[main] from main::@4 - [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' - [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 - to:main::@7 -main::@7: scope:[main] from main::@6 main::@8 - [16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 ) - [16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 ) - [17] if((byte) 0==(word) main::i1#2) goto main::@8 - to:main::@9 -main::@9: scope:[main] from main::@7 - [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' - [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 + [10] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) ' ' + [11] (byte) main::idx#21 ← ++ (byte) main::idx#10 to:main::@8 -main::@8: scope:[main] from main::@7 main::@9 - [20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 ) - [21] (word) main::i1#1 ← ++ (word) main::i1#2 - [22] if((word) main::i1#1!=(byte) 3) goto main::@7 +main::@8: scope:[main] from main::@6 main::@7 main::@9 + [12] (word) main::i1#5 ← phi( main::@9/(word) main::i1#1 main::@7/(word) main::i1#1 main::@6/(word) 0 ) + [12] (byte) main::idx#12 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 main::@6/(byte) main::idx#21 ) + [13] (word) main::i1#1 ← ++ (word) main::i1#5 + [14] if((word) main::i1#1!=(byte) 3) goto main::@7 to:main::@return main::@return: scope:[main] from main::@8 - [23] return + [15] return to:@return +main::@7: scope:[main] from main::@8 + [16] if((byte) 0==(word) main::i1#1) goto main::@8 + to:main::@9 +main::@9: scope:[main] from main::@7 + [17] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' + [18] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@8 +main::@3: scope:[main] from main::@4 + [19] if((byte) 0==(byte) main::i#1) goto main::@4 + to:main::@5 +main::@5: scope:[main] from main::@3 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' + [21] (byte) main::idx#4 ← ++ (byte) main::idx#10 + to:main::@4 diff --git a/src/test/ref/condition-integer-0.log b/src/test/ref/condition-integer-0.log index b6b498869..3de98784e 100644 --- a/src/test/ref/condition-integer-0.log +++ b/src/test/ref/condition-integer-0.log @@ -208,6 +208,268 @@ Eliminating variable (byte) main::idx#1 from unused block main::@3 Removing PHI-reference to removed block (main::@3) in block main::@1 Removing unused block main::@3 Successful SSA optimization Pass2EliminateUnusedBlocks +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [0] (byte) main::idx#13 ← phi( main/(const byte) main::idx#0 ) + to:main::@4 +main::@2: scope:[main] from main::@4 + [1] (byte) main::idx#8 ← phi( main::@4/(byte) main::idx#3 ) + [2] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [3] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5 +main::@4: scope:[main] from main::@1 + [4] *((const byte*) SCREEN#0 + (byte) main::idx#13) ← (byte) '+' + [5] (byte) main::idx#3 ← ++ (byte) main::idx#13 + to:main::@2 +main::@5: scope:[main] from main::@2 main::@6 + [6] (byte) main::idx#10 ← phi( main::@2/(byte) main::idx#2 main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@2/(const byte) main::i#0 main::@6/(byte) main::i#1 ) + [7] if((byte) 0==(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@7 + [8] (byte) main::i#5 ← phi( ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 + [11] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#10 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0==(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#2 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::idx#10) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [0] (byte) main::idx#13 ← phi( main/(const byte) main::idx#0 ) + to:main::@4 +main::@2: scope:[main] from main::@4 + [1] (byte) main::idx#8 ← phi( main::@4/(byte) main::idx#3 ) + [2] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [3] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5 +main::@4: scope:[main] from main::@1 + [4] *((const byte*) SCREEN#0 + (byte) main::idx#13) ← (byte) '+' + [5] (byte) main::idx#3 ← ++ (byte) main::idx#13 + to:main::@2 +main::@5: scope:[main] from main::@2 main::@6 + [6] (byte) main::idx#10 ← phi( main::@2/(byte) main::idx#2 main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@2/(const byte) main::i#0 main::@6/(byte) main::i#1 ) + [7] if((byte) 0==(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@7 + [8] (byte) main::i#5 ← phi( main::@5/(byte) main::i#2 main::@7/(byte) main::i#6 ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 + (byte) main::idx#18 ← phi( ) + (byte) main::i#6 ← phi( main::@5/(byte) main::i#2 ) + [11] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '+' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#18 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0==(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#2 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for main::i1#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [0] (byte) main::idx#13 ← phi( main/(const byte) main::idx#0 ) + to:main::@4 +main::@2: scope:[main] from main::@4 + [1] (byte) main::idx#8 ← phi( main::@4/(byte) main::idx#3 ) + [2] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [3] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5_1 +main::@4: scope:[main] from main::@1 + [4] *((const byte*) SCREEN#0 + (byte) main::idx#13) ← (byte) '+' + [5] (byte) main::idx#3 ← ++ (byte) main::idx#13 + to:main::@2 +main::@5: scope:[main] from main::@6 + [6] (byte) main::idx#10 ← phi( main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@6/(byte) main::i#1 ) + [7] if((byte) 0==(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@5_1 main::@7 + [8] (byte) main::i#5 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 main::@7/(byte) main::i#6 ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 main::@5_1 + (byte) main::idx#18 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 ) + (byte) main::i#6 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 ) + [11] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '+' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#18 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0==(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (word) main::i1#5 ← phi( ) + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#5 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@5_1: scope:[main] from main::@2 + (byte) main::idx#19 ← phi( main::@2/(byte) main::idx#2 ) + (byte) main::i#7 ← phi( main::@2/(const byte) main::i#0 ) + if((byte) 0==(byte) main::i#7) goto main::@6 + to:main::@7 + +GRAPH (NEW VERSIONS for main::idx#12) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [0] (byte) main::idx#13 ← phi( main/(const byte) main::idx#0 ) + to:main::@4 +main::@2: scope:[main] from main::@4 + [1] (byte) main::idx#8 ← phi( main::@4/(byte) main::idx#3 ) + [2] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [3] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5_1 +main::@4: scope:[main] from main::@1 + [4] *((const byte*) SCREEN#0 + (byte) main::idx#13) ← (byte) '+' + [5] (byte) main::idx#3 ← ++ (byte) main::idx#13 + to:main::@2 +main::@5: scope:[main] from main::@6 + [6] (byte) main::idx#10 ← phi( main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@6/(byte) main::i#1 ) + [7] if((byte) 0==(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@5_1 main::@7 + [8] (byte) main::i#5 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 main::@7/(byte) main::i#6 ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 main::@5_1 + (byte) main::idx#18 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 ) + (byte) main::i#6 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 ) + [11] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '+' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#18 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0==(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (word) main::i1#5 ← phi( main::@11/(word) main::i1#6 main::@9/(word) main::i1#2 ) + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#5 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + (byte) main::idx#20 ← phi( ) + (word) main::i1#6 ← phi( main::@9/(word) main::i1#2 ) + [20] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '+' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#20 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@5_1: scope:[main] from main::@2 + (byte) main::idx#19 ← phi( main::@2/(byte) main::idx#2 ) + (byte) main::i#7 ← phi( main::@2/(const byte) main::i#0 ) + if((byte) 0==(byte) main::i#7) goto main::@6 + to:main::@7 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@5 Adding number conversion cast (unumber) 3 in if((word) main::i1#1!=(number) 3) goto main::@9 Successful SSA optimization PassNAddNumberTypeConversions @@ -218,28 +480,48 @@ Finalized unsigned number type (byte) 3 Finalized unsigned number type (byte) 3 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte) main::idx#3 = (byte) main::idx#8 +Alias (byte) main::i#1 = (byte) main::i#2 +Alias (byte) main::idx#10 = (byte) main::idx#11 +Alias (word) main::i1#1 = (word) main::i1#2 +Alias (byte) main::idx#12 = (byte) main::idx#17 +Alias (byte) main::idx#19 = (byte) main::idx#2 +Alias (byte) main::idx#21 = (byte) main::idx#5 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::idx#13 (const byte) main::idx#0 +Identical Phi Values (byte) main::i#7 (const byte) main::i#0 +Identical Phi Values (word) main::i1#7 (const word) main::i1#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [5] (byte) main::idx#3 ← ++ (const byte) main::idx#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::idx#3 = ++main::idx#0 Successful SSA optimization Pass2ConstantIdentification +Removing PHI-reference to removed block (main::@5_1) in block main::@7 +Removing PHI-reference to removed block (main::@5_1) in block main::@7 +if() condition always true - replacing block destination [27] if((byte) 0==(const byte) main::i#0) goto main::@6 +Removing PHI-reference to removed block (main::@9_1) in block main::@11 +Removing PHI-reference to removed block (main::@9_1) in block main::@11 +if() condition always true - replacing block destination [29] if((byte) 0==(const word) main::i1#0) goto main::@10 +Successful SSA optimization Pass2ConstantIfs Simplifying expression containing zero SCREEN#0 in [4] *((const byte*) SCREEN#0 + (const byte) main::idx#0) ← (byte) '+' Successful SSA optimization PassNSimplifyExpressionWithZero -Constant right-side identified [1] (byte) main::idx#2 ← ++ (const byte) main::idx#3 +Alias (byte) main::i#1 = (byte) main::i#6 +Alias (byte) main::idx#10 = (byte) main::idx#18 +Alias (word) main::i1#1 = (word) main::i1#6 +Alias (byte) main::idx#12 = (byte) main::idx#20 +Successful SSA optimization Pass2AliasElimination +Constant right-side identified [1] (byte) main::idx#19 ← ++ (const byte) main::idx#3 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::idx#2 = ++main::idx#3 +Constant (const byte) main::idx#19 = ++main::idx#3 Successful SSA optimization Pass2ConstantIdentification Inlining constant with var siblings (const byte) main::idx#0 Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const word) main::i1#0 Inlining constant with var siblings (const byte) main::idx#3 -Inlining constant with var siblings (const byte) main::idx#2 +Inlining constant with var siblings (const byte) main::idx#19 Constant inlined main::i#0 = (byte) 0 Constant inlined main::i1#0 = (word) 0 Constant inlined main::idx#0 = (byte) 0 -Constant inlined main::idx#2 = ++++(byte) 0 +Constant inlined main::idx#19 = ++++(byte) 0 Constant inlined main::idx#3 = ++(byte) 0 Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in *(SCREEN#0+++0) @@ -249,36 +531,35 @@ Simplifying constant integer increment ++0 Successful SSA optimization Pass2ConstantSimplification Simplifying constant integer increment ++1 Successful SSA optimization Pass2ConstantSimplification -Added new block during phi lifting main::@13(between main::@6 and main::@5) -Added new block during phi lifting main::@14(between main::@5 and main::@6) -Added new block during phi lifting main::@15(between main::@10 and main::@9) -Added new block during phi lifting main::@16(between main::@9 and main::@10) +Added new block during phi lifting main::@13(between main::@5 and main::@6) +Added new block during phi lifting main::@14(between main::@9 and main::@10) 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 Adding NOP phi() at start of main Adding NOP phi() at start of main::@1 +Adding NOP phi() at start of main::@5_1 CALL GRAPH Calls in [] to main:2 -Created 6 initial phi equivalence classes -Coalesced [13] main::idx#20 ← main::idx#4 -Coalesced [19] main::idx#22 ← main::idx#5 -Coalesced [24] main::idx#23 ← main::idx#6 -Coalesced [29] main::i1#5 ← main::i1#1 -Coalesced [30] main::idx#21 ← main::idx#17 -Coalesced (already) [31] main::idx#24 ← main::idx#12 -Coalesced [32] main::i#5 ← main::i#1 -Coalesced [33] main::idx#18 ← main::idx#11 -Coalesced (already) [34] main::idx#19 ← main::idx#10 +Created 4 initial phi equivalence classes +Coalesced [15] main::idx#26 ← main::idx#21 +Coalesced [23] main::idx#24 ← main::idx#6 +Coalesced [24] main::i1#8 ← main::i1#1 +Coalesced (already) [25] main::idx#25 ← main::idx#12 +Coalesced (already) [26] main::i1#9 ← main::i1#1 +Coalesced [30] main::idx#23 ← main::idx#4 +Coalesced [31] main::i#9 ← main::i#1 +Coalesced (already) [32] main::idx#22 ← main::idx#10 +Coalesced (already) [33] main::i#8 ← main::i#1 Coalesced down to 4 phi equivalence classes Culled Empty Block (label) @2 Culled Empty Block (label) main::@1 -Culled Empty Block (label) main::@15 -Culled Empty Block (label) main::@16 -Culled Empty Block (label) main::@13 +Culled Empty Block (label) main::@5_1 +Culled Empty Block (label) main::@9_1 Culled Empty Block (label) main::@14 +Culled Empty Block (label) main::@13 Renumbering block main::@2 to main::@1 Renumbering block main::@4 to main::@2 Renumbering block main::@5 to main::@3 @@ -311,76 +592,72 @@ main::@2: scope:[main] from main to:main::@1 main::@1: scope:[main] from main::@2 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' - to:main::@3 -main::@3: scope:[main] from main::@1 main::@4 - [7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 ) - [7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 ) - [8] if((byte) 0==(byte) main::i#2) goto main::@4 - to:main::@5 -main::@5: scope:[main] from main::@3 - [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' - [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 to:main::@4 -main::@4: scope:[main] from main::@3 main::@5 - [11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 ) - [12] (byte) main::i#1 ← ++ (byte) main::i#2 - [13] if((byte) main::i#1!=(byte) 3) goto main::@3 +main::@4: scope:[main] from main::@1 main::@3 main::@5 + [7] (byte) main::i#5 ← phi( main::@3/(byte) main::i#1 main::@1/(byte) 0 main::@5/(byte) main::i#1 ) + [7] (byte) main::idx#10 ← phi( main::@3/(byte) main::idx#10 main::@1/(byte) 2 main::@5/(byte) main::idx#4 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#5 + [9] if((byte) main::i#1!=(byte) 3) goto main::@3 to:main::@6 main::@6: scope:[main] from main::@4 - [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' - [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 - to:main::@7 -main::@7: scope:[main] from main::@6 main::@8 - [16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 ) - [16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 ) - [17] if((byte) 0==(word) main::i1#2) goto main::@8 - to:main::@9 -main::@9: scope:[main] from main::@7 - [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' - [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 + [10] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) ' ' + [11] (byte) main::idx#21 ← ++ (byte) main::idx#10 to:main::@8 -main::@8: scope:[main] from main::@7 main::@9 - [20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 ) - [21] (word) main::i1#1 ← ++ (word) main::i1#2 - [22] if((word) main::i1#1!=(byte) 3) goto main::@7 +main::@8: scope:[main] from main::@6 main::@7 main::@9 + [12] (word) main::i1#5 ← phi( main::@9/(word) main::i1#1 main::@7/(word) main::i1#1 main::@6/(word) 0 ) + [12] (byte) main::idx#12 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 main::@6/(byte) main::idx#21 ) + [13] (word) main::i1#1 ← ++ (word) main::i1#5 + [14] if((word) main::i1#1!=(byte) 3) goto main::@7 to:main::@return main::@return: scope:[main] from main::@8 - [23] return + [15] return to:@return +main::@7: scope:[main] from main::@8 + [16] if((byte) 0==(word) main::i1#1) goto main::@8 + to:main::@9 +main::@9: scope:[main] from main::@7 + [17] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' + [18] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@8 +main::@3: scope:[main] from main::@4 + [19] if((byte) 0==(byte) main::i#1) goto main::@4 + to:main::@5 +main::@5: scope:[main] from main::@3 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' + [21] (byte) main::idx#4 ← ++ (byte) main::idx#10 + to:main::@4 VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#2 6.6000000000000005 +(byte) main::i#1 83.0 +(byte) main::i#5 213.0 (word) main::i1 -(word) main::i1#1 16.5 -(word) main::i1#2 6.6000000000000005 +(word) main::i1#1 83.0 +(word) main::i1#5 213.0 (byte) main::idx -(byte) main::idx#10 14.666666666666666 -(byte) main::idx#11 9.25 -(byte) main::idx#12 15.333333333333332 -(byte) main::idx#17 11.0 +(byte) main::idx#10 39.83333333333334 +(byte) main::idx#12 47.400000000000006 +(byte) main::idx#21 4.0 (byte) main::idx#4 22.0 -(byte) main::idx#5 4.0 (byte) main::idx#6 22.0 Initial phi equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#10 main::idx#11 main::idx#4 ] -[ main::i1#2 main::i1#1 ] -[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +[ main::idx#10 main::idx#4 ] +[ main::i#5 main::i#1 ] +[ main::idx#12 main::idx#6 main::idx#21 ] +[ main::i1#5 main::i1#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#10 main::idx#11 main::idx#4 ] -[ main::i1#2 main::i1#1 ] -[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] -Allocated zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] -Allocated zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +[ main::idx#10 main::idx#4 ] +[ main::i#5 main::i#1 ] +[ main::idx#12 main::idx#6 main::idx#21 ] +[ main::i1#5 main::i1#1 ] +Allocated zp ZP_BYTE:2 [ main::idx#10 main::idx#4 ] +Allocated zp ZP_BYTE:3 [ main::i#5 main::i#1 ] +Allocated zp ZP_BYTE:4 [ main::idx#12 main::idx#6 main::idx#21 ] +Allocated zp ZP_WORD:5 [ main::i1#5 main::i1#1 ] INITIAL ASM Target platform is c64basic @@ -411,13 +688,12 @@ bend_from_b1: bend: // main main: { - .label i = 2 - .label idx = 3 - .label idx_5 = 6 - .label i1 = 4 - .label idx_6 = 6 - .label idx_12 = 6 - .label idx_17 = 6 + .label i = 3 + .label idx = 2 + .label i1 = 5 + .label idx_6 = 4 + .label idx_12 = 4 + .label idx_21 = 4 jmp b2 // main::@2 b2: @@ -430,78 +706,78 @@ main: { // [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta SCREEN+1 - // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 - lda #2 - sta idx - // [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuz1=vbuc1 + // [7] phi from main::@1 to main::@4 [phi:main::@1->main::@4] + b4_from_b1: + // [7] phi (byte) main::i#5 = (byte) 0 [phi:main::@1->main::@4#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b3 - // loop byte - // [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3] - b3_from_b4: - // [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy - // [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy - jmp b3 - // main::@3 - b3: - // [8] if((byte) 0==(byte) main::i#2) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 - lda #0 - cmp i - beq b4_from_b3 - jmp b5 - // main::@5 - b5: - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 - lda #'+' - ldy idx - sta SCREEN,y - // [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1 - inc idx - // [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@4#1] -- vbuz1=vbuc1 + lda #2 + sta idx + jmp b4 + // [7] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] b4_from_b3: b4_from_b5: - // [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [7] phi (byte) main::idx#10 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#1] -- register_copy jmp b4 // main::@4 b4: - // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuz1=_inc_vbuz1 inc i - // [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 + // [9] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 lda #3 cmp i - bne b3_from_b4 + bne b3 jmp b6 // main::@6 b6: - // [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + // [10] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 lda #' ' ldy idx sta SCREEN,y - // [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuz1=_inc_vbuz2 + // [11] (byte) main::idx#21 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz2 ldy idx iny - sty idx_5 - // [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - b7_from_b6: - // [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1 + sty idx_21 + // [12] phi from main::@6 to main::@8 [phi:main::@6->main::@8] + b8_from_b6: + // [12] phi (word) main::i1#5 = (word) 0 [phi:main::@6->main::@8#0] -- vwuz1=vwuc1 lda #<0 sta i1 lda #>0 sta i1+1 - jmp b7 + // [12] phi (byte) main::idx#12 = (byte) main::idx#21 [phi:main::@6->main::@8#1] -- register_copy + jmp b8 + // [12] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] + b8_from_b7: + b8_from_b9: + // [12] phi (word) main::i1#5 = (word) main::i1#1 [phi:main::@7/main::@9->main::@8#0] -- register_copy + // [12] phi (byte) main::idx#12 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#1] -- register_copy + jmp b8 + // main::@8 + b8: + // [13] (word) main::i1#1 ← ++ (word) main::i1#5 -- vwuz1=_inc_vwuz1 + inc i1 + bne !+ + inc i1+1 + !: + // [14] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 + lda i1+1 + cmp #>3 + bne b7 + lda i1 + cmp #<3 + bne b7 + jmp breturn + // main::@return + breturn: + // [15] return + rts // loop word - // [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7] - b7_from_b8: - // [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy - jmp b7 // main::@7 b7: - // [17] if((byte) 0==(word) main::i1#2) goto main::@8 -- vwuc1_eq_vwuz1_then_la1 + // [16] if((byte) 0==(word) main::i1#1) goto main::@8 -- vwuc1_eq_vwuz1_then_la1 lda i1 cmp #<0 bne !+ @@ -512,69 +788,63 @@ main: { jmp b9 // main::@9 b9: - // [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 + // [17] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 lda #'+' ldy idx_12 sta SCREEN,y - // [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuz1=_inc_vbuz1 + // [18] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuz1=_inc_vbuz1 inc idx_6 - // [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] - b8_from_b7: - b8_from_b9: - // [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy - jmp b8 - // main::@8 - b8: - // [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1 - inc i1 - bne !+ - inc i1+1 - !: - // [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 - lda i1+1 - cmp #>3 - bne b7_from_b8 - lda i1 - cmp #<3 - bne b7_from_b8 - jmp breturn - // main::@return - breturn: - // [23] return - rts + jmp b8_from_b9 + // loop byte + // main::@3 + b3: + // [19] if((byte) 0==(byte) main::i#1) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp i + beq b4_from_b3 + jmp b5 + // main::@5 + b5: + // [20] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #'+' + ldy idx + sta SCREEN,y + // [21] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1 + inc idx + jmp b4_from_b5 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS Statement [5] *((const byte*) SCREEN#0) ← (byte) '+' [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] -Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a -Statement [17] if((byte) 0==(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] -Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a +Statement [10] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) ' ' [ main::idx#10 ] ( main:2 [ main::idx#10 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::idx#10 main::idx#4 ] +Statement [14] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::idx#12 main::i1#1 ] ( main:2 [ main::idx#12 main::i1#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::idx#12 main::idx#6 main::idx#21 ] +Statement [16] if((byte) 0==(word) main::i1#1) goto main::@8 [ main::idx#12 main::i1#1 ] ( main:2 [ main::idx#12 main::i1#1 ] ) always clobbers reg byte a +Statement [17] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' [ main::idx#12 main::i1#1 ] ( main:2 [ main::idx#12 main::i1#1 ] ) always clobbers reg byte a +Statement [20] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::idx#10 main::i#1 ] ( main:2 [ main::idx#10 main::i#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::i#5 main::i#1 ] Statement [5] *((const byte*) SCREEN#0) ← (byte) '+' [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a -Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a -Statement [17] if((byte) 0==(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] : zp ZP_WORD:4 , -Potential registers zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , +Statement [10] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) ' ' [ main::idx#10 ] ( main:2 [ main::idx#10 ] ) always clobbers reg byte a +Statement [14] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::idx#12 main::i1#1 ] ( main:2 [ main::idx#12 main::i1#1 ] ) always clobbers reg byte a +Statement [16] if((byte) 0==(word) main::i1#1) goto main::@8 [ main::idx#12 main::i1#1 ] ( main:2 [ main::idx#12 main::i1#1 ] ) always clobbers reg byte a +Statement [17] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' [ main::idx#12 main::i1#1 ] ( main:2 [ main::idx#12 main::i1#1 ] ) always clobbers reg byte a +Statement [20] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' [ main::idx#10 main::i#1 ] ( main:2 [ main::idx#10 main::i#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::idx#10 main::idx#4 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#5 main::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:4 [ main::idx#12 main::idx#6 main::idx#21 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:5 [ main::i1#5 main::i1#1 ] : zp ZP_WORD:5 , REGISTER UPLIFT SCOPES -Uplift Scope [main] 52.33: zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] 45.92: zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] 23.1: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 23.1: zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] +Uplift Scope [main] 296: zp ZP_BYTE:3 [ main::i#5 main::i#1 ] 296: zp ZP_WORD:5 [ main::i1#5 main::i1#1 ] 73.4: zp ZP_BYTE:4 [ main::idx#12 main::idx#6 main::idx#21 ] 61.83: zp ZP_BYTE:2 [ main::idx#10 main::idx#4 ] Uplift Scope [] -Uplifting [main] best 1227 combination reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] -Uplifting [] best 1227 combination -Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ main::i1#2 main::i1#1 ] +Uplifting [main] best 9462 combination reg byte y [ main::i#5 main::i#1 ] zp ZP_WORD:5 [ main::i1#5 main::i1#1 ] reg byte x [ main::idx#12 main::idx#6 main::idx#21 ] reg byte x [ main::idx#10 main::idx#4 ] +Uplifting [] best 9462 combination +Allocated (was zp ZP_WORD:5) zp ZP_WORD:2 [ main::i1#5 main::i1#1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -617,70 +887,72 @@ main: { // [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta SCREEN+1 - // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1 - ldy #2 - // [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1 - ldx #0 - jmp b3 - // loop byte - // [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3] - b3_from_b4: - // [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy - // [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy - jmp b3 - // main::@3 - b3: - // [8] if((byte) 0==(byte) main::i#2) goto main::@4 -- vbuc1_eq_vbuxx_then_la1 - cpx #0 - beq b4_from_b3 - jmp b5 - // main::@5 - b5: - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2 - lda #'+' - sta SCREEN,y - // [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy - iny - // [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + // [7] phi from main::@1 to main::@4 [phi:main::@1->main::@4] + b4_from_b1: + // [7] phi (byte) main::i#5 = (byte) 0 [phi:main::@1->main::@4#0] -- vbuyy=vbuc1 + ldy #0 + // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@4#1] -- vbuxx=vbuc1 + ldx #2 + jmp b4 + // [7] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] b4_from_b3: b4_from_b5: - // [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [7] phi (byte) main::idx#10 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#1] -- register_copy jmp b4 // main::@4 b4: - // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #3 - bne b3_from_b4 + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuyy=_inc_vbuyy + iny + // [9] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuyy_neq_vbuc1_then_la1 + cpy #3 + bne b3 jmp b6 // main::@6 b6: - // [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2 + // [10] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 lda #' ' - sta SCREEN,y - // [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy - iny - // [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - b7_from_b6: - // [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1 + sta SCREEN,x + // [11] (byte) main::idx#21 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx + inx + // [12] phi from main::@6 to main::@8 [phi:main::@6->main::@8] + b8_from_b6: + // [12] phi (word) main::i1#5 = (word) 0 [phi:main::@6->main::@8#0] -- vwuz1=vwuc1 lda #<0 sta i1 lda #>0 sta i1+1 - jmp b7 + // [12] phi (byte) main::idx#12 = (byte) main::idx#21 [phi:main::@6->main::@8#1] -- register_copy + jmp b8 + // [12] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] + b8_from_b7: + b8_from_b9: + // [12] phi (word) main::i1#5 = (word) main::i1#1 [phi:main::@7/main::@9->main::@8#0] -- register_copy + // [12] phi (byte) main::idx#12 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#1] -- register_copy + jmp b8 + // main::@8 + b8: + // [13] (word) main::i1#1 ← ++ (word) main::i1#5 -- vwuz1=_inc_vwuz1 + inc i1 + bne !+ + inc i1+1 + !: + // [14] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 + lda i1+1 + cmp #>3 + bne b7 + lda i1 + cmp #<3 + bne b7 + jmp breturn + // main::@return + breturn: + // [15] return + rts // loop word - // [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7] - b7_from_b8: - // [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy - jmp b7 // main::@7 b7: - // [17] if((byte) 0==(word) main::i1#2) goto main::@8 -- vwuc1_eq_vwuz1_then_la1 + // [16] if((byte) 0==(word) main::i1#1) goto main::@8 -- vwuc1_eq_vwuz1_then_la1 lda i1 cmp #<0 bne !+ @@ -691,35 +963,27 @@ main: { jmp b9 // main::@9 b9: - // [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2 + // [17] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 lda #'+' - sta SCREEN,y - // [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy - iny - // [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] - b8_from_b7: - b8_from_b9: - // [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy - jmp b8 - // main::@8 - b8: - // [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1 - inc i1 - bne !+ - inc i1+1 - !: - // [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 - lda i1+1 - cmp #>3 - bne b7_from_b8 - lda i1 - cmp #<3 - bne b7_from_b8 - jmp breturn - // main::@return - breturn: - // [23] return - rts + sta SCREEN,x + // [18] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuxx=_inc_vbuxx + inx + jmp b8_from_b9 + // loop byte + // main::@3 + b3: + // [19] if((byte) 0==(byte) main::i#1) goto main::@4 -- vbuc1_eq_vbuyy_then_la1 + cpy #0 + beq b4_from_b3 + jmp b5 + // main::@5 + b5: + // [20] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'+' + sta SCREEN,x + // [21] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx + inx + jmp b4_from_b5 } // File Data @@ -728,48 +992,43 @@ Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp b2 Removing instruction jmp b1 -Removing instruction jmp b3 -Removing instruction jmp b5 Removing instruction jmp b4 Removing instruction jmp b6 -Removing instruction jmp b7 -Removing instruction jmp b9 Removing instruction jmp b8 Removing instruction jmp breturn +Removing instruction jmp b9 +Removing instruction jmp b5 Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #>0 Succesful ASM optimization Pass5UnnecesaryLoadElimination -Replacing label b4_from_b3 with b4 -Replacing label b3_from_b4 with b3 Replacing label b8_from_b7 with b8 -Replacing label b7_from_b8 with b7 -Replacing label b7_from_b8 with b7 +Replacing label b8_from_b9 with b8 +Replacing label b4_from_b3 with b4 +Replacing label b4_from_b5 with b4 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b3_from_b4: Removing instruction b4_from_b3: Removing instruction b4_from_b5: -Removing instruction b7_from_b8: Removing instruction b8_from_b7: Removing instruction b8_from_b9: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction b2: Removing instruction b1: -Removing instruction b3_from_b1: -Removing instruction b5: +Removing instruction b4_from_b1: Removing instruction b6: -Removing instruction b7_from_b6: -Removing instruction b9: +Removing instruction b8_from_b6: Removing instruction breturn: +Removing instruction b9: +Removing instruction b5: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b3 -Removing instruction jmp b7 +Removing instruction jmp b4 +Removing instruction jmp b8 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -792,28 +1051,26 @@ FINAL SYMBOL TABLE (label) main::@9 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 6.6000000000000005 +(byte) main::i#1 reg byte y 83.0 +(byte) main::i#5 reg byte y 213.0 (word) main::i1 -(word) main::i1#1 i1 zp ZP_WORD:2 16.5 -(word) main::i1#2 i1 zp ZP_WORD:2 6.6000000000000005 +(word) main::i1#1 i1 zp ZP_WORD:2 83.0 +(word) main::i1#5 i1 zp ZP_WORD:2 213.0 (byte) main::idx -(byte) main::idx#10 reg byte y 14.666666666666666 -(byte) main::idx#11 reg byte y 9.25 -(byte) main::idx#12 reg byte y 15.333333333333332 -(byte) main::idx#17 reg byte y 11.0 -(byte) main::idx#4 reg byte y 22.0 -(byte) main::idx#5 reg byte y 4.0 -(byte) main::idx#6 reg byte y 22.0 +(byte) main::idx#10 reg byte x 39.83333333333334 +(byte) main::idx#12 reg byte x 47.400000000000006 +(byte) main::idx#21 reg byte x 4.0 +(byte) main::idx#4 reg byte x 22.0 +(byte) main::idx#6 reg byte x 22.0 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] -zp ZP_WORD:2 [ main::i1#2 main::i1#1 ] -reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +reg byte x [ main::idx#10 main::idx#4 ] +reg byte y [ main::i#5 main::i#1 ] +reg byte x [ main::idx#12 main::idx#6 main::idx#21 ] +zp ZP_WORD:2 [ main::i1#5 main::i1#1 ] FINAL ASSEMBLER -Score: 862 +Score: 6817 // File Comments // Tests using integer conditions in if() @@ -844,61 +1101,63 @@ main: { // [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta SCREEN+1 - // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1 - ldy #2 - // [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1 - ldx #0 - // loop byte - // [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3] - // [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy - // [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy - // main::@3 - b3: - // if(i) - // [8] if((byte) 0==(byte) main::i#2) goto main::@4 -- vbuc1_eq_vbuxx_then_la1 - cpx #0 - beq b4 - // main::@5 - // SCREEN[idx++] = '+' - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2 - lda #'+' - sta SCREEN,y - // SCREEN[idx++] = '+'; - // [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy - iny - // [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] - // [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [7] phi from main::@1 to main::@4 [phi:main::@1->main::@4] + // [7] phi (byte) main::i#5 = (byte) 0 [phi:main::@1->main::@4#0] -- vbuyy=vbuc1 + ldy #0 + // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@4#1] -- vbuxx=vbuc1 + ldx #2 + // [7] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [7] phi (byte) main::idx#10 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#1] -- register_copy // main::@4 b4: // for( byte i:0..2) - // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #3 + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuyy=_inc_vbuyy + iny + // [9] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuyy_neq_vbuc1_then_la1 + cpy #3 bne b3 // main::@6 // SCREEN[idx++] = ' ' - // [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2 + // [10] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 lda #' ' - sta SCREEN,y + sta SCREEN,x // SCREEN[idx++] = ' '; - // [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy - iny - // [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - // [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1 + // [11] (byte) main::idx#21 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx + inx + // [12] phi from main::@6 to main::@8 [phi:main::@6->main::@8] + // [12] phi (word) main::i1#5 = (word) 0 [phi:main::@6->main::@8#0] -- vwuz1=vwuc1 lda #<0 sta i1 sta i1+1 + // [12] phi (byte) main::idx#12 = (byte) main::idx#21 [phi:main::@6->main::@8#1] -- register_copy + // [12] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] + // [12] phi (word) main::i1#5 = (word) main::i1#1 [phi:main::@7/main::@9->main::@8#0] -- register_copy + // [12] phi (byte) main::idx#12 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#1] -- register_copy + // main::@8 + b8: + // for( word i:0..2) + // [13] (word) main::i1#1 ← ++ (word) main::i1#5 -- vwuz1=_inc_vwuz1 + inc i1 + bne !+ + inc i1+1 + !: + // [14] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 + lda i1+1 + cmp #>3 + bne b7 + lda i1 + cmp #<3 + bne b7 + // main::@return + // } + // [15] return + rts // loop word - // [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7] - // [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy // main::@7 b7: // if(i) - // [17] if((byte) 0==(word) main::i1#2) goto main::@8 -- vwuc1_eq_vwuz1_then_la1 + // [16] if((byte) 0==(word) main::i1#1) goto main::@8 -- vwuc1_eq_vwuz1_then_la1 lda i1 cmp #<0 bne !+ @@ -908,33 +1167,29 @@ main: { !: // main::@9 // SCREEN[idx++] = '+' - // [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2 + // [17] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 lda #'+' - sta SCREEN,y + sta SCREEN,x // SCREEN[idx++] = '+'; - // [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy - iny - // [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] - // [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy - // main::@8 - b8: - // for( word i:0..2) - // [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1 - inc i1 - bne !+ - inc i1+1 - !: - // [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 - lda i1+1 - cmp #>3 - bne b7 - lda i1 - cmp #<3 - bne b7 - // main::@return - // } - // [23] return - rts + // [18] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuxx=_inc_vbuxx + inx + jmp b8 + // loop byte + // main::@3 + b3: + // if(i) + // [19] if((byte) 0==(byte) main::i#1) goto main::@4 -- vbuc1_eq_vbuyy_then_la1 + cpy #0 + beq b4 + // main::@5 + // SCREEN[idx++] = '+' + // [20] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'+' + sta SCREEN,x + // SCREEN[idx++] = '+'; + // [21] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx + inx + jmp b4 } // File Data diff --git a/src/test/ref/condition-integer-0.sym b/src/test/ref/condition-integer-0.sym index 1dd505468..820853e46 100644 --- a/src/test/ref/condition-integer-0.sym +++ b/src/test/ref/condition-integer-0.sym @@ -15,21 +15,19 @@ (label) main::@9 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 6.6000000000000005 +(byte) main::i#1 reg byte y 83.0 +(byte) main::i#5 reg byte y 213.0 (word) main::i1 -(word) main::i1#1 i1 zp ZP_WORD:2 16.5 -(word) main::i1#2 i1 zp ZP_WORD:2 6.6000000000000005 +(word) main::i1#1 i1 zp ZP_WORD:2 83.0 +(word) main::i1#5 i1 zp ZP_WORD:2 213.0 (byte) main::idx -(byte) main::idx#10 reg byte y 14.666666666666666 -(byte) main::idx#11 reg byte y 9.25 -(byte) main::idx#12 reg byte y 15.333333333333332 -(byte) main::idx#17 reg byte y 11.0 -(byte) main::idx#4 reg byte y 22.0 -(byte) main::idx#5 reg byte y 4.0 -(byte) main::idx#6 reg byte y 22.0 +(byte) main::idx#10 reg byte x 39.83333333333334 +(byte) main::idx#12 reg byte x 47.400000000000006 +(byte) main::idx#21 reg byte x 4.0 +(byte) main::idx#4 reg byte x 22.0 +(byte) main::idx#6 reg byte x 22.0 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] -zp ZP_WORD:2 [ main::i1#2 main::i1#1 ] -reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +reg byte x [ main::idx#10 main::idx#4 ] +reg byte y [ main::i#5 main::i#1 ] +reg byte x [ main::idx#12 main::idx#6 main::idx#21 ] +zp ZP_WORD:2 [ main::i1#5 main::i1#1 ] diff --git a/src/test/ref/condition-integer-1.asm b/src/test/ref/condition-integer-1.asm index 7e6ce3b29..85f7f52ea 100644 --- a/src/test/ref/condition-integer-1.asm +++ b/src/test/ref/condition-integer-1.asm @@ -10,36 +10,26 @@ main: { sta SCREEN lda #' ' sta SCREEN+1 - ldy #2 - ldx #0 - // loop byte - b3: - cpx #0 - bne b4 + ldx #2 + ldy #0 + b5: lda #'0' - sta SCREEN,y - iny - b4: + sta SCREEN,x inx - cpx #3 + b4: + iny + cpy #3 bne b3 lda #' ' - sta SCREEN,y - iny + sta SCREEN,x + inx lda #<0 sta i1 sta i1+1 - // loop word - b7: - lda i1+1 - cmp #>0 - bne b8 - lda i1 - cmp #<0 - bne b8 + b9: lda #'0' - sta SCREEN,y - iny + sta SCREEN,x + inx b8: inc i1 bne !+ @@ -52,4 +42,18 @@ main: { cmp #<3 bne b7 rts + // loop word + b7: + lda i1+1 + cmp #>0 + bne b8 + lda i1 + cmp #<0 + bne b8 + jmp b9 + // loop byte + b3: + cpy #0 + bne b4 + jmp b5 } diff --git a/src/test/ref/condition-integer-1.cfg b/src/test/ref/condition-integer-1.cfg index c5cd311fd..4db739498 100644 --- a/src/test/ref/condition-integer-1.cfg +++ b/src/test/ref/condition-integer-1.cfg @@ -15,39 +15,39 @@ main::@2: scope:[main] from main to:main::@1 main::@1: scope:[main] from main::@2 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' - to:main::@3 -main::@3: scope:[main] from main::@1 main::@4 - [7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 ) - [7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 ) - [8] if((byte) 0!=(byte) main::i#2) goto main::@4 to:main::@5 -main::@5: scope:[main] from main::@3 - [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' - [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 +main::@5: scope:[main] from main::@1 main::@3 + [7] (byte) main::idx#18 ← phi( main::@3/(byte) main::idx#4 main::@1/(byte) 2 ) + [7] (byte) main::i#6 ← phi( main::@3/(byte) main::i#1 main::@1/(byte) 0 ) + [8] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' + [9] (byte) main::idx#4 ← ++ (byte) main::idx#18 to:main::@4 main::@4: scope:[main] from main::@3 main::@5 - [11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 ) - [12] (byte) main::i#1 ← ++ (byte) main::i#2 - [13] if((byte) main::i#1!=(byte) 3) goto main::@3 + [10] (byte) main::i#5 ← phi( main::@3/(byte) main::i#1 main::@5/(byte) main::i#6 ) + [11] (byte) main::i#1 ← ++ (byte) main::i#5 + [12] if((byte) main::i#1!=(byte) 3) goto main::@3 to:main::@6 main::@6: scope:[main] from main::@4 - [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' - [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 - to:main::@7 -main::@7: scope:[main] from main::@6 main::@8 - [16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 ) - [16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 ) - [17] if((byte) 0!=(word) main::i1#2) goto main::@8 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#4) ← (byte) ' ' + [14] (byte) main::idx#21 ← ++ (byte) main::idx#4 to:main::@9 -main::@9: scope:[main] from main::@7 - [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' - [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 +main::@9: scope:[main] from main::@6 main::@7 + [15] (byte) main::idx#20 ← phi( main::@7/(byte) main::idx#6 main::@6/(byte) main::idx#21 ) + [15] (word) main::i1#6 ← phi( main::@7/(word) main::i1#1 main::@6/(word) 0 ) + [16] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' + [17] (byte) main::idx#6 ← ++ (byte) main::idx#20 to:main::@8 main::@8: scope:[main] from main::@7 main::@9 - [20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 ) - [21] (word) main::i1#1 ← ++ (word) main::i1#2 - [22] if((word) main::i1#1!=(byte) 3) goto main::@7 + [18] (word) main::i1#5 ← phi( main::@9/(word) main::i1#6 main::@7/(word) main::i1#1 ) + [19] (word) main::i1#1 ← ++ (word) main::i1#5 + [20] if((word) main::i1#1!=(byte) 3) goto main::@7 to:main::@return main::@return: scope:[main] from main::@8 - [23] return + [21] return to:@return +main::@7: scope:[main] from main::@8 + [22] if((byte) 0!=(word) main::i1#1) goto main::@8 + to:main::@9 +main::@3: scope:[main] from main::@4 + [23] if((byte) 0!=(byte) main::i#1) goto main::@4 + to:main::@5 diff --git a/src/test/ref/condition-integer-1.log b/src/test/ref/condition-integer-1.log index fdd1f94dc..857afd720 100644 --- a/src/test/ref/condition-integer-1.log +++ b/src/test/ref/condition-integer-1.log @@ -214,6 +214,268 @@ Eliminating variable (byte) main::idx#3 from unused block main::@4 Removing PHI-reference to removed block (main::@4) in block main::@2 Removing unused block main::@4 Successful SSA optimization Pass2EliminateUnusedBlocks +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@3 +main::@1: scope:[main] from main::@3 + [0] (byte) main::idx#13 ← phi( main::@3/(byte) main::idx#1 ) + to:main::@2 +main::@3: scope:[main] from main + [1] *((const byte*) SCREEN#0) ← (byte) '0' + [2] (byte) main::idx#1 ← ++ (const byte) main::idx#0 + to:main::@1 +main::@2: scope:[main] from main::@1 + [3] (byte) main::idx#8 ← phi( main::@1/(byte) main::idx#13 ) + [4] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [5] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5 +main::@5: scope:[main] from main::@2 main::@6 + [6] (byte) main::idx#10 ← phi( main::@2/(byte) main::idx#2 main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@2/(const byte) main::i#0 main::@6/(byte) main::i#1 ) + [7] if((byte) 0!=(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@7 + [8] (byte) main::i#5 ← phi( ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 + [11] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#10 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0!=(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#2 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::idx#10) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@3 +main::@1: scope:[main] from main::@3 + [0] (byte) main::idx#13 ← phi( main::@3/(byte) main::idx#1 ) + to:main::@2 +main::@3: scope:[main] from main + [1] *((const byte*) SCREEN#0) ← (byte) '0' + [2] (byte) main::idx#1 ← ++ (const byte) main::idx#0 + to:main::@1 +main::@2: scope:[main] from main::@1 + [3] (byte) main::idx#8 ← phi( main::@1/(byte) main::idx#13 ) + [4] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [5] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5 +main::@5: scope:[main] from main::@2 main::@6 + [6] (byte) main::idx#10 ← phi( main::@2/(byte) main::idx#2 main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@2/(const byte) main::i#0 main::@6/(byte) main::i#1 ) + [7] if((byte) 0!=(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@7 + [8] (byte) main::i#5 ← phi( main::@5/(byte) main::i#2 main::@7/(byte) main::i#6 ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 + (byte) main::idx#18 ← phi( ) + (byte) main::i#6 ← phi( main::@5/(byte) main::i#2 ) + [11] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#18 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0!=(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#2 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for main::i1#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@3 +main::@1: scope:[main] from main::@3 + [0] (byte) main::idx#13 ← phi( main::@3/(byte) main::idx#1 ) + to:main::@2 +main::@3: scope:[main] from main + [1] *((const byte*) SCREEN#0) ← (byte) '0' + [2] (byte) main::idx#1 ← ++ (const byte) main::idx#0 + to:main::@1 +main::@2: scope:[main] from main::@1 + [3] (byte) main::idx#8 ← phi( main::@1/(byte) main::idx#13 ) + [4] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [5] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5_1 +main::@5: scope:[main] from main::@6 + [6] (byte) main::idx#10 ← phi( main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@6/(byte) main::i#1 ) + [7] if((byte) 0!=(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@5_1 main::@7 + [8] (byte) main::i#5 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 main::@7/(byte) main::i#6 ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 main::@5_1 + (byte) main::idx#18 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 ) + (byte) main::i#6 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 ) + [11] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#18 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0!=(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (word) main::i1#5 ← phi( ) + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#5 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + [20] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#12 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@5_1: scope:[main] from main::@2 + (byte) main::idx#19 ← phi( main::@2/(byte) main::idx#2 ) + (byte) main::i#7 ← phi( main::@2/(const byte) main::i#0 ) + if((byte) 0!=(byte) main::i#7) goto main::@6 + to:main::@7 + +GRAPH (NEW VERSIONS for main::idx#12) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@3 +main::@1: scope:[main] from main::@3 + [0] (byte) main::idx#13 ← phi( main::@3/(byte) main::idx#1 ) + to:main::@2 +main::@3: scope:[main] from main + [1] *((const byte*) SCREEN#0) ← (byte) '0' + [2] (byte) main::idx#1 ← ++ (const byte) main::idx#0 + to:main::@1 +main::@2: scope:[main] from main::@1 + [3] (byte) main::idx#8 ← phi( main::@1/(byte) main::idx#13 ) + [4] *((const byte*) SCREEN#0 + (byte) main::idx#8) ← (byte) ' ' + [5] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@5_1 +main::@5: scope:[main] from main::@6 + [6] (byte) main::idx#10 ← phi( main::@6/(byte) main::idx#11 ) + [6] (byte) main::i#2 ← phi( main::@6/(byte) main::i#1 ) + [7] if((byte) 0!=(byte) main::i#2) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 main::@5_1 main::@7 + [8] (byte) main::i#5 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 main::@7/(byte) main::i#6 ) + [8] (byte) main::idx#11 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 main::@7/(byte) main::idx#4 ) + [9] (byte) main::i#1 ← ++ (byte) main::i#5 + [10] if((byte) main::i#1!=(number) 3) goto main::@5 + to:main::@8 +main::@7: scope:[main] from main::@5 main::@5_1 + (byte) main::idx#18 ← phi( main::@5/(byte) main::idx#10 main::@5_1/(byte) main::idx#19 ) + (byte) main::i#6 ← phi( main::@5/(byte) main::i#2 main::@5_1/(byte) main::i#7 ) + [11] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' + [12] (byte) main::idx#4 ← ++ (byte) main::idx#18 + to:main::@6 +main::@8: scope:[main] from main::@6 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' + [14] (byte) main::idx#5 ← ++ (byte) main::idx#11 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + [15] (byte) main::idx#12 ← phi( main::@10/(byte) main::idx#17 main::@8/(byte) main::idx#5 ) + [15] (word) main::i1#2 ← phi( main::@10/(word) main::i1#1 main::@8/(const word) main::i1#0 ) + [16] if((byte) 0!=(word) main::i1#2) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@11 main::@9 + [17] (word) main::i1#5 ← phi( main::@11/(word) main::i1#6 main::@9/(word) main::i1#2 ) + [17] (byte) main::idx#17 ← phi( main::@11/(byte) main::idx#6 main::@9/(byte) main::idx#12 ) + [18] (word) main::i1#1 ← ++ (word) main::i1#5 + [19] if((word) main::i1#1!=(number) 3) goto main::@9 + to:main::@return +main::@11: scope:[main] from main::@9 + (byte) main::idx#20 ← phi( ) + (word) main::i1#6 ← phi( main::@9/(word) main::i1#2 ) + [20] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' + [21] (byte) main::idx#6 ← ++ (byte) main::idx#20 + to:main::@10 +main::@return: scope:[main] from main::@10 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@5_1: scope:[main] from main::@2 + (byte) main::idx#19 ← phi( main::@2/(byte) main::idx#2 ) + (byte) main::i#7 ← phi( main::@2/(const byte) main::i#0 ) + if((byte) 0!=(byte) main::i#7) goto main::@6 + to:main::@7 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@5 Adding number conversion cast (unumber) 3 in if((word) main::i1#1!=(number) 3) goto main::@9 Successful SSA optimization PassNAddNumberTypeConversions @@ -224,25 +486,44 @@ Finalized unsigned number type (byte) 3 Finalized unsigned number type (byte) 3 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte) main::idx#1 = (byte) main::idx#13 (byte) main::idx#8 +Alias (byte) main::i#1 = (byte) main::i#2 +Alias (byte) main::idx#10 = (byte) main::idx#11 +Alias (word) main::i1#1 = (word) main::i1#2 +Alias (byte) main::idx#12 = (byte) main::idx#17 +Alias (byte) main::idx#19 = (byte) main::idx#2 +Alias (byte) main::idx#21 = (byte) main::idx#5 Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#7 (const byte) main::i#0 +Identical Phi Values (word) main::i1#7 (const word) main::i1#0 +Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [2] (byte) main::idx#1 ← ++ (const byte) main::idx#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::idx#1 = ++main::idx#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [2] (byte) main::idx#2 ← ++ (const byte) main::idx#1 +Removing PHI-reference to removed block (main::@5_1) in block main::@6 +Removing PHI-reference to removed block (main::@5_1) in block main::@6 +if() condition always false - eliminating [27] if((byte) 0!=(const byte) main::i#0) goto main::@6 +Removing PHI-reference to removed block (main::@9_1) in block main::@10 +Removing PHI-reference to removed block (main::@9_1) in block main::@10 +if() condition always false - eliminating [29] if((byte) 0!=(const word) main::i1#0) goto main::@10 +Successful SSA optimization Pass2ConstantIfs +Identical Phi Values (byte) main::idx#10 (byte) main::idx#4 +Identical Phi Values (byte) main::idx#12 (byte) main::idx#6 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [2] (byte) main::idx#19 ← ++ (const byte) main::idx#1 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::idx#2 = ++main::idx#1 +Constant (const byte) main::idx#19 = ++main::idx#1 Successful SSA optimization Pass2ConstantIdentification Inlining constant with var siblings (const byte) main::idx#0 Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const word) main::i1#0 Inlining constant with var siblings (const byte) main::idx#1 -Inlining constant with var siblings (const byte) main::idx#2 +Inlining constant with var siblings (const byte) main::idx#19 Constant inlined main::i#0 = (byte) 0 Constant inlined main::i1#0 = (word) 0 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#19 = ++++(byte) 0 Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in *(SCREEN#0+++0) Successful SSA optimization Pass2ConstantAdditionElimination @@ -251,36 +532,39 @@ Simplifying constant integer increment ++0 Successful SSA optimization Pass2ConstantSimplification Simplifying constant integer increment ++1 Successful SSA optimization Pass2ConstantSimplification -Added new block during phi lifting main::@13(between main::@6 and main::@5) -Added new block during phi lifting main::@14(between main::@5 and main::@6) -Added new block during phi lifting main::@15(between main::@10 and main::@9) -Added new block during phi lifting main::@16(between main::@9 and main::@10) +Added new block during phi lifting main::@13(between main::@5 and main::@6) +Added new block during phi lifting main::@14(between main::@5 and main::@7) +Added new block during phi lifting main::@15(between main::@9 and main::@10) +Added new block during phi lifting main::@16(between main::@9 and main::@11) 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 Adding NOP phi() at start of main Adding NOP phi() at start of main::@1 +Adding NOP phi() at start of main::@5_1 CALL GRAPH Calls in [] to main:2 Created 6 initial phi equivalence classes -Coalesced [13] main::idx#20 ← main::idx#4 -Coalesced [19] main::idx#22 ← main::idx#5 -Coalesced [24] main::idx#23 ← main::idx#6 -Coalesced [29] main::i1#5 ← main::i1#1 -Coalesced [30] main::idx#21 ← main::idx#17 -Coalesced (already) [31] main::idx#24 ← main::idx#12 -Coalesced [32] main::i#5 ← main::i#1 -Coalesced [33] main::idx#18 ← main::idx#11 -Coalesced (already) [34] main::idx#19 ← main::idx#10 +Coalesced [13] main::i#9 ← main::i#6 +Coalesced [19] main::idx#24 ← main::idx#21 +Coalesced [23] main::i1#8 ← main::i1#6 +Coalesced [29] main::i1#10 ← main::i1#1 +Coalesced [30] main::idx#23 ← main::idx#6 +Coalesced (already) [31] main::i1#9 ← main::i1#1 +Coalesced [33] main::i#10 ← main::i#1 +Coalesced [34] main::idx#22 ← main::idx#4 +Coalesced (already) [35] main::i#8 ← main::i#1 Coalesced down to 4 phi equivalence classes Culled Empty Block (label) @2 Culled Empty Block (label) main::@1 -Culled Empty Block (label) main::@15 +Culled Empty Block (label) main::@5_1 +Culled Empty Block (label) main::@9_1 Culled Empty Block (label) main::@16 -Culled Empty Block (label) main::@13 +Culled Empty Block (label) main::@15 Culled Empty Block (label) main::@14 +Culled Empty Block (label) main::@13 Renumbering block main::@2 to main::@1 Renumbering block main::@3 to main::@2 Renumbering block main::@5 to main::@3 @@ -313,76 +597,76 @@ main::@2: scope:[main] from main to:main::@1 main::@1: scope:[main] from main::@2 [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' - to:main::@3 -main::@3: scope:[main] from main::@1 main::@4 - [7] (byte) main::idx#10 ← phi( main::@1/(byte) 2 main::@4/(byte) main::idx#11 ) - [7] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@4/(byte) main::i#1 ) - [8] if((byte) 0!=(byte) main::i#2) goto main::@4 to:main::@5 -main::@5: scope:[main] from main::@3 - [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' - [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 +main::@5: scope:[main] from main::@1 main::@3 + [7] (byte) main::idx#18 ← phi( main::@3/(byte) main::idx#4 main::@1/(byte) 2 ) + [7] (byte) main::i#6 ← phi( main::@3/(byte) main::i#1 main::@1/(byte) 0 ) + [8] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' + [9] (byte) main::idx#4 ← ++ (byte) main::idx#18 to:main::@4 main::@4: scope:[main] from main::@3 main::@5 - [11] (byte) main::idx#11 ← phi( main::@3/(byte) main::idx#10 main::@5/(byte) main::idx#4 ) - [12] (byte) main::i#1 ← ++ (byte) main::i#2 - [13] if((byte) main::i#1!=(byte) 3) goto main::@3 + [10] (byte) main::i#5 ← phi( main::@3/(byte) main::i#1 main::@5/(byte) main::i#6 ) + [11] (byte) main::i#1 ← ++ (byte) main::i#5 + [12] if((byte) main::i#1!=(byte) 3) goto main::@3 to:main::@6 main::@6: scope:[main] from main::@4 - [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' - [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 - to:main::@7 -main::@7: scope:[main] from main::@6 main::@8 - [16] (byte) main::idx#12 ← phi( main::@8/(byte) main::idx#17 main::@6/(byte) main::idx#5 ) - [16] (word) main::i1#2 ← phi( main::@8/(word) main::i1#1 main::@6/(word) 0 ) - [17] if((byte) 0!=(word) main::i1#2) goto main::@8 + [13] *((const byte*) SCREEN#0 + (byte) main::idx#4) ← (byte) ' ' + [14] (byte) main::idx#21 ← ++ (byte) main::idx#4 to:main::@9 -main::@9: scope:[main] from main::@7 - [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' - [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 +main::@9: scope:[main] from main::@6 main::@7 + [15] (byte) main::idx#20 ← phi( main::@7/(byte) main::idx#6 main::@6/(byte) main::idx#21 ) + [15] (word) main::i1#6 ← phi( main::@7/(word) main::i1#1 main::@6/(word) 0 ) + [16] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' + [17] (byte) main::idx#6 ← ++ (byte) main::idx#20 to:main::@8 main::@8: scope:[main] from main::@7 main::@9 - [20] (byte) main::idx#17 ← phi( main::@9/(byte) main::idx#6 main::@7/(byte) main::idx#12 ) - [21] (word) main::i1#1 ← ++ (word) main::i1#2 - [22] if((word) main::i1#1!=(byte) 3) goto main::@7 + [18] (word) main::i1#5 ← phi( main::@9/(word) main::i1#6 main::@7/(word) main::i1#1 ) + [19] (word) main::i1#1 ← ++ (word) main::i1#5 + [20] if((word) main::i1#1!=(byte) 3) goto main::@7 to:main::@return main::@return: scope:[main] from main::@8 - [23] return + [21] return to:@return +main::@7: scope:[main] from main::@8 + [22] if((byte) 0!=(word) main::i1#1) goto main::@8 + to:main::@9 +main::@3: scope:[main] from main::@4 + [23] if((byte) 0!=(byte) main::i#1) goto main::@4 + to:main::@5 VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#2 6.6000000000000005 +(byte) main::i#1 168.33333333333331 +(byte) main::i#5 213.0 +(byte) main::i#6 37.33333333333333 (word) main::i1 -(word) main::i1#1 16.5 -(word) main::i1#2 6.6000000000000005 +(word) main::i1#1 168.33333333333331 +(word) main::i1#5 213.0 +(word) main::i1#6 37.33333333333333 (byte) main::idx -(byte) main::idx#10 14.666666666666666 -(byte) main::idx#11 9.25 -(byte) main::idx#12 15.333333333333332 -(byte) main::idx#17 11.0 -(byte) main::idx#4 22.0 -(byte) main::idx#5 4.0 -(byte) main::idx#6 22.0 +(byte) main::idx#18 61.5 +(byte) main::idx#20 62.5 +(byte) main::idx#21 4.0 +(byte) main::idx#4 19.33333333333333 +(byte) main::idx#6 22.4 Initial phi equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#10 main::idx#11 main::idx#4 ] -[ main::i1#2 main::i1#1 ] -[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +[ main::idx#18 main::idx#4 ] +[ main::i#5 main::i#6 main::i#1 ] +[ main::idx#20 main::idx#6 main::idx#21 ] +[ main::i1#5 main::i1#6 main::i1#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#10 main::idx#11 main::idx#4 ] -[ main::i1#2 main::i1#1 ] -[ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] -Allocated zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] -Allocated zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +[ main::idx#18 main::idx#4 ] +[ main::i#5 main::i#6 main::i#1 ] +[ main::idx#20 main::idx#6 main::idx#21 ] +[ main::i1#5 main::i1#6 main::i1#1 ] +Allocated zp ZP_BYTE:2 [ main::idx#18 main::idx#4 ] +Allocated zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] +Allocated zp ZP_BYTE:4 [ main::idx#20 main::idx#6 main::idx#21 ] +Allocated zp ZP_WORD:5 [ main::i1#5 main::i1#6 main::i1#1 ] INITIAL ASM Target platform is c64basic @@ -413,13 +697,12 @@ bend_from_b1: bend: // main main: { - .label i = 2 - .label idx = 3 - .label idx_5 = 6 - .label i1 = 4 - .label idx_6 = 6 - .label idx_12 = 6 - .label idx_17 = 6 + .label i = 3 + .label idx = 2 + .label i1 = 5 + .label idx_6 = 4 + .label idx_20 = 4 + .label idx_21 = 4 jmp b2 // main::@2 b2: @@ -432,150 +715,148 @@ main: { // [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta SCREEN+1 - // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 + // [7] phi from main::@1 to main::@5 [phi:main::@1->main::@5] + b5_from_b1: + // [7] phi (byte) main::idx#18 = (byte) 2 [phi:main::@1->main::@5#0] -- vbuz1=vbuc1 lda #2 sta idx - // [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuz1=vbuc1 + // [7] phi (byte) main::i#6 = (byte) 0 [phi:main::@1->main::@5#1] -- vbuz1=vbuc1 lda #0 sta i - jmp b3 - // loop byte - // [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3] - b3_from_b4: - // [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy - // [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy - jmp b3 - // main::@3 - b3: - // [8] if((byte) 0!=(byte) main::i#2) goto main::@4 -- vbuc1_neq_vbuz1_then_la1 - lda #0 - cmp i - bne b4_from_b3 jmp b5 // main::@5 b5: - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' -- pbuc1_derefidx_vbuz1=vbuc2 + // [8] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' -- pbuc1_derefidx_vbuz1=vbuc2 lda #'0' ldy idx sta SCREEN,y - // [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1 + // [9] (byte) main::idx#4 ← ++ (byte) main::idx#18 -- vbuz1=_inc_vbuz1 inc idx - // [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + // [10] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] b4_from_b3: b4_from_b5: - // [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [10] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@5->main::@4#0] -- register_copy jmp b4 // main::@4 b4: - // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + // [11] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuz1=_inc_vbuz1 inc i - // [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 + // [12] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 lda #3 cmp i - bne b3_from_b4 + bne b3 jmp b6 // main::@6 b6: - // [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + // [13] *((const byte*) SCREEN#0 + (byte) main::idx#4) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 lda #' ' ldy idx sta SCREEN,y - // [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuz1=_inc_vbuz2 + // [14] (byte) main::idx#21 ← ++ (byte) main::idx#4 -- vbuz1=_inc_vbuz2 ldy idx iny - sty idx_5 - // [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - b7_from_b6: - // [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1 + sty idx_21 + // [15] phi from main::@6 to main::@9 [phi:main::@6->main::@9] + b9_from_b6: + // [15] phi (byte) main::idx#20 = (byte) main::idx#21 [phi:main::@6->main::@9#0] -- register_copy + // [15] phi (word) main::i1#6 = (word) 0 [phi:main::@6->main::@9#1] -- vwuz1=vwuc1 lda #<0 sta i1 lda #>0 sta i1+1 - jmp b7 + jmp b9 + // main::@9 + b9: + // [16] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #'0' + ldy idx_20 + sta SCREEN,y + // [17] (byte) main::idx#6 ← ++ (byte) main::idx#20 -- vbuz1=_inc_vbuz1 + inc idx_6 + // [18] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] + b8_from_b7: + b8_from_b9: + // [18] phi (word) main::i1#5 = (word) main::i1#1 [phi:main::@7/main::@9->main::@8#0] -- register_copy + jmp b8 + // main::@8 + b8: + // [19] (word) main::i1#1 ← ++ (word) main::i1#5 -- vwuz1=_inc_vwuz1 + inc i1 + bne !+ + inc i1+1 + !: + // [20] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 + lda i1+1 + cmp #>3 + bne b7 + lda i1 + cmp #<3 + bne b7 + jmp breturn + // main::@return + breturn: + // [21] return + rts // loop word - // [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7] - b7_from_b8: - // [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy - jmp b7 // main::@7 b7: - // [17] if((byte) 0!=(word) main::i1#2) goto main::@8 -- vwuc1_neq_vwuz1_then_la1 + // [22] if((byte) 0!=(word) main::i1#1) goto main::@8 -- vwuc1_neq_vwuz1_then_la1 lda i1+1 cmp #>0 bne b8_from_b7 lda i1 cmp #<0 bne b8_from_b7 + // [15] phi from main::@7 to main::@9 [phi:main::@7->main::@9] + b9_from_b7: + // [15] phi (byte) main::idx#20 = (byte) main::idx#6 [phi:main::@7->main::@9#0] -- register_copy + // [15] phi (word) main::i1#6 = (word) main::i1#1 [phi:main::@7->main::@9#1] -- register_copy jmp b9 - // main::@9 - b9: - // [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' -- pbuc1_derefidx_vbuz1=vbuc2 - lda #'0' - ldy idx_12 - sta SCREEN,y - // [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuz1=_inc_vbuz1 - inc idx_6 - // [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] - b8_from_b7: - b8_from_b9: - // [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy - jmp b8 - // main::@8 - b8: - // [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1 - inc i1 - bne !+ - inc i1+1 - !: - // [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 - lda i1+1 - cmp #>3 - bne b7_from_b8 - lda i1 - cmp #<3 - bne b7_from_b8 - jmp breturn - // main::@return - breturn: - // [23] return - rts + // loop byte + // main::@3 + b3: + // [23] if((byte) 0!=(byte) main::i#1) goto main::@4 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp i + bne b4_from_b3 + // [7] phi from main::@3 to main::@5 [phi:main::@3->main::@5] + b5_from_b3: + // [7] phi (byte) main::idx#18 = (byte) main::idx#4 [phi:main::@3->main::@5#0] -- register_copy + // [7] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@3->main::@5#1] -- register_copy + jmp b5 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS Statement [5] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] -Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a -Statement [17] if((byte) 0!=(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] -Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a +Statement [8] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' [ main::i#6 main::idx#18 ] ( main:2 [ main::i#6 main::idx#18 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::idx#18 main::idx#4 ] +Statement [13] *((const byte*) SCREEN#0 + (byte) main::idx#4) ← (byte) ' ' [ main::idx#4 ] ( main:2 [ main::idx#4 ] ) always clobbers reg byte a +Statement [16] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' [ main::i1#6 main::idx#20 ] ( main:2 [ main::i1#6 main::idx#20 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::idx#20 main::idx#6 main::idx#21 ] +Statement [20] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#6 ] ( main:2 [ main::i1#1 main::idx#6 ] ) always clobbers reg byte a +Statement [22] if((byte) 0!=(word) main::i1#1) goto main::@8 [ main::i1#1 main::idx#6 ] ( main:2 [ main::i1#1 main::idx#6 ] ) always clobbers reg byte a Statement [5] *((const byte*) SCREEN#0) ← (byte) '0' [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' [ main::i#2 main::idx#10 ] ( main:2 [ main::i#2 main::idx#10 ] ) always clobbers reg byte a -Statement [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' [ main::idx#11 ] ( main:2 [ main::idx#11 ] ) always clobbers reg byte a -Statement [17] if((byte) 0!=(word) main::i1#2) goto main::@8 [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Statement [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' [ main::i1#2 main::idx#12 ] ( main:2 [ main::i1#2 main::idx#12 ] ) always clobbers reg byte a -Statement [22] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#17 ] ( main:2 [ main::i1#1 main::idx#17 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] : zp ZP_WORD:4 , -Potential registers zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , +Statement [8] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' [ main::i#6 main::idx#18 ] ( main:2 [ main::i#6 main::idx#18 ] ) always clobbers reg byte a +Statement [13] *((const byte*) SCREEN#0 + (byte) main::idx#4) ← (byte) ' ' [ main::idx#4 ] ( main:2 [ main::idx#4 ] ) always clobbers reg byte a +Statement [16] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' [ main::i1#6 main::idx#20 ] ( main:2 [ main::i1#6 main::idx#20 ] ) always clobbers reg byte a +Statement [20] if((word) main::i1#1!=(byte) 3) goto main::@7 [ main::i1#1 main::idx#6 ] ( main:2 [ main::i1#1 main::idx#6 ] ) always clobbers reg byte a +Statement [22] if((byte) 0!=(word) main::i1#1) goto main::@8 [ main::i1#1 main::idx#6 ] ( main:2 [ main::i1#1 main::idx#6 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::idx#18 main::idx#4 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:4 [ main::idx#20 main::idx#6 main::idx#21 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:5 [ main::i1#5 main::i1#6 main::i1#1 ] : zp ZP_WORD:5 , REGISTER UPLIFT SCOPES -Uplift Scope [main] 52.33: zp ZP_BYTE:6 [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] 45.92: zp ZP_BYTE:3 [ main::idx#10 main::idx#11 main::idx#4 ] 23.1: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 23.1: zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] +Uplift Scope [main] 418.67: zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] 418.67: zp ZP_WORD:5 [ main::i1#5 main::i1#6 main::i1#1 ] 88.9: zp ZP_BYTE:4 [ main::idx#20 main::idx#6 main::idx#21 ] 80.83: zp ZP_BYTE:2 [ main::idx#18 main::idx#4 ] Uplift Scope [] -Uplifting [main] best 1227 combination reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:4 [ main::i1#2 main::i1#1 ] -Uplifting [] best 1227 combination -Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ main::i1#2 main::i1#1 ] +Uplifting [main] best 7062 combination reg byte y [ main::i#5 main::i#6 main::i#1 ] zp ZP_WORD:5 [ main::i1#5 main::i1#6 main::i1#1 ] reg byte x [ main::idx#20 main::idx#6 main::idx#21 ] reg byte x [ main::idx#18 main::idx#4 ] +Uplifting [] best 7062 combination +Allocated (was zp ZP_WORD:5) zp ZP_WORD:2 [ main::i1#5 main::i1#6 main::i1#1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -618,108 +899,106 @@ main: { // [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta SCREEN+1 - // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1 - ldy #2 - // [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1 - ldx #0 - jmp b3 - // loop byte - // [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3] - b3_from_b4: - // [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy - // [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy - jmp b3 - // main::@3 - b3: - // [8] if((byte) 0!=(byte) main::i#2) goto main::@4 -- vbuc1_neq_vbuxx_then_la1 - cpx #0 - bne b4_from_b3 + // [7] phi from main::@1 to main::@5 [phi:main::@1->main::@5] + b5_from_b1: + // [7] phi (byte) main::idx#18 = (byte) 2 [phi:main::@1->main::@5#0] -- vbuxx=vbuc1 + ldx #2 + // [7] phi (byte) main::i#6 = (byte) 0 [phi:main::@1->main::@5#1] -- vbuyy=vbuc1 + ldy #0 jmp b5 // main::@5 b5: - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2 + // [8] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' -- pbuc1_derefidx_vbuxx=vbuc2 lda #'0' - sta SCREEN,y - // [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy - iny - // [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + sta SCREEN,x + // [9] (byte) main::idx#4 ← ++ (byte) main::idx#18 -- vbuxx=_inc_vbuxx + inx + // [10] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] b4_from_b3: b4_from_b5: - // [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [10] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@5->main::@4#0] -- register_copy jmp b4 // main::@4 b4: - // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #3 - bne b3_from_b4 + // [11] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuyy=_inc_vbuyy + iny + // [12] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuyy_neq_vbuc1_then_la1 + cpy #3 + bne b3 jmp b6 // main::@6 b6: - // [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2 + // [13] *((const byte*) SCREEN#0 + (byte) main::idx#4) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 lda #' ' - sta SCREEN,y - // [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy - iny - // [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - b7_from_b6: - // [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1 + sta SCREEN,x + // [14] (byte) main::idx#21 ← ++ (byte) main::idx#4 -- vbuxx=_inc_vbuxx + inx + // [15] phi from main::@6 to main::@9 [phi:main::@6->main::@9] + b9_from_b6: + // [15] phi (byte) main::idx#20 = (byte) main::idx#21 [phi:main::@6->main::@9#0] -- register_copy + // [15] phi (word) main::i1#6 = (word) 0 [phi:main::@6->main::@9#1] -- vwuz1=vwuc1 lda #<0 sta i1 lda #>0 sta i1+1 - jmp b7 + jmp b9 + // main::@9 + b9: + // [16] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'0' + sta SCREEN,x + // [17] (byte) main::idx#6 ← ++ (byte) main::idx#20 -- vbuxx=_inc_vbuxx + inx + // [18] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] + b8_from_b7: + b8_from_b9: + // [18] phi (word) main::i1#5 = (word) main::i1#1 [phi:main::@7/main::@9->main::@8#0] -- register_copy + jmp b8 + // main::@8 + b8: + // [19] (word) main::i1#1 ← ++ (word) main::i1#5 -- vwuz1=_inc_vwuz1 + inc i1 + bne !+ + inc i1+1 + !: + // [20] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 + lda i1+1 + cmp #>3 + bne b7 + lda i1 + cmp #<3 + bne b7 + jmp breturn + // main::@return + breturn: + // [21] return + rts // loop word - // [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7] - b7_from_b8: - // [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy - jmp b7 // main::@7 b7: - // [17] if((byte) 0!=(word) main::i1#2) goto main::@8 -- vwuc1_neq_vwuz1_then_la1 + // [22] if((byte) 0!=(word) main::i1#1) goto main::@8 -- vwuc1_neq_vwuz1_then_la1 lda i1+1 cmp #>0 bne b8_from_b7 lda i1 cmp #<0 bne b8_from_b7 + // [15] phi from main::@7 to main::@9 [phi:main::@7->main::@9] + b9_from_b7: + // [15] phi (byte) main::idx#20 = (byte) main::idx#6 [phi:main::@7->main::@9#0] -- register_copy + // [15] phi (word) main::i1#6 = (word) main::i1#1 [phi:main::@7->main::@9#1] -- register_copy jmp b9 - // main::@9 - b9: - // [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2 - lda #'0' - sta SCREEN,y - // [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy - iny - // [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] - b8_from_b7: - b8_from_b9: - // [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy - jmp b8 - // main::@8 - b8: - // [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1 - inc i1 - bne !+ - inc i1+1 - !: - // [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 - lda i1+1 - cmp #>3 - bne b7_from_b8 - lda i1 - cmp #<3 - bne b7_from_b8 - jmp breturn - // main::@return - breturn: - // [23] return - rts + // loop byte + // main::@3 + b3: + // [23] if((byte) 0!=(byte) main::i#1) goto main::@4 -- vbuc1_neq_vbuyy_then_la1 + cpy #0 + bne b4_from_b3 + // [7] phi from main::@3 to main::@5 [phi:main::@3->main::@5] + b5_from_b3: + // [7] phi (byte) main::idx#18 = (byte) main::idx#4 [phi:main::@3->main::@5#0] -- register_copy + // [7] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@3->main::@5#1] -- register_copy + jmp b5 } // File Data @@ -728,50 +1007,40 @@ Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp b2 Removing instruction jmp b1 -Removing instruction jmp b3 Removing instruction jmp b5 Removing instruction jmp b4 Removing instruction jmp b6 -Removing instruction jmp b7 Removing instruction jmp b9 Removing instruction jmp b8 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #>0 Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b8_from_b7 with b8 +Replacing label b8_from_b7 with b8 Replacing label b4_from_b3 with b4 -Replacing label b3_from_b4 with b3 -Replacing label b8_from_b7 with b8 -Replacing label b8_from_b7 with b8 -Replacing label b7_from_b8 with b7 -Replacing label b7_from_b8 with b7 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b3_from_b4: Removing instruction b4_from_b3: Removing instruction b4_from_b5: -Removing instruction b7_from_b8: Removing instruction b8_from_b7: Removing instruction b8_from_b9: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction b2: Removing instruction b1: -Removing instruction b3_from_b1: -Removing instruction b5: +Removing instruction b5_from_b1: Removing instruction b6: -Removing instruction b7_from_b6: -Removing instruction b9: +Removing instruction b9_from_b6: Removing instruction breturn: +Removing instruction b9_from_b7: +Removing instruction b5_from_b3: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b3 -Removing instruction jmp b7 -Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -793,28 +1062,28 @@ FINAL SYMBOL TABLE (label) main::@9 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 6.6000000000000005 +(byte) main::i#1 reg byte y 168.33333333333331 +(byte) main::i#5 reg byte y 213.0 +(byte) main::i#6 reg byte y 37.33333333333333 (word) main::i1 -(word) main::i1#1 i1 zp ZP_WORD:2 16.5 -(word) main::i1#2 i1 zp ZP_WORD:2 6.6000000000000005 +(word) main::i1#1 i1 zp ZP_WORD:2 168.33333333333331 +(word) main::i1#5 i1 zp ZP_WORD:2 213.0 +(word) main::i1#6 i1 zp ZP_WORD:2 37.33333333333333 (byte) main::idx -(byte) main::idx#10 reg byte y 14.666666666666666 -(byte) main::idx#11 reg byte y 9.25 -(byte) main::idx#12 reg byte y 15.333333333333332 -(byte) main::idx#17 reg byte y 11.0 -(byte) main::idx#4 reg byte y 22.0 -(byte) main::idx#5 reg byte y 4.0 -(byte) main::idx#6 reg byte y 22.0 +(byte) main::idx#18 reg byte x 61.5 +(byte) main::idx#20 reg byte x 62.5 +(byte) main::idx#21 reg byte x 4.0 +(byte) main::idx#4 reg byte x 19.33333333333333 +(byte) main::idx#6 reg byte x 22.4 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] -zp ZP_WORD:2 [ main::i1#2 main::i1#1 ] -reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +reg byte x [ main::idx#18 main::idx#4 ] +reg byte y [ main::i#5 main::i#6 main::i#1 ] +reg byte x [ main::idx#20 main::idx#6 main::idx#21 ] +zp ZP_WORD:2 [ main::i1#5 main::i1#6 main::i1#1 ] FINAL ASSEMBLER -Score: 862 +Score: 5737 // File Comments // Tests using integer conditions in if() @@ -845,86 +1114,64 @@ main: { // [6] *((const byte*) SCREEN#0+(byte) 1) ← (byte) ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta SCREEN+1 - // [7] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - // [7] phi (byte) main::idx#10 = (byte) 2 [phi:main::@1->main::@3#0] -- vbuyy=vbuc1 - ldy #2 - // [7] phi (byte) main::i#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuxx=vbuc1 - ldx #0 - // loop byte - // [7] phi from main::@4 to main::@3 [phi:main::@4->main::@3] - // [7] phi (byte) main::idx#10 = (byte) main::idx#11 [phi:main::@4->main::@3#0] -- register_copy - // [7] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#1] -- register_copy - // main::@3 - b3: - // if(!i) - // [8] if((byte) 0!=(byte) main::i#2) goto main::@4 -- vbuc1_neq_vbuxx_then_la1 - cpx #0 - bne b4 + // [7] phi from main::@1 to main::@5 [phi:main::@1->main::@5] + // [7] phi (byte) main::idx#18 = (byte) 2 [phi:main::@1->main::@5#0] -- vbuxx=vbuc1 + ldx #2 + // [7] phi (byte) main::i#6 = (byte) 0 [phi:main::@1->main::@5#1] -- vbuyy=vbuc1 + ldy #0 // main::@5 + b5: // SCREEN[idx++] = '0' - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#10) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2 + // [8] *((const byte*) SCREEN#0 + (byte) main::idx#18) ← (byte) '0' -- pbuc1_derefidx_vbuxx=vbuc2 lda #'0' - sta SCREEN,y + sta SCREEN,x // SCREEN[idx++] = '0'; - // [10] (byte) main::idx#4 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy - iny - // [11] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] - // [11] phi (byte) main::idx#11 = (byte) main::idx#10 [phi:main::@3/main::@5->main::@4#0] -- register_copy + // [9] (byte) main::idx#4 ← ++ (byte) main::idx#18 -- vbuxx=_inc_vbuxx + inx + // [10] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + // [10] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@5->main::@4#0] -- register_copy // main::@4 b4: // for( byte i:0..2) - // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [13] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #3 + // [11] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuyy=_inc_vbuyy + iny + // [12] if((byte) main::i#1!=(byte) 3) goto main::@3 -- vbuyy_neq_vbuc1_then_la1 + cpy #3 bne b3 // main::@6 // SCREEN[idx++] = ' ' - // [14] *((const byte*) SCREEN#0 + (byte) main::idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuyy=vbuc2 + // [13] *((const byte*) SCREEN#0 + (byte) main::idx#4) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 lda #' ' - sta SCREEN,y + sta SCREEN,x // SCREEN[idx++] = ' '; - // [15] (byte) main::idx#5 ← ++ (byte) main::idx#11 -- vbuyy=_inc_vbuyy - iny - // [16] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - // [16] phi (byte) main::idx#12 = (byte) main::idx#5 [phi:main::@6->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) 0 [phi:main::@6->main::@7#1] -- vwuz1=vwuc1 + // [14] (byte) main::idx#21 ← ++ (byte) main::idx#4 -- vbuxx=_inc_vbuxx + inx + // [15] phi from main::@6 to main::@9 [phi:main::@6->main::@9] + // [15] phi (byte) main::idx#20 = (byte) main::idx#21 [phi:main::@6->main::@9#0] -- register_copy + // [15] phi (word) main::i1#6 = (word) 0 [phi:main::@6->main::@9#1] -- vwuz1=vwuc1 lda #<0 sta i1 sta i1+1 - // loop word - // [16] phi from main::@8 to main::@7 [phi:main::@8->main::@7] - // [16] phi (byte) main::idx#12 = (byte) main::idx#17 [phi:main::@8->main::@7#0] -- register_copy - // [16] phi (word) main::i1#2 = (word) main::i1#1 [phi:main::@8->main::@7#1] -- register_copy - // main::@7 - b7: - // if(!i) - // [17] if((byte) 0!=(word) main::i1#2) goto main::@8 -- vwuc1_neq_vwuz1_then_la1 - lda i1+1 - cmp #>0 - bne b8 - lda i1 - cmp #<0 - bne b8 // main::@9 + b9: // SCREEN[idx++] = '0' - // [18] *((const byte*) SCREEN#0 + (byte) main::idx#12) ← (byte) '0' -- pbuc1_derefidx_vbuyy=vbuc2 + // [16] *((const byte*) SCREEN#0 + (byte) main::idx#20) ← (byte) '0' -- pbuc1_derefidx_vbuxx=vbuc2 lda #'0' - sta SCREEN,y + sta SCREEN,x // SCREEN[idx++] = '0'; - // [19] (byte) main::idx#6 ← ++ (byte) main::idx#12 -- vbuyy=_inc_vbuyy - iny - // [20] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] - // [20] phi (byte) main::idx#17 = (byte) main::idx#12 [phi:main::@7/main::@9->main::@8#0] -- register_copy + // [17] (byte) main::idx#6 ← ++ (byte) main::idx#20 -- vbuxx=_inc_vbuxx + inx + // [18] phi from main::@7 main::@9 to main::@8 [phi:main::@7/main::@9->main::@8] + // [18] phi (word) main::i1#5 = (word) main::i1#1 [phi:main::@7/main::@9->main::@8#0] -- register_copy // main::@8 b8: // for( word i:0..2) - // [21] (word) main::i1#1 ← ++ (word) main::i1#2 -- vwuz1=_inc_vwuz1 + // [19] (word) main::i1#1 ← ++ (word) main::i1#5 -- vwuz1=_inc_vwuz1 inc i1 bne !+ inc i1+1 !: - // [22] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 + // [20] if((word) main::i1#1!=(byte) 3) goto main::@7 -- vwuz1_neq_vwuc1_then_la1 lda i1+1 cmp #>3 bne b7 @@ -933,8 +1180,34 @@ main: { bne b7 // main::@return // } - // [23] return + // [21] return rts + // loop word + // main::@7 + b7: + // if(!i) + // [22] if((byte) 0!=(word) main::i1#1) goto main::@8 -- vwuc1_neq_vwuz1_then_la1 + lda i1+1 + cmp #>0 + bne b8 + lda i1 + cmp #<0 + bne b8 + // [15] phi from main::@7 to main::@9 [phi:main::@7->main::@9] + // [15] phi (byte) main::idx#20 = (byte) main::idx#6 [phi:main::@7->main::@9#0] -- register_copy + // [15] phi (word) main::i1#6 = (word) main::i1#1 [phi:main::@7->main::@9#1] -- register_copy + jmp b9 + // loop byte + // main::@3 + b3: + // if(!i) + // [23] if((byte) 0!=(byte) main::i#1) goto main::@4 -- vbuc1_neq_vbuyy_then_la1 + cpy #0 + bne b4 + // [7] phi from main::@3 to main::@5 [phi:main::@3->main::@5] + // [7] phi (byte) main::idx#18 = (byte) main::idx#4 [phi:main::@3->main::@5#0] -- register_copy + // [7] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@3->main::@5#1] -- register_copy + jmp b5 } // File Data diff --git a/src/test/ref/condition-integer-1.sym b/src/test/ref/condition-integer-1.sym index 1dd505468..5cfcf12d8 100644 --- a/src/test/ref/condition-integer-1.sym +++ b/src/test/ref/condition-integer-1.sym @@ -15,21 +15,21 @@ (label) main::@9 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 6.6000000000000005 +(byte) main::i#1 reg byte y 168.33333333333331 +(byte) main::i#5 reg byte y 213.0 +(byte) main::i#6 reg byte y 37.33333333333333 (word) main::i1 -(word) main::i1#1 i1 zp ZP_WORD:2 16.5 -(word) main::i1#2 i1 zp ZP_WORD:2 6.6000000000000005 +(word) main::i1#1 i1 zp ZP_WORD:2 168.33333333333331 +(word) main::i1#5 i1 zp ZP_WORD:2 213.0 +(word) main::i1#6 i1 zp ZP_WORD:2 37.33333333333333 (byte) main::idx -(byte) main::idx#10 reg byte y 14.666666666666666 -(byte) main::idx#11 reg byte y 9.25 -(byte) main::idx#12 reg byte y 15.333333333333332 -(byte) main::idx#17 reg byte y 11.0 -(byte) main::idx#4 reg byte y 22.0 -(byte) main::idx#5 reg byte y 4.0 -(byte) main::idx#6 reg byte y 22.0 +(byte) main::idx#18 reg byte x 61.5 +(byte) main::idx#20 reg byte x 62.5 +(byte) main::idx#21 reg byte x 4.0 +(byte) main::idx#4 reg byte x 19.33333333333333 +(byte) main::idx#6 reg byte x 22.4 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::idx#10 main::idx#11 main::idx#4 ] -zp ZP_WORD:2 [ main::i1#2 main::i1#1 ] -reg byte y [ main::idx#12 main::idx#17 main::idx#5 main::idx#6 ] +reg byte x [ main::idx#18 main::idx#4 ] +reg byte y [ main::i#5 main::i#6 main::i#1 ] +reg byte x [ main::idx#20 main::idx#6 main::idx#21 ] +zp ZP_WORD:2 [ main::i1#5 main::i1#6 main::i1#1 ] diff --git a/src/test/ref/condition-integer-3.asm b/src/test/ref/condition-integer-3.asm index 45b12030f..efe0aabdf 100644 --- a/src/test/ref/condition-integer-3.asm +++ b/src/test/ref/condition-integer-3.asm @@ -7,11 +7,6 @@ main: { ldx #0 ldy #-2 - b1: - cpy #0 - bne b2 - lda #'0' - jmp b3 b2: lda #'+' b3: @@ -21,4 +16,9 @@ main: { cpy #3 bne b1 rts + b1: + cpy #0 + bne b2 + lda #'0' + jmp b3 } diff --git a/src/test/ref/condition-integer-3.cfg b/src/test/ref/condition-integer-3.cfg index ccd8c8740..e846a3952 100644 --- a/src/test/ref/condition-integer-3.cfg +++ b/src/test/ref/condition-integer-3.cfg @@ -9,22 +9,23 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::idx#2 ← phi( main/(byte) 0 main::@3/(byte) main::idx#1 ) - [5] (signed byte) main::i#2 ← phi( main/(signed byte) -2 main::@3/(signed byte) main::i#1 ) - [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 - to:main::@3 -main::@2: scope:[main] from main::@1 - [7] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::idx#7 ← phi( main::@1/(byte) main::idx#1 main/(byte) 0 ) + [5] (signed byte) main::i#7 ← phi( main::@1/(signed byte) main::i#1 main/(signed byte) -2 ) to:main::@3 main::@3: scope:[main] from main::@1 main::@2 - [8] (byte) main::j#0 ← phi( main::@2/(byte) '+' main::@1/(byte) '0' ) - [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 - [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 - [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 - [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 + [6] (byte) main::idx#6 ← phi( main::@2/(byte) main::idx#7 main::@1/(byte) main::idx#1 ) + [6] (signed byte) main::i#6 ← phi( main::@2/(signed byte) main::i#7 main::@1/(signed byte) main::i#1 ) + [6] (byte) main::j#0 ← phi( main::@2/(byte) '+' main::@1/(byte) '0' ) + [7] *((const byte*) SCREEN#0 + (byte) main::idx#6) ← (byte) main::j#0 + [8] (byte) main::idx#1 ← ++ (byte) main::idx#6 + [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#6 + [10] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [13] return + [11] return to:@return +main::@1: scope:[main] from main::@3 + [12] if((signed byte) 0!=(signed byte) main::i#1) goto main::@2 + to:main::@3 diff --git a/src/test/ref/condition-integer-3.log b/src/test/ref/condition-integer-3.log index f5423b27a..e51bda1e7 100644 --- a/src/test/ref/condition-integer-3.log +++ b/src/test/ref/condition-integer-3.log @@ -114,12 +114,93 @@ Constant (const byte) main::$0 = '0' Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [14] main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value [16] if(main::i#1!=rangelast(-2,2)) goto main::@1 to (number) 3 +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [0] (byte) main::idx#2 ← phi( main/(const byte) main::idx#0 main::@4/(byte) main::idx#1 ) + [0] (signed byte) main::i#2 ← phi( main/(const signed byte) main::i#0 main::@4/(signed byte) main::i#1 ) + [1] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + to:main::@4 +main::@3: scope:[main] from main::@1 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@3 + [2] (signed byte) main::i#6 ← phi( ) + [2] (byte) main::j#0 ← phi( main::@2/(const byte) main::$1 main::@3/(const byte) main::$0 ) + [3] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 + [4] (byte) main::idx#1 ← ++ (byte) main::idx#2 + [5] (signed byte) main::i#1 ← ++ (signed byte) main::i#6 + [6] if((signed byte) main::i#1!=(number) 3) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [7] return + to:@return +@1: scope:[] from @begin + [8] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::idx#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [0] (byte) main::idx#2 ← phi( main/(const byte) main::idx#0 main::@4/(byte) main::idx#1 ) + [0] (signed byte) main::i#2 ← phi( main/(const signed byte) main::i#0 main::@4/(signed byte) main::i#1 ) + [1] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (signed byte) main::i#7 ← phi( main::@1/(signed byte) main::i#2 ) + to:main::@4 +main::@3: scope:[main] from main::@1 + (signed byte) main::i#8 ← phi( main::@1/(signed byte) main::i#2 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@3 + [2] (byte) main::idx#6 ← phi( ) + [2] (signed byte) main::i#6 ← phi( main::@2/(signed byte) main::i#7 main::@3/(signed byte) main::i#8 ) + [2] (byte) main::j#0 ← phi( main::@2/(const byte) main::$1 main::@3/(const byte) main::$0 ) + [3] *((const byte*) SCREEN#0 + (byte) main::idx#6) ← (byte) main::j#0 + [4] (byte) main::idx#1 ← ++ (byte) main::idx#6 + [5] (signed byte) main::i#1 ← ++ (signed byte) main::i#6 + [6] if((signed byte) main::i#1!=(number) 3) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [7] return + to:@return +@1: scope:[] from @begin + [8] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (snumber) 3 in if((signed byte) main::i#1!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 Successful SSA optimization PassNCastSimplification Finalized signed number type (signed byte) 3 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (signed byte) main::i#1 = (signed byte) main::i#2 +Alias (byte) main::idx#1 = (byte) main::idx#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (signed byte) main::i#9 (const signed byte) main::i#0 +Identical Phi Values (byte) main::idx#9 (const byte) main::idx#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +if() condition always true - replacing block destination [12] if((signed byte) 0!=(const signed byte) main::i#0) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Alias (signed byte) main::i#1 = (signed byte) main::i#8 +Alias (byte) main::idx#1 = (byte) main::idx#8 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::idx#0 Inlining constant with var siblings (const signed byte) main::i#0 Constant inlined main::i#0 = (signed byte) -2 @@ -127,22 +208,26 @@ Constant inlined main::idx#0 = (byte) 0 Constant inlined main::$1 = (byte) '+' Constant inlined main::$0 = (byte) '0' Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@8(between main::@4 and main::@1) +Added new block during phi lifting main::@8(between main::@1 and main::@2) 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 Adding NOP phi() at start of main -Adding NOP phi() at start of main::@3 -Adding NOP phi() at start of main::@2 +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 -Created 3 initial phi equivalence classes -Coalesced [15] main::i#6 ← main::i#1 -Coalesced [16] main::idx#6 ← main::idx#1 +Created 5 initial phi equivalence classes +Coalesced [8] main::i#11 ← main::i#7 +Coalesced [9] main::idx#11 ← main::idx#7 +Coalesced [17] main::i#12 ← main::i#1 +Coalesced [18] main::idx#12 ← main::idx#1 +Coalesced (already) [19] main::i#10 ← main::i#1 +Coalesced (already) [20] main::idx#10 ← main::idx#1 Coalesced down to 3 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@8 Renumbering block main::@4 to main::@3 @@ -150,7 +235,6 @@ Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@2 FINAL CONTROL FLOW GRAPH @begin: scope:[] from @@ -164,50 +248,53 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::idx#2 ← phi( main/(byte) 0 main::@3/(byte) main::idx#1 ) - [5] (signed byte) main::i#2 ← phi( main/(signed byte) -2 main::@3/(signed byte) main::i#1 ) - [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 - to:main::@3 -main::@2: scope:[main] from main::@1 - [7] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::idx#7 ← phi( main::@1/(byte) main::idx#1 main/(byte) 0 ) + [5] (signed byte) main::i#7 ← phi( main::@1/(signed byte) main::i#1 main/(signed byte) -2 ) to:main::@3 main::@3: scope:[main] from main::@1 main::@2 - [8] (byte) main::j#0 ← phi( main::@2/(byte) '+' main::@1/(byte) '0' ) - [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 - [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 - [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 - [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 + [6] (byte) main::idx#6 ← phi( main::@2/(byte) main::idx#7 main::@1/(byte) main::idx#1 ) + [6] (signed byte) main::i#6 ← phi( main::@2/(signed byte) main::i#7 main::@1/(signed byte) main::i#1 ) + [6] (byte) main::j#0 ← phi( main::@2/(byte) '+' main::@1/(byte) '0' ) + [7] *((const byte*) SCREEN#0 + (byte) main::idx#6) ← (byte) main::j#0 + [8] (byte) main::idx#1 ← ++ (byte) main::idx#6 + [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#6 + [10] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [13] return + [11] return to:@return +main::@1: scope:[main] from main::@3 + [12] if((signed byte) 0!=(signed byte) main::i#1) goto main::@2 + to:main::@3 VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (signed byte) main::i -(signed byte) main::i#1 16.5 -(signed byte) main::i#2 5.5 +(signed byte) main::i#1 168.33333333333331 +(signed byte) main::i#6 71.0 +(signed byte) main::i#7 112.0 (byte) main::idx -(byte) main::idx#1 7.333333333333333 -(byte) main::idx#2 6.6000000000000005 +(byte) main::idx#1 75.75 +(byte) main::idx#6 157.0 +(byte) main::idx#7 112.0 (byte) main::j -(byte) main::j#0 11.0 +(byte) main::j#0 101.0 Initial phi equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#2 main::idx#1 ] [ main::j#0 ] +[ main::i#6 main::i#7 main::i#1 ] +[ main::idx#6 main::idx#7 main::idx#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#2 main::idx#1 ] [ main::j#0 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] -Allocated zp ZP_BYTE:4 [ main::j#0 ] +[ main::i#6 main::i#7 main::i#1 ] +[ main::idx#6 main::idx#7 main::idx#1 ] +Allocated zp ZP_BYTE:2 [ main::j#0 ] +Allocated zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] +Allocated zp ZP_BYTE:4 [ main::idx#6 main::idx#7 main::idx#1 ] INITIAL ASM Target platform is c64basic @@ -238,79 +325,80 @@ bend_from_b1: bend: // main main: { - .label j = 4 - .label idx = 3 - .label i = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + .label j = 2 + .label idx = 4 + .label i = 3 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::idx#7 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 sta idx - // [5] phi (signed byte) main::i#2 = (signed byte) -2 [phi:main->main::@1#1] -- vbsz1=vbsc1 + // [5] phi (signed byte) main::i#7 = (signed byte) -2 [phi:main->main::@2#1] -- vbsz1=vbsc1 lda #-2 sta i - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@3->main::@1#0] -- register_copy - // [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 -- vbsc1_neq_vbsz1_then_la1 - lda #0 - cmp i - bne b2_from_b1 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [8] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 - lda #'0' - sta j - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: + // [5] phi (byte) main::idx#7 = (byte) main::idx#1 [phi:main::@1->main::@2#0] -- register_copy + // [5] phi (signed byte) main::i#7 = (signed byte) main::i#1 [phi:main::@1->main::@2#1] -- register_copy jmp b2 // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: - // [8] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#0] -- vbuz1=vbuc1 + // [6] phi (byte) main::idx#6 = (byte) main::idx#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (signed byte) main::i#6 = (signed byte) main::i#7 [phi:main::@2->main::@3#1] -- register_copy + // [6] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#2] -- vbuz1=vbuc1 lda #'+' sta j jmp b3 // main::@3 b3: - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [7] *((const byte*) SCREEN#0 + (byte) main::idx#6) ← (byte) main::j#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda j ldy idx sta SCREEN,y - // [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuz1=_inc_vbuz1 + // [8] (byte) main::idx#1 ← ++ (byte) main::idx#6 -- vbuz1=_inc_vbuz1 inc idx - // [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsz1=_inc_vbsz1 + // [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#6 -- vbsz1=_inc_vbsz1 inc i - // [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 + // [10] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 lda #3 cmp i - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [13] return + // [11] return rts + // main::@1 + b1: + // [12] if((signed byte) 0!=(signed byte) main::i#1) goto main::@2 -- vbsc1_neq_vbsz1_then_la1 + lda #0 + cmp i + bne b2_from_b1 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [6] phi (byte) main::idx#6 = (byte) main::idx#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (signed byte) main::i#6 = (signed byte) main::i#1 [phi:main::@1->main::@3#1] -- register_copy + // [6] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#2] -- vbuz1=vbuc1 + lda #'0' + sta j + jmp b3 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:4 [ main::j#0 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:2 [ main::j#0 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:4 [ main::idx#6 main::idx#7 main::idx#1 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 22: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 13.93: zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] 11: zp ZP_BYTE:4 [ main::j#0 ] +Uplift Scope [main] 351.33: zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] 344.75: zp ZP_BYTE:4 [ main::idx#6 main::idx#7 main::idx#1 ] 101: zp ZP_BYTE:2 [ main::j#0 ] Uplift Scope [] -Uplifting [main] best 458 combination reg byte y [ main::i#2 main::i#1 ] reg byte x [ main::idx#2 main::idx#1 ] reg byte a [ main::j#0 ] -Uplifting [] best 458 combination +Uplifting [main] best 3218 combination reg byte y [ main::i#6 main::i#7 main::i#1 ] reg byte x [ main::idx#6 main::idx#7 main::idx#1 ] reg byte a [ main::j#0 ] +Uplifting [] best 3218 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -340,84 +428,82 @@ bend_from_b1: bend: // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::idx#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi (signed byte) main::i#2 = (signed byte) -2 [phi:main->main::@1#1] -- vbsyy=vbsc1 + // [5] phi (signed byte) main::i#7 = (signed byte) -2 [phi:main->main::@2#1] -- vbsyy=vbsc1 ldy #-2 - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@3->main::@1#0] -- register_copy - // [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 -- vbsc1_neq_vbsyy_then_la1 - cpy #0 - bne b2_from_b1 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [8] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'0' - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: + // [5] phi (byte) main::idx#7 = (byte) main::idx#1 [phi:main::@1->main::@2#0] -- register_copy + // [5] phi (signed byte) main::i#7 = (signed byte) main::i#1 [phi:main::@1->main::@2#1] -- register_copy jmp b2 // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: - // [8] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 + // [6] phi (byte) main::idx#6 = (byte) main::idx#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (signed byte) main::i#6 = (signed byte) main::i#7 [phi:main::@2->main::@3#1] -- register_copy + // [6] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#2] -- vbuaa=vbuc1 lda #'+' jmp b3 // main::@3 b3: - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 -- pbuc1_derefidx_vbuxx=vbuaa + // [7] *((const byte*) SCREEN#0 + (byte) main::idx#6) ← (byte) main::j#0 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x - // [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::idx#1 ← ++ (byte) main::idx#6 -- vbuxx=_inc_vbuxx inx - // [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsyy=_inc_vbsyy + // [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#6 -- vbsyy=_inc_vbsyy iny - // [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsyy_neq_vbsc1_then_la1 + // [10] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsyy_neq_vbsc1_then_la1 cpy #3 - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [13] return + // [11] return rts + // main::@1 + b1: + // [12] if((signed byte) 0!=(signed byte) main::i#1) goto main::@2 -- vbsc1_neq_vbsyy_then_la1 + cpy #0 + bne b2_from_b1 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [6] phi (byte) main::idx#6 = (byte) main::idx#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (signed byte) main::i#6 = (signed byte) main::i#1 [phi:main::@1->main::@3#1] -- register_copy + // [6] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#2] -- vbuaa=vbuc1 + lda #'0' + jmp b3 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing label b2_from_b1 with b2 -Replacing label b1_from_b3 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b3: Removing instruction b2_from_b1: Removing instruction b3_from_b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b3_from_b1: +Removing instruction b2_from_main: Removing instruction breturn: +Removing instruction b3_from_b1: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 +Removing instruction jmp b2 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -434,21 +520,23 @@ FINAL SYMBOL TABLE (label) main::@3 (label) main::@return (signed byte) main::i -(signed byte) main::i#1 reg byte y 16.5 -(signed byte) main::i#2 reg byte y 5.5 +(signed byte) main::i#1 reg byte y 168.33333333333331 +(signed byte) main::i#6 reg byte y 71.0 +(signed byte) main::i#7 reg byte y 112.0 (byte) main::idx -(byte) main::idx#1 reg byte x 7.333333333333333 -(byte) main::idx#2 reg byte x 6.6000000000000005 +(byte) main::idx#1 reg byte x 75.75 +(byte) main::idx#6 reg byte x 157.0 +(byte) main::idx#7 reg byte x 112.0 (byte) main::j -(byte) main::j#0 reg byte a 11.0 +(byte) main::j#0 reg byte a 101.0 -reg byte y [ main::i#2 main::i#1 ] -reg byte x [ main::idx#2 main::idx#1 ] reg byte a [ main::j#0 ] +reg byte y [ main::i#6 main::i#7 main::i#1 ] +reg byte x [ main::idx#6 main::idx#7 main::idx#1 ] FINAL ASSEMBLER -Score: 296 +Score: 2546 // File Comments // Tests using integer conditions in ternary operator @@ -468,48 +556,51 @@ Score: 296 // @end // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::idx#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi (signed byte) main::i#2 = (signed byte) -2 [phi:main->main::@1#1] -- vbsyy=vbsc1 + // [5] phi (signed byte) main::i#7 = (signed byte) -2 [phi:main->main::@2#1] -- vbsyy=vbsc1 ldy #-2 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - // [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@3->main::@1#0] -- register_copy - // [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy - // main::@1 - b1: - // i?'+':'0' - // [6] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 -- vbsc1_neq_vbsyy_then_la1 - cpy #0 - bne b2 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - // [8] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'0' - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi (byte) main::idx#7 = (byte) main::idx#1 [phi:main::@1->main::@2#0] -- register_copy + // [5] phi (signed byte) main::i#7 = (signed byte) main::i#1 [phi:main::@1->main::@2#1] -- register_copy // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - // [8] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi (byte) main::idx#6 = (byte) main::idx#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (signed byte) main::i#6 = (signed byte) main::i#7 [phi:main::@2->main::@3#1] -- register_copy + // [6] phi (byte) main::j#0 = (byte) '+' [phi:main::@2->main::@3#2] -- vbuaa=vbuc1 lda #'+' // main::@3 b3: // SCREEN[idx++] = j - // [9] *((const byte*) SCREEN#0 + (byte) main::idx#2) ← (byte) main::j#0 -- pbuc1_derefidx_vbuxx=vbuaa + // [7] *((const byte*) SCREEN#0 + (byte) main::idx#6) ← (byte) main::j#0 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x // SCREEN[idx++] = j; - // [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::idx#1 ← ++ (byte) main::idx#6 -- vbuxx=_inc_vbuxx inx // for( signed byte i: -2..2) - // [11] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsyy=_inc_vbsyy + // [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#6 -- vbsyy=_inc_vbsyy iny - // [12] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsyy_neq_vbsc1_then_la1 + // [10] if((signed byte) main::i#1!=(signed byte) 3) goto main::@1 -- vbsyy_neq_vbsc1_then_la1 cpy #3 bne b1 // main::@return // } - // [13] return + // [11] return rts + // main::@1 + b1: + // i?'+':'0' + // [12] if((signed byte) 0!=(signed byte) main::i#1) goto main::@2 -- vbsc1_neq_vbsyy_then_la1 + cpy #0 + bne b2 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [6] phi (byte) main::idx#6 = (byte) main::idx#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (signed byte) main::i#6 = (signed byte) main::i#1 [phi:main::@1->main::@3#1] -- register_copy + // [6] phi (byte) main::j#0 = (byte) '0' [phi:main::@1->main::@3#2] -- vbuaa=vbuc1 + lda #'0' + jmp b3 } // File Data diff --git a/src/test/ref/condition-integer-3.sym b/src/test/ref/condition-integer-3.sym index 40fe5248d..6539e8176 100644 --- a/src/test/ref/condition-integer-3.sym +++ b/src/test/ref/condition-integer-3.sym @@ -9,14 +9,16 @@ (label) main::@3 (label) main::@return (signed byte) main::i -(signed byte) main::i#1 reg byte y 16.5 -(signed byte) main::i#2 reg byte y 5.5 +(signed byte) main::i#1 reg byte y 168.33333333333331 +(signed byte) main::i#6 reg byte y 71.0 +(signed byte) main::i#7 reg byte y 112.0 (byte) main::idx -(byte) main::idx#1 reg byte x 7.333333333333333 -(byte) main::idx#2 reg byte x 6.6000000000000005 +(byte) main::idx#1 reg byte x 75.75 +(byte) main::idx#6 reg byte x 157.0 +(byte) main::idx#7 reg byte x 112.0 (byte) main::j -(byte) main::j#0 reg byte a 11.0 +(byte) main::j#0 reg byte a 101.0 -reg byte y [ main::i#2 main::i#1 ] -reg byte x [ main::idx#2 main::idx#1 ] reg byte a [ main::j#0 ] +reg byte y [ main::i#6 main::i#7 main::i#1 ] +reg byte x [ main::idx#6 main::idx#7 main::idx#1 ] diff --git a/src/test/ref/euclid-problem.asm b/src/test/ref/euclid-problem.asm index 3b87d9ebf..8a84b191b 100644 --- a/src/test/ref/euclid-problem.asm +++ b/src/test/ref/euclid-problem.asm @@ -9,6 +9,12 @@ main: { ldx #2 lda #$80 sta a + b4: + txa + eor #$ff + sec + adc a + sta a b1: cpx a bne b2 @@ -23,11 +29,4 @@ main: { sbc a tax jmp b1 - b4: - txa - eor #$ff - sec - adc a - sta a - jmp b1 } diff --git a/src/test/ref/euclid-problem.cfg b/src/test/ref/euclid-problem.cfg index 3a48bae1c..ed56e6868 100644 --- a/src/test/ref/euclid-problem.cfg +++ b/src/test/ref/euclid-problem.cfg @@ -9,24 +9,25 @@ [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@4 +main::@4: scope:[main] from main main::@2 + [5] (byte) main::b#10 ← phi( main::@2/(byte) main::b#11 main/(byte) 2 ) + [5] (byte) main::a#13 ← phi( main::@2/(byte) main::a#1 main/(byte) $80 ) + [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 to:main::@1 -main::@1: scope:[main] from main main::@4 main::@5 - [5] (byte) main::b#2 ← phi( main/(byte) 2 main::@4/(byte) main::b#2 main::@5/(byte) main::b#1 ) - [5] (byte) main::a#2 ← phi( main/(byte) $80 main::@4/(byte) main::a#1 main::@5/(byte) main::a#2 ) - [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 +main::@1: scope:[main] from main::@4 main::@5 + [7] (byte) main::b#11 ← phi( main::@4/(byte) main::b#10 main::@5/(byte) main::b#1 ) + [8] if((byte) main::a#1!=(byte) main::b#11) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@1 - [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 + [9] *((const byte*) SCREEN#0) ← (byte) main::a#1 to:main::@return main::@return: scope:[main] from main::@3 - [8] return + [10] return to:@return main::@2: scope:[main] from main::@1 - [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 + [11] if((byte) main::a#1>(byte) main::b#11) goto main::@4 to:main::@5 main::@5: scope:[main] from main::@2 - [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 - to:main::@1 -main::@4: scope:[main] from main::@2 - [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 + [12] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#1 to:main::@1 diff --git a/src/test/ref/euclid-problem.log b/src/test/ref/euclid-problem.log index e0dbc1627..5216b2edd 100644 --- a/src/test/ref/euclid-problem.log +++ b/src/test/ref/euclid-problem.log @@ -111,26 +111,213 @@ Constant (const byte*) SCREEN#0 = (byte*) 1024 Constant (const byte) main::a#0 = $80 Constant (const byte) main::b#0 = 2 Successful SSA optimization Pass2ConstantIdentification +GRAPH (NEW VERSIONS for main::a#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 main::@8 + [0] (byte) main::b#2 ← phi( main/(const byte) main::b#0 main::@4/(byte) main::b#2 main::@8/(byte) main::b#1 ) + [0] (byte) main::a#2 ← phi( main/(const byte) main::a#0 main::@4/(byte) main::a#1 main::@8/(byte) main::a#7 ) + [1] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::a#8 ← phi( ) + [2] if((byte) main::a#8>(byte) main::b#2) goto main::@4 + to:main::@8 +main::@3: scope:[main] from main::@1 + (byte) main::a#9 ← phi( ) + [3] *((const byte*) SCREEN#0) ← (byte) main::a#9 + to:main::@return +main::@4: scope:[main] from main::@2 + (byte) main::a#10 ← phi( ) + [4] (byte) main::a#1 ← (byte) main::a#10 - (byte) main::b#2 + to:main::@1 +main::@8: scope:[main] from main::@2 + (byte) main::a#7 ← phi( ) + [5] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#7 + to:main::@1 +main::@return: scope:[main] from main::@3 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::b#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 main::@8 + [0] (byte) main::b#2 ← phi( main/(const byte) main::b#0 main::@4/(byte) main::b#6 main::@8/(byte) main::b#1 ) + [0] (byte) main::a#2 ← phi( main/(const byte) main::a#0 main::@4/(byte) main::a#1 main::@8/(byte) main::a#7 ) + [1] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::b#7 ← phi( ) + (byte) main::a#8 ← phi( main::@1/(byte) main::a#2 ) + [2] if((byte) main::a#8>(byte) main::b#7) goto main::@4 + to:main::@8 +main::@3: scope:[main] from main::@1 + (byte) main::a#9 ← phi( main::@1/(byte) main::a#2 ) + [3] *((const byte*) SCREEN#0) ← (byte) main::a#9 + to:main::@return +main::@4: scope:[main] from main::@2 + (byte) main::b#6 ← phi( ) + (byte) main::a#10 ← phi( main::@2/(byte) main::a#8 ) + [4] (byte) main::a#1 ← (byte) main::a#10 - (byte) main::b#6 + to:main::@1 +main::@8: scope:[main] from main::@2 + (byte) main::b#8 ← phi( ) + (byte) main::a#7 ← phi( main::@2/(byte) main::a#8 ) + [5] (byte) main::b#1 ← (byte) main::b#8 - (byte) main::a#7 + to:main::@1 +main::@return: scope:[main] from main::@3 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::a#10 = (byte) main::a#8 (byte) main::a#7 +Alias (byte) main::b#6 = (byte) main::b#7 (byte) main::b#8 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::a#11 (const byte) main::a#0 +Identical Phi Values (byte) main::b#9 (const byte) main::b#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +if() condition always true - replacing block destination [13] if((const byte) main::a#0!=(const byte) main::b#0) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +GRAPH (NEW VERSIONS for main::a#10) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1_1 +main::@1: scope:[main] from main::@4 main::@8 + [0] (byte) main::b#2 ← phi( main::@4/(byte) main::b#6 main::@8/(byte) main::b#1 ) + [0] (byte) main::a#2 ← phi( main::@4/(byte) main::a#1 main::@8/(byte) main::a#12 ) + [1] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [2] (byte) main::b#6 ← phi( main::@1/(byte) main::b#2 main::@1_1/(const byte) main::b#0 ) + [2] (byte) main::a#10 ← phi( main::@1/(byte) main::a#2 main::@1_1/(const byte) main::a#0 ) + [3] if((byte) main::a#10>(byte) main::b#6) goto main::@4 + to:main::@8 +main::@3: scope:[main] from main::@1 + [4] (byte) main::a#9 ← phi( main::@1/(byte) main::a#2 ) + [5] *((const byte*) SCREEN#0) ← (byte) main::a#9 + to:main::@return +main::@4: scope:[main] from main::@2 + (byte) main::a#13 ← phi( ) + [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#6 + to:main::@1 +main::@8: scope:[main] from main::@2 + (byte) main::a#12 ← phi( ) + [7] (byte) main::b#1 ← (byte) main::b#6 - (byte) main::a#12 + to:main::@1 +main::@return: scope:[main] from main::@3 + [8] return + to:@return +@1: scope:[] from @begin + [9] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@1_1: scope:[main] from main + to:main::@2 + +GRAPH (NEW VERSIONS for main::b#6) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1_1 +main::@1: scope:[main] from main::@4 main::@8 + [0] (byte) main::b#2 ← phi( main::@4/(byte) main::b#10 main::@8/(byte) main::b#1 ) + [0] (byte) main::a#2 ← phi( main::@4/(byte) main::a#1 main::@8/(byte) main::a#12 ) + [1] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [2] (byte) main::b#6 ← phi( main::@1/(byte) main::b#2 main::@1_1/(const byte) main::b#0 ) + [2] (byte) main::a#10 ← phi( main::@1/(byte) main::a#2 main::@1_1/(const byte) main::a#0 ) + [3] if((byte) main::a#10>(byte) main::b#6) goto main::@4 + to:main::@8 +main::@3: scope:[main] from main::@1 + [4] (byte) main::a#9 ← phi( main::@1/(byte) main::a#2 ) + [5] *((const byte*) SCREEN#0) ← (byte) main::a#9 + to:main::@return +main::@4: scope:[main] from main::@2 + (byte) main::b#10 ← phi( ) + (byte) main::a#13 ← phi( main::@2/(byte) main::a#10 ) + [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 + to:main::@1 +main::@8: scope:[main] from main::@2 + (byte) main::b#11 ← phi( ) + (byte) main::a#12 ← phi( main::@2/(byte) main::a#10 ) + [7] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#12 + to:main::@1 +main::@return: scope:[main] from main::@3 + [8] return + to:@return +@1: scope:[] from @begin + [9] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main::@1_1: scope:[main] from main + to:main::@2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::a#10 = (byte) main::a#2 (byte) main::a#9 +Alias (byte) main::b#2 = (byte) main::b#6 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::a#14 (const byte) main::a#0 +Identical Phi Values (byte) main::b#12 (const byte) main::b#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@2_1) in block main::@8 +Removing PHI-reference to removed block (main::@2_1) in block main::@8 +if() condition always true - replacing block destination [13] if((const byte) main::a#0>(const byte) main::b#0) goto main::@4 +Successful SSA optimization Pass2ConstantIfs +Alias (byte) main::a#10 = (byte) main::a#12 +Alias (byte) main::b#11 = (byte) main::b#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::a#10 (byte) main::a#1 +Successful SSA optimization Pass2IdenticalPhiElimination Inlining constant with var siblings (const byte) main::a#0 Inlining constant with var siblings (const byte) main::b#0 Constant inlined main::a#0 = (byte) $80 Constant inlined main::b#0 = (byte) 2 Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting main::@11(between main::@2 and main::@4) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 +Adding NOP phi() at start of main::@2_1 CALL GRAPH Calls in [] to main:2 -Created 2 initial phi equivalence classes -Coalesced (already) [12] main::a#8 ← main::a#2 -Coalesced [13] main::b#7 ← main::b#1 -Coalesced [15] main::a#7 ← main::a#1 -Coalesced (already) [16] main::b#6 ← main::b#2 +Created 3 initial phi equivalence classes +Coalesced [10] main::b#13 ← main::b#10 +Coalesced [17] main::b#14 ← main::b#1 +Coalesced [18] main::a#15 ← main::a#1 +Coalesced (already) [19] main::b#15 ← main::b#11 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@2_1 +Culled Empty Block (label) main::@11 Renumbering block main::@8 to main::@5 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 @@ -149,26 +336,27 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@4 +main::@4: scope:[main] from main main::@2 + [5] (byte) main::b#10 ← phi( main::@2/(byte) main::b#11 main/(byte) 2 ) + [5] (byte) main::a#13 ← phi( main::@2/(byte) main::a#1 main/(byte) $80 ) + [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 to:main::@1 -main::@1: scope:[main] from main main::@4 main::@5 - [5] (byte) main::b#2 ← phi( main/(byte) 2 main::@4/(byte) main::b#2 main::@5/(byte) main::b#1 ) - [5] (byte) main::a#2 ← phi( main/(byte) $80 main::@4/(byte) main::a#1 main::@5/(byte) main::a#2 ) - [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 +main::@1: scope:[main] from main::@4 main::@5 + [7] (byte) main::b#11 ← phi( main::@4/(byte) main::b#10 main::@5/(byte) main::b#1 ) + [8] if((byte) main::a#1!=(byte) main::b#11) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@1 - [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 + [9] *((const byte*) SCREEN#0) ← (byte) main::a#1 to:main::@return main::@return: scope:[main] from main::@3 - [8] return + [10] return to:@return main::@2: scope:[main] from main::@1 - [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 + [11] if((byte) main::a#1>(byte) main::b#11) goto main::@4 to:main::@5 main::@5: scope:[main] from main::@2 - [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 - to:main::@1 -main::@4: scope:[main] from main::@2 - [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 + [12] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#1 to:main::@1 @@ -176,20 +364,21 @@ VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (byte) main::a -(byte) main::a#1 22.0 -(byte) main::a#2 19.75 +(byte) main::a#1 83.39999999999999 +(byte) main::a#13 112.0 (byte) main::b -(byte) main::b#1 22.0 -(byte) main::b#2 19.25 +(byte) main::b#1 202.0 +(byte) main::b#10 61.5 +(byte) main::b#11 171.99999999999997 Initial phi equivalence classes -[ main::a#2 main::a#1 ] -[ main::b#2 main::b#1 ] +[ main::a#13 main::a#1 ] +[ main::b#10 main::b#11 main::b#1 ] Complete equivalence classes -[ main::a#2 main::a#1 ] -[ main::b#2 main::b#1 ] -Allocated zp ZP_BYTE:2 [ main::a#2 main::a#1 ] -Allocated zp ZP_BYTE:3 [ main::b#2 main::b#1 ] +[ main::a#13 main::a#1 ] +[ main::b#10 main::b#11 main::b#1 ] +Allocated zp ZP_BYTE:2 [ main::a#13 main::a#1 ] +Allocated zp ZP_BYTE:3 [ main::b#10 main::b#11 main::b#1 ] INITIAL ASM Target platform is c64basic @@ -222,81 +411,85 @@ bend: main: { .label a = 2 .label b = 3 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::b#2 = (byte) 2 [phi:main->main::@1#0] -- vbuz1=vbuc1 + // [5] phi from main to main::@4 [phi:main->main::@4] + b4_from_main: + // [5] phi (byte) main::b#10 = (byte) 2 [phi:main->main::@4#0] -- vbuz1=vbuc1 lda #2 sta b - // [5] phi (byte) main::a#2 = (byte) $80 [phi:main->main::@1#1] -- vbuz1=vbuc1 + // [5] phi (byte) main::a#13 = (byte) $80 [phi:main->main::@4#1] -- vbuz1=vbuc1 lda #$80 sta a + jmp b4 + // [5] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + b4_from_b2: + // [5] phi (byte) main::b#10 = (byte) main::b#11 [phi:main::@2->main::@4#0] -- register_copy + // [5] phi (byte) main::a#13 = (byte) main::a#1 [phi:main::@2->main::@4#1] -- register_copy + jmp b4 + // main::@4 + b4: + // [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 -- vbuz1=vbuz1_minus_vbuz2 + lda a + sec + sbc b + sta a + // [7] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1] + b1_from_b4: + b1_from_b5: + // [7] phi (byte) main::b#11 = (byte) main::b#10 [phi:main::@4/main::@5->main::@1#0] -- register_copy jmp b1 // main::@1 b1: - // [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 -- vbuz1_neq_vbuz2_then_la1 + // [8] if((byte) main::a#1!=(byte) main::b#11) goto main::@2 -- vbuz1_neq_vbuz2_then_la1 lda a cmp b bne b2 jmp b3 // main::@3 b3: - // [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1 + // [9] *((const byte*) SCREEN#0) ← (byte) main::a#1 -- _deref_pbuc1=vbuz1 lda a sta SCREEN jmp breturn // main::@return breturn: - // [8] return + // [10] return rts // main::@2 b2: - // [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 -- vbuz1_gt_vbuz2_then_la1 + // [11] if((byte) main::a#1>(byte) main::b#11) goto main::@4 -- vbuz1_gt_vbuz2_then_la1 lda b cmp a - bcc b4 + bcc b4_from_b2 jmp b5 // main::@5 b5: - // [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 -- vbuz1=vbuz1_minus_vbuz2 + // [12] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#1 -- vbuz1=vbuz1_minus_vbuz2 lda b sec sbc a sta b - // [5] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1] - b1_from_b4: - b1_from_b5: - // [5] phi (byte) main::b#2 = (byte) main::b#2 [phi:main::@4/main::@5->main::@1#0] -- register_copy - // [5] phi (byte) main::a#2 = (byte) main::a#1 [phi:main::@4/main::@5->main::@1#1] -- register_copy - jmp b1 - // main::@4 - b4: - // [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 -- vbuz1=vbuz1_minus_vbuz2 - lda a - sec - sbc b - sta a - jmp b1_from_b4 + jmp b1_from_b5 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 [ main::a#2 main::b#1 ] ( main:2 [ main::a#2 main::b#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::a#2 main::a#1 ] -Statement [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 [ main::b#2 main::a#1 ] ( main:2 [ main::b#2 main::a#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::b#2 main::b#1 ] -Statement [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 [ main::a#2 main::b#1 ] ( main:2 [ main::a#2 main::b#1 ] ) always clobbers reg byte a -Statement [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 [ main::b#2 main::a#1 ] ( main:2 [ main::b#2 main::a#1 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::a#2 main::a#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::b#2 main::b#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , +Statement [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 [ main::b#10 main::a#1 ] ( main:2 [ main::b#10 main::a#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::b#10 main::b#11 main::b#1 ] +Statement [12] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#1 [ main::a#1 main::b#1 ] ( main:2 [ main::a#1 main::b#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::a#13 main::a#1 ] +Statement [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 [ main::b#10 main::a#1 ] ( main:2 [ main::b#10 main::a#1 ] ) always clobbers reg byte a +Statement [12] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#1 [ main::a#1 main::b#1 ] ( main:2 [ main::a#1 main::b#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::a#13 main::a#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::b#10 main::b#11 main::b#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 41.75: zp ZP_BYTE:2 [ main::a#2 main::a#1 ] 41.25: zp ZP_BYTE:3 [ main::b#2 main::b#1 ] +Uplift Scope [main] 435.5: zp ZP_BYTE:3 [ main::b#10 main::b#11 main::b#1 ] 195.4: zp ZP_BYTE:2 [ main::a#13 main::a#1 ] Uplift Scope [] -Uplifting [main] best 568 combination zp ZP_BYTE:2 [ main::a#2 main::a#1 ] reg byte x [ main::b#2 main::b#1 ] -Uplifting [] best 568 combination -Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::a#2 main::a#1 ] -Uplifting [main] best 568 combination zp ZP_BYTE:2 [ main::a#2 main::a#1 ] +Uplifting [main] best 3478 combination reg byte x [ main::b#10 main::b#11 main::b#1 ] zp ZP_BYTE:2 [ main::a#13 main::a#1 ] +Uplifting [] best 3478 combination +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::a#13 main::a#1 ] +Uplifting [main] best 3478 combination zp ZP_BYTE:2 [ main::a#13 main::a#1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -327,78 +520,86 @@ bend: // main main: { .label a = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::b#2 = (byte) 2 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@4 [phi:main->main::@4] + b4_from_main: + // [5] phi (byte) main::b#10 = (byte) 2 [phi:main->main::@4#0] -- vbuxx=vbuc1 ldx #2 - // [5] phi (byte) main::a#2 = (byte) $80 [phi:main->main::@1#1] -- vbuz1=vbuc1 + // [5] phi (byte) main::a#13 = (byte) $80 [phi:main->main::@4#1] -- vbuz1=vbuc1 lda #$80 sta a - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 -- vbuz1_neq_vbuxx_then_la1 - cpx a - bne b2 - jmp b3 - // main::@3 - b3: - // [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1 - lda a - sta SCREEN - jmp breturn - // main::@return - breturn: - // [8] return - rts - // main::@2 - b2: - // [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 -- vbuz1_gt_vbuxx_then_la1 - cpx a - bcc b4 - jmp b5 - // main::@5 - b5: - // [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 -- vbuxx=vbuxx_minus_vbuz1 - txa - sec - sbc a - tax - // [5] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1] - b1_from_b4: - b1_from_b5: - // [5] phi (byte) main::b#2 = (byte) main::b#2 [phi:main::@4/main::@5->main::@1#0] -- register_copy - // [5] phi (byte) main::a#2 = (byte) main::a#1 [phi:main::@4/main::@5->main::@1#1] -- register_copy - jmp b1 + jmp b4 + // [5] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + b4_from_b2: + // [5] phi (byte) main::b#10 = (byte) main::b#11 [phi:main::@2->main::@4#0] -- register_copy + // [5] phi (byte) main::a#13 = (byte) main::a#1 [phi:main::@2->main::@4#1] -- register_copy + jmp b4 // main::@4 b4: - // [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 -- vbuz1=vbuz1_minus_vbuxx + // [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 -- vbuz1=vbuz1_minus_vbuxx txa eor #$ff sec adc a sta a - jmp b1_from_b4 + // [7] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1] + b1_from_b4: + b1_from_b5: + // [7] phi (byte) main::b#11 = (byte) main::b#10 [phi:main::@4/main::@5->main::@1#0] -- register_copy + jmp b1 + // main::@1 + b1: + // [8] if((byte) main::a#1!=(byte) main::b#11) goto main::@2 -- vbuz1_neq_vbuxx_then_la1 + cpx a + bne b2 + jmp b3 + // main::@3 + b3: + // [9] *((const byte*) SCREEN#0) ← (byte) main::a#1 -- _deref_pbuc1=vbuz1 + lda a + sta SCREEN + jmp breturn + // main::@return + breturn: + // [10] return + rts + // main::@2 + b2: + // [11] if((byte) main::a#1>(byte) main::b#11) goto main::@4 -- vbuz1_gt_vbuxx_then_la1 + cpx a + bcc b4_from_b2 + jmp b5 + // main::@5 + b5: + // [12] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#1 -- vbuxx=vbuxx_minus_vbuz1 + txa + sec + sbc a + tax + jmp b1_from_b5 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend +Removing instruction jmp b4 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp breturn Removing instruction jmp b5 Succesful ASM optimization Pass5NextJumpElimination -Replacing label b1_from_b4 with b1_from_b5 +Replacing label b4_from_b2 with b4 +Replacing label b1_from_b5 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: +Removing instruction b4_from_b2: Removing instruction b1_from_b4: +Removing instruction b1_from_b5: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: +Removing instruction b4_from_main: Removing instruction b3: Removing instruction breturn: Removing instruction b5: @@ -406,12 +607,9 @@ Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Skipping double jump to b1 in jmp b1_from_b5 -Succesful ASM optimization Pass5DoubleJumpElimination -Relabelling long label b1_from_b5 to b3 -Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp b4 +Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: -Removing instruction b3: Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE @@ -428,18 +626,19 @@ FINAL SYMBOL TABLE (label) main::@5 (label) main::@return (byte) main::a -(byte) main::a#1 a zp ZP_BYTE:2 22.0 -(byte) main::a#2 a zp ZP_BYTE:2 19.75 +(byte) main::a#1 a zp ZP_BYTE:2 83.39999999999999 +(byte) main::a#13 a zp ZP_BYTE:2 112.0 (byte) main::b -(byte) main::b#1 reg byte x 22.0 -(byte) main::b#2 reg byte x 19.25 +(byte) main::b#1 reg byte x 202.0 +(byte) main::b#10 reg byte x 61.5 +(byte) main::b#11 reg byte x 171.99999999999997 -zp ZP_BYTE:2 [ main::a#2 main::a#1 ] -reg byte x [ main::b#2 main::b#1 ] +zp ZP_BYTE:2 [ main::a#13 main::a#1 ] +reg byte x [ main::b#10 main::b#11 main::b#1 ] FINAL ASSEMBLER -Score: 463 +Score: 2503 // File Comments // Demonstrates a problem where wrong alive ranges result in clobbering an alive variable @@ -460,53 +659,54 @@ Score: 463 // main main: { .label a = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::b#2 = (byte) 2 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@4 [phi:main->main::@4] + // [5] phi (byte) main::b#10 = (byte) 2 [phi:main->main::@4#0] -- vbuxx=vbuc1 ldx #2 - // [5] phi (byte) main::a#2 = (byte) $80 [phi:main->main::@1#1] -- vbuz1=vbuc1 + // [5] phi (byte) main::a#13 = (byte) $80 [phi:main->main::@4#1] -- vbuz1=vbuc1 lda #$80 sta a - // main::@1 - b1: - // while (a!=b) - // [6] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 -- vbuz1_neq_vbuxx_then_la1 - cpx a - bne b2 - // main::@3 - // *SCREEN = a - // [7] *((const byte*) SCREEN#0) ← (byte) main::a#2 -- _deref_pbuc1=vbuz1 - lda a - sta SCREEN - // main::@return - // } - // [8] return - rts - // main::@2 - b2: - // if(a>b) - // [9] if((byte) main::a#2>(byte) main::b#2) goto main::@4 -- vbuz1_gt_vbuxx_then_la1 - cpx a - bcc b4 - // main::@5 - // b = b-a - // [10] (byte) main::b#1 ← (byte) main::b#2 - (byte) main::a#2 -- vbuxx=vbuxx_minus_vbuz1 - txa - sec - sbc a - tax - // [5] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1] - // [5] phi (byte) main::b#2 = (byte) main::b#2 [phi:main::@4/main::@5->main::@1#0] -- register_copy - // [5] phi (byte) main::a#2 = (byte) main::a#1 [phi:main::@4/main::@5->main::@1#1] -- register_copy - jmp b1 + // [5] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + // [5] phi (byte) main::b#10 = (byte) main::b#11 [phi:main::@2->main::@4#0] -- register_copy + // [5] phi (byte) main::a#13 = (byte) main::a#1 [phi:main::@2->main::@4#1] -- register_copy // main::@4 b4: // a = a-b - // [11] (byte) main::a#1 ← (byte) main::a#2 - (byte) main::b#2 -- vbuz1=vbuz1_minus_vbuxx + // [6] (byte) main::a#1 ← (byte) main::a#13 - (byte) main::b#10 -- vbuz1=vbuz1_minus_vbuxx txa eor #$ff sec adc a sta a + // [7] phi from main::@4 main::@5 to main::@1 [phi:main::@4/main::@5->main::@1] + // [7] phi (byte) main::b#11 = (byte) main::b#10 [phi:main::@4/main::@5->main::@1#0] -- register_copy + // main::@1 + b1: + // while (a!=b) + // [8] if((byte) main::a#1!=(byte) main::b#11) goto main::@2 -- vbuz1_neq_vbuxx_then_la1 + cpx a + bne b2 + // main::@3 + // *SCREEN = a + // [9] *((const byte*) SCREEN#0) ← (byte) main::a#1 -- _deref_pbuc1=vbuz1 + lda a + sta SCREEN + // main::@return + // } + // [10] return + rts + // main::@2 + b2: + // if(a>b) + // [11] if((byte) main::a#1>(byte) main::b#11) goto main::@4 -- vbuz1_gt_vbuxx_then_la1 + cpx a + bcc b4 + // main::@5 + // b = b-a + // [12] (byte) main::b#1 ← (byte) main::b#11 - (byte) main::a#1 -- vbuxx=vbuxx_minus_vbuz1 + txa + sec + sbc a + tax jmp b1 } // File Data diff --git a/src/test/ref/euclid-problem.sym b/src/test/ref/euclid-problem.sym index 5acfef455..3d0b94cbe 100644 --- a/src/test/ref/euclid-problem.sym +++ b/src/test/ref/euclid-problem.sym @@ -11,11 +11,12 @@ (label) main::@5 (label) main::@return (byte) main::a -(byte) main::a#1 a zp ZP_BYTE:2 22.0 -(byte) main::a#2 a zp ZP_BYTE:2 19.75 +(byte) main::a#1 a zp ZP_BYTE:2 83.39999999999999 +(byte) main::a#13 a zp ZP_BYTE:2 112.0 (byte) main::b -(byte) main::b#1 reg byte x 22.0 -(byte) main::b#2 reg byte x 19.25 +(byte) main::b#1 reg byte x 202.0 +(byte) main::b#10 reg byte x 61.5 +(byte) main::b#11 reg byte x 171.99999999999997 -zp ZP_BYTE:2 [ main::a#2 main::a#1 ] -reg byte x [ main::b#2 main::b#1 ] +zp ZP_BYTE:2 [ main::a#13 main::a#1 ] +reg byte x [ main::b#10 main::b#11 main::b#1 ] diff --git a/src/test/ref/examples/fire/fire.asm b/src/test/ref/examples/fire/fire.asm index 3f09e5797..abf76f8a0 100644 --- a/src/test/ref/examples/fire/fire.asm +++ b/src/test/ref/examples/fire/fire.asm @@ -79,18 +79,47 @@ fire: { .label screen_2 = $c .label buffer = 4 .label buffer_3 = 9 - .label screen_4 = $c .label buffer_7 = 9 .label screen_10 = $c + .label screen_15 = $c lda screen - sta screen_10 + sta screen_15 lda screen+1 - sta screen_10+1 + sta screen_15+1 lda #<BUFFER sta buffer lda #>BUFFER sta buffer+1 - b1: + b2: + ldy #$28-1 + clc + lda (buffer),y + adc (buffer),y + ldy #$28 + clc + adc (buffer),y + ldy #$29 + clc + adc (buffer),y + lsr + lsr + cmp #2+1 + bcc b4 + sec + sbc #3 + b4: + ldy #0 + sta (buffer),y + lda (buffer),y + sta (screen_10),y + inc screen_2 + bne !+ + inc screen_2+1 + !: + inc buffer + bne !+ + inc buffer+1 + !: lda buffer+1 cmp #>BUFFER+$18*$28 bne b2 @@ -135,37 +164,6 @@ fire: { cmp #<BUFFER+$19*$28 bne b6 rts - b2: - ldy #$28-1 - clc - lda (buffer),y - adc (buffer),y - ldy #$28 - clc - adc (buffer),y - ldy #$29 - clc - adc (buffer),y - lsr - lsr - cmp #2+1 - bcc b4 - sec - sbc #3 - b4: - ldy #0 - sta (buffer),y - lda (buffer),y - sta (screen_4),y - inc screen_2 - bne !+ - inc screen_2+1 - !: - inc buffer - bne !+ - inc buffer+1 - !: - jmp b1 } // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() diff --git a/src/test/ref/examples/fire/fire.cfg b/src/test/ref/examples/fire/fire.cfg index 1fc5511c7..0055881cf 100644 --- a/src/test/ref/examples/fire/fire.cfg +++ b/src/test/ref/examples/fire/fire.cfg @@ -52,52 +52,54 @@ main::@3: scope:[main] from main::toD0182 to:main::@1 fire: scope:[fire] from main::@1 main::@2 [25] (byte*) fire::screen#0 ← phi( main::@1/(const byte*) SCREEN1#0 main::@2/(const byte*) SCREEN2#0 ) - [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 - to:fire::@1 -fire::@1: scope:[fire] from fire fire::@4 - [27] (byte*) fire::screen#4 ← phi( fire/(byte*~) fire::screen#10 fire::@4/(byte*) fire::screen#2 ) - [27] (byte*) fire::buffer#4 ← phi( fire/(const byte*) BUFFER#0 fire::@4/(byte*) fire::buffer#2 ) - [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 - to:fire::@3 -fire::@3: scope:[fire] from fire::@1 - [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 - to:fire::@6 -fire::@6: scope:[fire] from fire::@3 fire::@7 - [30] (byte*) fire::screen#5 ← phi( fire::@7/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) - [30] (byte*) fire::buffer#7 ← phi( fire::@7/(byte*) fire::buffer#3 fire::@3/(const byte*) BUFFER#0+(word)(number) $18*(number) $28 ) - [31] call sid_rnd - [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 - to:fire::@7 -fire::@7: scope:[fire] from fire::@6 - [33] (byte~) fire::$10 ← (byte) sid_rnd::return#2 - [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 - [35] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 - [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 - [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) - [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 - [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 - [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 - to:fire::@return -fire::@return: scope:[fire] from fire::@7 - [41] return - to:@return -fire::@2: scope:[fire] from fire::@1 - [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) - [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) - [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) - [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 - [46] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 + to:fire::@1_1 +fire::@1_1: scope:[fire] from fire + [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 + to:fire::@2 +fire::@2: scope:[fire] from fire::@1 fire::@1_1 + [27] (byte*) fire::screen#10 ← phi( fire::@1/(byte*) fire::screen#2 fire::@1_1/(byte*~) fire::screen#15 ) + [27] (byte*) fire::buffer#10 ← phi( fire::@1/(byte*) fire::buffer#2 fire::@1_1/(const byte*) BUFFER#0 ) + [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) + [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) + [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 + [32] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 to:fire::@5 fire::@5: scope:[fire] from fire::@2 - [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 + [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 to:fire::@4 fire::@4: scope:[fire] from fire::@2 fire::@5 - [48] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) - [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 - [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) - [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 - [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 + [34] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) + [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 + [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) + [37] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#10 + [38] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#10 to:fire::@1 +fire::@1: scope:[fire] from fire::@4 + [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 + to:fire::@3 +fire::@3: scope:[fire] from fire::@1 + [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 + to:fire::@6 +fire::@6: scope:[fire] from fire::@3 fire::@7 + [41] (byte*) fire::screen#5 ← phi( fire::@7/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) + [41] (byte*) fire::buffer#7 ← phi( fire::@7/(byte*) fire::buffer#3 fire::@3/(const byte*) BUFFER#0+(word)(number) $18*(number) $28 ) + [42] call sid_rnd + [43] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:fire::@7 +fire::@7: scope:[fire] from fire::@6 + [44] (byte~) fire::$10 ← (byte) sid_rnd::return#2 + [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 + [46] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 + [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 + [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) + [49] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 + [50] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 + [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 + to:fire::@return +fire::@return: scope:[fire] from fire::@7 + [52] return + to:@return sid_rnd: scope:[sid_rnd] from fire::@6 [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return diff --git a/src/test/ref/examples/fire/fire.log b/src/test/ref/examples/fire/fire.log index 711141d9b..cbae16100 100644 --- a/src/test/ref/examples/fire/fire.log +++ b/src/test/ref/examples/fire/fire.log @@ -1045,6 +1045,446 @@ Constant (const byte*) makecharset::font1#0 = makecharset::charset#0+(word)$40*8 Constant (const byte*) makecharset::$3 = makecharset::charset#0+(word)$100*8 Constant (const byte*) makecharset::$12 = makecharset::charset#0+(byte)1*8 Successful SSA optimization Pass2ConstantIdentification +GRAPH (NEW VERSIONS for fire::buffer#4) +@begin: scope:[] from + to:@4 +@4: scope:[] from @begin + to:@6 +sid_rnd_init: scope:[sid_rnd_init] from main::@12 + [0] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [1] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [2] return + to:@return +sid_rnd: scope:[sid_rnd] from fire::@9 + [3] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + [4] return + to:@return +@6: scope:[] from @4 + to:@10 +main: scope:[main] from @10 + asm { sei } + [6] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 + [7] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [8] call fillscreen + to:main::@9 +main::@9: scope:[main] from main + [9] call fillscreen + to:main::@10 +main::@10: scope:[main] from main::@9 + [10] call fillscreen + to:main::@11 +main::@11: scope:[main] from main::@10 + [11] call fillscreen + to:main::@12 +main::@12: scope:[main] from main::@11 + [12] call sid_rnd_init + to:main::@13 +main::@13: scope:[main] from main::@12 + [13] call makecharset + to:main::@14 +main::@14: scope:[main] from main::@13 + to:main::@1 +main::@1: scope:[main] from main::@14 main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 + [14] call fire + to:main::@15 +main::@15: scope:[main] from main::@2 + to:main::toD0181 +main::toD0181: scope:[main] from main::@15 + [15] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [16] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [17] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [18] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [19] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [20] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [21] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@7 +main::@7: scope:[main] from main::toD0181_@return + [22] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [23] call fire + to:main::@16 +main::@16: scope:[main] from main::@7 + to:main::toD0182 +main::toD0182: scope:[main] from main::@16 + [24] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff + [25] (word~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 + [26] (byte~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 + [27] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 + [28] (byte~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 + [29] (byte~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f + [30] (byte) main::toD0182_return#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + to:main::@8 +main::@8: scope:[main] from main::toD0182_@return + [31] *((const byte*) D018#0) ← (byte) main::toD0182_return#0 + to:main::@1 +fire: scope:[fire] from main::@2 main::@7 + [32] (byte*) fire::screen#0 ← phi( main::@2/(const byte*) fire::screenbase#0 main::@7/(const byte*) fire::screenbase#1 ) + to:fire::@1 +fire::@1: scope:[fire] from fire fire::@4 + [33] (byte*) fire::screen#4 ← phi( fire/(byte*) fire::screen#0 fire::@4/(byte*) fire::screen#2 ) + [33] (byte*) fire::buffer#4 ← phi( fire/(const byte*) fire::buffer#0 fire::@4/(byte*) fire::buffer#2 ) + [34] if((byte*) fire::buffer#4!=(const byte*) fire::$2) goto fire::@2 + to:fire::@3 +fire::@2: scope:[fire] from fire::@1 + (byte*) fire::buffer#10 ← phi( ) + [35] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + [36] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) + [37] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) + [38] (byte) fire::c#0 ← (byte~) fire::$6 / (byte) 4 + [39] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 + to:fire::@7 +fire::@3: scope:[fire] from fire::@1 + [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 + to:fire::@9 +fire::@4: scope:[fire] from fire::@2 fire::@7 + [41] (byte*) fire::buffer#11 ← phi( ) + [41] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@7/(byte) fire::c#1 ) + [42] *((byte*) fire::buffer#11) ← (byte) fire::c#2 + [43] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#11) + [44] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 + [45] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#11 + to:fire::@1 +fire::@7: scope:[fire] from fire::@2 + [46] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 + to:fire::@4 +fire::@9: scope:[fire] from fire::@11 fire::@3 + [47] (byte*) fire::screen#5 ← phi( fire::@11/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) + [47] (byte*) fire::buffer#7 ← phi( fire::@11/(byte*) fire::buffer#3 fire::@3/(const byte*) fire::buffer#1 ) + [48] call sid_rnd + [49] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:fire::@11 +fire::@11: scope:[fire] from fire::@9 + [50] (byte~) fire::$10 ← (byte) sid_rnd::return#2 + [51] (byte~) fire::$11 ← (byte~) fire::$10 / (byte) $10 + [52] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 + [53] *((byte*) fire::buffer#7) ← (byte~) fire::$12 + [54] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) + [55] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 + [56] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 + [57] if((byte*) fire::buffer#3!=(const byte*) fire::$13) goto fire::@9 + to:fire::@return +fire::@return: scope:[fire] from fire::@11 + [58] return + to:@return +makecharset: scope:[makecharset] from main::@13 + to:makecharset::@1 +makecharset::@1: scope:[makecharset] from makecharset makecharset::@1 + [59] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) makecharset::charset#0 makecharset::@1/(byte*) makecharset::font#1 ) + [60] *((byte*) makecharset::font#2) ← (byte) 0 + [61] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 + [62] if((byte*) makecharset::font#1!=(const byte*) makecharset::$0) goto makecharset::@1 + to:makecharset::@2 +makecharset::@2: scope:[makecharset] from makecharset::@1 + to:makecharset::@3 +makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@3 + [63] (byte*) makecharset::font1#2 ← phi( makecharset::@2/(const byte*) makecharset::font1#0 makecharset::@3/(byte*) makecharset::font1#1 ) + [64] *((byte*) makecharset::font1#2) ← (byte) $ff + [65] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 + [66] if((byte*) makecharset::font1#1!=(const byte*) makecharset::$3) goto makecharset::@3 + to:makecharset::@4 +makecharset::@4: scope:[makecharset] from makecharset::@3 + to:makecharset::@5 +makecharset::@5: scope:[makecharset] from makecharset::@11 makecharset::@4 + [67] (byte) makecharset::c#7 ← phi( makecharset::@11/(byte) makecharset::c#1 makecharset::@4/(const byte) makecharset::c#0 ) + to:makecharset::@6 +makecharset::@6: scope:[makecharset] from makecharset::@10 makecharset::@5 + [68] (byte) makecharset::i#6 ← phi( makecharset::@10/(byte) makecharset::i#1 makecharset::@5/(const byte) makecharset::i#0 ) + [68] (byte) makecharset::bc#5 ← phi( makecharset::@10/(byte) makecharset::bc#6 makecharset::@5/(const byte) makecharset::bc#0 ) + to:makecharset::@7 +makecharset::@7: scope:[makecharset] from makecharset::@6 makecharset::@8 + [69] (byte) makecharset::b#2 ← phi( makecharset::@6/(const byte) makecharset::b#0 makecharset::@8/(byte) makecharset::b#3 ) + [69] (byte) makecharset::ii#2 ← phi( makecharset::@6/(const byte) makecharset::ii#0 makecharset::@8/(byte) makecharset::ii#1 ) + [69] (byte) makecharset::bc#3 ← phi( makecharset::@6/(byte) makecharset::bc#5 makecharset::@8/(byte) makecharset::bc#6 ) + [70] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 + [71] if((byte) makecharset::bc#1<(byte) $3f+(byte) 1) goto makecharset::@8 + to:makecharset::@9 +makecharset::@8: scope:[makecharset] from makecharset::@7 makecharset::@9 + [72] (byte) makecharset::b#3 ← phi( makecharset::@7/(byte) makecharset::b#2 makecharset::@9/(byte) makecharset::b#1 ) + [72] (byte) makecharset::bc#6 ← phi( makecharset::@7/(byte) makecharset::bc#1 makecharset::@9/(byte) makecharset::bc#2 ) + [73] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 + [74] if((byte) makecharset::ii#1<(byte) 8) goto makecharset::@7 + to:makecharset::@10 +makecharset::@9: scope:[makecharset] from makecharset::@7 + [75] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte) $40 + [76] (byte~) makecharset::$8 ← (byte) makecharset::i#6 & (byte) 1 + [77] (byte~) makecharset::$9 ← (byte) makecharset::ii#2 + (byte~) makecharset::$8 + [78] (byte~) makecharset::$10 ← (byte~) makecharset::$9 & (byte) 7 + [79] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$10) + to:makecharset::@8 +makecharset::@10: scope:[makecharset] from makecharset::@8 + [80] (word~) makecharset::$13 ← (word)(byte) makecharset::c#7 + [81] (word~) makecharset::$14 ← (word~) makecharset::$13 << (byte) 3 + [82] (word~) makecharset::$15 ← (word~) makecharset::$14 + (byte) makecharset::i#6 + [83] (byte*~) makecharset::$18 ← (const byte*) makecharset::$12 + (word~) makecharset::$15 + [84] *((byte*~) makecharset::$18) ← (byte) makecharset::b#3 + [85] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#6 + [86] if((byte) makecharset::i#1<(byte) 8) goto makecharset::@6 + to:makecharset::@11 +makecharset::@11: scope:[makecharset] from makecharset::@10 + [87] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#7 + [88] if((byte) makecharset::c#1<(byte) $40) goto makecharset::@5 + to:makecharset::@return +makecharset::@return: scope:[makecharset] from makecharset::@11 + [89] return + to:@return +fillscreen: scope:[fillscreen] from main main::@10 main::@11 main::@9 + [90] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) fillscreen::screen#0 main::@10/(const byte*) fillscreen::screen#2 main::@11/(const byte*) fillscreen::screen#3 main::@9/(const byte*) fillscreen::screen#1 ) + [90] (byte) fillscreen::fill#5 ← phi( main/(const byte) fillscreen::fill#0 main::@10/(const byte) fillscreen::fill#2 main::@11/(const byte) fillscreen::fill#3 main::@9/(const byte) fillscreen::fill#1 ) + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + [91] (word) fillscreen::i#2 ← phi( fillscreen/(const word) fillscreen::i#0 fillscreen::@1/(word) fillscreen::i#1 ) + [91] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 ) + [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 + [93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 + [94] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 + [95] if((word) fillscreen::i#1!=(word) $3e8) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + [96] return + to:@return +@10: scope:[] from @6 + [97] call main + to:@11 +@11: scope:[] from @10 + to:@end +@end: scope:[] from @11 + +GRAPH (NEW VERSIONS for fire::screen#4) +@begin: scope:[] from + to:@4 +@4: scope:[] from @begin + to:@6 +sid_rnd_init: scope:[sid_rnd_init] from main::@12 + [0] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [1] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [2] return + to:@return +sid_rnd: scope:[sid_rnd] from fire::@9 + [3] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + [4] return + to:@return +@6: scope:[] from @4 + to:@10 +main: scope:[main] from @10 + asm { sei } + [6] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 + [7] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [8] call fillscreen + to:main::@9 +main::@9: scope:[main] from main + [9] call fillscreen + to:main::@10 +main::@10: scope:[main] from main::@9 + [10] call fillscreen + to:main::@11 +main::@11: scope:[main] from main::@10 + [11] call fillscreen + to:main::@12 +main::@12: scope:[main] from main::@11 + [12] call sid_rnd_init + to:main::@13 +main::@13: scope:[main] from main::@12 + [13] call makecharset + to:main::@14 +main::@14: scope:[main] from main::@13 + to:main::@1 +main::@1: scope:[main] from main::@14 main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 + [14] call fire + to:main::@15 +main::@15: scope:[main] from main::@2 + to:main::toD0181 +main::toD0181: scope:[main] from main::@15 + [15] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [16] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [17] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [18] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [19] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [20] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [21] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@7 +main::@7: scope:[main] from main::toD0181_@return + [22] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [23] call fire + to:main::@16 +main::@16: scope:[main] from main::@7 + to:main::toD0182 +main::toD0182: scope:[main] from main::@16 + [24] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff + [25] (word~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 + [26] (byte~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 + [27] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 + [28] (byte~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 + [29] (byte~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f + [30] (byte) main::toD0182_return#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + to:main::@8 +main::@8: scope:[main] from main::toD0182_@return + [31] *((const byte*) D018#0) ← (byte) main::toD0182_return#0 + to:main::@1 +fire: scope:[fire] from main::@2 main::@7 + [32] (byte*) fire::screen#0 ← phi( main::@2/(const byte*) fire::screenbase#0 main::@7/(const byte*) fire::screenbase#1 ) + to:fire::@1 +fire::@1: scope:[fire] from fire fire::@4 + [33] (byte*) fire::screen#4 ← phi( fire/(byte*) fire::screen#0 fire::@4/(byte*) fire::screen#2 ) + [33] (byte*) fire::buffer#4 ← phi( fire/(const byte*) fire::buffer#0 fire::@4/(byte*) fire::buffer#2 ) + [34] if((byte*) fire::buffer#4!=(const byte*) fire::$2) goto fire::@2 + to:fire::@3 +fire::@2: scope:[fire] from fire::@1 + (byte*) fire::buffer#10 ← phi( fire::@1/(byte*) fire::buffer#4 ) + [35] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + [36] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) + [37] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) + [38] (byte) fire::c#0 ← (byte~) fire::$6 / (byte) 4 + [39] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 + to:fire::@7 +fire::@3: scope:[fire] from fire::@1 + [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 + to:fire::@9 +fire::@4: scope:[fire] from fire::@2 fire::@7 + [41] (byte*) fire::screen#10 ← phi( ) + [41] (byte*) fire::buffer#11 ← phi( fire::@2/(byte*) fire::buffer#10 fire::@7/(byte*) fire::buffer#12 ) + [41] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@7/(byte) fire::c#1 ) + [42] *((byte*) fire::buffer#11) ← (byte) fire::c#2 + [43] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#11) + [44] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#10 + [45] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#11 + to:fire::@1 +fire::@7: scope:[fire] from fire::@2 + (byte*) fire::buffer#12 ← phi( fire::@2/(byte*) fire::buffer#10 ) + [46] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 + to:fire::@4 +fire::@9: scope:[fire] from fire::@11 fire::@3 + [47] (byte*) fire::screen#5 ← phi( fire::@11/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) + [47] (byte*) fire::buffer#7 ← phi( fire::@11/(byte*) fire::buffer#3 fire::@3/(const byte*) fire::buffer#1 ) + [48] call sid_rnd + [49] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:fire::@11 +fire::@11: scope:[fire] from fire::@9 + [50] (byte~) fire::$10 ← (byte) sid_rnd::return#2 + [51] (byte~) fire::$11 ← (byte~) fire::$10 / (byte) $10 + [52] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 + [53] *((byte*) fire::buffer#7) ← (byte~) fire::$12 + [54] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) + [55] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 + [56] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 + [57] if((byte*) fire::buffer#3!=(const byte*) fire::$13) goto fire::@9 + to:fire::@return +fire::@return: scope:[fire] from fire::@11 + [58] return + to:@return +makecharset: scope:[makecharset] from main::@13 + to:makecharset::@1 +makecharset::@1: scope:[makecharset] from makecharset makecharset::@1 + [59] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) makecharset::charset#0 makecharset::@1/(byte*) makecharset::font#1 ) + [60] *((byte*) makecharset::font#2) ← (byte) 0 + [61] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 + [62] if((byte*) makecharset::font#1!=(const byte*) makecharset::$0) goto makecharset::@1 + to:makecharset::@2 +makecharset::@2: scope:[makecharset] from makecharset::@1 + to:makecharset::@3 +makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@3 + [63] (byte*) makecharset::font1#2 ← phi( makecharset::@2/(const byte*) makecharset::font1#0 makecharset::@3/(byte*) makecharset::font1#1 ) + [64] *((byte*) makecharset::font1#2) ← (byte) $ff + [65] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2 + [66] if((byte*) makecharset::font1#1!=(const byte*) makecharset::$3) goto makecharset::@3 + to:makecharset::@4 +makecharset::@4: scope:[makecharset] from makecharset::@3 + to:makecharset::@5 +makecharset::@5: scope:[makecharset] from makecharset::@11 makecharset::@4 + [67] (byte) makecharset::c#7 ← phi( makecharset::@11/(byte) makecharset::c#1 makecharset::@4/(const byte) makecharset::c#0 ) + to:makecharset::@6 +makecharset::@6: scope:[makecharset] from makecharset::@10 makecharset::@5 + [68] (byte) makecharset::i#6 ← phi( makecharset::@10/(byte) makecharset::i#1 makecharset::@5/(const byte) makecharset::i#0 ) + [68] (byte) makecharset::bc#5 ← phi( makecharset::@10/(byte) makecharset::bc#6 makecharset::@5/(const byte) makecharset::bc#0 ) + to:makecharset::@7 +makecharset::@7: scope:[makecharset] from makecharset::@6 makecharset::@8 + [69] (byte) makecharset::b#2 ← phi( makecharset::@6/(const byte) makecharset::b#0 makecharset::@8/(byte) makecharset::b#3 ) + [69] (byte) makecharset::ii#2 ← phi( makecharset::@6/(const byte) makecharset::ii#0 makecharset::@8/(byte) makecharset::ii#1 ) + [69] (byte) makecharset::bc#3 ← phi( makecharset::@6/(byte) makecharset::bc#5 makecharset::@8/(byte) makecharset::bc#6 ) + [70] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#7 + [71] if((byte) makecharset::bc#1<(byte) $3f+(byte) 1) goto makecharset::@8 + to:makecharset::@9 +makecharset::@8: scope:[makecharset] from makecharset::@7 makecharset::@9 + [72] (byte) makecharset::b#3 ← phi( makecharset::@7/(byte) makecharset::b#2 makecharset::@9/(byte) makecharset::b#1 ) + [72] (byte) makecharset::bc#6 ← phi( makecharset::@7/(byte) makecharset::bc#1 makecharset::@9/(byte) makecharset::bc#2 ) + [73] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 + [74] if((byte) makecharset::ii#1<(byte) 8) goto makecharset::@7 + to:makecharset::@10 +makecharset::@9: scope:[makecharset] from makecharset::@7 + [75] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte) $40 + [76] (byte~) makecharset::$8 ← (byte) makecharset::i#6 & (byte) 1 + [77] (byte~) makecharset::$9 ← (byte) makecharset::ii#2 + (byte~) makecharset::$8 + [78] (byte~) makecharset::$10 ← (byte~) makecharset::$9 & (byte) 7 + [79] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const byte[8]) makecharset::bittab#0 + (byte~) makecharset::$10) + to:makecharset::@8 +makecharset::@10: scope:[makecharset] from makecharset::@8 + [80] (word~) makecharset::$13 ← (word)(byte) makecharset::c#7 + [81] (word~) makecharset::$14 ← (word~) makecharset::$13 << (byte) 3 + [82] (word~) makecharset::$15 ← (word~) makecharset::$14 + (byte) makecharset::i#6 + [83] (byte*~) makecharset::$18 ← (const byte*) makecharset::$12 + (word~) makecharset::$15 + [84] *((byte*~) makecharset::$18) ← (byte) makecharset::b#3 + [85] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#6 + [86] if((byte) makecharset::i#1<(byte) 8) goto makecharset::@6 + to:makecharset::@11 +makecharset::@11: scope:[makecharset] from makecharset::@10 + [87] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#7 + [88] if((byte) makecharset::c#1<(byte) $40) goto makecharset::@5 + to:makecharset::@return +makecharset::@return: scope:[makecharset] from makecharset::@11 + [89] return + to:@return +fillscreen: scope:[fillscreen] from main main::@10 main::@11 main::@9 + [90] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) fillscreen::screen#0 main::@10/(const byte*) fillscreen::screen#2 main::@11/(const byte*) fillscreen::screen#3 main::@9/(const byte*) fillscreen::screen#1 ) + [90] (byte) fillscreen::fill#5 ← phi( main/(const byte) fillscreen::fill#0 main::@10/(const byte) fillscreen::fill#2 main::@11/(const byte) fillscreen::fill#3 main::@9/(const byte) fillscreen::fill#1 ) + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + [91] (word) fillscreen::i#2 ← phi( fillscreen/(const word) fillscreen::i#0 fillscreen::@1/(word) fillscreen::i#1 ) + [91] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 ) + [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 + [93] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5 + [94] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2 + [95] if((word) fillscreen::i#1!=(word) $3e8) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + [96] return + to:@return +@10: scope:[] from @6 + [97] call main + to:@11 +@11: scope:[] from @10 + to:@end +@end: scope:[] from @11 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte*) fire::buffer#2 = (byte*) fire::buffer#4 +Alias (byte*) fire::screen#2 = (byte*) fire::screen#4 +Alias (byte*) fire::buffer#10 = (byte*) fire::buffer#12 +Alias (byte*) fire::screen#11 = (byte*) fire::screen#12 +Alias (byte*) fire::screen#0 = (byte*) fire::screen#13 +Successful SSA optimization Pass2AliasElimination +Alias (byte*) fire::buffer#10 = (byte*) fire::buffer#11 +Alias (byte*) fire::screen#10 = (byte*) fire::screen#11 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte*) fire::buffer#13 (const byte*) fire::buffer#0 +Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [15] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff Constant right-side identified [18] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Constant right-side identified [24] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff @@ -1055,6 +1495,8 @@ Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Constant (const word) main::toD0182_$1#0 = main::toD0182_$0#0&$3fff Constant (const byte) main::toD0182_$5#0 = >main::toD0182_$4#0 Successful SSA optimization Pass2ConstantIdentification +if() condition always true - replacing block destination [102] if((const byte*) fire::buffer#0!=(const byte*) fire::$2) goto fire::@2 +Successful SSA optimization Pass2ConstantIfs Constant right-side identified [15] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 Constant right-side identified [17] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Constant right-side identified [22] (word~) main::toD0182_$2#0 ← (const word) main::toD0182_$1#0 * (byte) 4 @@ -1147,8 +1589,9 @@ Constant inlined makecharset::c#0 = (byte) 0 Constant inlined fire::buffer#0 = (const byte*) BUFFER#0 Constant inlined fillscreen::fill#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting fire::@12(between fire::@2 and fire::@4) -Added new block during phi lifting fire::@13(between fire::@11 and fire::@9) +Added new block during phi lifting fire::@12(between fire::@1 and fire::@2) +Added new block during phi lifting fire::@13(between fire::@2 and fire::@4) +Added new block during phi lifting fire::@14(between fire::@11 and fire::@9) Added new block during phi lifting makecharset::@13(between makecharset::@1 and makecharset::@1) Added new block during phi lifting makecharset::@14(between makecharset::@3 and makecharset::@3) Added new block during phi lifting makecharset::@15(between makecharset::@11 and makecharset::@5) @@ -1182,16 +1625,16 @@ Adding NOP phi() at start of makecharset::@4 CALL GRAPH Calls in [] to main:4 Calls in [main] to fillscreen:10 fillscreen:12 fillscreen:14 fillscreen:16 sid_rnd_init:18 makecharset:20 fire:24 fire:29 -Calls in [fire] to sid_rnd:41 +Calls in [fire] to sid_rnd:53 Created 20 initial phi equivalence classes -Not coalescing [35] fire::screen#10 ← fire::screen#0 -Coalesced [39] fire::screen#13 ← fire::screen#1 -Coalesced [52] fire::buffer#11 ← fire::buffer#3 -Coalesced [53] fire::screen#12 ← fire::screen#3 -Coalesced [60] fire::c#5 ← fire::c#1 -Coalesced [66] fire::buffer#10 ← fire::buffer#2 -Coalesced [67] fire::screen#11 ← fire::screen#2 +Not coalescing [35] fire::screen#15 ← fire::screen#0 +Coalesced [43] fire::c#5 ← fire::c#1 +Coalesced [51] fire::screen#17 ← fire::screen#1 +Coalesced [64] fire::buffer#15 ← fire::buffer#3 +Coalesced [65] fire::screen#16 ← fire::screen#3 +Coalesced [66] fire::buffer#14 ← fire::buffer#2 +Coalesced [67] fire::screen#14 ← fire::screen#2 Coalesced [68] fire::c#4 ← fire::c#0 Coalesced [84] makecharset::bc#9 ← makecharset::bc#5 Coalesced [93] makecharset::bc#12 ← makecharset::bc#2 @@ -1219,8 +1662,9 @@ Culled Empty Block (label) main::@15 Culled Empty Block (label) main::toD0181_@return Culled Empty Block (label) main::@16 Culled Empty Block (label) main::toD0182_@return -Culled Empty Block (label) fire::@13 +Culled Empty Block (label) fire::@14 Culled Empty Block (label) fire::@12 +Culled Empty Block (label) fire::@13 Culled Empty Block (label) makecharset::@2 Culled Empty Block (label) makecharset::@4 Culled Empty Block (label) makecharset::@15 @@ -1318,52 +1762,54 @@ main::@3: scope:[main] from main::toD0182 to:main::@1 fire: scope:[fire] from main::@1 main::@2 [25] (byte*) fire::screen#0 ← phi( main::@1/(const byte*) SCREEN1#0 main::@2/(const byte*) SCREEN2#0 ) - [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 - to:fire::@1 -fire::@1: scope:[fire] from fire fire::@4 - [27] (byte*) fire::screen#4 ← phi( fire/(byte*~) fire::screen#10 fire::@4/(byte*) fire::screen#2 ) - [27] (byte*) fire::buffer#4 ← phi( fire/(const byte*) BUFFER#0 fire::@4/(byte*) fire::buffer#2 ) - [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 - to:fire::@3 -fire::@3: scope:[fire] from fire::@1 - [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 - to:fire::@6 -fire::@6: scope:[fire] from fire::@3 fire::@7 - [30] (byte*) fire::screen#5 ← phi( fire::@7/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) - [30] (byte*) fire::buffer#7 ← phi( fire::@7/(byte*) fire::buffer#3 fire::@3/(const byte*) BUFFER#0+(word)(number) $18*(number) $28 ) - [31] call sid_rnd - [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 - to:fire::@7 -fire::@7: scope:[fire] from fire::@6 - [33] (byte~) fire::$10 ← (byte) sid_rnd::return#2 - [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 - [35] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 - [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 - [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) - [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 - [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 - [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 - to:fire::@return -fire::@return: scope:[fire] from fire::@7 - [41] return - to:@return -fire::@2: scope:[fire] from fire::@1 - [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) - [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) - [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) - [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 - [46] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 + to:fire::@1_1 +fire::@1_1: scope:[fire] from fire + [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 + to:fire::@2 +fire::@2: scope:[fire] from fire::@1 fire::@1_1 + [27] (byte*) fire::screen#10 ← phi( fire::@1/(byte*) fire::screen#2 fire::@1_1/(byte*~) fire::screen#15 ) + [27] (byte*) fire::buffer#10 ← phi( fire::@1/(byte*) fire::buffer#2 fire::@1_1/(const byte*) BUFFER#0 ) + [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) + [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) + [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 + [32] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 to:fire::@5 fire::@5: scope:[fire] from fire::@2 - [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 + [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 to:fire::@4 fire::@4: scope:[fire] from fire::@2 fire::@5 - [48] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) - [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 - [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) - [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 - [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 + [34] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 ) + [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 + [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) + [37] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#10 + [38] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#10 to:fire::@1 +fire::@1: scope:[fire] from fire::@4 + [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 + to:fire::@3 +fire::@3: scope:[fire] from fire::@1 + [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 + to:fire::@6 +fire::@6: scope:[fire] from fire::@3 fire::@7 + [41] (byte*) fire::screen#5 ← phi( fire::@7/(byte*) fire::screen#3 fire::@3/(byte*) fire::screen#1 ) + [41] (byte*) fire::buffer#7 ← phi( fire::@7/(byte*) fire::buffer#3 fire::@3/(const byte*) BUFFER#0+(word)(number) $18*(number) $28 ) + [42] call sid_rnd + [43] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:fire::@7 +fire::@7: scope:[fire] from fire::@6 + [44] (byte~) fire::$10 ← (byte) sid_rnd::return#2 + [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 + [46] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 + [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 + [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) + [49] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 + [50] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 + [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 + to:fire::@return +fire::@return: scope:[fire] from fire::@7 + [52] return + to:@return sid_rnd: scope:[sid_rnd] from fire::@6 [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return @@ -1485,9 +1931,9 @@ VARIABLE REGISTER WEIGHTS (byte~) fire::$5 202.0 (byte~) fire::$6 202.0 (byte*) fire::buffer -(byte*) fire::buffer#2 202.0 +(byte*) fire::buffer#10 73.45454545454545 +(byte*) fire::buffer#2 151.5 (byte*) fire::buffer#3 151.5 -(byte*) fire::buffer#4 75.75 (byte*) fire::buffer#7 44.888888888888886 (byte) fire::c (byte) fire::c#0 202.0 @@ -1496,10 +1942,10 @@ VARIABLE REGISTER WEIGHTS (byte*) fire::screen (byte*) fire::screen#0 0.26666666666666666 (byte*) fire::screen#1 4.0 -(byte*~) fire::screen#10 4.0 -(byte*) fire::screen#2 101.0 +(byte*) fire::screen#10 30.5 +(byte*~) fire::screen#15 4.0 +(byte*) fire::screen#2 67.33333333333333 (byte*) fire::screen#3 67.33333333333333 -(byte*) fire::screen#4 27.727272727272727 (byte*) fire::screen#5 38.125 (byte*) fire::screenbase (void()) main() @@ -1570,11 +2016,11 @@ VARIABLE REGISTER WEIGHTS Initial phi equivalence classes [ fire::screen#0 ] -[ fire::buffer#4 fire::buffer#2 ] -[ fire::screen#4 fire::screen#10 fire::screen#2 ] +[ fire::buffer#10 fire::buffer#2 ] +[ fire::screen#10 fire::screen#2 fire::screen#15 ] +[ fire::c#2 fire::c#0 fire::c#1 ] [ fire::buffer#7 fire::buffer#3 ] [ fire::screen#5 fire::screen#3 fire::screen#1 ] -[ fire::c#2 fire::c#0 fire::c#1 ] [ makecharset::font#2 makecharset::font#1 ] [ makecharset::font1#2 makecharset::font1#1 ] [ makecharset::c#7 makecharset::c#1 ] @@ -1585,13 +2031,13 @@ Initial phi equivalence classes [ fillscreen::fill#5 ] [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] [ fillscreen::i#2 fillscreen::i#1 ] +Added variable fire::$4 to zero page equivalence class [ fire::$4 ] +Added variable fire::$5 to zero page equivalence class [ fire::$5 ] +Added variable fire::$6 to zero page equivalence class [ fire::$6 ] Added variable sid_rnd::return#2 to zero page equivalence class [ sid_rnd::return#2 ] Added variable fire::$10 to zero page equivalence class [ fire::$10 ] Added variable fire::$11 to zero page equivalence class [ fire::$11 ] Added variable fire::$12 to zero page equivalence class [ fire::$12 ] -Added variable fire::$4 to zero page equivalence class [ fire::$4 ] -Added variable fire::$5 to zero page equivalence class [ fire::$5 ] -Added variable fire::$6 to zero page equivalence class [ fire::$6 ] Added variable sid_rnd::return#0 to zero page equivalence class [ sid_rnd::return#0 ] Added variable makecharset::$8 to zero page equivalence class [ makecharset::$8 ] Added variable makecharset::$9 to zero page equivalence class [ makecharset::$9 ] @@ -1602,11 +2048,11 @@ Added variable makecharset::$15 to zero page equivalence class [ makecharset::$1 Added variable makecharset::$18 to zero page equivalence class [ makecharset::$18 ] Complete equivalence classes [ fire::screen#0 ] -[ fire::buffer#4 fire::buffer#2 ] -[ fire::screen#4 fire::screen#10 fire::screen#2 ] +[ fire::buffer#10 fire::buffer#2 ] +[ fire::screen#10 fire::screen#2 fire::screen#15 ] +[ fire::c#2 fire::c#0 fire::c#1 ] [ fire::buffer#7 fire::buffer#3 ] [ fire::screen#5 fire::screen#3 fire::screen#1 ] -[ fire::c#2 fire::c#0 fire::c#1 ] [ makecharset::font#2 makecharset::font#1 ] [ makecharset::font1#2 makecharset::font1#1 ] [ makecharset::c#7 makecharset::c#1 ] @@ -1617,13 +2063,13 @@ Complete equivalence classes [ fillscreen::fill#5 ] [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] [ fillscreen::i#2 fillscreen::i#1 ] +[ fire::$4 ] +[ fire::$5 ] +[ fire::$6 ] [ sid_rnd::return#2 ] [ fire::$10 ] [ fire::$11 ] [ fire::$12 ] -[ fire::$4 ] -[ fire::$5 ] -[ fire::$6 ] [ sid_rnd::return#0 ] [ makecharset::$8 ] [ makecharset::$9 ] @@ -1633,11 +2079,11 @@ Complete equivalence classes [ makecharset::$15 ] [ makecharset::$18 ] Allocated zp ZP_WORD:2 [ fire::screen#0 ] -Allocated zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] -Allocated zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] -Allocated zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] -Allocated zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] -Allocated zp ZP_BYTE:12 [ fire::c#2 fire::c#0 fire::c#1 ] +Allocated zp ZP_WORD:4 [ fire::buffer#10 fire::buffer#2 ] +Allocated zp ZP_WORD:6 [ fire::screen#10 fire::screen#2 fire::screen#15 ] +Allocated zp ZP_BYTE:8 [ fire::c#2 fire::c#0 fire::c#1 ] +Allocated zp ZP_WORD:9 [ fire::buffer#7 fire::buffer#3 ] +Allocated zp ZP_WORD:11 [ fire::screen#5 fire::screen#3 fire::screen#1 ] Allocated zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] Allocated zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] Allocated zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] @@ -1648,13 +2094,13 @@ Allocated zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] Allocated zp ZP_BYTE:22 [ fillscreen::fill#5 ] Allocated zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] Allocated zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] -Allocated zp ZP_BYTE:27 [ sid_rnd::return#2 ] -Allocated zp ZP_BYTE:28 [ fire::$10 ] -Allocated zp ZP_BYTE:29 [ fire::$11 ] -Allocated zp ZP_BYTE:30 [ fire::$12 ] -Allocated zp ZP_BYTE:31 [ fire::$4 ] -Allocated zp ZP_BYTE:32 [ fire::$5 ] -Allocated zp ZP_BYTE:33 [ fire::$6 ] +Allocated zp ZP_BYTE:27 [ fire::$4 ] +Allocated zp ZP_BYTE:28 [ fire::$5 ] +Allocated zp ZP_BYTE:29 [ fire::$6 ] +Allocated zp ZP_BYTE:30 [ sid_rnd::return#2 ] +Allocated zp ZP_BYTE:31 [ fire::$10 ] +Allocated zp ZP_BYTE:32 [ fire::$11 ] +Allocated zp ZP_BYTE:33 [ fire::$12 ] Allocated zp ZP_BYTE:34 [ sid_rnd::return#0 ] Allocated zp ZP_BYTE:35 [ makecharset::$8 ] Allocated zp ZP_BYTE:36 [ makecharset::$9 ] @@ -1850,50 +2296,122 @@ main: { // fire // Animate the fire on the passed screen. Uses BUFFER to store the current values. fire: { - .label _4 = $1f - .label _5 = $20 - .label _6 = $21 - .label _10 = $1c - .label _11 = $1d - .label _12 = $1e + .label _4 = $1b + .label _5 = $1c + .label _6 = $1d + .label _10 = $1f + .label _11 = $20 + .label _12 = $21 .label screen = 2 - .label c = $c - .label screen_1 = $a + .label c = 8 + .label screen_1 = $b .label screen_2 = 6 .label buffer = 4 - .label screen_3 = $a - .label buffer_3 = 8 - .label screen_4 = 6 - .label buffer_7 = 8 - .label screen_5 = $a + .label screen_3 = $b + .label buffer_3 = 9 + .label buffer_7 = 9 + .label screen_5 = $b .label screen_10 = 6 - // [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 + .label screen_15 = 6 + jmp b1_1 + // fire::@1_1 + b1_1: + // [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 lda screen - sta screen_10 + sta screen_15 lda screen+1 - sta screen_10+1 - // [27] phi from fire to fire::@1 [phi:fire->fire::@1] - b1_from_fire: - // [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#10 [phi:fire->fire::@1#0] -- register_copy - // [27] phi (byte*) fire::buffer#4 = (const byte*) BUFFER#0 [phi:fire->fire::@1#1] -- pbuz1=pbuc1 + sta screen_15+1 + // [27] phi from fire::@1_1 to fire::@2 [phi:fire::@1_1->fire::@2] + b2_from_b1_1: + // [27] phi (byte*) fire::screen#10 = (byte*~) fire::screen#15 [phi:fire::@1_1->fire::@2#0] -- register_copy + // [27] phi (byte*) fire::buffer#10 = (const byte*) BUFFER#0 [phi:fire::@1_1->fire::@2#1] -- pbuz1=pbuc1 lda #<BUFFER sta buffer lda #>BUFFER sta buffer+1 + jmp b2 + // [27] phi from fire::@1 to fire::@2 [phi:fire::@1->fire::@2] + b2_from_b1: + // [27] phi (byte*) fire::screen#10 = (byte*) fire::screen#2 [phi:fire::@1->fire::@2#0] -- register_copy + // [27] phi (byte*) fire::buffer#10 = (byte*) fire::buffer#2 [phi:fire::@1->fire::@2#1] -- register_copy + jmp b2 + // fire::@2 + b2: + // [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) -- vbuz1=pbuz2_derefidx_vbuc1_plus_pbuz2_derefidx_vbuc2 + ldy #$28-1 + clc + lda (buffer),y + ldy #$28-1 + adc (buffer),y + sta _4 + // [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) -- vbuz1=vbuz2_plus_pbuz3_derefidx_vbuc1 + lda _4 + ldy #$28 + clc + adc (buffer),y + sta _5 + // [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) -- vbuz1=vbuz2_plus_pbuz3_derefidx_vbuc1 + lda _5 + ldy #$29 + clc + adc (buffer),y + sta _6 + // [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 -- vbuz1=vbuz2_ror_2 + lda _6 + lsr + lsr + sta c + // [32] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 -- vbuz1_lt_vbuc1_then_la1 + lda c + cmp #2+1 + bcc b4_from_b2 + jmp b5 + // fire::@5 + b5: + // [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 -- vbuz1=vbuz1_minus_vbuc1 + lax c + axs #3 + stx c + // [34] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] + b4_from_b2: + b4_from_b5: + // [34] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy + jmp b4 + // fire::@4 + b4: + // [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 -- _deref_pbuz1=vbuz2 + lda c + ldy #0 + sta (buffer),y + // [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (buffer),y + ldy #0 + sta (screen_10),y + // [37] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#10 -- pbuz1=_inc_pbuz1 + inc screen_2 + bne !+ + inc screen_2+1 + !: + // [38] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#10 -- pbuz1=_inc_pbuz1 + inc buffer + bne !+ + inc buffer+1 + !: jmp b1 // fire::@1 b1: - // [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 -- pbuz1_neq_pbuc1_then_la1 + // [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 -- pbuz1_neq_pbuc1_then_la1 lda buffer+1 cmp #>BUFFER+$18*$28 - bne b2 + bne b2_from_b1 lda buffer cmp #<BUFFER+$18*$28 - bne b2 + bne b2_from_b1 jmp b3 // fire::@3 b3: - // [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 -- pbuz1=pbuz2_plus_vwuc1 + // [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 -- pbuz1=pbuz2_plus_vwuc1 lda screen clc adc #<$18*$28 @@ -1901,64 +2419,64 @@ fire: { lda screen+1 adc #>$18*$28 sta screen_1+1 - // [30] phi from fire::@3 to fire::@6 [phi:fire::@3->fire::@6] + // [41] phi from fire::@3 to fire::@6 [phi:fire::@3->fire::@6] b6_from_b3: - // [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy - // [30] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(word)(number) $18*(number) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 + // [41] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy + // [41] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(word)(number) $18*(number) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 lda #<BUFFER+$18*$28 sta buffer_7 lda #>BUFFER+$18*$28 sta buffer_7+1 jmp b6 - // [30] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] + // [41] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] b6_from_b7: - // [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy - // [30] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy + // [41] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy + // [41] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy jmp b6 // fire::@6 b6: - // [31] call sid_rnd + // [42] call sid_rnd jsr sid_rnd - // [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 -- vbuz1=vbuz2 + // [43] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 -- vbuz1=vbuz2 lda sid_rnd.return sta sid_rnd.return_2 jmp b7 // fire::@7 b7: - // [33] (byte~) fire::$10 ← (byte) sid_rnd::return#2 -- vbuz1=vbuz2 + // [44] (byte~) fire::$10 ← (byte) sid_rnd::return#2 -- vbuz1=vbuz2 lda sid_rnd.return_2 sta _10 - // [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 -- vbuz1=vbuz2_ror_4 + // [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 -- vbuz1=vbuz2_ror_4 lda _10 lsr lsr lsr lsr sta _11 - // [35] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 -- vbuz1=vbuc1_plus_vbuz2 + // [46] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 -- vbuz1=vbuc1_plus_vbuz2 lax _11 axs #-[$30] stx _12 - // [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 -- _deref_pbuz1=vbuz2 + // [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 -- _deref_pbuz1=vbuz2 lda _12 ldy #0 sta (buffer_7),y - // [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 + // [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (buffer_7),y ldy #0 sta (screen_5),y - // [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 + // [49] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 inc screen_3 bne !+ inc screen_3+1 !: - // [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 + // [50] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 inc buffer_3 bne !+ inc buffer_3+1 !: - // [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 + // [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 lda buffer_3+1 cmp #>BUFFER+$19*$28 bne b6_from_b7 @@ -1968,83 +2486,15 @@ fire: { jmp breturn // fire::@return breturn: - // [41] return + // [52] return rts - // fire::@2 - b2: - // [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) -- vbuz1=pbuz2_derefidx_vbuc1_plus_pbuz2_derefidx_vbuc2 - ldy #$28-1 - clc - lda (buffer),y - ldy #$28-1 - adc (buffer),y - sta _4 - // [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) -- vbuz1=vbuz2_plus_pbuz3_derefidx_vbuc1 - lda _4 - ldy #$28 - clc - adc (buffer),y - sta _5 - // [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) -- vbuz1=vbuz2_plus_pbuz3_derefidx_vbuc1 - lda _5 - ldy #$29 - clc - adc (buffer),y - sta _6 - // [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 -- vbuz1=vbuz2_ror_2 - lda _6 - lsr - lsr - sta c - // [46] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 -- vbuz1_lt_vbuc1_then_la1 - lda c - cmp #2+1 - bcc b4_from_b2 - jmp b5 - // fire::@5 - b5: - // [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 -- vbuz1=vbuz1_minus_vbuc1 - lax c - axs #3 - stx c - // [48] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] - b4_from_b2: - b4_from_b5: - // [48] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy - jmp b4 - // fire::@4 - b4: - // [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuz2 - lda c - ldy #0 - sta (buffer),y - // [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (buffer),y - ldy #0 - sta (screen_4),y - // [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 - inc screen_2 - bne !+ - inc screen_2+1 - !: - // [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 - inc buffer - bne !+ - inc buffer+1 - !: - // [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] - b1_from_b4: - // [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy - // [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy - jmp b1 } // sid_rnd // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { .label return = $22 - .label return_2 = $1b + .label return_2 = $1e // [53] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 lda SID_VOICE3_OSC sta return @@ -2361,20 +2811,20 @@ Statement [5] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 Statement [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::screen#10 ] ) always clobbers reg byte a -Statement [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a -Statement [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a -Statement [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 [ fire::buffer#7 fire::screen#5 fire::$11 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$11 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$11 ] ) always clobbers reg byte a -Statement [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y -Statement [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y -Statement [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a -Statement [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] ) always clobbers reg byte a reg byte y -Statement [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] ) always clobbers reg byte a reg byte y -Statement [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] ) always clobbers reg byte a reg byte y -Statement [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ) always clobbers reg byte a -Statement [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ) always clobbers reg byte a -Statement [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte y -Statement [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a reg byte y +Statement [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#15 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#15 ] main:2::fire:22 [ fire::screen#0 fire::screen#15 ] ) always clobbers reg byte a +Statement [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] ) always clobbers reg byte a reg byte y +Statement [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] ) always clobbers reg byte a reg byte y +Statement [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] ) always clobbers reg byte a reg byte y +Statement [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] ) always clobbers reg byte a +Statement [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] ) always clobbers reg byte a +Statement [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte y +Statement [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte a reg byte y +Statement [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] main:2::fire:22 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] ) always clobbers reg byte a +Statement [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a +Statement [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 [ fire::buffer#7 fire::screen#5 fire::$11 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$11 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$11 ] ) always clobbers reg byte a +Statement [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y +Statement [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y +Statement [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a Statement [57] *((byte*) makecharset::font#2) ← (byte) 0 [ makecharset::font#2 ] ( main:2::makecharset:17 [ makecharset::font#2 ] ) always clobbers reg byte a reg byte y Statement [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte)(number) 1*(number) 8) goto makecharset::@1 [ makecharset::font#1 ] ( main:2::makecharset:17 [ makecharset::font#1 ] ) always clobbers reg byte a Statement [61] *((byte*) makecharset::font1#2) ← (byte) $ff [ makecharset::font1#2 ] ( main:2::makecharset:17 [ makecharset::font1#2 ] ) always clobbers reg byte a reg byte y @@ -2407,20 +2857,20 @@ Statement [5] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 Statement [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::screen#10 ] ) always clobbers reg byte a -Statement [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a -Statement [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a -Statement [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 [ fire::buffer#7 fire::screen#5 fire::$11 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$11 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$11 ] ) always clobbers reg byte a -Statement [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y -Statement [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y -Statement [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a -Statement [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] ) always clobbers reg byte a reg byte y -Statement [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] ) always clobbers reg byte a reg byte y -Statement [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] ) always clobbers reg byte a reg byte y -Statement [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ) always clobbers reg byte a -Statement [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ) always clobbers reg byte a -Statement [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte y -Statement [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a reg byte y +Statement [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#15 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#15 ] main:2::fire:22 [ fire::screen#0 fire::screen#15 ] ) always clobbers reg byte a +Statement [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] ) always clobbers reg byte a reg byte y +Statement [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] ) always clobbers reg byte a reg byte y +Statement [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] ) always clobbers reg byte a reg byte y +Statement [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] ) always clobbers reg byte a +Statement [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] ) always clobbers reg byte a +Statement [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte y +Statement [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte a reg byte y +Statement [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] main:2::fire:22 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] ) always clobbers reg byte a +Statement [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a +Statement [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 [ fire::buffer#7 fire::screen#5 fire::$11 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$11 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$11 ] ) always clobbers reg byte a +Statement [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y +Statement [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y +Statement [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a Statement [57] *((byte*) makecharset::font#2) ← (byte) 0 [ makecharset::font#2 ] ( main:2::makecharset:17 [ makecharset::font#2 ] ) always clobbers reg byte a reg byte y Statement [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte)(number) 1*(number) 8) goto makecharset::@1 [ makecharset::font#1 ] ( main:2::makecharset:17 [ makecharset::font#1 ] ) always clobbers reg byte a Statement [61] *((byte*) makecharset::font1#2) ← (byte) $ff [ makecharset::font1#2 ] ( main:2::makecharset:17 [ makecharset::font1#2 ] ) always clobbers reg byte a reg byte y @@ -2449,20 +2899,20 @@ Statement [5] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 Statement [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::screen#10 ] ) always clobbers reg byte a -Statement [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a -Statement [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a -Statement [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 [ fire::buffer#7 fire::screen#5 fire::$11 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$11 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$11 ] ) always clobbers reg byte a -Statement [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y -Statement [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y -Statement [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a -Statement [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$4 ] ) always clobbers reg byte a reg byte y -Statement [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$5 ] ) always clobbers reg byte a reg byte y -Statement [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::$6 ] ) always clobbers reg byte a reg byte y -Statement [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#0 ] ) always clobbers reg byte a -Statement [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 fire::c#1 ] ) always clobbers reg byte a -Statement [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte y -Statement [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#4 fire::screen#4 ] ) always clobbers reg byte a reg byte y +Statement [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 [ fire::screen#0 fire::screen#15 ] ( main:2::fire:19 [ fire::screen#0 fire::screen#15 ] main:2::fire:22 [ fire::screen#0 fire::screen#15 ] ) always clobbers reg byte a +Statement [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$4 ] ) always clobbers reg byte a reg byte y +Statement [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$5 ] ) always clobbers reg byte a reg byte y +Statement [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::$6 ] ) always clobbers reg byte a reg byte y +Statement [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#0 ] ) always clobbers reg byte a +Statement [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 fire::c#1 ] ) always clobbers reg byte a +Statement [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte y +Statement [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] main:2::fire:22 [ fire::screen#0 fire::buffer#10 fire::screen#10 ] ) always clobbers reg byte a reg byte y +Statement [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] ( main:2::fire:19 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] main:2::fire:22 [ fire::screen#0 fire::buffer#2 fire::screen#2 ] ) always clobbers reg byte a +Statement [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 [ fire::screen#1 ] ( main:2::fire:19 [ fire::screen#1 ] main:2::fire:22 [ fire::screen#1 ] ) always clobbers reg byte a +Statement [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 [ fire::buffer#7 fire::screen#5 fire::$11 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 fire::$11 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 fire::$11 ] ) always clobbers reg byte a +Statement [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte y +Statement [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) [ fire::buffer#7 fire::screen#5 ] ( main:2::fire:19 [ fire::buffer#7 fire::screen#5 ] main:2::fire:22 [ fire::buffer#7 fire::screen#5 ] ) always clobbers reg byte a reg byte y +Statement [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 [ fire::buffer#3 fire::screen#3 ] ( main:2::fire:19 [ fire::buffer#3 fire::screen#3 ] main:2::fire:22 [ fire::buffer#3 fire::screen#3 ] ) always clobbers reg byte a Statement [57] *((byte*) makecharset::font#2) ← (byte) 0 [ makecharset::font#2 ] ( main:2::makecharset:17 [ makecharset::font#2 ] ) always clobbers reg byte a reg byte y Statement [59] if((byte*) makecharset::font#1!=(const byte*) CHARSET#0+(byte)(number) 1*(number) 8) goto makecharset::@1 [ makecharset::font#1 ] ( main:2::makecharset:17 [ makecharset::font#1 ] ) always clobbers reg byte a Statement [61] *((byte*) makecharset::font1#2) ← (byte) $ff [ makecharset::font1#2 ] ( main:2::makecharset:17 [ makecharset::font1#2 ] ) always clobbers reg byte a reg byte y @@ -2484,11 +2934,11 @@ Statement [88] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTRO Statement [92] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#5 fillscreen::i#2 ] ) always clobbers reg byte a reg byte y Statement [95] if((word) fillscreen::i#1!=(word) $3e8) goto fillscreen::@1 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ( main:2::fillscreen:7 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:9 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:11 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] main:2::fillscreen:13 [ fillscreen::fill#5 fillscreen::screen#4 fillscreen::i#1 ] ) always clobbers reg byte a Potential registers zp ZP_WORD:2 [ fire::screen#0 ] : zp ZP_WORD:2 , -Potential registers zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] : zp ZP_WORD:4 , -Potential registers zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] : zp ZP_WORD:8 , -Potential registers zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] : zp ZP_WORD:10 , -Potential registers zp ZP_BYTE:12 [ fire::c#2 fire::c#0 fire::c#1 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:4 [ fire::buffer#10 fire::buffer#2 ] : zp ZP_WORD:4 , +Potential registers zp ZP_WORD:6 [ fire::screen#10 fire::screen#2 fire::screen#15 ] : zp ZP_WORD:6 , +Potential registers zp ZP_BYTE:8 [ fire::c#2 fire::c#0 fire::c#1 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:9 [ fire::buffer#7 fire::buffer#3 ] : zp ZP_WORD:9 , +Potential registers zp ZP_WORD:11 [ fire::screen#5 fire::screen#3 fire::screen#1 ] : zp ZP_WORD:11 , Potential registers zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] : zp ZP_WORD:13 , Potential registers zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] : zp ZP_WORD:15 , Potential registers zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] : zp ZP_BYTE:17 , @@ -2499,13 +2949,13 @@ Potential registers zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharse Potential registers zp ZP_BYTE:22 [ fillscreen::fill#5 ] : zp ZP_BYTE:22 , reg byte x , Potential registers zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] : zp ZP_WORD:23 , Potential registers zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] : zp ZP_WORD:25 , -Potential registers zp ZP_BYTE:27 [ sid_rnd::return#2 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:28 [ fire::$10 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:29 [ fire::$11 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:30 [ fire::$12 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:31 [ fire::$4 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:32 [ fire::$5 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:33 [ fire::$6 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:27 [ fire::$4 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:28 [ fire::$5 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:29 [ fire::$6 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:30 [ sid_rnd::return#2 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:31 [ fire::$10 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:32 [ fire::$11 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:33 [ fire::$12 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:34 [ sid_rnd::return#0 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:35 [ makecharset::$8 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:36 [ makecharset::$9 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , @@ -2517,53 +2967,53 @@ Potential registers zp ZP_WORD:44 [ makecharset::$18 ] : zp ZP_WORD:44 , REGISTER UPLIFT SCOPES Uplift Scope [makecharset] 5,017.8: zp ZP_BYTE:19 [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] 2,874.43: zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] 2,002: zp ZP_BYTE:35 [ makecharset::$8 ] 2,002: zp ZP_BYTE:36 [ makecharset::$9 ] 2,002: zp ZP_BYTE:37 [ makecharset::$10 ] 1,835.17: zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] 228.21: zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] 202: zp ZP_WORD:38 [ makecharset::$13 ] 202: zp ZP_WORD:40 [ makecharset::$14 ] 202: zp ZP_WORD:42 [ makecharset::$15 ] 202: zp ZP_WORD:44 [ makecharset::$18 ] 67.65: zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] 33: zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] 33: zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] -Uplift Scope [fire] 707: zp ZP_BYTE:12 [ fire::c#2 fire::c#0 fire::c#1 ] 277.75: zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] 202: zp ZP_BYTE:28 [ fire::$10 ] 202: zp ZP_BYTE:29 [ fire::$11 ] 202: zp ZP_BYTE:30 [ fire::$12 ] 202: zp ZP_BYTE:31 [ fire::$4 ] 202: zp ZP_BYTE:32 [ fire::$5 ] 202: zp ZP_BYTE:33 [ fire::$6 ] 196.39: zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] 132.73: zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] 109.46: zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] 0.27: zp ZP_WORD:2 [ fire::screen#0 ] -Uplift Scope [sid_rnd] 202: zp ZP_BYTE:27 [ sid_rnd::return#2 ] 34.33: zp ZP_BYTE:34 [ sid_rnd::return#0 ] +Uplift Scope [fire] 707: zp ZP_BYTE:8 [ fire::c#2 fire::c#0 fire::c#1 ] 224.95: zp ZP_WORD:4 [ fire::buffer#10 fire::buffer#2 ] 202: zp ZP_BYTE:27 [ fire::$4 ] 202: zp ZP_BYTE:28 [ fire::$5 ] 202: zp ZP_BYTE:29 [ fire::$6 ] 202: zp ZP_BYTE:31 [ fire::$10 ] 202: zp ZP_BYTE:32 [ fire::$11 ] 202: zp ZP_BYTE:33 [ fire::$12 ] 196.39: zp ZP_WORD:9 [ fire::buffer#7 fire::buffer#3 ] 109.46: zp ZP_WORD:11 [ fire::screen#5 fire::screen#3 fire::screen#1 ] 101.83: zp ZP_WORD:6 [ fire::screen#10 fire::screen#2 fire::screen#15 ] 0.27: zp ZP_WORD:2 [ fire::screen#0 ] +Uplift Scope [sid_rnd] 202: zp ZP_BYTE:30 [ sid_rnd::return#2 ] 34.33: zp ZP_BYTE:34 [ sid_rnd::return#0 ] Uplift Scope [fillscreen] 26.83: zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] 23.83: zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] 1.83: zp ZP_BYTE:22 [ fillscreen::fill#5 ] Uplift Scope [sid_rnd_init] Uplift Scope [main] Uplift Scope [] -Uplifting [makecharset] best 124995 combination reg byte x [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte a [ makecharset::$8 ] reg byte a [ makecharset::$9 ] zp ZP_BYTE:37 [ makecharset::$10 ] zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] zp ZP_WORD:38 [ makecharset::$13 ] zp ZP_WORD:40 [ makecharset::$14 ] zp ZP_WORD:42 [ makecharset::$15 ] zp ZP_WORD:44 [ makecharset::$18 ] zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] +Uplifting [makecharset] best 125325 combination reg byte x [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte a [ makecharset::$8 ] reg byte a [ makecharset::$9 ] zp ZP_BYTE:37 [ makecharset::$10 ] zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] zp ZP_WORD:38 [ makecharset::$13 ] zp ZP_WORD:40 [ makecharset::$14 ] zp ZP_WORD:42 [ makecharset::$15 ] zp ZP_WORD:44 [ makecharset::$18 ] zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] Limited combination testing to 100 combinations of 512 possible. -Uplifting [fire] best 122095 combination reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] reg byte a [ fire::$10 ] reg byte a [ fire::$11 ] reg byte a [ fire::$12 ] zp ZP_BYTE:31 [ fire::$4 ] zp ZP_BYTE:32 [ fire::$5 ] zp ZP_BYTE:33 [ fire::$6 ] zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] zp ZP_WORD:2 [ fire::screen#0 ] +Uplifting [fire] best 122225 combination reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_WORD:4 [ fire::buffer#10 fire::buffer#2 ] reg byte a [ fire::$4 ] reg byte a [ fire::$5 ] reg byte a [ fire::$6 ] zp ZP_BYTE:31 [ fire::$10 ] zp ZP_BYTE:32 [ fire::$11 ] zp ZP_BYTE:33 [ fire::$12 ] zp ZP_WORD:9 [ fire::buffer#7 fire::buffer#3 ] zp ZP_WORD:11 [ fire::screen#5 fire::screen#3 fire::screen#1 ] zp ZP_WORD:6 [ fire::screen#10 fire::screen#2 fire::screen#15 ] zp ZP_WORD:2 [ fire::screen#0 ] Limited combination testing to 100 combinations of 16384 possible. -Uplifting [sid_rnd] best 121192 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] -Uplifting [fillscreen] best 121170 combination zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] reg byte x [ fillscreen::fill#5 ] -Uplifting [sid_rnd_init] best 121170 combination -Uplifting [main] best 121170 combination -Uplifting [] best 121170 combination +Uplifting [sid_rnd] best 121322 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] +Uplifting [fillscreen] best 121300 combination zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] reg byte x [ fillscreen::fill#5 ] +Uplifting [sid_rnd_init] best 121300 combination +Uplifting [main] best 121300 combination +Uplifting [] best 121300 combination Attempting to uplift remaining variables inzp ZP_BYTE:37 [ makecharset::$10 ] -Uplifting [makecharset] best 121170 combination zp ZP_BYTE:37 [ makecharset::$10 ] +Uplifting [makecharset] best 121300 combination zp ZP_BYTE:37 [ makecharset::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] -Uplifting [makecharset] best 121170 combination zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] +Uplifting [makecharset] best 121300 combination zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] -Uplifting [makecharset] best 121170 combination zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:31 [ fire::$4 ] -Uplifting [fire] best 120570 combination reg byte a [ fire::$4 ] -Attempting to uplift remaining variables inzp ZP_BYTE:32 [ fire::$5 ] -Uplifting [fire] best 119970 combination reg byte a [ fire::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:33 [ fire::$6 ] -Uplifting [fire] best 119370 combination reg byte a [ fire::$6 ] +Uplifting [makecharset] best 121300 combination zp ZP_BYTE:18 [ makecharset::i#6 makecharset::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:31 [ fire::$10 ] +Uplifting [fire] best 120700 combination reg byte a [ fire::$10 ] +Attempting to uplift remaining variables inzp ZP_BYTE:32 [ fire::$11 ] +Uplifting [fire] best 120300 combination reg byte a [ fire::$11 ] +Attempting to uplift remaining variables inzp ZP_BYTE:33 [ fire::$12 ] +Uplifting [fire] best 119700 combination reg byte a [ fire::$12 ] Attempting to uplift remaining variables inzp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] -Uplifting [makecharset] best 119370 combination zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] -Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 ] ] with [ zp ZP_WORD:10 [ fire::screen#5 fire::screen#3 fire::screen#1 ] ] - score: 1 +Uplifting [makecharset] best 119700 combination zp ZP_BYTE:17 [ makecharset::c#7 makecharset::c#1 ] +Coalescing zero page register [ zp ZP_WORD:2 [ fire::screen#0 ] ] with [ zp ZP_WORD:11 [ fire::screen#5 fire::screen#3 fire::screen#1 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:38 [ makecharset::$13 ] ] with [ zp ZP_WORD:40 [ makecharset::$14 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:42 [ makecharset::$15 ] ] with [ zp ZP_WORD:44 [ makecharset::$18 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:38 [ makecharset::$13 makecharset::$14 ] ] with [ zp ZP_WORD:42 [ makecharset::$15 makecharset::$18 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:13 [ makecharset::font#2 makecharset::font#1 ] ] with [ zp ZP_WORD:2 [ fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 ] ] -Coalescing zero page register [ zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] ] with [ zp ZP_WORD:4 [ fire::buffer#4 fire::buffer#2 ] ] -Coalescing zero page register [ zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] ] with [ zp ZP_WORD:6 [ fire::screen#4 fire::screen#10 fire::screen#2 ] ] -Coalescing zero page register [ zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] ] with [ zp ZP_WORD:8 [ fire::buffer#7 fire::buffer#3 ] ] -Coalescing zero page register [ zp ZP_WORD:38 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 ] ] with [ zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#4 fire::screen#10 fire::screen#2 ] ] +Coalescing zero page register [ zp ZP_WORD:15 [ makecharset::font1#2 makecharset::font1#1 ] ] with [ zp ZP_WORD:4 [ fire::buffer#10 fire::buffer#2 ] ] +Coalescing zero page register [ zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 ] ] with [ zp ZP_WORD:6 [ fire::screen#10 fire::screen#2 fire::screen#15 ] ] +Coalescing zero page register [ zp ZP_WORD:25 [ fillscreen::i#2 fillscreen::i#1 ] ] with [ zp ZP_WORD:9 [ fire::buffer#7 fire::buffer#3 ] ] +Coalescing zero page register [ zp ZP_WORD:38 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 ] ] with [ zp ZP_WORD:23 [ fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#10 fire::screen#2 fire::screen#15 ] ] Allocated (was zp ZP_WORD:13) zp ZP_WORD:2 [ makecharset::font#2 makecharset::font#1 fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 ] -Allocated (was zp ZP_WORD:15) zp ZP_WORD:4 [ makecharset::font1#2 makecharset::font1#1 fire::buffer#4 fire::buffer#2 ] +Allocated (was zp ZP_WORD:15) zp ZP_WORD:4 [ makecharset::font1#2 makecharset::font1#1 fire::buffer#10 fire::buffer#2 ] Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:6 [ makecharset::c#7 makecharset::c#1 ] Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:7 [ makecharset::i#6 makecharset::i#1 ] Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:8 [ makecharset::ii#2 makecharset::ii#1 ] Allocated (was zp ZP_WORD:25) zp ZP_WORD:9 [ fillscreen::i#2 fillscreen::i#1 fire::buffer#7 fire::buffer#3 ] Allocated (was zp ZP_BYTE:37) zp ZP_BYTE:11 [ makecharset::$10 ] -Allocated (was zp ZP_WORD:38) zp ZP_WORD:12 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#4 fire::screen#10 fire::screen#2 ] +Allocated (was zp ZP_WORD:38) zp ZP_WORD:12 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#10 fire::screen#2 fire::screen#15 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -2750,36 +3200,98 @@ fire: { .label screen_2 = $c .label buffer = 4 .label buffer_3 = 9 - .label screen_4 = $c .label buffer_7 = 9 .label screen_10 = $c - // [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 + .label screen_15 = $c + jmp b1_1 + // fire::@1_1 + b1_1: + // [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 lda screen - sta screen_10 + sta screen_15 lda screen+1 - sta screen_10+1 - // [27] phi from fire to fire::@1 [phi:fire->fire::@1] - b1_from_fire: - // [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#10 [phi:fire->fire::@1#0] -- register_copy - // [27] phi (byte*) fire::buffer#4 = (const byte*) BUFFER#0 [phi:fire->fire::@1#1] -- pbuz1=pbuc1 + sta screen_15+1 + // [27] phi from fire::@1_1 to fire::@2 [phi:fire::@1_1->fire::@2] + b2_from_b1_1: + // [27] phi (byte*) fire::screen#10 = (byte*~) fire::screen#15 [phi:fire::@1_1->fire::@2#0] -- register_copy + // [27] phi (byte*) fire::buffer#10 = (const byte*) BUFFER#0 [phi:fire::@1_1->fire::@2#1] -- pbuz1=pbuc1 lda #<BUFFER sta buffer lda #>BUFFER sta buffer+1 + jmp b2 + // [27] phi from fire::@1 to fire::@2 [phi:fire::@1->fire::@2] + b2_from_b1: + // [27] phi (byte*) fire::screen#10 = (byte*) fire::screen#2 [phi:fire::@1->fire::@2#0] -- register_copy + // [27] phi (byte*) fire::buffer#10 = (byte*) fire::buffer#2 [phi:fire::@1->fire::@2#1] -- register_copy + jmp b2 + // fire::@2 + b2: + // [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) -- vbuaa=pbuz1_derefidx_vbuc1_plus_pbuz1_derefidx_vbuc2 + ldy #$28-1 + clc + lda (buffer),y + ldy #$28-1 + adc (buffer),y + // [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 + ldy #$28 + clc + adc (buffer),y + // [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 + ldy #$29 + clc + adc (buffer),y + // [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 -- vbuaa=vbuaa_ror_2 + lsr + lsr + // [32] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 + cmp #2+1 + bcc b4_from_b2 + jmp b5 + // fire::@5 + b5: + // [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 -- vbuaa=vbuaa_minus_vbuc1 + sec + sbc #3 + // [34] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] + b4_from_b2: + b4_from_b5: + // [34] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy + jmp b4 + // fire::@4 + b4: + // [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa + ldy #0 + sta (buffer),y + // [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (buffer),y + ldy #0 + sta (screen_10),y + // [37] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#10 -- pbuz1=_inc_pbuz1 + inc screen_2 + bne !+ + inc screen_2+1 + !: + // [38] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#10 -- pbuz1=_inc_pbuz1 + inc buffer + bne !+ + inc buffer+1 + !: jmp b1 // fire::@1 b1: - // [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 -- pbuz1_neq_pbuc1_then_la1 + // [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 -- pbuz1_neq_pbuc1_then_la1 lda buffer+1 cmp #>BUFFER+$18*$28 - bne b2 + bne b2_from_b1 lda buffer cmp #<BUFFER+$18*$28 - bne b2 + bne b2_from_b1 jmp b3 // fire::@3 b3: - // [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 -- pbuz1=pbuz1_plus_vwuc1 + // [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 -- pbuz1=pbuz1_plus_vwuc1 clc lda screen adc #<$18*$28 @@ -2787,56 +3299,56 @@ fire: { lda screen+1 adc #>$18*$28 sta screen+1 - // [30] phi from fire::@3 to fire::@6 [phi:fire::@3->fire::@6] + // [41] phi from fire::@3 to fire::@6 [phi:fire::@3->fire::@6] b6_from_b3: - // [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy - // [30] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(word)(number) $18*(number) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 + // [41] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy + // [41] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(word)(number) $18*(number) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 lda #<BUFFER+$18*$28 sta buffer_7 lda #>BUFFER+$18*$28 sta buffer_7+1 jmp b6 - // [30] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] + // [41] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] b6_from_b7: - // [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy - // [30] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy + // [41] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy + // [41] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy jmp b6 // fire::@6 b6: - // [31] call sid_rnd + // [42] call sid_rnd jsr sid_rnd - // [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + // [43] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 jmp b7 // fire::@7 b7: - // [33] (byte~) fire::$10 ← (byte) sid_rnd::return#2 - // [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 -- vbuaa=vbuaa_ror_4 + // [44] (byte~) fire::$10 ← (byte) sid_rnd::return#2 + // [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 -- vbuaa=vbuaa_ror_4 lsr lsr lsr lsr - // [35] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 -- vbuaa=vbuc1_plus_vbuaa + // [46] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 -- vbuaa=vbuc1_plus_vbuaa clc adc #$30 - // [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 -- _deref_pbuz1=vbuaa + // [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 -- _deref_pbuz1=vbuaa ldy #0 sta (buffer_7),y - // [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 + // [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (buffer_7),y ldy #0 sta (screen),y - // [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 + // [49] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 + // [50] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 inc buffer_3 bne !+ inc buffer_3+1 !: - // [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 + // [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 lda buffer_3+1 cmp #>BUFFER+$19*$28 bne b6_from_b7 @@ -2846,66 +3358,8 @@ fire: { jmp breturn // fire::@return breturn: - // [41] return + // [52] return rts - // fire::@2 - b2: - // [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) -- vbuaa=pbuz1_derefidx_vbuc1_plus_pbuz1_derefidx_vbuc2 - ldy #$28-1 - clc - lda (buffer),y - ldy #$28-1 - adc (buffer),y - // [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 - ldy #$28 - clc - adc (buffer),y - // [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 - ldy #$29 - clc - adc (buffer),y - // [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 -- vbuaa=vbuaa_ror_2 - lsr - lsr - // [46] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 - cmp #2+1 - bcc b4_from_b2 - jmp b5 - // fire::@5 - b5: - // [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 -- vbuaa=vbuaa_minus_vbuc1 - sec - sbc #3 - // [48] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] - b4_from_b2: - b4_from_b5: - // [48] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy - jmp b4 - // fire::@4 - b4: - // [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa - ldy #0 - sta (buffer),y - // [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (buffer),y - ldy #0 - sta (screen_4),y - // [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 - inc screen_2 - bne !+ - inc screen_2+1 - !: - // [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 - inc buffer - bne !+ - inc buffer+1 - !: - // [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] - b1_from_b4: - // [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy - // [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy - jmp b1 } // sid_rnd // Get a random number from the SID voice 3, @@ -3217,13 +3671,15 @@ Removing instruction jmp toD0181 Removing instruction jmp b2 Removing instruction jmp toD0182 Removing instruction jmp b3 +Removing instruction jmp b1_1 +Removing instruction jmp b2 +Removing instruction jmp b5 +Removing instruction jmp b4 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp b6 Removing instruction jmp b7 Removing instruction jmp breturn -Removing instruction jmp b5 -Removing instruction jmp b4 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b2 @@ -3240,20 +3696,22 @@ Removing instruction jmp b1 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #BLACK -Removing instruction ldy #0 -Removing instruction ldy #0 Removing instruction ldy #$28-1 Removing instruction ldy #0 Removing instruction ldy #0 +Removing instruction ldy #0 +Removing instruction ldy #0 Replacing instruction ldy #0 with TAY Replacing instruction ldx #0 with TAX Replacing instruction lda #0 with TYA Removing instruction lda #>0 Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label b1_from_b3 with b1 -Replacing label b6_from_b7 with b6 -Replacing label b6_from_b7 with b6 Replacing label b4_from_b2 with b4 +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 +Replacing label b6_from_b7 with b6 +Replacing label b6_from_b7 with b6 Replacing label b1_from_b1 with b1 Replacing label b1_from_b1 with b1 Replacing label b2_from_b2 with b2 @@ -3283,9 +3741,10 @@ Removing instruction toD0181_from_b1: Removing instruction toD0181: Removing instruction toD0182_from_b2: Removing instruction toD0182: -Removing instruction b6_from_b7: +Removing instruction b2_from_b1: Removing instruction b4_from_b2: Removing instruction b4_from_b5: +Removing instruction b6_from_b7: Removing instruction b1_from_b1: Removing instruction b2_from_b2: Removing instruction b3_from_b9: @@ -3307,13 +3766,14 @@ Removing instruction b8: Removing instruction b2: Removing instruction fire_from_b2: Removing instruction b3: -Removing instruction b1_from_fire: +Removing instruction b1_1: +Removing instruction b2_from_b1_1: +Removing instruction b5: +Removing instruction b1: Removing instruction b3: Removing instruction b6_from_b3: Removing instruction b7: Removing instruction breturn: -Removing instruction b5: -Removing instruction b1_from_b4: Removing instruction breturn: Removing instruction b1_from_makecharset: Removing instruction b2_from_b1: @@ -3329,6 +3789,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 Removing instruction jmp b6 Removing instruction jmp b1 Removing instruction jmp b2 @@ -3392,6 +3853,7 @@ FINAL SYMBOL TABLE (byte~) fire::$5 reg byte a 202.0 (byte~) fire::$6 reg byte a 202.0 (label) fire::@1 +(label) fire::@1_1 (label) fire::@2 (label) fire::@3 (label) fire::@4 @@ -3400,9 +3862,9 @@ FINAL SYMBOL TABLE (label) fire::@7 (label) fire::@return (byte*) fire::buffer -(byte*) fire::buffer#2 buffer zp ZP_WORD:4 202.0 +(byte*) fire::buffer#10 buffer zp ZP_WORD:4 73.45454545454545 +(byte*) fire::buffer#2 buffer zp ZP_WORD:4 151.5 (byte*) fire::buffer#3 buffer#3 zp ZP_WORD:9 151.5 -(byte*) fire::buffer#4 buffer zp ZP_WORD:4 75.75 (byte*) fire::buffer#7 buffer#7 zp ZP_WORD:9 44.888888888888886 (byte) fire::c (byte) fire::c#0 reg byte a 202.0 @@ -3411,10 +3873,10 @@ FINAL SYMBOL TABLE (byte*) fire::screen (byte*) fire::screen#0 screen zp ZP_WORD:2 0.26666666666666666 (byte*) fire::screen#1 screen zp ZP_WORD:2 4.0 -(byte*~) fire::screen#10 screen#10 zp ZP_WORD:12 4.0 -(byte*) fire::screen#2 screen#2 zp ZP_WORD:12 101.0 +(byte*) fire::screen#10 screen#10 zp ZP_WORD:12 30.5 +(byte*~) fire::screen#15 screen#15 zp ZP_WORD:12 4.0 +(byte*) fire::screen#2 screen#2 zp ZP_WORD:12 67.33333333333333 (byte*) fire::screen#3 screen zp ZP_WORD:2 67.33333333333333 -(byte*) fire::screen#4 screen#4 zp ZP_WORD:12 27.727272727272727 (byte*) fire::screen#5 screen zp ZP_WORD:2 38.125 (byte*) fire::screenbase (void()) main() @@ -3510,7 +3972,7 @@ FINAL SYMBOL TABLE reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_WORD:2 [ makecharset::font#2 makecharset::font#1 fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 ] -zp ZP_WORD:4 [ makecharset::font1#2 makecharset::font1#1 fire::buffer#4 fire::buffer#2 ] +zp ZP_WORD:4 [ makecharset::font1#2 makecharset::font1#1 fire::buffer#10 fire::buffer#2 ] zp ZP_BYTE:6 [ makecharset::c#7 makecharset::c#1 ] zp ZP_BYTE:7 [ makecharset::i#6 makecharset::i#1 ] reg byte x [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] @@ -3518,22 +3980,22 @@ zp ZP_BYTE:8 [ makecharset::ii#2 makecharset::ii#1 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte x [ fillscreen::fill#5 ] zp ZP_WORD:9 [ fillscreen::i#2 fillscreen::i#1 fire::buffer#7 fire::buffer#3 ] +reg byte a [ fire::$4 ] +reg byte a [ fire::$5 ] +reg byte a [ fire::$6 ] reg byte a [ sid_rnd::return#2 ] reg byte a [ fire::$10 ] reg byte a [ fire::$11 ] reg byte a [ fire::$12 ] -reg byte a [ fire::$4 ] -reg byte a [ fire::$5 ] -reg byte a [ fire::$6 ] reg byte a [ sid_rnd::return#0 ] reg byte a [ makecharset::$8 ] reg byte a [ makecharset::$9 ] zp ZP_BYTE:11 [ makecharset::$10 ] -zp ZP_WORD:12 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#4 fire::screen#10 fire::screen#2 ] +zp ZP_WORD:12 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#10 fire::screen#2 fire::screen#15 ] FINAL ASSEMBLER -Score: 98915 +Score: 98615 // File Comments // A KickC version of the fire routine from the CC65 samples @@ -3688,25 +4150,83 @@ fire: { .label screen_2 = $c .label buffer = 4 .label buffer_3 = 9 - .label screen_4 = $c .label buffer_7 = 9 .label screen_10 = $c - // [26] (byte*~) fire::screen#10 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 + .label screen_15 = $c + // fire::@1_1 + // [26] (byte*~) fire::screen#15 ← (byte*) fire::screen#0 -- pbuz1=pbuz2 lda screen - sta screen_10 + sta screen_15 lda screen+1 - sta screen_10+1 - // [27] phi from fire to fire::@1 [phi:fire->fire::@1] - // [27] phi (byte*) fire::screen#4 = (byte*~) fire::screen#10 [phi:fire->fire::@1#0] -- register_copy - // [27] phi (byte*) fire::buffer#4 = (const byte*) BUFFER#0 [phi:fire->fire::@1#1] -- pbuz1=pbuc1 + sta screen_15+1 + // [27] phi from fire::@1_1 to fire::@2 [phi:fire::@1_1->fire::@2] + // [27] phi (byte*) fire::screen#10 = (byte*~) fire::screen#15 [phi:fire::@1_1->fire::@2#0] -- register_copy + // [27] phi (byte*) fire::buffer#10 = (const byte*) BUFFER#0 [phi:fire::@1_1->fire::@2#1] -- pbuz1=pbuc1 lda #<BUFFER sta buffer lda #>BUFFER sta buffer+1 + // [27] phi from fire::@1 to fire::@2 [phi:fire::@1->fire::@2] + // [27] phi (byte*) fire::screen#10 = (byte*) fire::screen#2 [phi:fire::@1->fire::@2#0] -- register_copy + // [27] phi (byte*) fire::buffer#10 = (byte*) fire::buffer#2 [phi:fire::@1->fire::@2#1] -- register_copy + // fire::@2 + b2: + // buffer[40-1] + buffer[40-1] + // [28] (byte~) fire::$4 ← *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#10 + (byte)(number) $28-(number) 1) -- vbuaa=pbuz1_derefidx_vbuc1_plus_pbuz1_derefidx_vbuc2 + ldy #$28-1 + clc + lda (buffer),y + adc (buffer),y + // buffer[40-1] + buffer[40-1] + buffer[40] + // [29] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#10 + (byte) $28) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 + ldy #$28 + clc + adc (buffer),y + // buffer[40-1] + buffer[40-1] + buffer[40] + buffer[41] + // [30] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#10 + (byte) $29) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 + ldy #$29 + clc + adc (buffer),y + // c = ( buffer[40-1] + buffer[40-1] + buffer[40] + buffer[41] )/4 + // [31] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 -- vbuaa=vbuaa_ror_2 + lsr + lsr + // if (c > 2) + // [32] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 + cmp #2+1 + bcc b4 + // fire::@5 + // c -= 3 + // [33] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 -- vbuaa=vbuaa_minus_vbuc1 + sec + sbc #3 + // [34] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] + // [34] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy + // fire::@4 + b4: + // *buffer = c + // [35] *((byte*) fire::buffer#10) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa + ldy #0 + sta (buffer),y + // *screen = *buffer = c + // [36] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10) -- _deref_pbuz1=_deref_pbuz2 + lda (buffer),y + sta (screen_10),y + // ++screen; + // [37] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#10 -- pbuz1=_inc_pbuz1 + inc screen_2 + bne !+ + inc screen_2+1 + !: + // ++buffer; + // [38] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#10 -- pbuz1=_inc_pbuz1 + inc buffer + bne !+ + inc buffer+1 + !: // fire::@1 - b1: // while (buffer != (BUFFER + (24 * 40))) - // [28] if((byte*) fire::buffer#4!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 -- pbuz1_neq_pbuc1_then_la1 + // [39] if((byte*) fire::buffer#2!=(const byte*) BUFFER#0+(word)(number) $18*(number) $28) goto fire::@2 -- pbuz1_neq_pbuc1_then_la1 lda buffer+1 cmp #>BUFFER+$18*$28 bne b2 @@ -3715,7 +4235,7 @@ fire: { bne b2 // fire::@3 // screen = (screenbase + (24 * 40)) - // [29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 -- pbuz1=pbuz1_plus_vwuc1 + // [40] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28 -- pbuz1=pbuz1_plus_vwuc1 clc lda screen adc #<$18*$28 @@ -3723,54 +4243,54 @@ fire: { lda screen+1 adc #>$18*$28 sta screen+1 - // [30] phi from fire::@3 to fire::@6 [phi:fire::@3->fire::@6] - // [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy - // [30] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(word)(number) $18*(number) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 + // [41] phi from fire::@3 to fire::@6 [phi:fire::@3->fire::@6] + // [41] phi (byte*) fire::screen#5 = (byte*) fire::screen#1 [phi:fire::@3->fire::@6#0] -- register_copy + // [41] phi (byte*) fire::buffer#7 = (const byte*) BUFFER#0+(word)(number) $18*(number) $28 [phi:fire::@3->fire::@6#1] -- pbuz1=pbuc1 lda #<BUFFER+$18*$28 sta buffer_7 lda #>BUFFER+$18*$28 sta buffer_7+1 - // [30] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] - // [30] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy - // [30] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy + // [41] phi from fire::@7 to fire::@6 [phi:fire::@7->fire::@6] + // [41] phi (byte*) fire::screen#5 = (byte*) fire::screen#3 [phi:fire::@7->fire::@6#0] -- register_copy + // [41] phi (byte*) fire::buffer#7 = (byte*) fire::buffer#3 [phi:fire::@7->fire::@6#1] -- register_copy // fire::@6 b6: // sid_rnd() - // [31] call sid_rnd + // [42] call sid_rnd jsr sid_rnd - // [32] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + // [43] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 // fire::@7 - // [33] (byte~) fire::$10 ← (byte) sid_rnd::return#2 + // [44] (byte~) fire::$10 ← (byte) sid_rnd::return#2 // (sid_rnd())/$10 - // [34] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 -- vbuaa=vbuaa_ror_4 + // [45] (byte~) fire::$11 ← (byte~) fire::$10 >> (byte) 4 -- vbuaa=vbuaa_ror_4 lsr lsr lsr lsr // 0x30 + (sid_rnd())/$10 - // [35] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 -- vbuaa=vbuc1_plus_vbuaa + // [46] (byte~) fire::$12 ← (byte) $30 + (byte~) fire::$11 -- vbuaa=vbuc1_plus_vbuaa clc adc #$30 // *buffer = 0x30 + (sid_rnd())/$10 - // [36] *((byte*) fire::buffer#7) ← (byte~) fire::$12 -- _deref_pbuz1=vbuaa + // [47] *((byte*) fire::buffer#7) ← (byte~) fire::$12 -- _deref_pbuz1=vbuaa ldy #0 sta (buffer_7),y // *screen = *buffer = 0x30 + (sid_rnd())/$10 - // [37] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 + // [48] *((byte*) fire::screen#5) ← *((byte*) fire::buffer#7) -- _deref_pbuz1=_deref_pbuz2 lda (buffer_7),y sta (screen),y // for(; buffer != (BUFFER+(25*40)); ++screen, ++buffer) - // [38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 + // [49] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#5 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 + // [50] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#7 -- pbuz1=_inc_pbuz1 inc buffer_3 bne !+ inc buffer_3+1 !: - // [40] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 + // [51] if((byte*) fire::buffer#3!=(const byte*) BUFFER#0+(word)(number) $19*(number) $28) goto fire::@6 -- pbuz1_neq_pbuc1_then_la1 lda buffer_3+1 cmp #>BUFFER+$19*$28 bne b6 @@ -3779,67 +4299,8 @@ fire: { bne b6 // fire::@return // } - // [41] return + // [52] return rts - // fire::@2 - b2: - // buffer[40-1] + buffer[40-1] - // [42] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) -- vbuaa=pbuz1_derefidx_vbuc1_plus_pbuz1_derefidx_vbuc2 - ldy #$28-1 - clc - lda (buffer),y - adc (buffer),y - // buffer[40-1] + buffer[40-1] + buffer[40] - // [43] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 - ldy #$28 - clc - adc (buffer),y - // buffer[40-1] + buffer[40-1] + buffer[40] + buffer[41] - // [44] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29) -- vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 - ldy #$29 - clc - adc (buffer),y - // c = ( buffer[40-1] + buffer[40-1] + buffer[40] + buffer[41] )/4 - // [45] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2 -- vbuaa=vbuaa_ror_2 - lsr - lsr - // if (c > 2) - // [46] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4 -- vbuaa_lt_vbuc1_then_la1 - cmp #2+1 - bcc b4 - // fire::@5 - // c -= 3 - // [47] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3 -- vbuaa=vbuaa_minus_vbuc1 - sec - sbc #3 - // [48] phi from fire::@2 fire::@5 to fire::@4 [phi:fire::@2/fire::@5->fire::@4] - // [48] phi (byte) fire::c#2 = (byte) fire::c#0 [phi:fire::@2/fire::@5->fire::@4#0] -- register_copy - // fire::@4 - b4: - // *buffer = c - // [49] *((byte*) fire::buffer#4) ← (byte) fire::c#2 -- _deref_pbuz1=vbuaa - ldy #0 - sta (buffer),y - // *screen = *buffer = c - // [50] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4) -- _deref_pbuz1=_deref_pbuz2 - lda (buffer),y - sta (screen_4),y - // ++screen; - // [51] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 -- pbuz1=_inc_pbuz1 - inc screen_2 - bne !+ - inc screen_2+1 - !: - // ++buffer; - // [52] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 -- pbuz1=_inc_pbuz1 - inc buffer - bne !+ - inc buffer+1 - !: - // [27] phi from fire::@4 to fire::@1 [phi:fire::@4->fire::@1] - // [27] phi (byte*) fire::screen#4 = (byte*) fire::screen#2 [phi:fire::@4->fire::@1#0] -- register_copy - // [27] phi (byte*) fire::buffer#4 = (byte*) fire::buffer#2 [phi:fire::@4->fire::@1#1] -- register_copy - jmp b1 } // sid_rnd // Get a random number from the SID voice 3, diff --git a/src/test/ref/examples/fire/fire.sym b/src/test/ref/examples/fire/fire.sym index 4b84d8ad2..793642d6c 100644 --- a/src/test/ref/examples/fire/fire.sym +++ b/src/test/ref/examples/fire/fire.sym @@ -49,6 +49,7 @@ (byte~) fire::$5 reg byte a 202.0 (byte~) fire::$6 reg byte a 202.0 (label) fire::@1 +(label) fire::@1_1 (label) fire::@2 (label) fire::@3 (label) fire::@4 @@ -57,9 +58,9 @@ (label) fire::@7 (label) fire::@return (byte*) fire::buffer -(byte*) fire::buffer#2 buffer zp ZP_WORD:4 202.0 +(byte*) fire::buffer#10 buffer zp ZP_WORD:4 73.45454545454545 +(byte*) fire::buffer#2 buffer zp ZP_WORD:4 151.5 (byte*) fire::buffer#3 buffer#3 zp ZP_WORD:9 151.5 -(byte*) fire::buffer#4 buffer zp ZP_WORD:4 75.75 (byte*) fire::buffer#7 buffer#7 zp ZP_WORD:9 44.888888888888886 (byte) fire::c (byte) fire::c#0 reg byte a 202.0 @@ -68,10 +69,10 @@ (byte*) fire::screen (byte*) fire::screen#0 screen zp ZP_WORD:2 0.26666666666666666 (byte*) fire::screen#1 screen zp ZP_WORD:2 4.0 -(byte*~) fire::screen#10 screen#10 zp ZP_WORD:12 4.0 -(byte*) fire::screen#2 screen#2 zp ZP_WORD:12 101.0 +(byte*) fire::screen#10 screen#10 zp ZP_WORD:12 30.5 +(byte*~) fire::screen#15 screen#15 zp ZP_WORD:12 4.0 +(byte*) fire::screen#2 screen#2 zp ZP_WORD:12 67.33333333333333 (byte*) fire::screen#3 screen zp ZP_WORD:2 67.33333333333333 -(byte*) fire::screen#4 screen#4 zp ZP_WORD:12 27.727272727272727 (byte*) fire::screen#5 screen zp ZP_WORD:2 38.125 (byte*) fire::screenbase (void()) main() @@ -167,7 +168,7 @@ reg byte a [ fire::c#2 fire::c#0 fire::c#1 ] zp ZP_WORD:2 [ makecharset::font#2 makecharset::font#1 fire::screen#0 fire::screen#5 fire::screen#3 fire::screen#1 ] -zp ZP_WORD:4 [ makecharset::font1#2 makecharset::font1#1 fire::buffer#4 fire::buffer#2 ] +zp ZP_WORD:4 [ makecharset::font1#2 makecharset::font1#1 fire::buffer#10 fire::buffer#2 ] zp ZP_BYTE:6 [ makecharset::c#7 makecharset::c#1 ] zp ZP_BYTE:7 [ makecharset::i#6 makecharset::i#1 ] reg byte x [ makecharset::bc#3 makecharset::bc#5 makecharset::bc#6 makecharset::bc#1 makecharset::bc#2 ] @@ -175,15 +176,15 @@ zp ZP_BYTE:8 [ makecharset::ii#2 makecharset::ii#1 ] reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte x [ fillscreen::fill#5 ] zp ZP_WORD:9 [ fillscreen::i#2 fillscreen::i#1 fire::buffer#7 fire::buffer#3 ] +reg byte a [ fire::$4 ] +reg byte a [ fire::$5 ] +reg byte a [ fire::$6 ] reg byte a [ sid_rnd::return#2 ] reg byte a [ fire::$10 ] reg byte a [ fire::$11 ] reg byte a [ fire::$12 ] -reg byte a [ fire::$4 ] -reg byte a [ fire::$5 ] -reg byte a [ fire::$6 ] reg byte a [ sid_rnd::return#0 ] reg byte a [ makecharset::$8 ] reg byte a [ makecharset::$9 ] zp ZP_BYTE:11 [ makecharset::$10 ] -zp ZP_WORD:12 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#4 fire::screen#10 fire::screen#2 ] +zp ZP_WORD:12 [ makecharset::$13 makecharset::$14 makecharset::$15 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#10 fire::screen#2 fire::screen#15 ] diff --git a/src/test/ref/ifmin.asm b/src/test/ref/ifmin.asm index 615459398..1946ec914 100644 --- a/src/test/ref/ifmin.asm +++ b/src/test/ref/ifmin.asm @@ -5,13 +5,15 @@ .label SCREEN = $400 main: { ldx #0 - b1: - cpx #$32 - bcs b2 + b3: stx SCREEN b2: inx cpx #$64 bcc b1 rts + b1: + cpx #$32 + bcs b2 + jmp b3 } diff --git a/src/test/ref/ifmin.cfg b/src/test/ref/ifmin.cfg index ea4d6b6a5..0a74ca30d 100644 --- a/src/test/ref/ifmin.cfg +++ b/src/test/ref/ifmin.cfg @@ -9,18 +9,19 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2>=(byte) $32) goto main::@2 to:main::@3 -main::@3: scope:[main] from main::@1 - [7] *((const byte*) SCREEN#0) ← (byte) main::i#2 +main::@3: scope:[main] from main main::@1 + [5] (byte) main::i#6 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) + [6] *((const byte*) SCREEN#0) ← (byte) main::i#6 to:main::@2 main::@2: scope:[main] from main::@1 main::@3 - [8] (byte) main::i#1 ← ++ (byte) main::i#2 + [7] (byte) main::i#5 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#6 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#5 [9] if((byte) main::i#1<(byte) $64) goto main::@1 to:main::@return main::@return: scope:[main] from main::@2 [10] return to:@return +main::@1: scope:[main] from main::@2 + [11] if((byte) main::i#1>=(byte) $32) goto main::@2 + to:main::@3 diff --git a/src/test/ref/ifmin.log b/src/test/ref/ifmin.log index 7de50676d..d6934508f 100644 --- a/src/test/ref/ifmin.log +++ b/src/test/ref/ifmin.log @@ -84,22 +84,64 @@ Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = (byte*) 1024 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#2>=(byte) $32) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@3 + (byte) main::i#5 ← phi( ) + [2] (byte) main::i#1 ← ++ (byte) main::i#5 + [3] if((byte) main::i#1<(byte) $64) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@1 + (byte) main::i#6 ← phi( ) + [4] *((const byte*) SCREEN#0) ← (byte) main::i#6 + to:main::@2 +main::@return: scope:[main] from main::@2 + [5] return + to:@return +@1: scope:[] from @begin + [6] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::i#1 = (byte) main::i#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#7 (const byte) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@2 +if() condition always false - eliminating [10] if((const byte) main::i#0>=(byte) $32) goto main::@2 +Successful SSA optimization Pass2ConstantIfs Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::i#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@5(between main::@2 and main::@1) +Added new block during phi lifting main::@5(between main::@1 and main::@2) +Added new block during phi lifting main::@6(between main::@1 and main::@3) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 -Created 1 initial phi equivalence classes -Coalesced [12] main::i#5 ← main::i#1 +Created 2 initial phi equivalence classes +Coalesced [9] main::i#9 ← main::i#6 +Coalesced [15] main::i#10 ← main::i#1 +Coalesced (already) [16] main::i#8 ← main::i#1 Coalesced down to 1 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@6 Culled Empty Block (label) main::@5 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 @@ -118,35 +160,37 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2>=(byte) $32) goto main::@2 to:main::@3 -main::@3: scope:[main] from main::@1 - [7] *((const byte*) SCREEN#0) ← (byte) main::i#2 +main::@3: scope:[main] from main main::@1 + [5] (byte) main::i#6 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) + [6] *((const byte*) SCREEN#0) ← (byte) main::i#6 to:main::@2 main::@2: scope:[main] from main::@1 main::@3 - [8] (byte) main::i#1 ← ++ (byte) main::i#2 + [7] (byte) main::i#5 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#6 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#5 [9] if((byte) main::i#1<(byte) $64) goto main::@1 to:main::@return main::@return: scope:[main] from main::@2 [10] return to:@return +main::@1: scope:[main] from main::@2 + [11] if((byte) main::i#1>=(byte) $32) goto main::@2 + to:main::@3 VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#2 14.666666666666666 +(byte) main::i#1 168.33333333333331 +(byte) main::i#5 213.0 +(byte) main::i#6 61.5 Initial phi equivalence classes -[ main::i#2 main::i#1 ] +[ main::i#5 main::i#6 main::i#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +[ main::i#5 main::i#6 main::i#1 ] +Allocated zp ZP_BYTE:2 [ main::i#5 main::i#6 main::i#1 ] INITIAL ASM Target platform is c64basic @@ -177,54 +221,57 @@ bend: // main main: { .label i = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + // [5] phi from main to main::@3 [phi:main->main::@3] + b3_from_main: + // [5] phi (byte) main::i#6 = (byte) 0 [phi:main->main::@3#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2>=(byte) $32) goto main::@2 -- vbuz1_ge_vbuc1_then_la1 - lda i - cmp #$32 - bcs b2 jmp b3 // main::@3 b3: - // [7] *((const byte*) SCREEN#0) ← (byte) main::i#2 -- _deref_pbuc1=vbuz1 + // [6] *((const byte*) SCREEN#0) ← (byte) main::i#6 -- _deref_pbuc1=vbuz1 lda i sta SCREEN + // [7] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] + b2_from_b1: + b2_from_b3: + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [8] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuz1=_inc_vbuz1 inc i // [9] if((byte) main::i#1<(byte) $64) goto main::@1 -- vbuz1_lt_vbuc1_then_la1 lda i cmp #$64 - bcc b1_from_b2 + bcc b1 jmp breturn // main::@return breturn: // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::i#1>=(byte) $32) goto main::@2 -- vbuz1_ge_vbuc1_then_la1 + lda i + cmp #$32 + bcs b2_from_b1 + // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [5] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + jmp b3 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:2 [ main::i#5 main::i#6 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 31.17: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplift Scope [main] 442.83: zp ZP_BYTE:2 [ main::i#5 main::i#6 main::i#1 ] Uplift Scope [] -Uplifting [main] best 338 combination reg byte x [ main::i#2 main::i#1 ] -Uplifting [] best 338 combination +Uplifting [main] best 1838 combination reg byte x [ main::i#5 main::i#6 main::i#1 ] +Uplifting [] best 1838 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -253,66 +300,67 @@ bend_from_b1: bend: // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@3 [phi:main->main::@3] + b3_from_main: + // [5] phi (byte) main::i#6 = (byte) 0 [phi:main->main::@3#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2>=(byte) $32) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 - cpx #$32 - bcs b2 jmp b3 // main::@3 b3: - // [7] *((const byte*) SCREEN#0) ← (byte) main::i#2 -- _deref_pbuc1=vbuxx + // [6] *((const byte*) SCREEN#0) ← (byte) main::i#6 -- _deref_pbuc1=vbuxx stx SCREEN + // [7] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] + b2_from_b1: + b2_from_b3: + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [8] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuxx=_inc_vbuxx inx // [9] if((byte) main::i#1<(byte) $64) goto main::@1 -- vbuxx_lt_vbuc1_then_la1 cpx #$64 - bcc b1_from_b2 + bcc b1 jmp breturn // main::@return breturn: // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::i#1>=(byte) $32) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 + cpx #$32 + bcs b2_from_b1 + // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [5] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + jmp b3 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp b2 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination -Replacing label b1_from_b2 with b1 +Replacing label b2_from_b1 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b2: +Removing instruction b2_from_b1: +Removing instruction b2_from_b3: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b3: +Removing instruction b3_from_main: Removing instruction breturn: +Removing instruction b3_from_b1: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 -Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -328,14 +376,15 @@ FINAL SYMBOL TABLE (label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 14.666666666666666 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#5 reg byte x 213.0 +(byte) main::i#6 reg byte x 61.5 -reg byte x [ main::i#2 main::i#1 ] +reg byte x [ main::i#5 main::i#6 main::i#1 ] FINAL ASSEMBLER -Score: 176 +Score: 1196 // File Comments // Minimal if() test @@ -354,25 +403,20 @@ Score: 176 // @end // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@3 [phi:main->main::@3] + // [5] phi (byte) main::i#6 = (byte) 0 [phi:main->main::@3#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy - // main::@1 - b1: - // if(i<50) - // [6] if((byte) main::i#2>=(byte) $32) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 - cpx #$32 - bcs b2 // main::@3 + b3: // *SCREEN = i - // [7] *((const byte*) SCREEN#0) ← (byte) main::i#2 -- _deref_pbuc1=vbuxx + // [6] *((const byte*) SCREEN#0) ← (byte) main::i#6 -- _deref_pbuc1=vbuxx stx SCREEN + // [7] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3->main::@2#0] -- register_copy // main::@2 b2: // while(++i<100) - // [8] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuxx=_inc_vbuxx inx // [9] if((byte) main::i#1<(byte) $64) goto main::@1 -- vbuxx_lt_vbuc1_then_la1 cpx #$64 @@ -381,6 +425,15 @@ main: { // } // [10] return rts + // main::@1 + b1: + // if(i<50) + // [11] if((byte) main::i#1>=(byte) $32) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 + cpx #$32 + bcs b2 + // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [5] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + jmp b3 } // File Data diff --git a/src/test/ref/ifmin.sym b/src/test/ref/ifmin.sym index efcd1b0d0..23f0c3483 100644 --- a/src/test/ref/ifmin.sym +++ b/src/test/ref/ifmin.sym @@ -9,7 +9,8 @@ (label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 14.666666666666666 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#5 reg byte x 213.0 +(byte) main::i#6 reg byte x 61.5 -reg byte x [ main::i#2 main::i#1 ] +reg byte x [ main::i#5 main::i#6 main::i#1 ] diff --git a/src/test/ref/loop-for-sideeffect.asm b/src/test/ref/loop-for-sideeffect.asm index a03abf473..cbabad38b 100644 --- a/src/test/ref/loop-for-sideeffect.asm +++ b/src/test/ref/loop-for-sideeffect.asm @@ -6,18 +6,9 @@ .label SCREEN = $400 main: { lda #7 - b1: - tax - sta SCREEN,x - tax - inx - cmp #7 - bcc b3 + sta SCREEN+7 // The condition-evaluation should increment i - even if when it is not met - x should end up in 0x0408 lda #'x' - sta SCREEN,x + sta SCREEN+8 rts - b3: - txa - jmp b1 } diff --git a/src/test/ref/loop-for-sideeffect.cfg b/src/test/ref/loop-for-sideeffect.cfg index 86206b4d5..17c19d111 100644 --- a/src/test/ref/loop-for-sideeffect.cfg +++ b/src/test/ref/loop-for-sideeffect.cfg @@ -9,19 +9,13 @@ [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@1_1 +main::@1_1: scope:[main] from main + [5] *((const byte*) SCREEN#0+(byte) 7) ← (byte) 7 to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::i#3 ← phi( main/(byte) 7 main::@3/(byte~) main::i#5 ) - [6] *((const byte*) SCREEN#0 + (byte) main::i#3) ← (byte) main::i#3 - [7] (byte) main::i#2 ← ++ (byte) main::i#3 - [8] if((byte) main::i#3<(byte) 7) goto main::@3 - to:main::@2 -main::@2: scope:[main] from main::@1 - [9] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) 'x' +main::@1: scope:[main] from main::@1_1 + [6] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' to:main::@return -main::@return: scope:[main] from main::@2 - [10] return +main::@return: scope:[main] from main::@1 + [7] return to:@return -main::@3: scope:[main] from main::@1 - [11] (byte~) main::i#5 ← (byte) main::i#2 - to:main::@1 diff --git a/src/test/ref/loop-for-sideeffect.log b/src/test/ref/loop-for-sideeffect.log index ef33c4c58..08d386f05 100644 --- a/src/test/ref/loop-for-sideeffect.log +++ b/src/test/ref/loop-for-sideeffect.log @@ -71,10 +71,60 @@ Constant (const byte) main::i#1 = 7 Successful SSA optimization Pass2ConstantIdentification Eliminating unused constant (const byte) main::i#0 Successful SSA optimization PassNEliminateUnusedVars -Inlining constant with var siblings (const byte) main::i#1 +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [0] (byte) main::i#3 ← phi( main/(const byte) main::i#1 main::@1/(byte) main::i#2 ) + [1] *((const byte*) SCREEN#0 + (byte) main::i#3) ← (byte) main::i#3 + [2] (byte) main::i#2 ← ++ (byte) main::i#3 + [3] if((byte) main::i#3<(byte) 7) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) main::i#5 ← phi( ) + [4] *((const byte*) SCREEN#0 + (byte) main::i#5) ← (byte) 'x' + to:main::@return +main::@return: scope:[main] from main::@2 + [5] return + to:@return +@1: scope:[] from @begin + [6] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Identical Phi Values (byte) main::i#6 (const byte) main::i#1 +Successful SSA optimization Pass2IdenticalPhiElimination +Negating conditional jump and destination [11] if((const byte) main::i#1>=(byte) 7) goto main::@2 +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +Constant right-side identified [10] (byte) main::i#7 ← ++ (const byte) main::i#1 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::i#7 = ++main::i#1 +Successful SSA optimization Pass2ConstantIdentification +Removing PHI-reference to removed block (main::@1_1) in block main::@1 +if() condition always true - replacing block destination [11] if((const byte) main::i#1>=(byte) 7) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Eliminating variable (byte) main::i#3 from unused block main::@1 +Eliminating variable (byte) main::i#2 from unused block main::@1 +Removing PHI-reference to removed block (main::@1) in block main::@2 +Removing unused block main::@1 +Successful SSA optimization Pass2EliminateUnusedBlocks +Identical Phi Values (byte) main::i#5 (const byte) main::i#7 +Successful SSA optimization Pass2IdenticalPhiElimination +Inlining constant with different constant siblings (const byte) main::i#1 +Inlining constant with different constant siblings (const byte) main::i#7 +Constant inlined main::i#7 = ++(byte) 7 Constant inlined main::i#1 = (byte) 7 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@3(between main::@1 and main::@1) +Consolidated array index constant in *(SCREEN#0+++7) +Consolidated array index constant in *(SCREEN#0+7) +Successful SSA optimization Pass2ConstantAdditionElimination +Simplifying constant integer increment ++7 +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 @@ -83,10 +133,10 @@ Adding NOP phi() at start of main CALL GRAPH Calls in [] to main:2 -Created 1 initial phi equivalence classes -Not coalescing [12] main::i#5 ← main::i#2 -Coalesced down to 2 phi equivalence classes +Created 0 initial phi equivalence classes +Coalesced down to 0 phi equivalence classes Culled Empty Block (label) @2 +Renumbering block main::@2 to main::@1 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -104,40 +154,25 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@1_1 +main::@1_1: scope:[main] from main + [5] *((const byte*) SCREEN#0+(byte) 7) ← (byte) 7 to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::i#3 ← phi( main/(byte) 7 main::@3/(byte~) main::i#5 ) - [6] *((const byte*) SCREEN#0 + (byte) main::i#3) ← (byte) main::i#3 - [7] (byte) main::i#2 ← ++ (byte) main::i#3 - [8] if((byte) main::i#3<(byte) 7) goto main::@3 - to:main::@2 -main::@2: scope:[main] from main::@1 - [9] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) 'x' +main::@1: scope:[main] from main::@1_1 + [6] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' to:main::@return -main::@return: scope:[main] from main::@2 - [10] return +main::@return: scope:[main] from main::@1 + [7] return to:@return -main::@3: scope:[main] from main::@1 - [11] (byte~) main::i#5 ← (byte) main::i#2 - to:main::@1 VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (byte) main::i -(byte) main::i#2 12.0 -(byte) main::i#3 18.333333333333332 -(byte~) main::i#5 22.0 Initial phi equivalence classes -[ main::i#3 main::i#5 ] -Added variable main::i#2 to zero page equivalence class [ main::i#2 ] Complete equivalence classes -[ main::i#3 main::i#5 ] -[ main::i#2 ] -Allocated zp ZP_BYTE:2 [ main::i#3 main::i#5 ] -Allocated zp ZP_BYTE:3 [ main::i#2 ] INITIAL ASM Target platform is c64basic @@ -168,65 +203,37 @@ bend_from_b1: bend: // main main: { - .label i = 3 - .label i_3 = 2 - .label i_5 = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#3 = (byte) 7 [phi:main->main::@1#0] -- vbuz1=vbuc1 + jmp b1_1 + // main::@1_1 + b1_1: + // [5] *((const byte*) SCREEN#0+(byte) 7) ← (byte) 7 -- _deref_pbuc1=vbuc2 lda #7 - sta i_3 + sta SCREEN+7 jmp b1 // main::@1 b1: - // [6] *((const byte*) SCREEN#0 + (byte) main::i#3) ← (byte) main::i#3 -- pbuc1_derefidx_vbuz1=vbuz1 - ldy i_3 - tya - sta SCREEN,y - // [7] (byte) main::i#2 ← ++ (byte) main::i#3 -- vbuz1=_inc_vbuz2 - ldy i_3 - iny - sty i - // [8] if((byte) main::i#3<(byte) 7) goto main::@3 -- vbuz1_lt_vbuc1_then_la1 - lda i_3 - cmp #7 - bcc b3 - jmp b2 - // main::@2 - b2: - // [9] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) 'x' -- pbuc1_derefidx_vbuz1=vbuc2 + // [6] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' -- _deref_pbuc1=vbuc2 // The condition-evaluation should increment i - even if when it is not met - x should end up in 0x0408 lda #'x' - ldy i - sta SCREEN,y + sta SCREEN+8 jmp breturn // main::@return breturn: - // [10] return + // [7] return rts - // main::@3 - b3: - // [11] (byte~) main::i#5 ← (byte) main::i#2 -- vbuz1=vbuz2 - lda i - sta i_5 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::i#3 = (byte~) main::i#5 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [9] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) 'x' [ ] ( main:2 [ ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#3 main::i#5 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::i#2 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Statement [5] *((const byte*) SCREEN#0+(byte) 7) ← (byte) 7 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [6] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' [ ] ( main:2 [ ] ) always clobbers reg byte a REGISTER UPLIFT SCOPES -Uplift Scope [main] 40.33: zp ZP_BYTE:2 [ main::i#3 main::i#5 ] 12: zp ZP_BYTE:3 [ main::i#2 ] +Uplift Scope [main] Uplift Scope [] -Uplifting [main] best 313 combination reg byte a [ main::i#3 main::i#5 ] reg byte x [ main::i#2 ] -Uplifting [] best 313 combination +Uplifting [main] best 66 combination +Uplifting [] best 66 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -256,50 +263,32 @@ bend_from_b1: bend: // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#3 = (byte) 7 [phi:main->main::@1#0] -- vbuaa=vbuc1 + jmp b1_1 + // main::@1_1 + b1_1: + // [5] *((const byte*) SCREEN#0+(byte) 7) ← (byte) 7 -- _deref_pbuc1=vbuc2 lda #7 + sta SCREEN+7 jmp b1 // main::@1 b1: - // [6] *((const byte*) SCREEN#0 + (byte) main::i#3) ← (byte) main::i#3 -- pbuc1_derefidx_vbuaa=vbuaa - tax - sta SCREEN,x - // [7] (byte) main::i#2 ← ++ (byte) main::i#3 -- vbuxx=_inc_vbuaa - tax - inx - // [8] if((byte) main::i#3<(byte) 7) goto main::@3 -- vbuaa_lt_vbuc1_then_la1 - cmp #7 - bcc b3 - jmp b2 - // main::@2 - b2: - // [9] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) 'x' -- pbuc1_derefidx_vbuxx=vbuc2 + // [6] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' -- _deref_pbuc1=vbuc2 // The condition-evaluation should increment i - even if when it is not met - x should end up in 0x0408 lda #'x' - sta SCREEN,x + sta SCREEN+8 jmp breturn // main::@return breturn: - // [10] return + // [7] return rts - // main::@3 - b3: - // [11] (byte~) main::i#5 ← (byte) main::i#2 -- vbuaa=vbuxx - txa - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::i#3 = (byte~) main::i#5 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend +Removing instruction jmp b1_1 Removing instruction jmp b1 -Removing instruction jmp b2 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction b1_from_bbegin: @@ -308,10 +297,9 @@ Removing instruction main_from_b1: Removing instruction bend_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b2: +Removing instruction b1_1: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b3: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main @@ -327,20 +315,14 @@ FINAL SYMBOL TABLE (const byte*) SCREEN#0 SCREEN = (byte*) 1024 (void()) main() (label) main::@1 -(label) main::@2 -(label) main::@3 +(label) main::@1_1 (label) main::@return (byte) main::i -(byte) main::i#2 reg byte x 12.0 -(byte) main::i#3 reg byte a 18.333333333333332 -(byte~) main::i#5 reg byte a 22.0 -reg byte a [ main::i#3 main::i#5 ] -reg byte x [ main::i#2 ] FINAL ASSEMBLER -Score: 238 +Score: 18 // File Comments // Test a for()-loop where the condition has a side-effect @@ -360,39 +342,21 @@ Score: 238 // @end // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::i#3 = (byte) 7 [phi:main->main::@1#0] -- vbuaa=vbuc1 - lda #7 - // main::@1 - b1: + // main::@1_1 // SCREEN[i] = i - // [6] *((const byte*) SCREEN#0 + (byte) main::i#3) ← (byte) main::i#3 -- pbuc1_derefidx_vbuaa=vbuaa - tax - sta SCREEN,x - // for(i=7;i++<7;) - // [7] (byte) main::i#2 ← ++ (byte) main::i#3 -- vbuxx=_inc_vbuaa - tax - inx - // [8] if((byte) main::i#3<(byte) 7) goto main::@3 -- vbuaa_lt_vbuc1_then_la1 - cmp #7 - bcc b3 - // main::@2 + // [5] *((const byte*) SCREEN#0+(byte) 7) ← (byte) 7 -- _deref_pbuc1=vbuc2 + lda #7 + sta SCREEN+7 + // main::@1 // (SCREEN)[i] = 'x' - // [9] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) 'x' -- pbuc1_derefidx_vbuxx=vbuc2 + // [6] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' -- _deref_pbuc1=vbuc2 // The condition-evaluation should increment i - even if when it is not met - x should end up in 0x0408 lda #'x' - sta SCREEN,x + sta SCREEN+8 // main::@return // } - // [10] return + // [7] return rts - // main::@3 - b3: - // [11] (byte~) main::i#5 ← (byte) main::i#2 -- vbuaa=vbuxx - txa - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - // [5] phi (byte) main::i#3 = (byte~) main::i#5 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 } // File Data diff --git a/src/test/ref/loop-for-sideeffect.sym b/src/test/ref/loop-for-sideeffect.sym index a0d5fa8dc..98ab28caa 100644 --- a/src/test/ref/loop-for-sideeffect.sym +++ b/src/test/ref/loop-for-sideeffect.sym @@ -5,13 +5,7 @@ (const byte*) SCREEN#0 SCREEN = (byte*) 1024 (void()) main() (label) main::@1 -(label) main::@2 -(label) main::@3 +(label) main::@1_1 (label) main::@return (byte) main::i -(byte) main::i#2 reg byte x 12.0 -(byte) main::i#3 reg byte a 18.333333333333332 -(byte~) main::i#5 reg byte a 22.0 -reg byte a [ main::i#3 main::i#5 ] -reg byte x [ main::i#2 ] diff --git a/src/test/ref/loop-memset-min.asm b/src/test/ref/loop-memset-min.asm index a8b6ed712..ceb2300c8 100644 --- a/src/test/ref/loop-memset-min.asm +++ b/src/test/ref/loop-memset-min.asm @@ -18,14 +18,6 @@ memset: { sta dst lda #>str sta dst+1 - b1: - lda dst+1 - cmp #>end - bne b2 - lda dst - cmp #<end - bne b2 - rts b2: lda #c ldy #0 @@ -34,5 +26,11 @@ memset: { bne !+ inc dst+1 !: - jmp b1 + lda dst+1 + cmp #>end + bne b2 + lda dst + cmp #<end + bne b2 + rts } diff --git a/src/test/ref/loop-memset-min.cfg b/src/test/ref/loop-memset-min.cfg index ca3ababfa..808522e73 100644 --- a/src/test/ref/loop-memset-min.cfg +++ b/src/test/ref/loop-memset-min.cfg @@ -16,15 +16,15 @@ main::@return: scope:[main] from main to:@return memset: scope:[memset] from main [7] phi() + to:memset::@2 +memset::@2: scope:[memset] from memset memset::@1 + [8] (byte*) memset::dst#4 ← phi( memset::@1/(byte*) memset::dst#1 memset/(byte*)(const void*) memset::str#0 ) + [9] *((byte*) memset::dst#4) ← (const byte) memset::c#0 + [10] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 to:memset::@1 -memset::@1: scope:[memset] from memset memset::@2 - [8] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) - [9] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 +memset::@1: scope:[memset] from memset::@2 + [11] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 to:memset::@return memset::@return: scope:[memset] from memset::@1 - [10] return + [12] return to:@return -memset::@2: scope:[memset] from memset::@1 - [11] *((byte*) memset::dst#2) ← (const byte) memset::c#0 - [12] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - to:memset::@1 diff --git a/src/test/ref/loop-memset-min.log b/src/test/ref/loop-memset-min.log index ea6f78fe1..e379a9a51 100644 --- a/src/test/ref/loop-memset-min.log +++ b/src/test/ref/loop-memset-min.log @@ -185,10 +185,54 @@ Constant right-side identified [2] (byte*) memset::end#0 ← (const byte*) memse Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 Successful SSA optimization Pass2ConstantIdentification +GRAPH (NEW VERSIONS for memset::dst#2) +@begin: scope:[] from + to:@2 +main: scope:[main] from @2 + [0] call memset + to:main::@1 +main::@1: scope:[main] from main + to:main::@return +main::@return: scope:[main] from main::@1 + [1] return + to:@return +memset: scope:[memset] from main + to:memset::@2 +memset::@1: scope:[memset] from memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@5 + [2] (byte*) memset::dst#2 ← phi( memset::@2/(const byte*) memset::dst#0 memset::@5/(byte*) memset::dst#1 ) + [3] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@5 + to:memset::@1 +memset::@5: scope:[memset] from memset::@4 + (byte*) memset::dst#4 ← phi( ) + [4] *((byte*) memset::dst#4) ← (const byte) memset::c#0 + [5] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 + to:memset::@4 +memset::@return: scope:[memset] from memset::@1 + [6] return + to:@return +@2: scope:[] from @begin + [7] call main + to:@3 +@3: scope:[] from @2 + to:@end +@end: scope:[] from @3 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte*) memset::dst#1 = (byte*) memset::dst#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte*) memset::dst#5 (const byte*) memset::dst#0 +Successful SSA optimization Pass2IdenticalPhiElimination +if() condition always true - replacing block destination [11] if((const byte*) memset::dst#0!=(const byte*) memset::end#0) goto memset::@5 +Successful SSA optimization Pass2ConstantIfs Inlining constant with var siblings (const byte*) memset::dst#0 Constant inlined memset::$2 = (byte*)(const void*) memset::str#0 Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0 Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting memset::@10(between memset::@4 and memset::@5) Adding NOP phi() at start of @begin Adding NOP phi() at start of @2 Adding NOP phi() at start of @3 @@ -197,18 +241,21 @@ Adding NOP phi() at start of main Adding NOP phi() at start of main::@1 Adding NOP phi() at start of memset Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@4_1 Adding NOP phi() at start of memset::@1 CALL GRAPH Calls in [] to main:2 Calls in [main] to memset:6 Created 1 initial phi equivalence classes -Coalesced [17] memset::dst#4 ← memset::dst#1 +Coalesced [18] memset::dst#6 ← memset::dst#1 Coalesced down to 1 phi equivalence classes Culled Empty Block (label) @3 Culled Empty Block (label) main::@1 Culled Empty Block (label) memset::@2 +Culled Empty Block (label) memset::@4_1 Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@10 Renumbering block @2 to @1 Renumbering block memset::@4 to memset::@1 Renumbering block memset::@5 to memset::@2 @@ -237,18 +284,18 @@ main::@return: scope:[main] from main to:@return memset: scope:[memset] from main [7] phi() + to:memset::@2 +memset::@2: scope:[memset] from memset memset::@1 + [8] (byte*) memset::dst#4 ← phi( memset::@1/(byte*) memset::dst#1 memset/(byte*)(const void*) memset::str#0 ) + [9] *((byte*) memset::dst#4) ← (const byte) memset::c#0 + [10] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 to:memset::@1 -memset::@1: scope:[memset] from memset memset::@2 - [8] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) - [9] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 +memset::@1: scope:[memset] from memset::@2 + [11] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 to:memset::@return memset::@return: scope:[memset] from memset::@1 - [10] return + [12] return to:@return -memset::@2: scope:[memset] from memset::@1 - [11] *((byte*) memset::dst#2) ← (const byte) memset::c#0 - [12] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - to:memset::@1 VARIABLE REGISTER WEIGHTS @@ -257,18 +304,18 @@ VARIABLE REGISTER WEIGHTS (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c (byte*) memset::dst -(byte*) memset::dst#1 22.0 -(byte*) memset::dst#2 14.666666666666666 +(byte*) memset::dst#1 16.5 +(byte*) memset::dst#4 16.5 (byte*) memset::end (word) memset::num (void*) memset::return (void*) memset::str Initial phi equivalence classes -[ memset::dst#2 memset::dst#1 ] +[ memset::dst#4 memset::dst#1 ] Complete equivalence classes -[ memset::dst#2 memset::dst#1 ] -Allocated zp ZP_WORD:2 [ memset::dst#2 memset::dst#1 ] +[ memset::dst#4 memset::dst#1 ] +Allocated zp ZP_WORD:2 [ memset::dst#4 memset::dst#1 ] INITIAL ASM Target platform is c64basic @@ -316,59 +363,60 @@ memset: { .label str = SCREEN .label end = str+num .label dst = 2 - // [8] phi from memset to memset::@1 [phi:memset->memset::@1] - b1_from_memset: - // [8] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + // [8] phi from memset to memset::@2 [phi:memset->memset::@2] + b2_from_memset: + // [8] phi (byte*) memset::dst#4 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@2#0] -- pbuz1=pbuc1 lda #<str sta dst lda #>str sta dst+1 - jmp b1 - // memset::@1 - b1: - // [9] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 - lda dst+1 - cmp #>end - bne b2 - lda dst - cmp #<end - bne b2 - jmp breturn - // memset::@return - breturn: - // [10] return - rts + jmp b2 + // [8] phi from memset::@1 to memset::@2 [phi:memset::@1->memset::@2] + b2_from_b1: + // [8] phi (byte*) memset::dst#4 = (byte*) memset::dst#1 [phi:memset::@1->memset::@2#0] -- register_copy + jmp b2 // memset::@2 b2: - // [11] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [9] *((byte*) memset::dst#4) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y - // [12] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [10] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [8] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] - b1_from_b2: - // [8] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy jmp b1 + // memset::@1 + b1: + // [11] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + lda dst+1 + cmp #>end + bne b2_from_b1 + lda dst + cmp #<end + bne b2_from_b1 + jmp breturn + // memset::@return + breturn: + // [12] return + rts } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [9] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::memset:5 [ memset::dst#2 ] ) always clobbers reg byte a -Statement [11] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::memset:5 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y -Potential registers zp ZP_WORD:2 [ memset::dst#2 memset::dst#1 ] : zp ZP_WORD:2 , +Statement [9] *((byte*) memset::dst#4) ← (const byte) memset::c#0 [ memset::dst#4 ] ( main:2::memset:5 [ memset::dst#4 ] ) always clobbers reg byte a reg byte y +Statement [11] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#1 ] ( main:2::memset:5 [ memset::dst#1 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ memset::dst#4 memset::dst#1 ] : zp ZP_WORD:2 , REGISTER UPLIFT SCOPES -Uplift Scope [memset] 36.67: zp ZP_WORD:2 [ memset::dst#2 memset::dst#1 ] +Uplift Scope [memset] 33: zp ZP_WORD:2 [ memset::dst#4 memset::dst#1 ] Uplift Scope [main] Uplift Scope [] -Uplifting [memset] best 598 combination zp ZP_WORD:2 [ memset::dst#2 memset::dst#1 ] -Uplifting [main] best 598 combination -Uplifting [] best 598 combination +Uplifting [memset] best 628 combination zp ZP_WORD:2 [ memset::dst#4 memset::dst#1 ] +Uplifting [main] best 628 combination +Uplifting [] best 628 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -415,43 +463,44 @@ memset: { .label str = SCREEN .label end = str+num .label dst = 2 - // [8] phi from memset to memset::@1 [phi:memset->memset::@1] - b1_from_memset: - // [8] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + // [8] phi from memset to memset::@2 [phi:memset->memset::@2] + b2_from_memset: + // [8] phi (byte*) memset::dst#4 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@2#0] -- pbuz1=pbuc1 lda #<str sta dst lda #>str sta dst+1 - jmp b1 - // memset::@1 - b1: - // [9] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 - lda dst+1 - cmp #>end - bne b2 - lda dst - cmp #<end - bne b2 - jmp breturn - // memset::@return - breturn: - // [10] return - rts + jmp b2 + // [8] phi from memset::@1 to memset::@2 [phi:memset::@1->memset::@2] + b2_from_b1: + // [8] phi (byte*) memset::dst#4 = (byte*) memset::dst#1 [phi:memset::@1->memset::@2#0] -- register_copy + jmp b2 // memset::@2 b2: - // [11] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [9] *((byte*) memset::dst#4) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y - // [12] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [10] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [8] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] - b1_from_b2: - // [8] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy jmp b1 + // memset::@1 + b1: + // [11] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + lda dst+1 + cmp #>end + bne b2_from_b1 + lda dst + cmp #<end + bne b2_from_b1 + jmp breturn + // memset::@return + breturn: + // [12] return + rts } // File Data @@ -459,24 +508,30 @@ ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp breturn +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: +Removing instruction b2_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction memset_from_main: Removing instruction breturn: -Removing instruction b1_from_memset: +Removing instruction b2_from_memset: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b2: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -495,8 +550,8 @@ FINAL SYMBOL TABLE (byte) memset::c (const byte) memset::c#0 c = (byte) 'c' (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:2 22.0 -(byte*) memset::dst#2 dst zp ZP_WORD:2 14.666666666666666 +(byte*) memset::dst#1 dst zp ZP_WORD:2 16.5 +(byte*) memset::dst#4 dst zp ZP_WORD:2 16.5 (byte*) memset::end (const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 (word) memset::num @@ -505,11 +560,11 @@ FINAL SYMBOL TABLE (void*) memset::str (const void*) memset::str#0 str = (void*)(const byte*) SCREEN#0 -zp ZP_WORD:2 [ memset::dst#2 memset::dst#1 ] +zp ZP_WORD:2 [ memset::dst#4 memset::dst#1 ] FINAL ASSEMBLER -Score: 523 +Score: 493 // File Comments // Minimal classic for() loop - coded using while() to test optimization of loop heads @@ -545,16 +600,30 @@ memset: { .label str = SCREEN .label end = str+num .label dst = 2 - // [8] phi from memset to memset::@1 [phi:memset->memset::@1] - // [8] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + // [8] phi from memset to memset::@2 [phi:memset->memset::@2] + // [8] phi (byte*) memset::dst#4 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@2#0] -- pbuz1=pbuc1 lda #<str sta dst lda #>str sta dst+1 + // [8] phi from memset::@1 to memset::@2 [phi:memset::@1->memset::@2] + // [8] phi (byte*) memset::dst#4 = (byte*) memset::dst#1 [phi:memset::@1->memset::@2#0] -- register_copy + // memset::@2 + b2: + // *dst = c + // [9] *((byte*) memset::dst#4) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + lda #c + ldy #0 + sta (dst),y + // dst++; + // [10] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: // memset::@1 - b1: // while(dst!=end) - // [9] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + // [11] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 lda dst+1 cmp #>end bne b2 @@ -563,24 +632,8 @@ memset: { bne b2 // memset::@return // } - // [10] return + // [12] return rts - // memset::@2 - b2: - // *dst = c - // [11] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 - lda #c - ldy #0 - sta (dst),y - // dst++; - // [12] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 - inc dst - bne !+ - inc dst+1 - !: - // [8] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] - // [8] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy - jmp b1 } // File Data diff --git a/src/test/ref/loop-memset-min.sym b/src/test/ref/loop-memset-min.sym index c6fda7016..c51e79bad 100644 --- a/src/test/ref/loop-memset-min.sym +++ b/src/test/ref/loop-memset-min.sym @@ -12,8 +12,8 @@ (byte) memset::c (const byte) memset::c#0 c = (byte) 'c' (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:2 22.0 -(byte*) memset::dst#2 dst zp ZP_WORD:2 14.666666666666666 +(byte*) memset::dst#1 dst zp ZP_WORD:2 16.5 +(byte*) memset::dst#4 dst zp ZP_WORD:2 16.5 (byte*) memset::end (const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 (word) memset::num @@ -22,4 +22,4 @@ (void*) memset::str (const void*) memset::str#0 str = (void*)(const byte*) SCREEN#0 -zp ZP_WORD:2 [ memset::dst#2 memset::dst#1 ] +zp ZP_WORD:2 [ memset::dst#4 memset::dst#1 ] diff --git a/src/test/ref/loop-while-min.asm b/src/test/ref/loop-while-min.asm index 669d67109..1223cbde0 100644 --- a/src/test/ref/loop-while-min.asm +++ b/src/test/ref/loop-while-min.asm @@ -5,13 +5,11 @@ .label SCREEN = $400 main: { ldx #0 - b1: - cpx #$64 - bne b2 - rts b2: txa sta SCREEN,x inx - jmp b1 + cpx #$64 + bne b2 + rts } diff --git a/src/test/ref/loop-while-min.cfg b/src/test/ref/loop-while-min.cfg index b93d67ece..5322325b6 100644 --- a/src/test/ref/loop-while-min.cfg +++ b/src/test/ref/loop-while-min.cfg @@ -9,15 +9,15 @@ [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) + [6] *((const byte*) SCREEN#0 + (byte) main::i#4) ← (byte) main::i#4 + [7] (byte) main::i#1 ← ++ (byte) main::i#4 to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2!=(byte) $64) goto main::@2 +main::@1: scope:[main] from main::@2 + [8] if((byte) main::i#1!=(byte) $64) goto main::@2 to:main::@return main::@return: scope:[main] from main::@1 - [7] return + [9] return to:@return -main::@2: scope:[main] from main::@1 - [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 - [9] (byte) main::i#1 ← ++ (byte) main::i#2 - to:main::@1 diff --git a/src/test/ref/loop-while-min.log b/src/test/ref/loop-while-min.log index d5892f35a..84a87a957 100644 --- a/src/test/ref/loop-while-min.log +++ b/src/test/ref/loop-while-min.log @@ -69,21 +69,56 @@ Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = (byte*) 1024 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#2!=(byte) $64) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte) main::i#4 ← phi( ) + [2] *((const byte*) SCREEN#0 + (byte) main::i#4) ← (byte) main::i#4 + [3] (byte) main::i#1 ← ++ (byte) main::i#4 + to:main::@1 +main::@return: scope:[main] from main::@1 + [4] return + to:@return +@1: scope:[] from @begin + [5] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::i#1 = (byte) main::i#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#5 (const byte) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +if() condition always true - replacing block destination [9] if((const byte) main::i#0!=(byte) $64) goto main::@2 +Successful SSA optimization Pass2ConstantIfs Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::i#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting main::@7(between main::@1 and main::@2) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 Created 1 initial phi equivalence classes -Coalesced [11] main::i#4 ← main::i#1 +Coalesced [12] main::i#6 ← main::i#1 Coalesced down to 1 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@7 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -101,32 +136,32 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) + [6] *((const byte*) SCREEN#0 + (byte) main::i#4) ← (byte) main::i#4 + [7] (byte) main::i#1 ← ++ (byte) main::i#4 to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2!=(byte) $64) goto main::@2 +main::@1: scope:[main] from main::@2 + [8] if((byte) main::i#1!=(byte) $64) goto main::@2 to:main::@return main::@return: scope:[main] from main::@1 - [7] return + [9] return to:@return -main::@2: scope:[main] from main::@1 - [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 - [9] (byte) main::i#1 ← ++ (byte) main::i#2 - to:main::@1 VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (byte) main::i -(byte) main::i#1 22.0 -(byte) main::i#2 18.333333333333332 +(byte) main::i#1 16.5 +(byte) main::i#4 22.0 Initial phi equivalence classes -[ main::i#2 main::i#1 ] +[ main::i#4 main::i#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +[ main::i#4 main::i#1 ] +Allocated zp ZP_BYTE:2 [ main::i#4 main::i#1 ] INITIAL ASM Target platform is c64basic @@ -157,47 +192,48 @@ bend: // main main: { .label i = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#4 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2!=(byte) $64) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 - lda #$64 - cmp i - bne b2 - jmp breturn - // main::@return - breturn: - // [7] return - rts + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::i#4 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy + jmp b2 // main::@2 b2: - // [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 -- pbuc1_derefidx_vbuz1=vbuz1 + // [6] *((const byte*) SCREEN#0 + (byte) main::i#4) ← (byte) main::i#4 -- pbuc1_derefidx_vbuz1=vbuz1 ldy i tya sta SCREEN,y - // [9] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + // [7] (byte) main::i#1 ← ++ (byte) main::i#4 -- vbuz1=_inc_vbuz1 inc i - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy jmp b1 + // main::@1 + b1: + // [8] if((byte) main::i#1!=(byte) $64) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 + lda #$64 + cmp i + bne b2_from_b1 + jmp breturn + // main::@return + breturn: + // [9] return + rts } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:2 [ main::i#4 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 40.33: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplift Scope [main] 38.5: zp ZP_BYTE:2 [ main::i#4 main::i#1 ] Uplift Scope [] -Uplifting [main] best 263 combination reg byte x [ main::i#2 main::i#1 ] -Uplifting [] best 263 combination +Uplifting [main] best 293 combination reg byte x [ main::i#4 main::i#1 ] +Uplifting [] best 293 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -226,54 +262,60 @@ bend_from_b1: bend: // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#4 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::i#4 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy + jmp b2 + // main::@2 + b2: + // [6] *((const byte*) SCREEN#0 + (byte) main::i#4) ← (byte) main::i#4 -- pbuc1_derefidx_vbuxx=vbuxx + txa + sta SCREEN,x + // [7] (byte) main::i#1 ← ++ (byte) main::i#4 -- vbuxx=_inc_vbuxx + inx jmp b1 // main::@1 b1: - // [6] if((byte) main::i#2!=(byte) $64) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 + // [8] if((byte) main::i#1!=(byte) $64) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$64 - bne b2 + bne b2_from_b1 jmp breturn // main::@return breturn: - // [7] return + // [9] return rts - // main::@2 - b2: - // [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 -- pbuc1_derefidx_vbuxx=vbuxx - txa - sta SCREEN,x - // [9] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy - jmp b1 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination +Replacing label b2_from_b1 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: +Removing instruction b2_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: +Removing instruction b2_from_main: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b2: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -288,14 +330,14 @@ FINAL SYMBOL TABLE (label) main::@2 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 22.0 -(byte) main::i#2 reg byte x 18.333333333333332 +(byte) main::i#1 reg byte x 16.5 +(byte) main::i#4 reg byte x 22.0 -reg byte x [ main::i#2 main::i#1 ] +reg byte x [ main::i#4 main::i#1 ] FINAL ASSEMBLER -Score: 191 +Score: 161 // File Comments // Minimal classic while() loop @@ -314,31 +356,29 @@ Score: 191 // @end // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::i#4 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi (byte) main::i#4 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy + // main::@2 + b2: + // SCREEN[i] = i + // [6] *((const byte*) SCREEN#0 + (byte) main::i#4) ← (byte) main::i#4 -- pbuc1_derefidx_vbuxx=vbuxx + txa + sta SCREEN,x + // i++; + // [7] (byte) main::i#1 ← ++ (byte) main::i#4 -- vbuxx=_inc_vbuxx + inx // main::@1 - b1: // while(i!=100) - // [6] if((byte) main::i#2!=(byte) $64) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 + // [8] if((byte) main::i#1!=(byte) $64) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$64 bne b2 // main::@return // } - // [7] return + // [9] return rts - // main::@2 - b2: - // SCREEN[i] = i - // [8] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2 -- pbuc1_derefidx_vbuxx=vbuxx - txa - sta SCREEN,x - // i++; - // [9] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy - jmp b1 } // File Data diff --git a/src/test/ref/loop-while-min.sym b/src/test/ref/loop-while-min.sym index 19dc59f31..882179ca9 100644 --- a/src/test/ref/loop-while-min.sym +++ b/src/test/ref/loop-while-min.sym @@ -8,7 +8,7 @@ (label) main::@2 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 22.0 -(byte) main::i#2 reg byte x 18.333333333333332 +(byte) main::i#1 reg byte x 16.5 +(byte) main::i#4 reg byte x 22.0 -reg byte x [ main::i#2 main::i#1 ] +reg byte x [ main::i#4 main::i#1 ] diff --git a/src/test/ref/loop-while-sideeffect.asm b/src/test/ref/loop-while-sideeffect.asm index 36f77af8f..3b26818a7 100644 --- a/src/test/ref/loop-while-sideeffect.asm +++ b/src/test/ref/loop-while-sideeffect.asm @@ -4,19 +4,8 @@ .pc = $80d "Program" .label SCREEN = $400 main: { - lda #7 - b1: - tax - inx - cmp #7 - bne b2 // The condition-evaluation should increment i - even if when it is not met lda #'x' - sta SCREEN,x + sta SCREEN+8 rts - b2: - txa - sta SCREEN,x - txa - jmp b1 } diff --git a/src/test/ref/loop-while-sideeffect.cfg b/src/test/ref/loop-while-sideeffect.cfg index 35a51cd3c..b5ffbdfaa 100644 --- a/src/test/ref/loop-while-sideeffect.cfg +++ b/src/test/ref/loop-while-sideeffect.cfg @@ -10,18 +10,9 @@ main: scope:[main] from @1 [4] phi() to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::i#2 ← phi( main/(byte) 7 main::@2/(byte~) main::i#5 ) - [6] (byte) main::i#1 ← ++ (byte) main::i#2 - [7] if((byte) main::i#2!=(byte) 7) goto main::@2 - to:main::@3 -main::@3: scope:[main] from main::@1 - [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) 'x' +main::@1: scope:[main] from main + [5] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' to:main::@return -main::@return: scope:[main] from main::@3 - [9] return +main::@return: scope:[main] from main::@1 + [6] return to:@return -main::@2: scope:[main] from main::@1 - [10] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::i#1 - [11] (byte~) main::i#5 ← (byte) main::i#1 - to:main::@1 diff --git a/src/test/ref/loop-while-sideeffect.log b/src/test/ref/loop-while-sideeffect.log index c39b878a5..c2deca791 100644 --- a/src/test/ref/loop-while-sideeffect.log +++ b/src/test/ref/loop-while-sideeffect.log @@ -74,21 +74,78 @@ Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = (byte*) 1024 Constant (const byte) main::i#0 = 7 Successful SSA optimization Pass2ConstantIdentification -Inlining constant with var siblings (const byte) main::i#0 +GRAPH (NEW VERSIONS for main::i#1) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#5 ) + [1] (byte) main::i#1 ← ++ (byte) main::i#2 + [2] if((byte) main::i#2!=(byte) 7) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::i#5 ← phi( ) + [3] *((const byte*) SCREEN#0 + (byte) main::i#5) ← (byte) main::i#5 + to:main::@1 +main::@3: scope:[main] from main::@1 + (byte) main::i#6 ← phi( ) + [4] *((const byte*) SCREEN#0 + (byte) main::i#6) ← (byte) 'x' + to:main::@return +main::@return: scope:[main] from main::@3 + [5] return + to:@return +@1: scope:[] from @begin + [6] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::i#2 = (byte) main::i#5 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#7 (const byte) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [10] (byte) main::i#8 ← ++ (const byte) main::i#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::i#8 = ++main::i#0 +Successful SSA optimization Pass2ConstantIdentification +Removing PHI-reference to removed block (main::@1_1) in block main::@2 +if() condition always false - eliminating [11] if((const byte) main::i#0!=(byte) 7) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Eliminating variable (byte) main::i#1 from unused block main::@1 +Eliminating variable (byte) main::i#2 from unused block main::@2 +Removing PHI-reference to removed block (main::@1) in block main::@2 +Removing PHI-reference to removed block (main::@1) in block main::@3 +Removing unused block main::@1 +Removing unused block main::@2 +Successful SSA optimization Pass2EliminateUnusedBlocks +Identical Phi Values (byte) main::i#6 (const byte) main::i#8 +Successful SSA optimization Pass2IdenticalPhiElimination +Inlining constant with different constant siblings (const byte) main::i#0 +Inlining constant with different constant siblings (const byte) main::i#8 +Constant inlined main::i#8 = ++(byte) 7 Constant inlined main::i#0 = (byte) 7 Successful SSA optimization Pass2ConstantInlining +Consolidated array index constant in *(SCREEN#0+++7) +Successful SSA optimization Pass2ConstantAdditionElimination +Simplifying constant integer increment ++7 +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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 -Created 1 initial phi equivalence classes -Not coalescing [12] main::i#5 ← main::i#1 -Coalesced down to 2 phi equivalence classes +Created 0 initial phi equivalence classes +Coalesced down to 0 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Renumbering block main::@3 to main::@1 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -107,39 +164,21 @@ FINAL CONTROL FLOW GRAPH main: scope:[main] from @1 [4] phi() to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::i#2 ← phi( main/(byte) 7 main::@2/(byte~) main::i#5 ) - [6] (byte) main::i#1 ← ++ (byte) main::i#2 - [7] if((byte) main::i#2!=(byte) 7) goto main::@2 - to:main::@3 -main::@3: scope:[main] from main::@1 - [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) 'x' +main::@1: scope:[main] from main + [5] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' to:main::@return -main::@return: scope:[main] from main::@3 - [9] return +main::@return: scope:[main] from main::@1 + [6] return to:@return -main::@2: scope:[main] from main::@1 - [10] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::i#1 - [11] (byte~) main::i#5 ← (byte) main::i#1 - to:main::@1 VARIABLE REGISTER WEIGHTS (byte*) SCREEN (void()) main() (byte) main::i -(byte) main::i#1 15.333333333333332 -(byte) main::i#2 16.5 -(byte~) main::i#5 22.0 Initial phi equivalence classes -[ main::i#2 main::i#5 ] -Added variable main::i#1 to zero page equivalence class [ main::i#1 ] Complete equivalence classes -[ main::i#2 main::i#5 ] -[ main::i#1 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#5 ] -Allocated zp ZP_BYTE:3 [ main::i#1 ] INITIAL ASM Target platform is c64basic @@ -169,65 +208,30 @@ bend_from_b1: bend: // main main: { - .label i = 3 - .label i_2 = 2 - .label i_5 = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 7 [phi:main->main::@1#0] -- vbuz1=vbuc1 - lda #7 - sta i_2 jmp b1 // main::@1 b1: - // [6] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz2 - ldy i_2 - iny - sty i - // [7] if((byte) main::i#2!=(byte) 7) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 - lda #7 - cmp i_2 - bne b2 - jmp b3 - // main::@3 - b3: - // [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) 'x' -- pbuc1_derefidx_vbuz1=vbuc2 + // [5] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' -- _deref_pbuc1=vbuc2 // The condition-evaluation should increment i - even if when it is not met lda #'x' - ldy i - sta SCREEN,y + sta SCREEN+8 jmp breturn // main::@return breturn: - // [9] return + // [6] return rts - // main::@2 - b2: - // [10] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::i#1 -- pbuc1_derefidx_vbuz1=vbuz1 - ldy i - tya - sta SCREEN,y - // [11] (byte~) main::i#5 ← (byte) main::i#1 -- vbuz1=vbuz2 - lda i - sta i_5 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::i#2 = (byte~) main::i#5 [phi:main::@2->main::@1#0] -- register_copy - jmp b1 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) 'x' [ ] ( main:2 [ ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#5 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::i#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Statement [5] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' [ ] ( main:2 [ ] ) always clobbers reg byte a REGISTER UPLIFT SCOPES -Uplift Scope [main] 38.5: zp ZP_BYTE:2 [ main::i#2 main::i#5 ] 15.33: zp ZP_BYTE:3 [ main::i#1 ] +Uplift Scope [main] Uplift Scope [] -Uplifting [main] best 313 combination reg byte a [ main::i#2 main::i#5 ] reg byte x [ main::i#1 ] -Uplifting [] best 313 combination +Uplifting [main] best 57 combination +Uplifting [] best 57 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -256,42 +260,18 @@ bend_from_b1: bend: // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 7 [phi:main->main::@1#0] -- vbuaa=vbuc1 - lda #7 jmp b1 // main::@1 b1: - // [6] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuaa - tax - inx - // [7] if((byte) main::i#2!=(byte) 7) goto main::@2 -- vbuaa_neq_vbuc1_then_la1 - cmp #7 - bne b2 - jmp b3 - // main::@3 - b3: - // [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) 'x' -- pbuc1_derefidx_vbuxx=vbuc2 + // [5] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' -- _deref_pbuc1=vbuc2 // The condition-evaluation should increment i - even if when it is not met lda #'x' - sta SCREEN,x + sta SCREEN+8 jmp breturn // main::@return breturn: - // [9] return + // [6] return rts - // main::@2 - b2: - // [10] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::i#1 -- pbuc1_derefidx_vbuxx=vbuxx - txa - sta SCREEN,x - // [11] (byte~) main::i#5 ← (byte) main::i#1 -- vbuaa=vbuxx - txa - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::i#2 = (byte~) main::i#5 [phi:main::@2->main::@1#0] -- register_copy - jmp b1 } // File Data @@ -299,7 +279,6 @@ ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp b1 -Removing instruction jmp b3 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction b1_from_bbegin: @@ -308,10 +287,8 @@ Removing instruction main_from_b1: Removing instruction bend_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b3: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b2: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main @@ -327,20 +304,13 @@ FINAL SYMBOL TABLE (const byte*) SCREEN#0 SCREEN = (byte*) 1024 (void()) main() (label) main::@1 -(label) main::@2 -(label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 15.333333333333332 -(byte) main::i#2 reg byte a 16.5 -(byte~) main::i#5 reg byte a 22.0 -reg byte a [ main::i#2 main::i#5 ] -reg byte x [ main::i#1 ] FINAL ASSEMBLER -Score: 238 +Score: 12 // File Comments // Test a while()-loop where the condition has a side-effect @@ -359,39 +329,16 @@ Score: 238 // @end // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::i#2 = (byte) 7 [phi:main->main::@1#0] -- vbuaa=vbuc1 - lda #7 // main::@1 - b1: - // while(i++!=7) - // [6] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuaa - tax - inx - // [7] if((byte) main::i#2!=(byte) 7) goto main::@2 -- vbuaa_neq_vbuc1_then_la1 - cmp #7 - bne b2 - // main::@3 // (SCREEN)[i] = 'x' - // [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) 'x' -- pbuc1_derefidx_vbuxx=vbuc2 + // [5] *((const byte*) SCREEN#0+(byte) 8) ← (byte) 'x' -- _deref_pbuc1=vbuc2 // The condition-evaluation should increment i - even if when it is not met lda #'x' - sta SCREEN,x + sta SCREEN+8 // main::@return // } - // [9] return + // [6] return rts - // main::@2 - b2: - // SCREEN[i] = i - // [10] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::i#1 -- pbuc1_derefidx_vbuxx=vbuxx - txa - sta SCREEN,x - // [11] (byte~) main::i#5 ← (byte) main::i#1 -- vbuaa=vbuxx - txa - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [5] phi (byte) main::i#2 = (byte~) main::i#5 [phi:main::@2->main::@1#0] -- register_copy - jmp b1 } // File Data diff --git a/src/test/ref/loop-while-sideeffect.sym b/src/test/ref/loop-while-sideeffect.sym index a335e8d3f..ff525f446 100644 --- a/src/test/ref/loop-while-sideeffect.sym +++ b/src/test/ref/loop-while-sideeffect.sym @@ -5,13 +5,6 @@ (const byte*) SCREEN#0 SCREEN = (byte*) 1024 (void()) main() (label) main::@1 -(label) main::@2 -(label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 15.333333333333332 -(byte) main::i#2 reg byte a 16.5 -(byte~) main::i#5 reg byte a 22.0 -reg byte a [ main::i#2 main::i#5 ] -reg byte x [ main::i#1 ] diff --git a/src/test/ref/loopmin.asm b/src/test/ref/loopmin.asm index 4e5845cce..16b638483 100644 --- a/src/test/ref/loopmin.asm +++ b/src/test/ref/loopmin.asm @@ -4,9 +4,7 @@ main: { lda #0 ldx #$a - b1: - cpx #5+1 - bcc b2 + b3: stx $ff clc adc $ff @@ -15,4 +13,8 @@ main: { cpx #0 bne b1 rts + b1: + cpx #5+1 + bcc b2 + jmp b3 } diff --git a/src/test/ref/loopmin.cfg b/src/test/ref/loopmin.cfg index 42550cb12..f1bfbd751 100644 --- a/src/test/ref/loopmin.cfg +++ b/src/test/ref/loopmin.cfg @@ -9,20 +9,20 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::s#2 ← phi( main/(byte) 0 main::@2/(byte) main::s#4 ) - [5] (byte) main::i#2 ← phi( main/(byte) $a main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) 5+(byte) 1) goto main::@2 to:main::@3 -main::@3: scope:[main] from main::@1 - [7] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#2 +main::@3: scope:[main] from main main::@1 + [5] (byte) main::s#5 ← phi( main::@1/(byte) main::s#1 main/(byte) 0 ) + [5] (byte) main::i#6 ← phi( main::@1/(byte) main::i#1 main/(byte) $a ) + [6] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 to:main::@2 main::@2: scope:[main] from main::@1 main::@3 - [8] (byte) main::s#4 ← phi( main::@1/(byte) main::s#2 main::@3/(byte) main::s#1 ) - [9] (byte) main::i#1 ← -- (byte) main::i#2 - [10] if((byte) main::i#1>(byte) 0) goto main::@1 + [7] (byte) main::i#5 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#6 ) + [8] (byte) main::i#1 ← -- (byte) main::i#5 + [9] if((byte) main::i#1>(byte) 0) goto main::@1 to:main::@return main::@return: scope:[main] from main::@2 - [11] return + [10] return to:@return +main::@1: scope:[main] from main::@2 + [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@2 + to:main::@3 diff --git a/src/test/ref/loopmin.log b/src/test/ref/loopmin.log index 0309bfad2..ef265303a 100644 --- a/src/test/ref/loopmin.log +++ b/src/test/ref/loopmin.log @@ -97,6 +97,68 @@ Constant (const byte) main::i#0 = $a Constant (const byte) main::s#0 = 0 Successful SSA optimization Pass2ConstantIdentification Rewriting conditional comparison [5] if((byte) main::i#2<=(byte) 5) goto main::@2 +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::s#2 ← phi( main/(const byte) main::s#0 main::@2/(byte) main::s#4 ) + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#2<(byte) 5+(number) 1) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@3 + [2] (byte) main::i#5 ← phi( ) + [2] (byte) main::s#4 ← phi( main::@1/(byte) main::s#2 main::@3/(byte) main::s#1 ) + [3] (byte) main::i#1 ← -- (byte) main::i#5 + [4] if((byte) main::i#1>(byte) 0) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@1 + (byte) main::i#6 ← phi( ) + [5] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#6 + to:main::@2 +main::@return: scope:[main] from main::@2 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::s#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::s#2 ← phi( main/(const byte) main::s#0 main::@2/(byte) main::s#4 ) + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#2<(byte) 5+(number) 1) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@3 + [2] (byte) main::i#5 ← phi( main::@1/(byte) main::i#2 main::@3/(byte) main::i#6 ) + [2] (byte) main::s#4 ← phi( main::@1/(byte) main::s#2 main::@3/(byte) main::s#1 ) + [3] (byte) main::i#1 ← -- (byte) main::i#5 + [4] if((byte) main::i#1>(byte) 0) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@1 + (byte) main::s#5 ← phi( ) + (byte) main::i#6 ← phi( main::@1/(byte) main::i#2 ) + [5] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 + to:main::@2 +main::@return: scope:[main] from main::@2 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 5+1 in if((byte) main::i#2<(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) 1 in if((byte) main::i#2<(unumber)(byte) 5+(number) 1) goto main::@2 Successful SSA optimization PassNAddNumberTypeConversions @@ -105,30 +167,44 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte) main::i#1 = (byte) main::i#2 +Alias (byte) main::s#2 = (byte) main::s#4 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#7 (const byte) main::i#0 +Identical Phi Values (byte) main::s#6 (const byte) main::s#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@2 +Removing PHI-reference to removed block (main::@1_1) in block main::@2 +if() condition always false - eliminating [10] if((const byte) main::i#0<(byte) 5+(byte) 1) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Identical Phi Values (byte) main::s#2 (byte) main::s#1 +Successful SSA optimization Pass2IdenticalPhiElimination Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const byte) main::s#0 Constant inlined main::i#0 = (byte) $a Constant inlined main::s#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@5(between main::@2 and main::@1) -Added new block during phi lifting main::@6(between main::@1 and main::@2) +Added new block during phi lifting main::@5(between main::@1 and main::@2) +Added new block during phi lifting main::@6(between main::@1 and main::@3) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 Created 3 initial phi equivalence classes -Coalesced [9] main::s#7 ← main::s#1 -Coalesced [14] main::i#5 ← main::i#1 -Coalesced [15] main::s#5 ← main::s#4 -Coalesced (already) [16] main::s#6 ← main::s#2 +Coalesced [9] main::i#9 ← main::i#6 +Coalesced [15] main::i#10 ← main::i#1 +Coalesced [16] main::s#7 ← main::s#1 +Coalesced (already) [17] main::i#8 ← main::i#1 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 -Culled Empty Block (label) main::@5 +Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@6 +Culled Empty Block (label) main::@5 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -146,43 +222,43 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::s#2 ← phi( main/(byte) 0 main::@2/(byte) main::s#4 ) - [5] (byte) main::i#2 ← phi( main/(byte) $a main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) 5+(byte) 1) goto main::@2 to:main::@3 -main::@3: scope:[main] from main::@1 - [7] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#2 +main::@3: scope:[main] from main main::@1 + [5] (byte) main::s#5 ← phi( main::@1/(byte) main::s#1 main/(byte) 0 ) + [5] (byte) main::i#6 ← phi( main::@1/(byte) main::i#1 main/(byte) $a ) + [6] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 to:main::@2 main::@2: scope:[main] from main::@1 main::@3 - [8] (byte) main::s#4 ← phi( main::@1/(byte) main::s#2 main::@3/(byte) main::s#1 ) - [9] (byte) main::i#1 ← -- (byte) main::i#2 - [10] if((byte) main::i#1>(byte) 0) goto main::@1 + [7] (byte) main::i#5 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#6 ) + [8] (byte) main::i#1 ← -- (byte) main::i#5 + [9] if((byte) main::i#1>(byte) 0) goto main::@1 to:main::@return main::@return: scope:[main] from main::@2 - [11] return + [10] return to:@return +main::@1: scope:[main] from main::@2 + [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@2 + to:main::@3 VARIABLE REGISTER WEIGHTS (void()) main() (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#2 11.0 +(byte) main::i#1 168.33333333333331 +(byte) main::i#5 213.0 +(byte) main::i#6 61.5 (byte) main::s -(byte) main::s#1 22.0 -(byte) main::s#2 16.5 -(byte) main::s#4 11.0 +(byte) main::s#1 22.4 +(byte) main::s#5 112.0 Initial phi equivalence classes -[ main::i#2 main::i#1 ] -[ main::s#2 main::s#4 main::s#1 ] +[ main::s#5 main::s#1 ] +[ main::i#5 main::i#6 main::i#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -[ main::s#2 main::s#4 main::s#1 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::s#2 main::s#4 main::s#1 ] +[ main::s#5 main::s#1 ] +[ main::i#5 main::i#6 main::i#1 ] +Allocated zp ZP_BYTE:2 [ main::s#5 main::s#1 ] +Allocated zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] INITIAL ASM Target platform is c64basic @@ -210,69 +286,68 @@ bend_from_b1: bend: // main main: { - .label i = 2 - .label s = 3 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::s#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + .label i = 3 + .label s = 2 + // [5] phi from main to main::@3 [phi:main->main::@3] + b3_from_main: + // [5] phi (byte) main::s#5 = (byte) 0 [phi:main->main::@3#0] -- vbuz1=vbuc1 lda #0 sta s - // [5] phi (byte) main::i#2 = (byte) $a [phi:main->main::@1#1] -- vbuz1=vbuc1 + // [5] phi (byte) main::i#6 = (byte) $a [phi:main->main::@3#1] -- vbuz1=vbuc1 lda #$a sta i - jmp b1 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::s#2 = (byte) main::s#4 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2<(byte) 5+(byte) 1) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #5+1 - bcc b2_from_b1 jmp b3 // main::@3 b3: - // [7] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#2 -- vbuz1=vbuz1_plus_vbuz2 + // [6] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 -- vbuz1=vbuz1_plus_vbuz2 lda s clc adc i sta s - // [8] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] + // [7] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] b2_from_b1: b2_from_b3: - // [8] phi (byte) main::s#4 = (byte) main::s#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [9] (byte) main::i#1 ← -- (byte) main::i#2 -- vbuz1=_dec_vbuz1 + // [8] (byte) main::i#1 ← -- (byte) main::i#5 -- vbuz1=_dec_vbuz1 dec i - // [10] if((byte) main::i#1>(byte) 0) goto main::@1 -- vbuz1_gt_0_then_la1 + // [9] if((byte) main::i#1>(byte) 0) goto main::@1 -- vbuz1_gt_0_then_la1 lda i - bne b1_from_b2 + bne b1 jmp breturn // main::@return breturn: - // [11] return + // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #5+1 + bcc b2_from_b1 + // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [5] phi (byte) main::s#5 = (byte) main::s#1 [phi:main::@1->main::@3#0] -- register_copy + // [5] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#1] -- register_copy + jmp b3 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [7] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#2 [ main::i#2 main::s#1 ] ( main:2 [ main::i#2 main::s#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Statement [7] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#2 [ main::i#2 main::s#1 ] ( main:2 [ main::i#2 main::s#1 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::s#2 main::s#4 main::s#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Statement [6] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 [ main::i#6 main::s#1 ] ( main:2 [ main::i#6 main::s#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] +Statement [6] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 [ main::i#6 main::s#1 ] ( main:2 [ main::i#6 main::s#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::s#5 main::s#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 49.5: zp ZP_BYTE:3 [ main::s#2 main::s#4 main::s#1 ] 27.5: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplift Scope [main] 442.83: zp ZP_BYTE:3 [ main::i#5 main::i#6 main::i#1 ] 134.4: zp ZP_BYTE:2 [ main::s#5 main::s#1 ] Uplift Scope [] -Uplifting [main] best 398 combination reg byte a [ main::s#2 main::s#4 main::s#1 ] reg byte x [ main::i#2 main::i#1 ] -Uplifting [] best 398 combination +Uplifting [main] best 1898 combination reg byte x [ main::i#5 main::i#6 main::i#1 ] reg byte a [ main::s#5 main::s#1 ] +Uplifting [] best 1898 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -299,78 +374,72 @@ bend_from_b1: bend: // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::s#2 = (byte) 0 [phi:main->main::@1#0] -- vbuaa=vbuc1 + // [5] phi from main to main::@3 [phi:main->main::@3] + b3_from_main: + // [5] phi (byte) main::s#5 = (byte) 0 [phi:main->main::@3#0] -- vbuaa=vbuc1 lda #0 - // [5] phi (byte) main::i#2 = (byte) $a [phi:main->main::@1#1] -- vbuxx=vbuc1 + // [5] phi (byte) main::i#6 = (byte) $a [phi:main->main::@3#1] -- vbuxx=vbuc1 ldx #$a - jmp b1 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::s#2 = (byte) main::s#4 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2<(byte) 5+(byte) 1) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #5+1 - bcc b2_from_b1 jmp b3 // main::@3 b3: - // [7] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuxx + // [6] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 -- vbuaa=vbuaa_plus_vbuxx stx $ff clc adc $ff - // [8] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] + // [7] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] b2_from_b1: b2_from_b3: - // [8] phi (byte) main::s#4 = (byte) main::s#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [9] (byte) main::i#1 ← -- (byte) main::i#2 -- vbuxx=_dec_vbuxx + // [8] (byte) main::i#1 ← -- (byte) main::i#5 -- vbuxx=_dec_vbuxx dex - // [10] if((byte) main::i#1>(byte) 0) goto main::@1 -- vbuxx_gt_0_then_la1 + // [9] if((byte) main::i#1>(byte) 0) goto main::@1 -- vbuxx_gt_0_then_la1 cpx #0 - bne b1_from_b2 + bne b1 jmp breturn // main::@return breturn: - // [11] return + // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #5+1 + bcc b2_from_b1 + // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [5] phi (byte) main::s#5 = (byte) main::s#1 [phi:main::@1->main::@3#0] -- register_copy + // [5] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#1] -- register_copy + jmp b3 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp b2 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing label b2_from_b1 with b2 -Replacing label b1_from_b2 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b2: Removing instruction b2_from_b1: Removing instruction b2_from_b3: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b3: +Removing instruction b3_from_main: Removing instruction breturn: +Removing instruction b3_from_b1: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 -Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -384,19 +453,19 @@ FINAL SYMBOL TABLE (label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 11.0 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#5 reg byte x 213.0 +(byte) main::i#6 reg byte x 61.5 (byte) main::s -(byte) main::s#1 reg byte a 22.0 -(byte) main::s#2 reg byte a 16.5 -(byte) main::s#4 reg byte a 11.0 +(byte) main::s#1 reg byte a 22.4 +(byte) main::s#5 reg byte a 112.0 -reg byte x [ main::i#2 main::i#1 ] -reg byte a [ main::s#2 main::s#4 main::s#1 ] +reg byte a [ main::s#5 main::s#1 ] +reg byte x [ main::i#5 main::i#6 main::i#1 ] FINAL ASSEMBLER -Score: 236 +Score: 1256 // File Comments // Upstart @@ -413,41 +482,43 @@ Score: 236 // @end // main main: { - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::s#2 = (byte) 0 [phi:main->main::@1#0] -- vbuaa=vbuc1 + // [5] phi from main to main::@3 [phi:main->main::@3] + // [5] phi (byte) main::s#5 = (byte) 0 [phi:main->main::@3#0] -- vbuaa=vbuc1 lda #0 - // [5] phi (byte) main::i#2 = (byte) $a [phi:main->main::@1#1] -- vbuxx=vbuc1 + // [5] phi (byte) main::i#6 = (byte) $a [phi:main->main::@3#1] -- vbuxx=vbuc1 ldx #$a - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [5] phi (byte) main::s#2 = (byte) main::s#4 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - // main::@1 - b1: - // if(i>5) - // [6] if((byte) main::i#2<(byte) 5+(byte) 1) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #5+1 - bcc b2 // main::@3 + b3: // s=s+i - // [7] (byte) main::s#1 ← (byte) main::s#2 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuxx + // [6] (byte) main::s#1 ← (byte) main::s#5 + (byte) main::i#6 -- vbuaa=vbuaa_plus_vbuxx stx $ff clc adc $ff - // [8] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] - // [8] phi (byte) main::s#4 = (byte) main::s#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy + // [7] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] + // [7] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@1/main::@3->main::@2#0] -- register_copy // main::@2 b2: // i--; - // [9] (byte) main::i#1 ← -- (byte) main::i#2 -- vbuxx=_dec_vbuxx + // [8] (byte) main::i#1 ← -- (byte) main::i#5 -- vbuxx=_dec_vbuxx dex // while (i>0) - // [10] if((byte) main::i#1>(byte) 0) goto main::@1 -- vbuxx_gt_0_then_la1 + // [9] if((byte) main::i#1>(byte) 0) goto main::@1 -- vbuxx_gt_0_then_la1 cpx #0 bne b1 // main::@return // } - // [11] return + // [10] return rts + // main::@1 + b1: + // if(i>5) + // [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #5+1 + bcc b2 + // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [5] phi (byte) main::s#5 = (byte) main::s#1 [phi:main::@1->main::@3#0] -- register_copy + // [5] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#1] -- register_copy + jmp b3 } // File Data diff --git a/src/test/ref/loopmin.sym b/src/test/ref/loopmin.sym index 8debc0c66..c6f244fb1 100644 --- a/src/test/ref/loopmin.sym +++ b/src/test/ref/loopmin.sym @@ -7,12 +7,12 @@ (label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 11.0 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#5 reg byte x 213.0 +(byte) main::i#6 reg byte x 61.5 (byte) main::s -(byte) main::s#1 reg byte a 22.0 -(byte) main::s#2 reg byte a 16.5 -(byte) main::s#4 reg byte a 11.0 +(byte) main::s#1 reg byte a 22.4 +(byte) main::s#5 reg byte a 112.0 -reg byte x [ main::i#2 main::i#1 ] -reg byte a [ main::s#2 main::s#4 main::s#1 ] +reg byte a [ main::s#5 main::s#1 ] +reg byte x [ main::i#5 main::i#6 main::i#1 ] diff --git a/src/test/ref/plasma-center.asm b/src/test/ref/plasma-center.asm index 286b12537..800f3aef8 100644 --- a/src/test/ref/plasma-center.asm +++ b/src/test/ref/plasma-center.asm @@ -25,15 +25,15 @@ // Plasma screen 2 .label SCREEN2 = $2c00 .const NUM_SQUARES = $30 - .label heap_head = $18 - .label SQUARES = 9 + .label heap_head = 9 + .label SQUARES = $13 .label print_char_cursor = 7 // Screen containing distance to center .label SCREEN_DIST = $b // Screen containing angle to center .label SCREEN_ANGLE = $d .label sin_offset_x = 2 - .label sin_offset_y = $f + .label sin_offset_y = $11 bbegin: lda #<$3e8 sta malloc.size @@ -105,10 +105,10 @@ main: { doplasma: { .label angle = 3 .label dist = 5 - .label sin_x = $1a - .label sin_y = $11 + .label sin_x = $13 + .label sin_y = $f .label screen = 7 - .label y = $10 + .label y = $12 lda SCREEN_ANGLE sta angle lda SCREEN_ANGLE+1 @@ -188,7 +188,7 @@ doplasma: { // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. // memset(void* zeropage(3) str, byte register(X) c) memset: { - .label end = $1a + .label end = $f .label dst = 3 .label str = 3 lda str @@ -216,13 +216,13 @@ memset: { } // Make a plasma-friendly charset where the chars are randomly filled make_plasma_charset: { - .label _4 = $10 - .label _8 = $11 - .label _9 = $11 - .label s = $f + .label _4 = $12 + .label _8 = $13 + .label _9 = $13 + .label s = $11 .label i = 2 .label c = 5 - .label _16 = $11 + .label _16 = $13 jsr sid_rnd_init jsr print_cls lda #<print_line_cursor @@ -350,17 +350,17 @@ sid_rnd_init: { // Utilizes symmetry around the center // init_angle_screen(byte* zeropage(3) screen) init_angle_screen: { - .label _10 = $11 + .label _10 = $18 .label screen = 3 .label screen_topline = 5 .label screen_bottomline = 3 - .label xw = $14 + .label xw = $13 .label yw = $16 - .label angle_w = $11 - .label ang_w = $13 - .label x = $10 + .label angle_w = $18 + .label ang_w = $15 + .label x = $12 .label xb = 2 - .label y = $f + .label y = $11 lda screen clc adc #<$28*$c @@ -448,17 +448,17 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($14) x, signed word zeropage($16) y) +// atan2_16(signed word zeropage($13) x, signed word zeropage($16) y) atan2_16: { .label _2 = 7 - .label _7 = $1a + .label _7 = $f .label yi = 7 - .label xi = $1a - .label angle = $11 + .label xi = $f + .label angle = $18 .label xd = 9 - .label yd = $18 - .label return = $11 - .label x = $14 + .label yd = $1a + .label return = $18 + .label x = $13 .label y = $16 lda y+1 bmi !b1+ @@ -640,11 +640,11 @@ atan2_16: { init_dist_screen: { .label screen = 3 .label screen_bottomline = 5 - .label yds = $14 - .label xds = $16 - .label ds = $16 - .label x = $f - .label xb = $10 + .label yds = $16 + .label xds = $18 + .label ds = $18 + .label x = $11 + .label xb = $12 .label screen_topline = 3 .label y = 2 jsr init_squares @@ -735,16 +735,16 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($16) val) +// sqrt(word zeropage($18) val) sqrt: { - .label _1 = 7 - .label _3 = 7 - .label found = 7 - .label val = $16 + .label _1 = $f + .label _3 = $f + .label found = $f + .label val = $18 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 jsr bsearch16u lda _3 sec @@ -763,46 +763,27 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($16) key, word* zeropage(7) items, byte register(X) num) +// bsearch16u(word zeropage($18) key, word* zeropage($f) items, byte register(X) num) bsearch16u: { - .label _2 = 7 - .label pivot = $18 + .label _2 = $f + .label pivot = $f .label result = $1a - .label return = 7 - .label items = 7 - .label key = $16 + .label return = $f + .label items = $f + .label key = $18 + .label items_1 = 7 + .label items_10 = 7 + .label items_16 = 7 ldx #NUM_SQUARES - b3: - cpx #0 - bne b4 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - b2: - rts b4: txa lsr asl clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 sec lda key @@ -816,38 +797,66 @@ bsearch16u: { bne b6 lda result bne b6 - lda pivot - sta return - lda pivot+1 - sta return+1 + breturn: rts b6: lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: dex b7: txa lsr tax - jmp b3 + cpx #0 + bne b9 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + rts + b9: + lda items + sta items_16 + lda items+1 + sta items_16+1 + jmp b4 + b10: + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $16 - .label return_2 = $14 + .label return = $18 + .label return_2 = $16 asl tay lda (SQUARES),y @@ -860,8 +869,8 @@ sqr: { // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $11 - .label sqr = $1a + .label squares = $1a + .label sqr = $18 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD @@ -906,10 +915,10 @@ init_squares: { } // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage(9) size) +// malloc(word zeropage($13) size) malloc: { - .label mem = 9 - .label size = 9 + .label mem = $13 + .label size = $13 lda heap_head sec sbc mem diff --git a/src/test/ref/plasma-center.cfg b/src/test/ref/plasma-center.cfg index 5d1e92ced..2c7105dcb 100644 --- a/src/test/ref/plasma-center.cfg +++ b/src/test/ref/plasma-center.cfg @@ -428,84 +428,87 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [218] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [219] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(word*) bsearch16u::items#1 ) + [219] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [225] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [226] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [229] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [230] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#19 ) + [230] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [231] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [219] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [219] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [232] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [223] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [235] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [224] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [225] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [235] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [235] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [237] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + [238] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [240] return + [241] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [241] phi() - [242] call malloc + [242] phi() + [243] call malloc to:init_squares::@2 init_squares::@2: scope:[init_squares] from init_squares - [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [245] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [245] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [245] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [246] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [246] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [246] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [253] return + [254] return to:@return malloc: scope:[malloc] from @1 @3 init_squares - [254] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [254] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) - [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 - [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [255] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [255] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 to:malloc::@return malloc::@return: scope:[malloc] from malloc - [257] return + [258] return to:@return diff --git a/src/test/ref/plasma-center.log b/src/test/ref/plasma-center.log index d315290b7..ccf80b548 100644 --- a/src/test/ref/plasma-center.log +++ b/src/test/ref/plasma-center.log @@ -3560,6 +3560,1142 @@ Eliminating unused constant (const word*) SQUARES#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks +GRAPH (NEW VERSIONS for bsearch16u::num#3) +@begin: scope:[] from + to:@8 +memset: scope:[memset] from main::@11 print_cls + [0] (byte) memset::c#3 ← phi( main::@11/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@11/(void*) memset::str#1 print_cls/(void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@11/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@8: scope:[] from @begin + to:@16 +malloc: scope:[malloc] from @47 @53 init_squares + [10] (word) malloc::size#3 ← phi( @47/(const word) malloc::size#1 @53/(const word) malloc::size#2 init_squares/(word) malloc::size#0 ) + [10] (byte*) heap_head#12 ← phi( @47/(const byte*) HEAP_TOP#0 @53/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [11] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [12] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [13] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [14] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [15] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [15] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [16] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (byte) bsearch16u::num#9 ← phi( ) + [17] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [18] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [19] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [20] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [21] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [22] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [23] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [24] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (byte) bsearch16u::num#10 ← phi( ) + [25] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [26] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [27] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [28] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#2 ) + [28] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [29] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( ) + [30] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [31] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + [32] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [33] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#2 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@16: scope:[] from @8 + to:@19 +init_squares: scope:[init_squares] from init_dist_screen + [34] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [35] call malloc + [36] (void*) malloc::return#2 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [37] (void*~) init_squares::$1 ← (void*) malloc::return#2 + [38] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [39] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [40] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [41] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [41] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [41] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [42] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [43] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [44] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [45] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [46] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [47] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [48] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [49] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [50] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [51] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [52] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [53] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [54] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [55] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [56] call bsearch16u + [57] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [58] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [59] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [60] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [61] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [62] return + to:@return +@19: scope:[] from @16 + to:@21 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [63] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [64] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [65] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::y#0 atan2_16::@2/(signed word~) atan2_16::$2 ) + [66] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [67] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [68] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::x#0 atan2_16::@5/(signed word~) atan2_16::$7 ) + [69] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + [70] (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(const word) atan2_16::angle#0 ) + [70] (byte) atan2_16::i#2 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(const byte) atan2_16::i#0 ) + [70] (signed word) atan2_16::xi#3 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [70] (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [71] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + [72] (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + [73] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 + [74] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + [75] (signed word) atan2_16::yd#3 ← phi( atan2_16::@16/(signed word) atan2_16::yi#3 atan2_16::@19/(signed word) atan2_16::yd#1 ) + [75] (signed word) atan2_16::xd#3 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xd#1 ) + [75] (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::shift#1 ) + [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + [77] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [78] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [79] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + [81] (signed word) atan2_16::xd#5 ← phi( atan2_16::@20/(signed word) atan2_16::xd#3 atan2_16::@24/(signed word) atan2_16::xd#2 ) + [81] (signed word) atan2_16::yd#5 ← phi( atan2_16::@20/(signed word) atan2_16::yd#3 atan2_16::@24/(signed word) atan2_16::yd#2 ) + [82] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + [83] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [84] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [88] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + [89] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [90] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [91] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [92] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + [93] (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + [93] (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + [93] (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + [94] (byte) atan2_16::i#1 ← (byte) atan2_16::i#2 + rangenext(0,atan2_16::$16) + [95] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 + to:atan2_16::@15 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + [96] (word) atan2_16::angle#11 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + [97] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + [98] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + [99] (word) atan2_16::return#0 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + [100] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [101] return + to:@return +@21: scope:[] from @19 + to:@45 +print_char: scope:[print_char] from make_plasma_charset::@8 + [102] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 + [103] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#49 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [104] return + to:@return +print_cls: scope:[print_cls] from make_plasma_charset::@11 + [105] (void*) memset::str#0 ← (void*)(const byte*) print_line_cursor#0 + [106] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [107] return + to:@return +@45: scope:[] from @21 + to:@47 +sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset + [108] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [109] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [110] return + to:@return +sid_rnd: scope:[sid_rnd] from make_plasma_charset::@3 + [111] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + [112] return + to:@return +@47: scope:[] from @45 + [113] call malloc + [114] (void*) malloc::return#3 ← (void*) malloc::return#0 + to:@53 +@53: scope:[] from @47 + [115] (void*~) $0 ← (void*) malloc::return#3 + [116] (byte*) SCREEN_DIST#0 ← (byte*)(void*~) $0 + [117] call malloc + [118] (void*) malloc::return#4 ← (void*) malloc::return#0 + to:@54 +@54: scope:[] from @53 + [119] (void*~) $1 ← (void*) malloc::return#4 + [120] (byte*) SCREEN_ANGLE#0 ← (byte*)(void*~) $1 + to:@48 +main: scope:[main] from @52 + [121] (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#0 + [122] call init_dist_screen + to:main::@9 +main::@9: scope:[main] from main + [123] (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN_ANGLE#0 + [124] call init_angle_screen + to:main::@10 +main::@10: scope:[main] from main::@9 + [125] call make_plasma_charset + to:main::@11 +main::@11: scope:[main] from main::@10 + [126] (void*) memset::str#1 ← (void*)(const byte*) COLS#0 + [127] call memset + to:main::@12 +main::@12: scope:[main] from main::@11 + to:main::@1 +main::@1: scope:[main] from main::@12 main::@8 + [128] (byte) sin_offset_y#14 ← phi( main::@12/(const byte) sin_offset_y#18 main::@8/(byte) sin_offset_y#12 ) + [128] (byte) sin_offset_x#14 ← phi( main::@12/(const byte) sin_offset_x#18 main::@8/(byte) sin_offset_x#12 ) + to:main::@2 +main::@2: scope:[main] from main::@1 + [129] call doplasma + to:main::@13 +main::@13: scope:[main] from main::@2 + to:main::toD0181 +main::toD0181: scope:[main] from main::@13 + [130] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 + [131] (word~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff + [132] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [133] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [134] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 + [135] (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + [136] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [137] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [138] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@7 +main::@7: scope:[main] from main::toD0181_@return + [139] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [140] call doplasma + to:main::@14 +main::@14: scope:[main] from main::@7 + to:main::toD0182 +main::toD0182: scope:[main] from main::@14 + [141] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::toD0182_screen#0 + [142] (word~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (word) $3fff + [143] (word~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 + [144] (byte~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 + [145] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::toD0182_gfx#0 + [146] (byte~) main::toD0182_$5#0 ← > (word~) main::toD0182_$4#0 + [147] (byte~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 + [148] (byte~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f + [149] (byte) main::toD0182_return#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + to:main::@8 +main::@8: scope:[main] from main::toD0182_@return + [150] *((const byte*) D018#0) ← (byte) main::toD0182_return#0 + to:main::@1 +@48: scope:[] from @54 + to:@52 +doplasma: scope:[doplasma] from main::@2 main::@7 + [151] (byte*) doplasma::screen#6 ← phi( main::@2/(const byte*) doplasma::screen#0 main::@7/(const byte*) doplasma::screen#1 ) + [151] (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@7/(byte) sin_offset_y#12 ) + [151] (byte) sin_offset_x#10 ← phi( main::@2/(byte) sin_offset_x#14 main::@7/(byte) sin_offset_x#12 ) + [152] (byte*) doplasma::angle#0 ← (byte*) SCREEN_ANGLE#0 + [153] (byte*) doplasma::dist#0 ← (byte*) SCREEN_DIST#0 + [154] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 + [155] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 + to:doplasma::@1 +doplasma::@1: scope:[doplasma] from doplasma doplasma::@3 + [156] (byte) doplasma::y#4 ← phi( doplasma/(const byte) doplasma::y#0 doplasma::@3/(byte) doplasma::y#1 ) + [156] (byte*) doplasma::screen#5 ← phi( doplasma/(byte*) doplasma::screen#6 doplasma::@3/(byte*) doplasma::screen#2 ) + [156] (byte*) doplasma::dist#4 ← phi( doplasma/(byte*) doplasma::dist#0 doplasma::@3/(byte*) doplasma::dist#1 ) + [156] (byte*) doplasma::angle#4 ← phi( doplasma/(byte*) doplasma::angle#0 doplasma::@3/(byte*) doplasma::angle#1 ) + to:doplasma::@2 +doplasma::@2: scope:[doplasma] from doplasma::@1 doplasma::@2 + [157] (byte) doplasma::x#2 ← phi( doplasma::@1/(const byte) doplasma::x#0 doplasma::@2/(byte) doplasma::x#1 ) + [158] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) + [159] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 + [160] (byte) doplasma::x#1 ← ++ (byte) doplasma::x#2 + [161] if((byte) doplasma::x#1!=(number) $28) goto doplasma::@2 + to:doplasma::@3 +doplasma::@3: scope:[doplasma] from doplasma::@2 + [162] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 + [163] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 + [164] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 + [165] (byte) doplasma::y#1 ← ++ (byte) doplasma::y#4 + [166] if((byte) doplasma::y#1!=(number) $1a) goto doplasma::@1 + to:doplasma::@4 +doplasma::@4: scope:[doplasma] from doplasma::@3 + [167] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 + [168] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 + to:doplasma::@return +doplasma::@return: scope:[doplasma] from doplasma::@4 + [169] return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@9 + [170] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [171] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [172] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [172] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [172] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(const byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + [173] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + [173] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + [174] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 + [175] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [176] (word~) init_angle_screen::$4 ← (byte)(byte~) init_angle_screen::$3 w= (byte) 0 + [177] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 + [178] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 + [179] (word~) init_angle_screen::$7 ← (byte)(byte~) init_angle_screen::$6 w= (byte) 0 + [180] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 + [181] (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + [182] (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + [183] call atan2_16 + [184] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + [185] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [186] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [187] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [188] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [189] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [190] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [191] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [192] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [193] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [194] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [195] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [196] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [197] if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + [198] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [199] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [200] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [201] if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [202] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main + [203] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [204] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [205] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [205] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen#0 ) + [205] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [206] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [207] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [208] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [209] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [210] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [211] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [212] call sqr + [213] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [214] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [215] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [215] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [216] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [217] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [218] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [219] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [220] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [221] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [222] call sqr + [223] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [224] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [225] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [226] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [227] call sqrt + [228] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [229] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [230] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [231] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [232] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [233] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [234] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [235] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [236] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [237] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [238] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [239] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [240] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [241] return + to:@return +make_plasma_charset: scope:[make_plasma_charset] from main::@10 + [242] call sid_rnd_init + to:make_plasma_charset::@11 +make_plasma_charset::@11: scope:[make_plasma_charset] from make_plasma_charset + [243] call print_cls + to:make_plasma_charset::@12 +make_plasma_charset::@12: scope:[make_plasma_charset] from make_plasma_charset::@11 + to:make_plasma_charset::@1 +make_plasma_charset::@1: scope:[make_plasma_charset] from make_plasma_charset::@12 make_plasma_charset::@9 + [244] (byte*) print_char_cursor#49 ← phi( make_plasma_charset::@12/(const byte*) print_line_cursor#0 make_plasma_charset::@9/(byte*) print_char_cursor#18 ) + [244] (word) make_plasma_charset::c#2 ← phi( make_plasma_charset::@12/(const word) make_plasma_charset::c#0 make_plasma_charset::@9/(word) make_plasma_charset::c#1 ) + [245] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 + [246] (byte) make_plasma_charset::s#0 ← *((const byte[$200]) SINTABLE#0 + (byte~) make_plasma_charset::$2) + to:make_plasma_charset::@2 +make_plasma_charset::@2: scope:[make_plasma_charset] from make_plasma_charset::@1 make_plasma_charset::@6 + [247] (byte) make_plasma_charset::i#7 ← phi( make_plasma_charset::@1/(const byte) make_plasma_charset::i#0 make_plasma_charset::@6/(byte) make_plasma_charset::i#1 ) + to:make_plasma_charset::@3 +make_plasma_charset::@3: scope:[make_plasma_charset] from make_plasma_charset::@2 make_plasma_charset::@4 + [248] (byte) make_plasma_charset::b#2 ← phi( make_plasma_charset::@2/(const byte) make_plasma_charset::b#0 make_plasma_charset::@4/(byte) make_plasma_charset::b#3 ) + [248] (byte) make_plasma_charset::ii#2 ← phi( make_plasma_charset::@2/(const byte) make_plasma_charset::ii#0 make_plasma_charset::@4/(byte) make_plasma_charset::ii#1 ) + [249] call sid_rnd + [250] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:make_plasma_charset::@13 +make_plasma_charset::@13: scope:[make_plasma_charset] from make_plasma_charset::@3 + [251] (byte~) make_plasma_charset::$3 ← (byte) sid_rnd::return#2 + [252] (byte~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (byte) $ff + [253] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@4 + to:make_plasma_charset::@5 +make_plasma_charset::@4: scope:[make_plasma_charset] from make_plasma_charset::@13 make_plasma_charset::@5 + [254] (byte) make_plasma_charset::b#3 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::b#2 make_plasma_charset::@5/(byte) make_plasma_charset::b#1 ) + [255] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 + [256] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 + to:make_plasma_charset::@6 +make_plasma_charset::@5: scope:[make_plasma_charset] from make_plasma_charset::@13 + [257] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) + to:make_plasma_charset::@4 +make_plasma_charset::@6: scope:[make_plasma_charset] from make_plasma_charset::@4 + [258] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 * (byte) 8 + [259] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 + [260] (byte*~) make_plasma_charset::$16 ← (const byte*) make_plasma_charset::charset#0 + (word~) make_plasma_charset::$9 + [261] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 + [262] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#7 + [263] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 + to:make_plasma_charset::@7 +make_plasma_charset::@7: scope:[make_plasma_charset] from make_plasma_charset::@6 + [264] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 + [265] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 + to:make_plasma_charset::@8 +make_plasma_charset::@9: scope:[make_plasma_charset] from make_plasma_charset::@14 make_plasma_charset::@7 + [266] (byte*) print_char_cursor#18 ← phi( make_plasma_charset::@14/(byte*) print_char_cursor#1 make_plasma_charset::@7/(byte*) print_char_cursor#49 ) + [267] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2 + [268] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 + to:make_plasma_charset::@return +make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset::@7 + [269] call print_char + to:make_plasma_charset::@14 +make_plasma_charset::@14: scope:[make_plasma_charset] from make_plasma_charset::@8 + to:make_plasma_charset::@9 +make_plasma_charset::@return: scope:[make_plasma_charset] from make_plasma_charset::@9 + [270] return + to:@return +@52: scope:[] from @48 + [271] call main + to:@55 +@55: scope:[] from @52 + to:@end +@end: scope:[] from @55 + +GRAPH (NEW VERSIONS for bsearch16u::items#2) +@begin: scope:[] from + to:@8 +memset: scope:[memset] from main::@11 print_cls + [0] (byte) memset::c#3 ← phi( main::@11/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@11/(void*) memset::str#1 print_cls/(void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@11/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@8: scope:[] from @begin + to:@16 +malloc: scope:[malloc] from @47 @53 init_squares + [10] (word) malloc::size#3 ← phi( @47/(const word) malloc::size#1 @53/(const word) malloc::size#2 init_squares/(word) malloc::size#0 ) + [10] (byte*) heap_head#12 ← phi( @47/(const byte*) HEAP_TOP#0 @53/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [11] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [12] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [13] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [14] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [15] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [15] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [16] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#10 ← phi( ) + (byte) bsearch16u::num#9 ← phi( bsearch16u::@6/(byte) bsearch16u::num#3 ) + [17] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [18] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [19] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [20] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [21] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [22] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [23] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#11 ← phi( ) + [24] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (word*) bsearch16u::items#12 ← phi( ) + (byte) bsearch16u::num#10 ← phi( bsearch16u::@7/(byte) bsearch16u::num#9 ) + [25] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [26] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [27] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [28] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#12 ) + [28] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [29] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( bsearch16u::@9/(byte) bsearch16u::num#10 ) + [30] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [31] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#14 ← phi( ) + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#13 ← phi( ) + [32] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#13 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [33] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#14 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@16: scope:[] from @8 + to:@19 +init_squares: scope:[init_squares] from init_dist_screen + [34] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [35] call malloc + [36] (void*) malloc::return#2 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [37] (void*~) init_squares::$1 ← (void*) malloc::return#2 + [38] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [39] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [40] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [41] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [41] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [41] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [42] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [43] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [44] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [45] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [46] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [47] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [48] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [49] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [50] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [51] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [52] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [53] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [54] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [55] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [56] call bsearch16u + [57] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [58] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [59] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [60] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [61] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [62] return + to:@return +@19: scope:[] from @16 + to:@21 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [63] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [64] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [65] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::y#0 atan2_16::@2/(signed word~) atan2_16::$2 ) + [66] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [67] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [68] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::x#0 atan2_16::@5/(signed word~) atan2_16::$7 ) + [69] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + [70] (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(const word) atan2_16::angle#0 ) + [70] (byte) atan2_16::i#2 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(const byte) atan2_16::i#0 ) + [70] (signed word) atan2_16::xi#3 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [70] (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [71] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + [72] (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + [73] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 + [74] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + [75] (signed word) atan2_16::yd#3 ← phi( atan2_16::@16/(signed word) atan2_16::yi#3 atan2_16::@19/(signed word) atan2_16::yd#1 ) + [75] (signed word) atan2_16::xd#3 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xd#1 ) + [75] (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::shift#1 ) + [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + [77] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [78] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [79] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + [81] (signed word) atan2_16::xd#5 ← phi( atan2_16::@20/(signed word) atan2_16::xd#3 atan2_16::@24/(signed word) atan2_16::xd#2 ) + [81] (signed word) atan2_16::yd#5 ← phi( atan2_16::@20/(signed word) atan2_16::yd#3 atan2_16::@24/(signed word) atan2_16::yd#2 ) + [82] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + [83] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [84] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [88] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + [89] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [90] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [91] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [92] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + [93] (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + [93] (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + [93] (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + [94] (byte) atan2_16::i#1 ← (byte) atan2_16::i#2 + rangenext(0,atan2_16::$16) + [95] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 + to:atan2_16::@15 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + [96] (word) atan2_16::angle#11 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + [97] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + [98] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + [99] (word) atan2_16::return#0 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + [100] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [101] return + to:@return +@21: scope:[] from @19 + to:@45 +print_char: scope:[print_char] from make_plasma_charset::@8 + [102] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 + [103] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#49 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [104] return + to:@return +print_cls: scope:[print_cls] from make_plasma_charset::@11 + [105] (void*) memset::str#0 ← (void*)(const byte*) print_line_cursor#0 + [106] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [107] return + to:@return +@45: scope:[] from @21 + to:@47 +sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset + [108] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [109] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [110] return + to:@return +sid_rnd: scope:[sid_rnd] from make_plasma_charset::@3 + [111] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + [112] return + to:@return +@47: scope:[] from @45 + [113] call malloc + [114] (void*) malloc::return#3 ← (void*) malloc::return#0 + to:@53 +@53: scope:[] from @47 + [115] (void*~) $0 ← (void*) malloc::return#3 + [116] (byte*) SCREEN_DIST#0 ← (byte*)(void*~) $0 + [117] call malloc + [118] (void*) malloc::return#4 ← (void*) malloc::return#0 + to:@54 +@54: scope:[] from @53 + [119] (void*~) $1 ← (void*) malloc::return#4 + [120] (byte*) SCREEN_ANGLE#0 ← (byte*)(void*~) $1 + to:@48 +main: scope:[main] from @52 + [121] (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#0 + [122] call init_dist_screen + to:main::@9 +main::@9: scope:[main] from main + [123] (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN_ANGLE#0 + [124] call init_angle_screen + to:main::@10 +main::@10: scope:[main] from main::@9 + [125] call make_plasma_charset + to:main::@11 +main::@11: scope:[main] from main::@10 + [126] (void*) memset::str#1 ← (void*)(const byte*) COLS#0 + [127] call memset + to:main::@12 +main::@12: scope:[main] from main::@11 + to:main::@1 +main::@1: scope:[main] from main::@12 main::@8 + [128] (byte) sin_offset_y#14 ← phi( main::@12/(const byte) sin_offset_y#18 main::@8/(byte) sin_offset_y#12 ) + [128] (byte) sin_offset_x#14 ← phi( main::@12/(const byte) sin_offset_x#18 main::@8/(byte) sin_offset_x#12 ) + to:main::@2 +main::@2: scope:[main] from main::@1 + [129] call doplasma + to:main::@13 +main::@13: scope:[main] from main::@2 + to:main::toD0181 +main::toD0181: scope:[main] from main::@13 + [130] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 + [131] (word~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff + [132] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [133] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [134] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 + [135] (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + [136] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [137] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [138] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@7 +main::@7: scope:[main] from main::toD0181_@return + [139] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [140] call doplasma + to:main::@14 +main::@14: scope:[main] from main::@7 + to:main::toD0182 +main::toD0182: scope:[main] from main::@14 + [141] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::toD0182_screen#0 + [142] (word~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (word) $3fff + [143] (word~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 + [144] (byte~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 + [145] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::toD0182_gfx#0 + [146] (byte~) main::toD0182_$5#0 ← > (word~) main::toD0182_$4#0 + [147] (byte~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 + [148] (byte~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f + [149] (byte) main::toD0182_return#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + to:main::@8 +main::@8: scope:[main] from main::toD0182_@return + [150] *((const byte*) D018#0) ← (byte) main::toD0182_return#0 + to:main::@1 +@48: scope:[] from @54 + to:@52 +doplasma: scope:[doplasma] from main::@2 main::@7 + [151] (byte*) doplasma::screen#6 ← phi( main::@2/(const byte*) doplasma::screen#0 main::@7/(const byte*) doplasma::screen#1 ) + [151] (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@7/(byte) sin_offset_y#12 ) + [151] (byte) sin_offset_x#10 ← phi( main::@2/(byte) sin_offset_x#14 main::@7/(byte) sin_offset_x#12 ) + [152] (byte*) doplasma::angle#0 ← (byte*) SCREEN_ANGLE#0 + [153] (byte*) doplasma::dist#0 ← (byte*) SCREEN_DIST#0 + [154] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 + [155] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 + to:doplasma::@1 +doplasma::@1: scope:[doplasma] from doplasma doplasma::@3 + [156] (byte) doplasma::y#4 ← phi( doplasma/(const byte) doplasma::y#0 doplasma::@3/(byte) doplasma::y#1 ) + [156] (byte*) doplasma::screen#5 ← phi( doplasma/(byte*) doplasma::screen#6 doplasma::@3/(byte*) doplasma::screen#2 ) + [156] (byte*) doplasma::dist#4 ← phi( doplasma/(byte*) doplasma::dist#0 doplasma::@3/(byte*) doplasma::dist#1 ) + [156] (byte*) doplasma::angle#4 ← phi( doplasma/(byte*) doplasma::angle#0 doplasma::@3/(byte*) doplasma::angle#1 ) + to:doplasma::@2 +doplasma::@2: scope:[doplasma] from doplasma::@1 doplasma::@2 + [157] (byte) doplasma::x#2 ← phi( doplasma::@1/(const byte) doplasma::x#0 doplasma::@2/(byte) doplasma::x#1 ) + [158] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) + [159] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 + [160] (byte) doplasma::x#1 ← ++ (byte) doplasma::x#2 + [161] if((byte) doplasma::x#1!=(number) $28) goto doplasma::@2 + to:doplasma::@3 +doplasma::@3: scope:[doplasma] from doplasma::@2 + [162] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 + [163] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 + [164] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 + [165] (byte) doplasma::y#1 ← ++ (byte) doplasma::y#4 + [166] if((byte) doplasma::y#1!=(number) $1a) goto doplasma::@1 + to:doplasma::@4 +doplasma::@4: scope:[doplasma] from doplasma::@3 + [167] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 + [168] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 + to:doplasma::@return +doplasma::@return: scope:[doplasma] from doplasma::@4 + [169] return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@9 + [170] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [171] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [172] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [172] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [172] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(const byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + [173] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + [173] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + [174] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 + [175] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [176] (word~) init_angle_screen::$4 ← (byte)(byte~) init_angle_screen::$3 w= (byte) 0 + [177] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 + [178] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 + [179] (word~) init_angle_screen::$7 ← (byte)(byte~) init_angle_screen::$6 w= (byte) 0 + [180] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 + [181] (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + [182] (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + [183] call atan2_16 + [184] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + [185] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [186] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [187] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [188] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [189] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [190] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [191] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [192] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [193] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [194] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [195] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [196] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [197] if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + [198] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [199] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [200] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [201] if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [202] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main + [203] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [204] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [205] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [205] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen#0 ) + [205] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [206] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [207] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [208] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [209] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [210] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [211] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [212] call sqr + [213] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [214] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [215] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [215] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [216] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [217] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [218] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [219] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [220] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [221] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [222] call sqr + [223] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [224] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [225] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [226] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [227] call sqrt + [228] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [229] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [230] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [231] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [232] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [233] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [234] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [235] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [236] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [237] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [238] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [239] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [240] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [241] return + to:@return +make_plasma_charset: scope:[make_plasma_charset] from main::@10 + [242] call sid_rnd_init + to:make_plasma_charset::@11 +make_plasma_charset::@11: scope:[make_plasma_charset] from make_plasma_charset + [243] call print_cls + to:make_plasma_charset::@12 +make_plasma_charset::@12: scope:[make_plasma_charset] from make_plasma_charset::@11 + to:make_plasma_charset::@1 +make_plasma_charset::@1: scope:[make_plasma_charset] from make_plasma_charset::@12 make_plasma_charset::@9 + [244] (byte*) print_char_cursor#49 ← phi( make_plasma_charset::@12/(const byte*) print_line_cursor#0 make_plasma_charset::@9/(byte*) print_char_cursor#18 ) + [244] (word) make_plasma_charset::c#2 ← phi( make_plasma_charset::@12/(const word) make_plasma_charset::c#0 make_plasma_charset::@9/(word) make_plasma_charset::c#1 ) + [245] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 + [246] (byte) make_plasma_charset::s#0 ← *((const byte[$200]) SINTABLE#0 + (byte~) make_plasma_charset::$2) + to:make_plasma_charset::@2 +make_plasma_charset::@2: scope:[make_plasma_charset] from make_plasma_charset::@1 make_plasma_charset::@6 + [247] (byte) make_plasma_charset::i#7 ← phi( make_plasma_charset::@1/(const byte) make_plasma_charset::i#0 make_plasma_charset::@6/(byte) make_plasma_charset::i#1 ) + to:make_plasma_charset::@3 +make_plasma_charset::@3: scope:[make_plasma_charset] from make_plasma_charset::@2 make_plasma_charset::@4 + [248] (byte) make_plasma_charset::b#2 ← phi( make_plasma_charset::@2/(const byte) make_plasma_charset::b#0 make_plasma_charset::@4/(byte) make_plasma_charset::b#3 ) + [248] (byte) make_plasma_charset::ii#2 ← phi( make_plasma_charset::@2/(const byte) make_plasma_charset::ii#0 make_plasma_charset::@4/(byte) make_plasma_charset::ii#1 ) + [249] call sid_rnd + [250] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:make_plasma_charset::@13 +make_plasma_charset::@13: scope:[make_plasma_charset] from make_plasma_charset::@3 + [251] (byte~) make_plasma_charset::$3 ← (byte) sid_rnd::return#2 + [252] (byte~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (byte) $ff + [253] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@4 + to:make_plasma_charset::@5 +make_plasma_charset::@4: scope:[make_plasma_charset] from make_plasma_charset::@13 make_plasma_charset::@5 + [254] (byte) make_plasma_charset::b#3 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::b#2 make_plasma_charset::@5/(byte) make_plasma_charset::b#1 ) + [255] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 + [256] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 + to:make_plasma_charset::@6 +make_plasma_charset::@5: scope:[make_plasma_charset] from make_plasma_charset::@13 + [257] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) + to:make_plasma_charset::@4 +make_plasma_charset::@6: scope:[make_plasma_charset] from make_plasma_charset::@4 + [258] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 * (byte) 8 + [259] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 + [260] (byte*~) make_plasma_charset::$16 ← (const byte*) make_plasma_charset::charset#0 + (word~) make_plasma_charset::$9 + [261] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 + [262] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#7 + [263] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 + to:make_plasma_charset::@7 +make_plasma_charset::@7: scope:[make_plasma_charset] from make_plasma_charset::@6 + [264] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 + [265] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 + to:make_plasma_charset::@8 +make_plasma_charset::@9: scope:[make_plasma_charset] from make_plasma_charset::@14 make_plasma_charset::@7 + [266] (byte*) print_char_cursor#18 ← phi( make_plasma_charset::@14/(byte*) print_char_cursor#1 make_plasma_charset::@7/(byte*) print_char_cursor#49 ) + [267] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2 + [268] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 + to:make_plasma_charset::@return +make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset::@7 + [269] call print_char + to:make_plasma_charset::@14 +make_plasma_charset::@14: scope:[make_plasma_charset] from make_plasma_charset::@8 + to:make_plasma_charset::@9 +make_plasma_charset::@return: scope:[make_plasma_charset] from make_plasma_charset::@9 + [270] return + to:@return +@52: scope:[] from @48 + [271] call main + to:@55 +@55: scope:[] from @52 + to:@end +@end: scope:[] from @55 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $28 in if((byte) doplasma::x#1!=(number) $28) goto doplasma::@2 Adding number conversion cast (unumber) $1a in if((byte) doplasma::y#1!=(number) $1a) goto doplasma::@1 Adding number conversion cast (unumber) $13+1 in if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 @@ -3587,9 +4723,18 @@ Finalized unsigned number type (byte) $d Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [34] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [40] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 -Constant right-side identified [69] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 +Alias (byte) bsearch16u::num#0 = (byte) bsearch16u::num#3 +Alias (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 +Alias (byte) bsearch16u::num#10 = (byte) bsearch16u::num#9 (byte) bsearch16u::num#11 +Alias (word*) bsearch16u::items#10 = (word*) bsearch16u::items#12 +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#14 (word*) bsearch16u::items#13 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) bsearch16u::num#12 (const byte) bsearch16u::num#2 +Identical Phi Values (word*) bsearch16u::items#15 (word*) bsearch16u::items#1 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [40] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD +Constant right-side identified [46] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 +Constant right-side identified [75] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 @@ -3601,10 +4746,13 @@ Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0 Constant (const word) main::toD0182_$0#0 = (word)main::toD0182_screen#0 Constant (const word) main::toD0182_$4#0 = (word)main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [47] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [48] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Resolved ranged next value [94] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [95] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 +Removing PHI-reference to removed block (bsearch16u::@6_1) in block bsearch16u::@8 +if() condition always true - replacing block destination [279] if((const byte) bsearch16u::num#2>(byte) 0) goto bsearch16u::@7 +Successful SSA optimization Pass2ConstantIfs +Resolved ranged next value [53] init_squares::i#1 ← ++ init_squares::i#2 to ++ +Resolved ranged comparison value [54] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 +Resolved ranged next value [100] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [101] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 @@ -3618,10 +4766,12 @@ Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [125] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [128] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 -Constant right-side identified [134] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff -Constant right-side identified [137] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#2 +Successful SSA optimization Pass2AliasElimination +Constant right-side identified [126] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [129] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [135] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff +Constant right-side identified [138] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 @@ -3774,7 +4924,8 @@ Successful SSA optimization Pass2IdenticalPhiElimination if() condition always false - eliminating [1] if((word) $3e8<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) -Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) +Added new block during phi lifting bsearch16u::@18(between bsearch16u::@6 and bsearch16u::@7) +Added new block during phi lifting bsearch16u::@19(between bsearch16u::@9 and bsearch16u::@10) Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) @@ -3821,6 +4972,7 @@ Adding NOP phi() at start of make_plasma_charset::@8 Adding NOP phi() at start of print_cls Adding NOP phi() at start of print_cls::@1 Adding NOP phi() at start of init_dist_screen +Adding NOP phi() at start of bsearch16u CALL GRAPH Calls in [] to malloc:7 malloc:10 main:14 Calls in [main] to init_dist_screen:18 init_angle_screen:20 make_plasma_charset:22 memset:24 doplasma:29 doplasma:36 @@ -3829,7 +4981,7 @@ Calls in [print_cls] to memset:128 Calls in [init_angle_screen] to atan2_16:147 Calls in [init_dist_screen] to init_squares:243 sqr:255 sqr:266 sqrt:271 Calls in [sqrt] to bsearch16u:297 -Calls in [init_squares] to malloc:337 +Calls in [init_squares] to malloc:338 Created 61 initial phi equivalence classes Coalesced [9] heap_head#59 ← heap_head#1 @@ -3909,23 +5061,23 @@ Coalesced [289] init_dist_screen::x#8 ← init_dist_screen::x#1 Coalesced [290] init_dist_screen::xb#8 ← init_dist_screen::xb#1 Coalesced [292] init_dist_screen::xd#1 ← init_dist_screen::$15 Coalesced [294] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [304] bsearch16u::items#10 ← bsearch16u::items#1 -Coalesced [309] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [311] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [314] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [320] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [324] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [325] bsearch16u::items#12 ← bsearch16u::items#0 -Coalesced [328] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [329] bsearch16u::items#11 ← bsearch16u::items#8 -Coalesced [330] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [331] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [336] heap_head#60 ← heap_head#1 -Coalesced [340] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [350] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [351] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [352] init_squares::i#3 ← init_squares::i#1 -Not coalescing [355] heap_head#1 ← malloc::mem#0 +Coalesced [305] bsearch16u::items#17 ← bsearch16u::items#1 +Coalesced [312] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [318] bsearch16u::num#14 ← bsearch16u::num#1 +Coalesced [319] bsearch16u::items#18 ← bsearch16u::items#0 +Coalesced [325] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [327] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [328] bsearch16u::return#8 ← bsearch16u::items#11 +Coalesced [329] bsearch16u::num#13 ← bsearch16u::num#0 +Not coalescing [330] bsearch16u::items#16 ← bsearch16u::items#11 +Coalesced [331] bsearch16u::num#15 ← bsearch16u::num#10 +Not coalescing [332] bsearch16u::items#19 ← bsearch16u::items#10 +Coalesced (already) [337] heap_head#60 ← heap_head#1 +Coalesced [341] init_squares::squares#4 ← init_squares::squares#0 +Coalesced [351] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [352] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [353] init_squares::i#3 ← init_squares::i#1 +Not coalescing [356] heap_head#1 ← malloc::mem#0 Coalesced down to 47 phi equivalence classes Culled Empty Block (label) @8 Culled Empty Block (label) @16 @@ -3961,8 +5113,9 @@ Culled Empty Block (label) atan2_16::@36 Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_dist_screen::@19 Culled Empty Block (label) init_dist_screen::@20 +Culled Empty Block (label) bsearch16u::@6_1 +Culled Empty Block (label) bsearch16u::@13 Culled Empty Block (label) bsearch16u::@1 -Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@4 Renumbering block @47 to @1 Renumbering block @52 to @2 @@ -3977,8 +5130,9 @@ Renumbering block bsearch16u::@7 to bsearch16u::@4 Renumbering block bsearch16u::@8 to bsearch16u::@5 Renumbering block bsearch16u::@9 to bsearch16u::@6 Renumbering block bsearch16u::@10 to bsearch16u::@7 -Renumbering block bsearch16u::@13 to bsearch16u::@8 -Renumbering block bsearch16u::@15 to bsearch16u::@9 +Renumbering block bsearch16u::@15 to bsearch16u::@8 +Renumbering block bsearch16u::@18 to bsearch16u::@9 +Renumbering block bsearch16u::@19 to bsearch16u::@10 Renumbering block init_squares::@3 to init_squares::@2 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block atan2_16::@13 to atan2_16::@9 @@ -4455,86 +5609,89 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [218] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [219] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(word*) bsearch16u::items#1 ) + [219] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [225] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [226] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [229] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [230] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#19 ) + [230] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [231] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [219] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [219] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [232] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [223] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [235] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [224] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [225] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [235] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [235] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [237] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + [238] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [240] return + [241] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [241] phi() - [242] call malloc + [242] phi() + [243] call malloc to:init_squares::@2 init_squares::@2: scope:[init_squares] from init_squares - [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [245] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [245] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [245] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [246] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [246] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [246] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [253] return + [254] return to:@return malloc: scope:[malloc] from @1 @3 init_squares - [254] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [254] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) - [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 - [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [255] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [255] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 to:malloc::@return malloc::@return: scope:[malloc] from malloc - [257] return + [258] return to:@return @@ -4622,24 +5779,25 @@ VARIABLE REGISTER WEIGHTS (word*) bsearch16u::items (word*) bsearch16u::items#0 1001.0 (word*) bsearch16u::items#1 2.0 -(word*) bsearch16u::items#2 334.5555555555556 -(word*) bsearch16u::items#8 1501.5 +(word*) bsearch16u::items#10 429.2857142857143 +(word*) bsearch16u::items#11 752.25 +(word*~) bsearch16u::items#16 2002.0 +(word*~) bsearch16u::items#19 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 0.26666666666666666 +(word) bsearch16u::key#0 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 2002.0 +(byte) bsearch16u::num#0 1001.0 (byte) bsearch16u::num#1 2002.0 -(byte) bsearch16u::num#3 556.1111111111111 +(byte) bsearch16u::num#10 444.8888888888889 (byte) bsearch16u::num#5 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 501.0 +(word*) bsearch16u::pivot#0 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 2.0 +(word*) bsearch16u::return#1 335.00000000000006 (word*) bsearch16u::return#2 6.0 (word*) bsearch16u::return#3 4.0 -(word*~) bsearch16u::return#6 4.0 (void()) doplasma((byte*) doplasma::screen) (byte~) doplasma::$2 2002.0 (byte*) doplasma::angle @@ -4903,8 +6061,9 @@ Initial phi equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] @@ -4962,7 +6121,6 @@ Added variable sqrt::$1 to zero page equivalence class [ sqrt::$1 ] Added variable sqrt::return#0 to zero page equivalence class [ sqrt::return#0 ] Added variable bsearch16u::$6 to zero page equivalence class [ bsearch16u::$6 ] Added variable bsearch16u::$16 to zero page equivalence class [ bsearch16u::$16 ] -Added variable bsearch16u::pivot#0 to zero page equivalence class [ bsearch16u::pivot#0 ] Added variable bsearch16u::result#0 to zero page equivalence class [ bsearch16u::result#0 ] Added variable sqr::$0 to zero page equivalence class [ sqr::$0 ] Added variable sqr::return#0 to zero page equivalence class [ sqr::return#0 ] @@ -5006,8 +6164,9 @@ Complete equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] @@ -5065,7 +6224,6 @@ Complete equivalence classes [ sqrt::return#0 ] [ bsearch16u::$6 ] [ bsearch16u::$16 ] -[ bsearch16u::pivot#0 ] [ bsearch16u::result#0 ] [ sqr::$0 ] [ sqr::return#0 ] @@ -5108,66 +6266,66 @@ Allocated zp ZP_BYTE:50 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_ Allocated zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Allocated zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Allocated zp ZP_BYTE:53 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -Allocated zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -Allocated zp ZP_BYTE:56 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Allocated zp ZP_BYTE:57 [ sqr::val#2 sqr::val#0 sqr::val#1 ] -Allocated zp ZP_WORD:58 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp ZP_WORD:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated zp ZP_BYTE:62 [ init_squares::i#2 init_squares::i#1 ] -Allocated zp ZP_WORD:63 [ heap_head#12 heap_head#1 ] -Allocated zp ZP_WORD:65 [ malloc::size#3 ] -Allocated zp ZP_WORD:67 [ SCREEN_DIST#0 ] -Allocated zp ZP_WORD:69 [ SCREEN_ANGLE#0 ] -Allocated zp ZP_WORD:71 [ init_angle_screen::screen#0 ] -Allocated zp ZP_WORD:73 [ doplasma::sin_x#0 ] -Allocated zp ZP_WORD:75 [ doplasma::sin_y#0 ] -Allocated zp ZP_BYTE:77 [ doplasma::$2 ] -Allocated zp ZP_WORD:78 [ memset::end#0 ] -Allocated zp ZP_BYTE:80 [ make_plasma_charset::$2 ] -Allocated zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] -Allocated zp ZP_BYTE:82 [ sid_rnd::return#2 ] -Allocated zp ZP_BYTE:83 [ make_plasma_charset::$3 ] -Allocated zp ZP_BYTE:84 [ make_plasma_charset::$4 ] -Allocated zp ZP_WORD:85 [ make_plasma_charset::$8 ] -Allocated zp ZP_WORD:87 [ make_plasma_charset::$9 ] -Allocated zp ZP_WORD:89 [ make_plasma_charset::$16 ] -Allocated zp ZP_BYTE:91 [ make_plasma_charset::$11 ] -Allocated zp ZP_BYTE:92 [ sid_rnd::return#0 ] -Allocated zp ZP_BYTE:93 [ init_angle_screen::$2 ] -Allocated zp ZP_BYTE:94 [ init_angle_screen::$3 ] -Allocated zp ZP_WORD:95 [ init_angle_screen::xw#0 ] -Allocated zp ZP_BYTE:97 [ init_angle_screen::$6 ] -Allocated zp ZP_WORD:98 [ init_angle_screen::yw#0 ] -Allocated zp ZP_WORD:100 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:102 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:104 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:106 [ init_angle_screen::angle_w#0 ] -Allocated zp ZP_WORD:108 [ init_angle_screen::$10 ] -Allocated zp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] -Allocated zp ZP_BYTE:111 [ init_angle_screen::$12 ] -Allocated zp ZP_BYTE:112 [ init_angle_screen::$13 ] -Allocated zp ZP_BYTE:113 [ init_angle_screen::$14 ] -Allocated zp ZP_BYTE:114 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:115 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:116 [ init_dist_screen::y2#0 ] -Allocated zp ZP_WORD:117 [ sqr::return#2 ] -Allocated zp ZP_WORD:119 [ init_dist_screen::yds#0 ] -Allocated zp ZP_BYTE:121 [ init_dist_screen::x2#0 ] -Allocated zp ZP_WORD:122 [ sqr::return#3 ] -Allocated zp ZP_WORD:124 [ init_dist_screen::xds#0 ] -Allocated zp ZP_WORD:126 [ init_dist_screen::ds#0 ] -Allocated zp ZP_WORD:128 [ sqrt::val#0 ] -Allocated zp ZP_BYTE:130 [ sqrt::return#2 ] -Allocated zp ZP_BYTE:131 [ init_dist_screen::d#0 ] -Allocated zp ZP_WORD:132 [ bsearch16u::key#0 ] -Allocated zp ZP_WORD:134 [ bsearch16u::return#3 ] -Allocated zp ZP_WORD:136 [ sqrt::found#0 ] -Allocated zp ZP_WORD:138 [ sqrt::$3 ] -Allocated zp ZP_WORD:140 [ sqrt::$1 ] -Allocated zp ZP_BYTE:142 [ sqrt::return#0 ] -Allocated zp ZP_BYTE:143 [ bsearch16u::$6 ] -Allocated zp ZP_BYTE:144 [ bsearch16u::$16 ] -Allocated zp ZP_WORD:145 [ bsearch16u::pivot#0 ] +Allocated zp ZP_WORD:54 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +Allocated zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +Allocated zp ZP_BYTE:58 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Allocated zp ZP_BYTE:59 [ sqr::val#2 sqr::val#0 sqr::val#1 ] +Allocated zp ZP_WORD:60 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp ZP_WORD:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +Allocated zp ZP_BYTE:64 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp ZP_WORD:65 [ heap_head#12 heap_head#1 ] +Allocated zp ZP_WORD:67 [ malloc::size#3 ] +Allocated zp ZP_WORD:69 [ SCREEN_DIST#0 ] +Allocated zp ZP_WORD:71 [ SCREEN_ANGLE#0 ] +Allocated zp ZP_WORD:73 [ init_angle_screen::screen#0 ] +Allocated zp ZP_WORD:75 [ doplasma::sin_x#0 ] +Allocated zp ZP_WORD:77 [ doplasma::sin_y#0 ] +Allocated zp ZP_BYTE:79 [ doplasma::$2 ] +Allocated zp ZP_WORD:80 [ memset::end#0 ] +Allocated zp ZP_BYTE:82 [ make_plasma_charset::$2 ] +Allocated zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] +Allocated zp ZP_BYTE:84 [ sid_rnd::return#2 ] +Allocated zp ZP_BYTE:85 [ make_plasma_charset::$3 ] +Allocated zp ZP_BYTE:86 [ make_plasma_charset::$4 ] +Allocated zp ZP_WORD:87 [ make_plasma_charset::$8 ] +Allocated zp ZP_WORD:89 [ make_plasma_charset::$9 ] +Allocated zp ZP_WORD:91 [ make_plasma_charset::$16 ] +Allocated zp ZP_BYTE:93 [ make_plasma_charset::$11 ] +Allocated zp ZP_BYTE:94 [ sid_rnd::return#0 ] +Allocated zp ZP_BYTE:95 [ init_angle_screen::$2 ] +Allocated zp ZP_BYTE:96 [ init_angle_screen::$3 ] +Allocated zp ZP_WORD:97 [ init_angle_screen::xw#0 ] +Allocated zp ZP_BYTE:99 [ init_angle_screen::$6 ] +Allocated zp ZP_WORD:100 [ init_angle_screen::yw#0 ] +Allocated zp ZP_WORD:102 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:104 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:106 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:108 [ init_angle_screen::angle_w#0 ] +Allocated zp ZP_WORD:110 [ init_angle_screen::$10 ] +Allocated zp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] +Allocated zp ZP_BYTE:113 [ init_angle_screen::$12 ] +Allocated zp ZP_BYTE:114 [ init_angle_screen::$13 ] +Allocated zp ZP_BYTE:115 [ init_angle_screen::$14 ] +Allocated zp ZP_BYTE:116 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:117 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:118 [ init_dist_screen::y2#0 ] +Allocated zp ZP_WORD:119 [ sqr::return#2 ] +Allocated zp ZP_WORD:121 [ init_dist_screen::yds#0 ] +Allocated zp ZP_BYTE:123 [ init_dist_screen::x2#0 ] +Allocated zp ZP_WORD:124 [ sqr::return#3 ] +Allocated zp ZP_WORD:126 [ init_dist_screen::xds#0 ] +Allocated zp ZP_WORD:128 [ init_dist_screen::ds#0 ] +Allocated zp ZP_WORD:130 [ sqrt::val#0 ] +Allocated zp ZP_BYTE:132 [ sqrt::return#2 ] +Allocated zp ZP_BYTE:133 [ init_dist_screen::d#0 ] +Allocated zp ZP_WORD:134 [ bsearch16u::key#0 ] +Allocated zp ZP_WORD:136 [ bsearch16u::return#3 ] +Allocated zp ZP_WORD:138 [ sqrt::found#0 ] +Allocated zp ZP_WORD:140 [ sqrt::$3 ] +Allocated zp ZP_WORD:142 [ sqrt::$1 ] +Allocated zp ZP_BYTE:144 [ sqrt::return#0 ] +Allocated zp ZP_BYTE:145 [ bsearch16u::$6 ] +Allocated zp ZP_BYTE:146 [ bsearch16u::$16 ] Allocated zp ZP_WORD:147 [ bsearch16u::result#0 ] Allocated zp ZP_BYTE:149 [ sqr::$0 ] Allocated zp ZP_WORD:150 [ sqr::return#0 ] @@ -5208,13 +6366,13 @@ Target platform is c64basic // Plasma screen 2 .label SCREEN2 = $2c00 .const NUM_SQUARES = $30 - .label heap_head = $3f + .label heap_head = $41 .label SQUARES = $98 .label print_char_cursor = $13 // Screen containing distance to center - .label SCREEN_DIST = $43 + .label SCREEN_DIST = $45 // Screen containing angle to center - .label SCREEN_ANGLE = $45 + .label SCREEN_ANGLE = $47 .label sin_offset_x = 2 .label sin_offset_y = 3 // @begin @@ -5225,14 +6383,14 @@ b1_from_bbegin: // @1 b1: // [2] call malloc - // [254] phi from @1 to malloc [phi:@1->malloc] + // [255] phi from @1 to malloc [phi:@1->malloc] malloc_from_b1: - // [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + // [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + // [255] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 lda #<HEAP_TOP sta heap_head lda #>HEAP_TOP @@ -5247,14 +6405,14 @@ b3: lda malloc.mem+1 sta SCREEN_DIST+1 // [4] call malloc - // [254] phi from @3 to malloc [phi:@3->malloc] + // [255] phi from @3 to malloc [phi:@3->malloc] malloc_from_b3: - // [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + // [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy jsr malloc jmp b4 // @4 @@ -5396,11 +6554,11 @@ main: { // Render plasma to the passed screen // doplasma(byte* zeropage(8) screen) doplasma: { - .label _2 = $4d + .label _2 = $4f .label angle = 4 .label dist = 6 - .label sin_x = $49 - .label sin_y = $4b + .label sin_x = $4b + .label sin_y = $4d .label x = $b .label screen = 8 .label y = $a @@ -5535,7 +6693,7 @@ doplasma: { // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. // memset(void* zeropage($c) str, byte zeropage($e) c) memset: { - .label end = $4e + .label end = $50 .label dst = $f .label str = $c .label c = $e @@ -5587,18 +6745,18 @@ memset: { // make_plasma_charset // Make a plasma-friendly charset where the chars are randomly filled make_plasma_charset: { - .label _2 = $50 - .label _3 = $53 - .label _4 = $54 - .label _8 = $55 - .label _9 = $57 - .label _11 = $5b - .label s = $51 + .label _2 = $52 + .label _3 = $55 + .label _4 = $56 + .label _8 = $57 + .label _9 = $59 + .label _11 = $5d + .label s = $53 .label ii = $16 .label b = $17 .label i = $15 .label c = $11 - .label _16 = $59 + .label _16 = $5b // [53] call sid_rnd_init jsr sid_rnd_init // [54] phi from make_plasma_charset to make_plasma_charset::@10 [phi:make_plasma_charset->make_plasma_charset::@10] @@ -5814,8 +6972,8 @@ print_char: { // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { - .label return = $5c - .label return_2 = $52 + .label return = $5e + .label return_2 = $54 // [87] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 lda SID_VOICE3_OSC sta return @@ -5866,22 +7024,22 @@ sid_rnd_init: { // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage($47) screen) +// init_angle_screen(byte* zeropage($49) screen) init_angle_screen: { - .label _2 = $5d - .label _3 = $5e - .label _6 = $61 - .label _10 = $6c - .label _12 = $6f - .label _13 = $70 - .label _14 = $71 - .label screen = $47 + .label _2 = $5f + .label _3 = $60 + .label _6 = $63 + .label _10 = $6e + .label _12 = $71 + .label _13 = $72 + .label _14 = $73 + .label screen = $49 .label screen_topline = $1b .label screen_bottomline = $19 - .label xw = $5f - .label yw = $62 - .label angle_w = $6a - .label ang_w = $6e + .label xw = $61 + .label yw = $64 + .label angle_w = $6c + .label ang_w = $70 .label x = $1d .label xb = $1e .label y = $18 @@ -6066,12 +7224,12 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($64) x, signed word zeropage($66) y) +// atan2_16(signed word zeropage($66) x, signed word zeropage($68) y) atan2_16: { .label _2 = $1f .label _7 = $21 - .label _23 = $73 - .label _24 = $72 + .label _23 = $75 + .label _24 = $74 .label yi = $1f .label xi = $21 .label angle = $26 @@ -6082,9 +7240,9 @@ atan2_16: { .label angle_3 = $24 .label i = $23 .label return = $26 - .label x = $64 - .label y = $66 - .label return_2 = $68 + .label x = $66 + .label y = $68 + .label return_2 = $6a .label angle_6 = $24 .label angle_12 = $24 .label angle_13 = $24 @@ -6408,20 +7566,20 @@ init_dist_screen: { .label _15 = $35 .label screen = $2e .label screen_bottomline = $30 - .label y2 = $74 + .label y2 = $76 .label yd = $32 - .label yds = $77 - .label x2 = $79 + .label yds = $79 + .label x2 = $7b .label xd = $35 - .label xds = $7c - .label ds = $7e - .label d = $83 + .label xds = $7e + .label ds = $80 + .label d = $85 .label x = $33 .label xb = $34 .label screen_topline = $2e .label y = $2d // [170] call init_squares - // [241] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [242] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares jmp b10 @@ -6478,9 +7636,9 @@ init_dist_screen: { lda yd sta sqr.val // [178] call sqr - // [237] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [238] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [237] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [238] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [179] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -6538,9 +7696,9 @@ init_dist_screen: { lda xd sta sqr.val // [187] call sqr - // [237] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [238] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [237] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [238] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [188] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -6652,14 +7810,14 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($80) val) +// sqrt(word zeropage($82) val) sqrt: { - .label _1 = $8c - .label _3 = $8a - .label found = $88 - .label return = $8e - .label val = $80 - .label return_2 = $82 + .label _1 = $8e + .label _3 = $8c + .label found = $8a + .label return = $90 + .label val = $82 + .label return_2 = $84 // [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 lda val sta bsearch16u.key @@ -6667,9 +7825,9 @@ sqrt: { sta bsearch16u.key+1 // [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [211] call bsearch16u // [218] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: @@ -6717,34 +7875,112 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($84) key, word* zeropage($36) items, byte zeropage($38) num) +// bsearch16u(word zeropage($86) key, word* zeropage($38) items, byte zeropage($3a) num) bsearch16u: { - .label _2 = $36 - .label _6 = $8f - .label _16 = $90 - .label pivot = $91 + .label _2 = $38 + .label _6 = $91 + .label _16 = $92 + .label pivot = $38 .label result = $93 - .label return = $36 - .label num = $38 - .label items = $36 - .label key = $84 - .label return_3 = $86 - // [219] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [219] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 + .label return = $38 + .label num = $3a + .label items = $38 + .label key = $86 + .label items_1 = $36 + .label return_3 = $88 + .label items_10 = $36 + .label items_16 = $36 + // [219] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [219] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [219] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuz1=vbuc1 lda #NUM_SQUARES sta num + jmp b4 + // bsearch16u::@4 + b4: + // [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + lda num + lsr + sta _6 + // [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda _6 + asl + sta _16 + // [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 + lda _16 + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [225] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [225] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [226] return + rts + // bsearch16u::@6 + b6: + // [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [229] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuz1=_dec_vbuz1 + dec num + // [230] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [230] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [230] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [231] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr num jmp b3 // bsearch16u::@3 b3: - // [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 + // [232] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuz1_gt_0_then_la1 lda num - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -6758,7 +7994,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -6766,117 +8002,50 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [223] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [235] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [223] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [235] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [224] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [224] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [225] return - rts - // bsearch16u::@4 - b4: - // [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 - lda num - lsr - sta _6 - // [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda _6 - asl - sta _16 - // [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 - lda _16 - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [219] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [219] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [219] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 - dec num - // [235] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [235] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [235] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 - lsr num - // [219] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [219] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte zeropage($39) val) +// sqr(byte zeropage($3b) val) sqr: { .label _0 = $95 .label return = $96 - .label val = $39 - .label return_2 = $75 - .label return_3 = $7a - // [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label val = $3b + .label return_2 = $77 + .label return_3 = $7c + // [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda val asl sta _0 - // [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 + // [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 ldy _0 lda (SQUARES),y sta return @@ -6886,7 +8055,7 @@ sqr: { jmp breturn // sqr::@return breturn: - // [240] return + // [241] return rts } // init_squares @@ -6895,60 +8064,60 @@ sqr: { init_squares: { .label _3 = $9a .label _4 = $9b - .label squares = $3c - .label sqr = $3a - .label i = $3e - // [242] call malloc - // [254] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $3e + .label sqr = $3c + .label i = $40 + // [243] call malloc + // [255] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: - // [254] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + // [255] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc jmp b2 // init_squares::@2 b2: - // [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda malloc.mem sta SQUARES lda malloc.mem+1 sta SQUARES+1 - // [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [245] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] b1_from_b2: - // [245] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [245] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [245] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [245] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [245] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -6956,15 +8125,15 @@ init_squares: { bcc !+ inc squares+1 !: - // [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _3 - // [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy _3 iny sty _4 - // [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda _4 clc adc sqr @@ -6972,26 +8141,26 @@ init_squares: { bcc !+ inc sqr+1 !: - // [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc i - // [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 + // [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_SQUARES-1+1 cmp i bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [253] return + // [254] return rts } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($41) size) +// malloc(word zeropage($43) size) malloc: { .label mem = $9c - .label size = $41 - // [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz3 + .label size = $43 + // [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz3 lda heap_head sec sbc size @@ -6999,7 +8168,7 @@ malloc: { lda heap_head+1 sbc size+1 sta mem+1 - // [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 + // [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 lda mem sta heap_head lda mem+1 @@ -7007,7 +8176,7 @@ malloc: { jmp breturn // malloc::@return breturn: - // [257] return + // [258] return rts } // File Data @@ -7058,7 +8227,7 @@ Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ m Statement [50] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:7::memset:16 [ SCREEN_DIST#0 SCREEN_ANGLE#0 memset::c#3 memset::end#0 memset::dst#1 ] main:7::make_plasma_charset:14::print_cls:55::memset:90 [ SCREEN_DIST#0 SCREEN_ANGLE#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Statement [57] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$2 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$2 ] ) always clobbers reg byte a Statement [66] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::ii#2 make_plasma_charset::b#1 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::ii#2 make_plasma_charset::b#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] Statement [70] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 << (byte) 3 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$8 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$8 ] ) always clobbers reg byte a @@ -7066,7 +8235,7 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ m Statement [71] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$9 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$9 ] ) always clobbers reg byte a Statement [72] (byte*~) make_plasma_charset::$16 ← (const byte*) CHARSET#0 + (word~) make_plasma_charset::$9 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$16 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$16 ] ) always clobbers reg byte a Statement [73] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] Statement [76] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$11 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$11 ] ) always clobbers reg byte a Statement [82] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 [ make_plasma_charset::c#1 print_char_cursor#18 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#1 print_char_cursor#18 ] ) always clobbers reg byte a @@ -7093,9 +8262,9 @@ Statement [108] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return# Statement [109] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a Statement [110] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a Statement [111] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] Statement [112] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] Statement [113] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y Statement [114] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a Statement [115] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y @@ -7155,33 +8324,34 @@ Statement [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:58 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Statement [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:56 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:56 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:62 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:62 [ init_squares::i#2 init_squares::i#1 ] -Statement [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:58 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:64 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:64 [ init_squares::i#2 init_squares::i#1 ] +Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:170::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a @@ -7275,7 +8445,7 @@ Statement [189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_d Statement [190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a Statement [191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a Statement [195] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:131 [ init_dist_screen::d#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:133 [ init_dist_screen::d#0 ] Statement [196] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y Statement [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y Statement [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ) always clobbers reg byte y @@ -7288,26 +8458,27 @@ Statement [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:170::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a @@ -7413,26 +8584,27 @@ Statement [213] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [214] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [215] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [216] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:192 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:242 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:7::init_dist_screen:10::sqrt:192::bsearch16u:211 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:187 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:170 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:170::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:170::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Potential registers zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] : zp ZP_BYTE:2 , Potential registers zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] : zp ZP_BYTE:3 , Potential registers zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] : zp ZP_WORD:4 , @@ -7468,66 +8640,66 @@ Potential registers zp ZP_BYTE:50 [ init_dist_screen::yd#0 init_dist_screen::$7 Potential registers zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:51 , reg byte x , Potential registers zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:52 , reg byte x , Potential registers zp ZP_BYTE:53 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:53 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:54 , -Potential registers zp ZP_BYTE:56 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:56 , reg byte x , -Potential registers zp ZP_BYTE:57 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:58 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:58 , -Potential registers zp ZP_WORD:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:60 , -Potential registers zp ZP_BYTE:62 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:62 , reg byte x , -Potential registers zp ZP_WORD:63 [ heap_head#12 heap_head#1 ] : zp ZP_WORD:63 , -Potential registers zp ZP_WORD:65 [ malloc::size#3 ] : zp ZP_WORD:65 , -Potential registers zp ZP_WORD:67 [ SCREEN_DIST#0 ] : zp ZP_WORD:67 , -Potential registers zp ZP_WORD:69 [ SCREEN_ANGLE#0 ] : zp ZP_WORD:69 , -Potential registers zp ZP_WORD:71 [ init_angle_screen::screen#0 ] : zp ZP_WORD:71 , -Potential registers zp ZP_WORD:73 [ doplasma::sin_x#0 ] : zp ZP_WORD:73 , -Potential registers zp ZP_WORD:75 [ doplasma::sin_y#0 ] : zp ZP_WORD:75 , -Potential registers zp ZP_BYTE:77 [ doplasma::$2 ] : zp ZP_BYTE:77 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:78 [ memset::end#0 ] : zp ZP_WORD:78 , -Potential registers zp ZP_BYTE:80 [ make_plasma_charset::$2 ] : zp ZP_BYTE:80 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] : zp ZP_BYTE:81 , reg byte x , -Potential registers zp ZP_BYTE:82 [ sid_rnd::return#2 ] : zp ZP_BYTE:82 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:83 [ make_plasma_charset::$3 ] : zp ZP_BYTE:83 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:84 [ make_plasma_charset::$4 ] : zp ZP_BYTE:84 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:85 [ make_plasma_charset::$8 ] : zp ZP_WORD:85 , -Potential registers zp ZP_WORD:87 [ make_plasma_charset::$9 ] : zp ZP_WORD:87 , -Potential registers zp ZP_WORD:89 [ make_plasma_charset::$16 ] : zp ZP_WORD:89 , -Potential registers zp ZP_BYTE:91 [ make_plasma_charset::$11 ] : zp ZP_BYTE:91 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:92 [ sid_rnd::return#0 ] : zp ZP_BYTE:92 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:93 [ init_angle_screen::$2 ] : zp ZP_BYTE:93 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:94 [ init_angle_screen::$3 ] : zp ZP_BYTE:94 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:95 [ init_angle_screen::xw#0 ] : zp ZP_WORD:95 , -Potential registers zp ZP_BYTE:97 [ init_angle_screen::$6 ] : zp ZP_BYTE:97 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:98 [ init_angle_screen::yw#0 ] : zp ZP_WORD:98 , -Potential registers zp ZP_WORD:100 [ atan2_16::x#0 ] : zp ZP_WORD:100 , -Potential registers zp ZP_WORD:102 [ atan2_16::y#0 ] : zp ZP_WORD:102 , -Potential registers zp ZP_WORD:104 [ atan2_16::return#2 ] : zp ZP_WORD:104 , -Potential registers zp ZP_WORD:106 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:106 , -Potential registers zp ZP_WORD:108 [ init_angle_screen::$10 ] : zp ZP_WORD:108 , -Potential registers zp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:110 , reg byte x , -Potential registers zp ZP_BYTE:111 [ init_angle_screen::$12 ] : zp ZP_BYTE:111 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:112 [ init_angle_screen::$13 ] : zp ZP_BYTE:112 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:113 [ init_angle_screen::$14 ] : zp ZP_BYTE:113 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:114 [ atan2_16::$24 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:115 [ atan2_16::$23 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:116 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:116 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:117 [ sqr::return#2 ] : zp ZP_WORD:117 , -Potential registers zp ZP_WORD:119 [ init_dist_screen::yds#0 ] : zp ZP_WORD:119 , -Potential registers zp ZP_BYTE:121 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:121 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:122 [ sqr::return#3 ] : zp ZP_WORD:122 , -Potential registers zp ZP_WORD:124 [ init_dist_screen::xds#0 ] : zp ZP_WORD:124 , -Potential registers zp ZP_WORD:126 [ init_dist_screen::ds#0 ] : zp ZP_WORD:126 , -Potential registers zp ZP_WORD:128 [ sqrt::val#0 ] : zp ZP_WORD:128 , -Potential registers zp ZP_BYTE:130 [ sqrt::return#2 ] : zp ZP_BYTE:130 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:131 [ init_dist_screen::d#0 ] : zp ZP_BYTE:131 , reg byte a , reg byte x , -Potential registers zp ZP_WORD:132 [ bsearch16u::key#0 ] : zp ZP_WORD:132 , -Potential registers zp ZP_WORD:134 [ bsearch16u::return#3 ] : zp ZP_WORD:134 , -Potential registers zp ZP_WORD:136 [ sqrt::found#0 ] : zp ZP_WORD:136 , -Potential registers zp ZP_WORD:138 [ sqrt::$3 ] : zp ZP_WORD:138 , -Potential registers zp ZP_WORD:140 [ sqrt::$1 ] : zp ZP_WORD:140 , -Potential registers zp ZP_BYTE:142 [ sqrt::return#0 ] : zp ZP_BYTE:142 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:143 [ bsearch16u::$6 ] : zp ZP_BYTE:143 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:144 [ bsearch16u::$16 ] : zp ZP_BYTE:144 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:145 [ bsearch16u::pivot#0 ] : zp ZP_WORD:145 , +Potential registers zp ZP_WORD:54 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] : zp ZP_WORD:54 , +Potential registers zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] : zp ZP_WORD:56 , +Potential registers zp ZP_BYTE:58 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] : zp ZP_BYTE:58 , reg byte x , +Potential registers zp ZP_BYTE:59 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:60 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:60 , +Potential registers zp ZP_WORD:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:62 , +Potential registers zp ZP_BYTE:64 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:64 , reg byte x , +Potential registers zp ZP_WORD:65 [ heap_head#12 heap_head#1 ] : zp ZP_WORD:65 , +Potential registers zp ZP_WORD:67 [ malloc::size#3 ] : zp ZP_WORD:67 , +Potential registers zp ZP_WORD:69 [ SCREEN_DIST#0 ] : zp ZP_WORD:69 , +Potential registers zp ZP_WORD:71 [ SCREEN_ANGLE#0 ] : zp ZP_WORD:71 , +Potential registers zp ZP_WORD:73 [ init_angle_screen::screen#0 ] : zp ZP_WORD:73 , +Potential registers zp ZP_WORD:75 [ doplasma::sin_x#0 ] : zp ZP_WORD:75 , +Potential registers zp ZP_WORD:77 [ doplasma::sin_y#0 ] : zp ZP_WORD:77 , +Potential registers zp ZP_BYTE:79 [ doplasma::$2 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:80 [ memset::end#0 ] : zp ZP_WORD:80 , +Potential registers zp ZP_BYTE:82 [ make_plasma_charset::$2 ] : zp ZP_BYTE:82 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] : zp ZP_BYTE:83 , reg byte x , +Potential registers zp ZP_BYTE:84 [ sid_rnd::return#2 ] : zp ZP_BYTE:84 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:85 [ make_plasma_charset::$3 ] : zp ZP_BYTE:85 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:86 [ make_plasma_charset::$4 ] : zp ZP_BYTE:86 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:87 [ make_plasma_charset::$8 ] : zp ZP_WORD:87 , +Potential registers zp ZP_WORD:89 [ make_plasma_charset::$9 ] : zp ZP_WORD:89 , +Potential registers zp ZP_WORD:91 [ make_plasma_charset::$16 ] : zp ZP_WORD:91 , +Potential registers zp ZP_BYTE:93 [ make_plasma_charset::$11 ] : zp ZP_BYTE:93 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:94 [ sid_rnd::return#0 ] : zp ZP_BYTE:94 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:95 [ init_angle_screen::$2 ] : zp ZP_BYTE:95 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:96 [ init_angle_screen::$3 ] : zp ZP_BYTE:96 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:97 [ init_angle_screen::xw#0 ] : zp ZP_WORD:97 , +Potential registers zp ZP_BYTE:99 [ init_angle_screen::$6 ] : zp ZP_BYTE:99 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:100 [ init_angle_screen::yw#0 ] : zp ZP_WORD:100 , +Potential registers zp ZP_WORD:102 [ atan2_16::x#0 ] : zp ZP_WORD:102 , +Potential registers zp ZP_WORD:104 [ atan2_16::y#0 ] : zp ZP_WORD:104 , +Potential registers zp ZP_WORD:106 [ atan2_16::return#2 ] : zp ZP_WORD:106 , +Potential registers zp ZP_WORD:108 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:108 , +Potential registers zp ZP_WORD:110 [ init_angle_screen::$10 ] : zp ZP_WORD:110 , +Potential registers zp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:112 , reg byte x , +Potential registers zp ZP_BYTE:113 [ init_angle_screen::$12 ] : zp ZP_BYTE:113 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:114 [ init_angle_screen::$13 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:115 [ init_angle_screen::$14 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:116 [ atan2_16::$24 ] : zp ZP_BYTE:116 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:117 [ atan2_16::$23 ] : zp ZP_BYTE:117 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:118 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:118 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:119 [ sqr::return#2 ] : zp ZP_WORD:119 , +Potential registers zp ZP_WORD:121 [ init_dist_screen::yds#0 ] : zp ZP_WORD:121 , +Potential registers zp ZP_BYTE:123 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:123 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:124 [ sqr::return#3 ] : zp ZP_WORD:124 , +Potential registers zp ZP_WORD:126 [ init_dist_screen::xds#0 ] : zp ZP_WORD:126 , +Potential registers zp ZP_WORD:128 [ init_dist_screen::ds#0 ] : zp ZP_WORD:128 , +Potential registers zp ZP_WORD:130 [ sqrt::val#0 ] : zp ZP_WORD:130 , +Potential registers zp ZP_BYTE:132 [ sqrt::return#2 ] : zp ZP_BYTE:132 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:133 [ init_dist_screen::d#0 ] : zp ZP_BYTE:133 , reg byte a , reg byte x , +Potential registers zp ZP_WORD:134 [ bsearch16u::key#0 ] : zp ZP_WORD:134 , +Potential registers zp ZP_WORD:136 [ bsearch16u::return#3 ] : zp ZP_WORD:136 , +Potential registers zp ZP_WORD:138 [ sqrt::found#0 ] : zp ZP_WORD:138 , +Potential registers zp ZP_WORD:140 [ sqrt::$3 ] : zp ZP_WORD:140 , +Potential registers zp ZP_WORD:142 [ sqrt::$1 ] : zp ZP_WORD:142 , +Potential registers zp ZP_BYTE:144 [ sqrt::return#0 ] : zp ZP_BYTE:144 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:145 [ bsearch16u::$6 ] : zp ZP_BYTE:145 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:146 [ bsearch16u::$16 ] : zp ZP_BYTE:146 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:147 [ bsearch16u::result#0 ] : zp ZP_WORD:147 , Potential registers zp ZP_BYTE:149 [ sqr::$0 ] : zp ZP_BYTE:149 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:150 [ sqr::return#0 ] : zp ZP_WORD:150 , @@ -7537,107 +8709,107 @@ Potential registers zp ZP_BYTE:155 [ init_squares::$4 ] : zp ZP_BYTE:155 , reg b Potential registers zp ZP_WORD:156 [ malloc::mem#0 ] : zp ZP_WORD:156 , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:40 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:41 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:43 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:31 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:114 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:115 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:35 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:104 [ atan2_16::return#2 ] 50: zp ZP_WORD:38 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:100 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:102 [ atan2_16::y#0 ] -Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:56 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,855.06: zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:143 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:144 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:147 [ bsearch16u::result#0 ] 501: zp ZP_WORD:145 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:134 [ bsearch16u::return#3 ] 0.27: zp ZP_WORD:132 [ bsearch16u::key#0 ] -Uplift Scope [make_plasma_charset] 3,019.83: zp ZP_BYTE:23 [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] 2,002: zp ZP_BYTE:83 [ make_plasma_charset::$3 ] 2,002: zp ZP_BYTE:84 [ make_plasma_charset::$4 ] 1,876.88: zp ZP_BYTE:22 [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] 202: zp ZP_WORD:85 [ make_plasma_charset::$8 ] 202: zp ZP_WORD:87 [ make_plasma_charset::$9 ] 202: zp ZP_WORD:89 [ make_plasma_charset::$16 ] 171.7: zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] 56.22: zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] 22.3: zp ZP_WORD:17 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] 22: zp ZP_BYTE:80 [ make_plasma_charset::$2 ] 22: zp ZP_BYTE:91 [ make_plasma_charset::$11 ] -Uplift Scope [doplasma] 3,169.83: zp ZP_BYTE:11 [ doplasma::x#2 doplasma::x#1 ] 2,002: zp ZP_BYTE:77 [ doplasma::$2 ] 241.63: zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] 223.64: zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] 219.29: zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] 173.94: zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] 83.58: zp ZP_WORD:75 [ doplasma::sin_y#0 ] 77.15: zp ZP_WORD:73 [ doplasma::sin_x#0 ] -Uplift Scope [sid_rnd] 2,002: zp ZP_BYTE:82 [ sid_rnd::return#2 ] 334.33: zp ZP_BYTE:92 [ sid_rnd::return#0 ] -Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:93 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:94 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:97 [ init_angle_screen::$6 ] 202: zp ZP_WORD:106 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:108 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:111 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:112 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:113 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:98 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:95 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:25 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:27 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:71 [ init_angle_screen::screen#0 ] -Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:53 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:121 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:124 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:126 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:131 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:50 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:116 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:48 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:46 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:119 [ init_dist_screen::yds#0 ] -Uplift Scope [sqr] 338: zp ZP_BYTE:57 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:122 [ sqr::return#3 ] 28.5: zp ZP_WORD:150 [ sqr::return#0 ] 22: zp ZP_WORD:117 [ sqr::return#2 ] 4: zp ZP_BYTE:149 [ sqr::$0 ] -Uplift Scope [sqrt] 202: zp ZP_BYTE:130 [ sqrt::return#2 ] 103: zp ZP_WORD:128 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:142 [ sqrt::return#0 ] 4: zp ZP_WORD:136 [ sqrt::found#0 ] 4: zp ZP_WORD:138 [ sqrt::$3 ] 2: zp ZP_WORD:140 [ sqrt::$1 ] -Uplift Scope [init_squares] 25.17: zp ZP_WORD:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:62 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:154 [ init_squares::$3 ] 22: zp ZP_BYTE:155 [ init_squares::$4 ] 13.93: zp ZP_WORD:58 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplift Scope [] 16.42: zp ZP_WORD:19 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] 15.53: zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] 15.29: zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] 6.6: zp ZP_WORD:63 [ heap_head#12 heap_head#1 ] 0.05: zp ZP_WORD:69 [ SCREEN_ANGLE#0 ] 0.05: zp ZP_WORD:67 [ SCREEN_DIST#0 ] 0.03: zp ZP_WORD:152 [ SQUARES#1 ] -Uplift Scope [memset] 38: zp ZP_WORD:15 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:78 [ memset::end#0 ] 1.57: zp ZP_BYTE:14 [ memset::c#3 ] 0: zp ZP_WORD:12 [ memset::str#3 ] -Uplift Scope [malloc] 2: zp ZP_WORD:65 [ malloc::size#3 ] 0.67: zp ZP_WORD:156 [ malloc::mem#0 ] +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:40 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:41 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:43 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:31 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:116 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:117 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:35 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:106 [ atan2_16::return#2 ] 50: zp ZP_WORD:38 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:102 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:104 [ atan2_16::y#0 ] +Uplift Scope [bsearch16u] 6,450.89: zp ZP_BYTE:58 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] 4,851: zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] 2,433.29: zp ZP_WORD:54 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] 2,002: zp ZP_BYTE:145 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:146 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:147 [ bsearch16u::result#0 ] 4: zp ZP_WORD:136 [ bsearch16u::return#3 ] 0.24: zp ZP_WORD:134 [ bsearch16u::key#0 ] +Uplift Scope [make_plasma_charset] 3,019.83: zp ZP_BYTE:23 [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] 2,002: zp ZP_BYTE:85 [ make_plasma_charset::$3 ] 2,002: zp ZP_BYTE:86 [ make_plasma_charset::$4 ] 1,876.88: zp ZP_BYTE:22 [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] 202: zp ZP_WORD:87 [ make_plasma_charset::$8 ] 202: zp ZP_WORD:89 [ make_plasma_charset::$9 ] 202: zp ZP_WORD:91 [ make_plasma_charset::$16 ] 171.7: zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] 56.22: zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] 22.3: zp ZP_WORD:17 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] 22: zp ZP_BYTE:82 [ make_plasma_charset::$2 ] 22: zp ZP_BYTE:93 [ make_plasma_charset::$11 ] +Uplift Scope [doplasma] 3,169.83: zp ZP_BYTE:11 [ doplasma::x#2 doplasma::x#1 ] 2,002: zp ZP_BYTE:79 [ doplasma::$2 ] 241.63: zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] 223.64: zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] 219.29: zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] 173.94: zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] 83.58: zp ZP_WORD:77 [ doplasma::sin_y#0 ] 77.15: zp ZP_WORD:75 [ doplasma::sin_x#0 ] +Uplift Scope [sid_rnd] 2,002: zp ZP_BYTE:84 [ sid_rnd::return#2 ] 334.33: zp ZP_BYTE:94 [ sid_rnd::return#0 ] +Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:95 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:96 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:99 [ init_angle_screen::$6 ] 202: zp ZP_WORD:108 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:110 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:113 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:114 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:115 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:100 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:97 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:25 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:27 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:73 [ init_angle_screen::screen#0 ] +Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:53 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:123 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:126 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:128 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:133 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:50 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:118 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:48 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:46 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:121 [ init_dist_screen::yds#0 ] +Uplift Scope [sqr] 338: zp ZP_BYTE:59 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:124 [ sqr::return#3 ] 28.5: zp ZP_WORD:150 [ sqr::return#0 ] 22: zp ZP_WORD:119 [ sqr::return#2 ] 4: zp ZP_BYTE:149 [ sqr::$0 ] +Uplift Scope [sqrt] 202: zp ZP_BYTE:132 [ sqrt::return#2 ] 103: zp ZP_WORD:130 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:144 [ sqrt::return#0 ] 4: zp ZP_WORD:138 [ sqrt::found#0 ] 4: zp ZP_WORD:140 [ sqrt::$3 ] 2: zp ZP_WORD:142 [ sqrt::$1 ] +Uplift Scope [init_squares] 25.17: zp ZP_WORD:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:64 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:154 [ init_squares::$3 ] 22: zp ZP_BYTE:155 [ init_squares::$4 ] 13.93: zp ZP_WORD:60 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [] 16.42: zp ZP_WORD:19 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] 15.53: zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] 15.29: zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] 6.6: zp ZP_WORD:65 [ heap_head#12 heap_head#1 ] 0.05: zp ZP_WORD:71 [ SCREEN_ANGLE#0 ] 0.05: zp ZP_WORD:69 [ SCREEN_DIST#0 ] 0.03: zp ZP_WORD:152 [ SQUARES#1 ] +Uplift Scope [memset] 38: zp ZP_WORD:15 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:80 [ memset::end#0 ] 1.57: zp ZP_BYTE:14 [ memset::c#3 ] 0: zp ZP_WORD:12 [ memset::str#3 ] +Uplift Scope [malloc] 2: zp ZP_WORD:67 [ malloc::size#3 ] 0.67: zp ZP_WORD:156 [ malloc::mem#0 ] Uplift Scope [RADIX] Uplift Scope [print_char] Uplift Scope [print_cls] Uplift Scope [sid_rnd_init] Uplift Scope [main] -Uplifting [atan2_16] best 1412191 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:41 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:43 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:31 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:104 [ atan2_16::return#2 ] zp ZP_WORD:38 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:100 [ atan2_16::x#0 ] zp ZP_WORD:102 [ atan2_16::y#0 ] +Uplifting [atan2_16] best 1438706 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:41 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:43 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:31 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:106 [ atan2_16::return#2 ] zp ZP_WORD:38 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:102 [ atan2_16::x#0 ] zp ZP_WORD:104 [ atan2_16::y#0 ] Limited combination testing to 100 combinations of 144 possible. -Uplifting [bsearch16u] best 1393191 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:147 [ bsearch16u::result#0 ] zp ZP_WORD:145 [ bsearch16u::pivot#0 ] zp ZP_WORD:134 [ bsearch16u::return#3 ] zp ZP_WORD:132 [ bsearch16u::key#0 ] -Uplifting [make_plasma_charset] best 1370091 combination reg byte y [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] reg byte a [ make_plasma_charset::$3 ] zp ZP_BYTE:84 [ make_plasma_charset::$4 ] reg byte x [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] zp ZP_WORD:85 [ make_plasma_charset::$8 ] zp ZP_WORD:87 [ make_plasma_charset::$9 ] zp ZP_WORD:89 [ make_plasma_charset::$16 ] zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] zp ZP_WORD:17 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] zp ZP_BYTE:80 [ make_plasma_charset::$2 ] zp ZP_BYTE:91 [ make_plasma_charset::$11 ] +Uplifting [bsearch16u] best 1419706 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] zp ZP_WORD:54 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:147 [ bsearch16u::result#0 ] zp ZP_WORD:136 [ bsearch16u::return#3 ] zp ZP_WORD:134 [ bsearch16u::key#0 ] +Uplifting [make_plasma_charset] best 1396606 combination reg byte y [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] reg byte a [ make_plasma_charset::$3 ] zp ZP_BYTE:86 [ make_plasma_charset::$4 ] reg byte x [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] zp ZP_WORD:87 [ make_plasma_charset::$8 ] zp ZP_WORD:89 [ make_plasma_charset::$9 ] zp ZP_WORD:91 [ make_plasma_charset::$16 ] zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] zp ZP_WORD:17 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] zp ZP_BYTE:82 [ make_plasma_charset::$2 ] zp ZP_BYTE:93 [ make_plasma_charset::$11 ] Limited combination testing to 100 combinations of 9216 possible. -Uplifting [doplasma] best 1359091 combination reg byte x [ doplasma::x#2 doplasma::x#1 ] reg byte a [ doplasma::$2 ] zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] zp ZP_WORD:75 [ doplasma::sin_y#0 ] zp ZP_WORD:73 [ doplasma::sin_x#0 ] -Uplifting [sid_rnd] best 1350088 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] -Uplifting [init_angle_screen] best 1347888 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:106 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:108 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:112 [ init_angle_screen::$13 ] zp ZP_BYTE:113 [ init_angle_screen::$14 ] zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:98 [ init_angle_screen::yw#0 ] zp ZP_WORD:95 [ init_angle_screen::xw#0 ] zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:25 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:27 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:71 [ init_angle_screen::screen#0 ] +Uplifting [doplasma] best 1385606 combination reg byte x [ doplasma::x#2 doplasma::x#1 ] reg byte a [ doplasma::$2 ] zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] zp ZP_WORD:77 [ doplasma::sin_y#0 ] zp ZP_WORD:75 [ doplasma::sin_x#0 ] +Uplifting [sid_rnd] best 1376603 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] +Uplifting [init_angle_screen] best 1374403 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:108 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:110 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:114 [ init_angle_screen::$13 ] zp ZP_BYTE:115 [ init_angle_screen::$14 ] zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:100 [ init_angle_screen::yw#0 ] zp ZP_WORD:97 [ init_angle_screen::xw#0 ] zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:25 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:27 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:73 [ init_angle_screen::screen#0 ] Limited combination testing to 100 combinations of 65536 possible. -Uplifting [init_dist_screen] best 1344688 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:124 [ init_dist_screen::xds#0 ] zp ZP_WORD:126 [ init_dist_screen::ds#0 ] zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:50 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:116 [ init_dist_screen::y2#0 ] zp ZP_WORD:48 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:46 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:119 [ init_dist_screen::yds#0 ] +Uplifting [init_dist_screen] best 1371203 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:126 [ init_dist_screen::xds#0 ] zp ZP_WORD:128 [ init_dist_screen::ds#0 ] zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:50 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:118 [ init_dist_screen::y2#0 ] zp ZP_WORD:48 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:46 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:121 [ init_dist_screen::yds#0 ] Limited combination testing to 100 combinations of 6144 possible. -Uplifting [sqr] best 1344351 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:122 [ sqr::return#3 ] zp ZP_WORD:150 [ sqr::return#0 ] zp ZP_WORD:117 [ sqr::return#2 ] reg byte a [ sqr::$0 ] -Uplifting [sqrt] best 1343448 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:128 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:136 [ sqrt::found#0 ] zp ZP_WORD:138 [ sqrt::$3 ] zp ZP_WORD:140 [ sqrt::$1 ] -Uplifting [init_squares] best 1343248 combination zp ZP_WORD:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:58 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplifting [] best 1343248 combination zp ZP_WORD:19 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] zp ZP_WORD:63 [ heap_head#12 heap_head#1 ] zp ZP_WORD:69 [ SCREEN_ANGLE#0 ] zp ZP_WORD:67 [ SCREEN_DIST#0 ] zp ZP_WORD:152 [ SQUARES#1 ] -Uplifting [memset] best 1343232 combination zp ZP_WORD:15 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:78 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:12 [ memset::str#3 ] -Uplifting [malloc] best 1343232 combination zp ZP_WORD:65 [ malloc::size#3 ] zp ZP_WORD:156 [ malloc::mem#0 ] -Uplifting [RADIX] best 1343232 combination -Uplifting [print_char] best 1343232 combination -Uplifting [print_cls] best 1343232 combination -Uplifting [sid_rnd_init] best 1343232 combination -Uplifting [main] best 1343232 combination -Attempting to uplift remaining variables inzp ZP_BYTE:84 [ make_plasma_charset::$4 ] -Uplifting [make_plasma_charset] best 1343232 combination zp ZP_BYTE:84 [ make_plasma_charset::$4 ] -Attempting to uplift remaining variables inzp ZP_BYTE:112 [ init_angle_screen::$13 ] -Uplifting [init_angle_screen] best 1342832 combination reg byte a [ init_angle_screen::$13 ] -Attempting to uplift remaining variables inzp ZP_BYTE:113 [ init_angle_screen::$14 ] -Uplifting [init_angle_screen] best 1342232 combination reg byte a [ init_angle_screen::$14 ] +Uplifting [sqr] best 1370866 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:124 [ sqr::return#3 ] zp ZP_WORD:150 [ sqr::return#0 ] zp ZP_WORD:119 [ sqr::return#2 ] reg byte a [ sqr::$0 ] +Uplifting [sqrt] best 1369963 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:130 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:138 [ sqrt::found#0 ] zp ZP_WORD:140 [ sqrt::$3 ] zp ZP_WORD:142 [ sqrt::$1 ] +Uplifting [init_squares] best 1369763 combination zp ZP_WORD:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:60 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [] best 1369763 combination zp ZP_WORD:19 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] zp ZP_WORD:65 [ heap_head#12 heap_head#1 ] zp ZP_WORD:71 [ SCREEN_ANGLE#0 ] zp ZP_WORD:69 [ SCREEN_DIST#0 ] zp ZP_WORD:152 [ SQUARES#1 ] +Uplifting [memset] best 1369747 combination zp ZP_WORD:15 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:80 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:12 [ memset::str#3 ] +Uplifting [malloc] best 1369747 combination zp ZP_WORD:67 [ malloc::size#3 ] zp ZP_WORD:156 [ malloc::mem#0 ] +Uplifting [RADIX] best 1369747 combination +Uplifting [print_char] best 1369747 combination +Uplifting [print_cls] best 1369747 combination +Uplifting [sid_rnd_init] best 1369747 combination +Uplifting [main] best 1369747 combination +Attempting to uplift remaining variables inzp ZP_BYTE:86 [ make_plasma_charset::$4 ] +Uplifting [make_plasma_charset] best 1369747 combination zp ZP_BYTE:86 [ make_plasma_charset::$4 ] +Attempting to uplift remaining variables inzp ZP_BYTE:114 [ init_angle_screen::$13 ] +Uplifting [init_angle_screen] best 1369347 combination reg byte a [ init_angle_screen::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:115 [ init_angle_screen::$14 ] +Uplifting [init_angle_screen] best 1368747 combination reg byte a [ init_angle_screen::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] -Uplifting [doplasma] best 1342232 combination zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] +Uplifting [doplasma] best 1368747 combination zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] -Uplifting [make_plasma_charset] best 1342232 combination zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +Uplifting [make_plasma_charset] best 1368747 combination zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Uplifting [init_dist_screen] best 1342232 combination zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Uplifting [init_dist_screen] best 1368747 combination zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Uplifting [init_angle_screen] best 1342232 combination zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Uplifting [init_angle_screen] best 1368747 combination zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Uplifting [init_dist_screen] best 1342232 combination zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Uplifting [init_dist_screen] best 1368747 combination zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Uplifting [init_angle_screen] best 1342232 combination zp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] -Uplifting [init_angle_screen] best 1342232 combination zp ZP_BYTE:110 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1368747 combination zp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1368747 combination zp ZP_BYTE:112 [ init_angle_screen::ang_w#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:50 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Uplifting [init_dist_screen] best 1342162 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:81 [ make_plasma_charset::s#0 ] -Uplifting [make_plasma_charset] best 1342162 combination zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:80 [ make_plasma_charset::$2 ] -Uplifting [make_plasma_charset] best 1342122 combination reg byte a [ make_plasma_charset::$2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:91 [ make_plasma_charset::$11 ] -Uplifting [make_plasma_charset] best 1342062 combination reg byte a [ make_plasma_charset::$11 ] -Attempting to uplift remaining variables inzp ZP_BYTE:116 [ init_dist_screen::y2#0 ] -Uplifting [init_dist_screen] best 1341962 combination reg byte a [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 1368677 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:83 [ make_plasma_charset::s#0 ] +Uplifting [make_plasma_charset] best 1368677 combination zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:82 [ make_plasma_charset::$2 ] +Uplifting [make_plasma_charset] best 1368637 combination reg byte a [ make_plasma_charset::$2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:93 [ make_plasma_charset::$11 ] +Uplifting [make_plasma_charset] best 1368577 combination reg byte a [ make_plasma_charset::$11 ] +Attempting to uplift remaining variables inzp ZP_BYTE:118 [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 1368477 combination reg byte a [ init_dist_screen::y2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Uplifting [init_angle_screen] best 1341962 combination zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Uplifting [init_angle_screen] best 1368477 combination zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Uplifting [init_dist_screen] best 1341962 combination zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Uplifting [init_dist_screen] best 1368477 combination zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] -Uplifting [] best 1341962 combination zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +Uplifting [] best 1368477 combination zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] -Uplifting [] best 1341962 combination zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +Uplifting [] best 1368477 combination zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] Coalescing zero page register [ zp ZP_WORD:12 [ memset::str#3 ] ] with [ zp ZP_WORD:15 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:25 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:71 [ init_angle_screen::screen#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:25 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:73 [ init_angle_screen::screen#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:38 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:134 [ bsearch16u::return#3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:65 [ malloc::size#3 ] ] with [ zp ZP_WORD:156 [ malloc::mem#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:85 [ make_plasma_charset::$8 ] ] with [ zp ZP_WORD:87 [ make_plasma_charset::$9 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:95 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:100 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:98 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:102 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:104 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:106 [ init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:117 [ sqr::return#2 ] ] with [ zp ZP_WORD:119 [ init_dist_screen::yds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:122 [ sqr::return#3 ] ] with [ zp ZP_WORD:124 [ init_dist_screen::xds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:122 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:150 [ sqr::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:126 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:128 [ sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:136 [ sqrt::found#0 ] ] with [ zp ZP_WORD:138 [ sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:104 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:136 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:65 [ malloc::size#3 malloc::mem#0 ] ] with [ zp ZP_WORD:152 [ SQUARES#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:85 [ make_plasma_charset::$8 make_plasma_charset::$9 ] ] with [ zp ZP_WORD:89 [ make_plasma_charset::$16 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:122 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:126 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:108 [ init_angle_screen::$10 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:140 [ sqrt::$1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:122 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:132 [ bsearch16u::key#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] ] with [ zp ZP_WORD:136 [ bsearch16u::return#3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:67 [ malloc::size#3 ] ] with [ zp ZP_WORD:156 [ malloc::mem#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:87 [ make_plasma_charset::$8 ] ] with [ zp ZP_WORD:89 [ make_plasma_charset::$9 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:97 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:102 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:100 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:104 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:106 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:108 [ init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:119 [ sqr::return#2 ] ] with [ zp ZP_WORD:121 [ init_dist_screen::yds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:124 [ sqr::return#3 ] ] with [ zp ZP_WORD:126 [ init_dist_screen::xds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:124 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:150 [ sqr::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:128 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:130 [ sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:138 [ sqrt::found#0 ] ] with [ zp ZP_WORD:140 [ sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:106 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 ] ] with [ zp ZP_WORD:138 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:67 [ malloc::size#3 malloc::mem#0 ] ] with [ zp ZP_WORD:152 [ SQUARES#1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:87 [ make_plasma_charset::$8 make_plasma_charset::$9 ] ] with [ zp ZP_WORD:91 [ make_plasma_charset::$16 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:124 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:128 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:110 [ init_angle_screen::$10 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:142 [ sqrt::$1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:124 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:134 [ bsearch16u::key#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:12 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] ] with [ zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] ] Coalescing zero page register [ zp ZP_WORD:17 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] ] with [ zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] ] Coalescing zero page register [ zp ZP_WORD:19 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] ] with [ zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] ] @@ -7647,42 +8819,42 @@ Coalescing zero page register [ zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angl Coalescing zero page register [ zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] ] with [ zp ZP_BYTE:30 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] ] Coalescing zero page register [ zp ZP_WORD:46 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] ] with [ zp ZP_WORD:25 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] ] Coalescing zero page register [ zp ZP_WORD:48 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] ] with [ zp ZP_WORD:27 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] ] -Coalescing zero page register [ zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp ZP_WORD:31 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] -Coalescing zero page register [ zp ZP_WORD:58 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] -Coalescing zero page register [ zp ZP_WORD:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] ] -Coalescing zero page register [ zp ZP_WORD:63 [ heap_head#12 heap_head#1 ] ] with [ zp ZP_WORD:41 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] -Coalescing zero page register [ zp ZP_WORD:65 [ malloc::size#3 malloc::mem#0 SQUARES#1 ] ] with [ zp ZP_WORD:43 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] -Coalescing zero page register [ zp ZP_WORD:78 [ memset::end#0 ] ] with [ zp ZP_WORD:73 [ doplasma::sin_x#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:81 [ make_plasma_charset::s#0 ] ] with [ zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:84 [ make_plasma_charset::$4 ] ] with [ zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] -Coalescing zero page register [ zp ZP_WORD:85 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 ] ] with [ zp ZP_WORD:75 [ doplasma::sin_y#0 ] ] -Coalescing zero page register [ zp ZP_WORD:117 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:95 [ init_angle_screen::xw#0 atan2_16::x#0 ] ] -Coalescing zero page register [ zp ZP_WORD:122 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp ZP_WORD:98 [ init_angle_screen::yw#0 atan2_16::y#0 ] ] +Coalescing zero page register [ zp ZP_WORD:54 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] ] with [ zp ZP_WORD:31 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] +Coalescing zero page register [ zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp ZP_WORD:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] +Coalescing zero page register [ zp ZP_WORD:60 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] ] +Coalescing zero page register [ zp ZP_WORD:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp ZP_WORD:41 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] +Coalescing zero page register [ zp ZP_WORD:65 [ heap_head#12 heap_head#1 ] ] with [ zp ZP_WORD:43 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] +Coalescing zero page register [ zp ZP_WORD:75 [ doplasma::sin_x#0 ] ] with [ zp ZP_WORD:67 [ malloc::size#3 malloc::mem#0 SQUARES#1 ] ] +Coalescing zero page register [ zp ZP_WORD:80 [ memset::end#0 ] ] with [ zp ZP_WORD:77 [ doplasma::sin_y#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:83 [ make_plasma_charset::s#0 ] ] with [ zp ZP_BYTE:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:86 [ make_plasma_charset::$4 ] ] with [ zp ZP_BYTE:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] +Coalescing zero page register [ zp ZP_WORD:97 [ init_angle_screen::xw#0 atan2_16::x#0 ] ] with [ zp ZP_WORD:87 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 ] ] +Coalescing zero page register [ zp ZP_WORD:119 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:100 [ init_angle_screen::yw#0 atan2_16::y#0 ] ] Coalescing zero page register [ zp ZP_BYTE:45 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] ] with [ zp ZP_BYTE:21 [ make_plasma_charset::i#7 make_plasma_charset::i#1 sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] ] Coalescing zero page register [ zp ZP_WORD:46 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] ] with [ zp ZP_WORD:12 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] ] Coalescing zero page register [ zp ZP_WORD:48 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] ] with [ zp ZP_WORD:17 [ make_plasma_charset::c#2 make_plasma_charset::c#1 doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] ] -Coalescing zero page register [ zp ZP_WORD:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] with [ zp ZP_WORD:19 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] ] -Coalescing zero page register [ zp ZP_WORD:78 [ memset::end#0 doplasma::sin_x#0 ] ] with [ zp ZP_WORD:58 [ init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] -Coalescing zero page register [ zp ZP_BYTE:81 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 ] ] with [ zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] ] -Coalescing zero page register [ zp ZP_BYTE:84 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] ] -Coalescing zero page register [ zp ZP_WORD:85 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 doplasma::sin_y#0 ] ] with [ zp ZP_WORD:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] ] -Coalescing zero page register [ zp ZP_WORD:145 [ bsearch16u::pivot#0 ] ] with [ zp ZP_WORD:63 [ heap_head#12 heap_head#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] -Coalescing zero page register [ zp ZP_WORD:147 [ bsearch16u::result#0 ] ] with [ zp ZP_WORD:78 [ memset::end#0 doplasma::sin_x#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] +Coalescing zero page register [ zp ZP_WORD:54 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] with [ zp ZP_WORD:19 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] ] +Coalescing zero page register [ zp ZP_WORD:80 [ memset::end#0 doplasma::sin_y#0 ] ] with [ zp ZP_WORD:56 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] +Coalescing zero page register [ zp ZP_BYTE:83 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 ] ] with [ zp ZP_BYTE:24 [ init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] ] +Coalescing zero page register [ zp ZP_BYTE:86 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp ZP_BYTE:29 [ init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] ] +Coalescing zero page register [ zp ZP_WORD:97 [ init_angle_screen::xw#0 atan2_16::x#0 make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 ] ] with [ zp ZP_WORD:75 [ doplasma::sin_x#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] ] +Coalescing zero page register [ zp ZP_WORD:124 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp ZP_WORD:60 [ init_squares::sqr#2 init_squares::sqr#1 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] ] +Coalescing zero page register [ zp ZP_WORD:147 [ bsearch16u::result#0 ] ] with [ zp ZP_WORD:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] Allocated (was zp ZP_BYTE:45) zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::xb#2 init_angle_screen::xb#1 make_plasma_charset::i#7 make_plasma_charset::i#1 sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] Allocated (was zp ZP_WORD:46) zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] Allocated (was zp ZP_WORD:48) zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 make_plasma_charset::c#2 make_plasma_charset::c#1 doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] -Allocated (was zp ZP_WORD:54) zp ZP_WORD:7 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] -Allocated (was zp ZP_WORD:65) zp ZP_WORD:9 [ malloc::size#3 malloc::mem#0 SQUARES#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] -Allocated (was zp ZP_WORD:67) zp ZP_WORD:11 [ SCREEN_DIST#0 ] -Allocated (was zp ZP_WORD:69) zp ZP_WORD:13 [ SCREEN_ANGLE#0 ] -Allocated (was zp ZP_BYTE:81) zp ZP_BYTE:15 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] -Allocated (was zp ZP_BYTE:84) zp ZP_BYTE:16 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] -Allocated (was zp ZP_WORD:85) zp ZP_WORD:17 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 doplasma::sin_y#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] -Allocated (was zp ZP_BYTE:110) zp ZP_BYTE:19 [ init_angle_screen::ang_w#0 ] -Allocated (was zp ZP_WORD:117) zp ZP_WORD:20 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::xw#0 atan2_16::x#0 ] -Allocated (was zp ZP_WORD:122) zp ZP_WORD:22 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::yw#0 atan2_16::y#0 ] -Allocated (was zp ZP_WORD:145) zp ZP_WORD:24 [ bsearch16u::pivot#0 heap_head#12 heap_head#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] -Allocated (was zp ZP_WORD:147) zp ZP_WORD:26 [ bsearch16u::result#0 memset::end#0 doplasma::sin_x#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated (was zp ZP_WORD:54) zp ZP_WORD:7 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +Allocated (was zp ZP_WORD:65) zp ZP_WORD:9 [ heap_head#12 heap_head#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_WORD:69) zp ZP_WORD:11 [ SCREEN_DIST#0 ] +Allocated (was zp ZP_WORD:71) zp ZP_WORD:13 [ SCREEN_ANGLE#0 ] +Allocated (was zp ZP_WORD:80) zp ZP_WORD:15 [ memset::end#0 doplasma::sin_y#0 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated (was zp ZP_BYTE:83) zp ZP_BYTE:17 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +Allocated (was zp ZP_BYTE:86) zp ZP_BYTE:18 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] +Allocated (was zp ZP_WORD:97) zp ZP_WORD:19 [ init_angle_screen::xw#0 atan2_16::x#0 make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 doplasma::sin_x#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] +Allocated (was zp ZP_BYTE:112) zp ZP_BYTE:21 [ init_angle_screen::ang_w#0 ] +Allocated (was zp ZP_WORD:119) zp ZP_WORD:22 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_WORD:124) zp ZP_WORD:24 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] +Allocated (was zp ZP_WORD:147) zp ZP_WORD:26 [ bsearch16u::result#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -7715,15 +8887,15 @@ ASSEMBLER BEFORE OPTIMIZATION // Plasma screen 2 .label SCREEN2 = $2c00 .const NUM_SQUARES = $30 - .label heap_head = $18 - .label SQUARES = 9 + .label heap_head = 9 + .label SQUARES = $13 .label print_char_cursor = 7 // Screen containing distance to center .label SCREEN_DIST = $b // Screen containing angle to center .label SCREEN_ANGLE = $d .label sin_offset_x = 2 - .label sin_offset_y = $f + .label sin_offset_y = $11 // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -7732,14 +8904,14 @@ b1_from_bbegin: // @1 b1: // [2] call malloc - // [254] phi from @1 to malloc [phi:@1->malloc] + // [255] phi from @1 to malloc [phi:@1->malloc] malloc_from_b1: - // [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + // [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + // [255] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 lda #<HEAP_TOP sta heap_head lda #>HEAP_TOP @@ -7754,14 +8926,14 @@ b3: lda malloc.mem+1 sta SCREEN_DIST+1 // [4] call malloc - // [254] phi from @3 to malloc [phi:@3->malloc] + // [255] phi from @3 to malloc [phi:@3->malloc] malloc_from_b3: - // [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + // [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy jsr malloc jmp b4 // @4 @@ -7904,10 +9076,10 @@ main: { doplasma: { .label angle = 3 .label dist = 5 - .label sin_x = $1a - .label sin_y = $11 + .label sin_x = $13 + .label sin_y = $f .label screen = 7 - .label y = $10 + .label y = $12 // [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 lda SCREEN_ANGLE sta angle @@ -8037,7 +9209,7 @@ doplasma: { // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. // memset(void* zeropage(3) str, byte register(X) c) memset: { - .label end = $1a + .label end = $f .label dst = 3 .label str = 3 jmp b1 @@ -8084,13 +9256,13 @@ memset: { // make_plasma_charset // Make a plasma-friendly charset where the chars are randomly filled make_plasma_charset: { - .label _4 = $10 - .label _8 = $11 - .label _9 = $11 - .label s = $f + .label _4 = $12 + .label _8 = $13 + .label _9 = $13 + .label s = $11 .label i = 2 .label c = 5 - .label _16 = $11 + .label _16 = $13 // [53] call sid_rnd_init jsr sid_rnd_init // [54] phi from make_plasma_charset to make_plasma_charset::@10 [phi:make_plasma_charset->make_plasma_charset::@10] @@ -8344,17 +9516,17 @@ sid_rnd_init: { // Utilizes symmetry around the center // init_angle_screen(byte* zeropage(3) screen) init_angle_screen: { - .label _10 = $11 + .label _10 = $18 .label screen = 3 .label screen_topline = 5 .label screen_bottomline = 3 - .label xw = $14 + .label xw = $13 .label yw = $16 - .label angle_w = $11 - .label ang_w = $13 - .label x = $10 + .label angle_w = $18 + .label ang_w = $15 + .label x = $12 .label xb = 2 - .label y = $f + .label y = $11 // [95] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen clc @@ -8510,17 +9682,17 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($14) x, signed word zeropage($16) y) +// atan2_16(signed word zeropage($13) x, signed word zeropage($16) y) atan2_16: { .label _2 = 7 - .label _7 = $1a + .label _7 = $f .label yi = 7 - .label xi = $1a - .label angle = $11 + .label xi = $f + .label angle = $18 .label xd = 9 - .label yd = $18 - .label return = $11 - .label x = $14 + .label yd = $1a + .label return = $18 + .label x = $13 .label y = $16 // [126] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 @@ -8828,15 +10000,15 @@ atan2_16: { init_dist_screen: { .label screen = 3 .label screen_bottomline = 5 - .label yds = $14 - .label xds = $16 - .label ds = $16 - .label x = $f - .label xb = $10 + .label yds = $16 + .label xds = $18 + .label ds = $18 + .label x = $11 + .label xb = $12 .label screen_topline = 3 .label y = 2 // [170] call init_squares - // [241] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [242] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares jmp b10 @@ -8888,9 +10060,9 @@ init_dist_screen: { b4: // [177] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [178] call sqr - // [237] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [238] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [237] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [238] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [179] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -8939,9 +10111,9 @@ init_dist_screen: { b8: // [186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [187] call sqr - // [237] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [238] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [237] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [238] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [188] (word) sqr::return#3 ← (word) sqr::return#0 jmp b12 @@ -9031,18 +10203,18 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($16) val) +// sqrt(word zeropage($18) val) sqrt: { - .label _1 = 7 - .label _3 = 7 - .label found = 7 - .label val = $16 + .label _1 = $f + .label _3 = $f + .label found = $f + .label val = $18 // [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [211] call bsearch16u // [218] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: @@ -9077,29 +10249,105 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($16) key, word* zeropage(7) items, byte register(X) num) +// bsearch16u(word zeropage($18) key, word* zeropage($f) items, byte register(X) num) bsearch16u: { - .label _2 = 7 - .label pivot = $18 + .label _2 = $f + .label pivot = $f .label result = $1a - .label return = 7 - .label items = 7 - .label key = $16 - // [219] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [219] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + .label return = $f + .label items = $f + .label key = $18 + .label items_1 = 7 + .label items_10 = 7 + .label items_16 = 7 + // [219] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [219] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [219] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES + jmp b4 + // bsearch16u::@4 + b4: + // [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + txa + lsr + // [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + // [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [225] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [225] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [226] return + rts + // bsearch16u::@6 + b6: + // [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [229] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx + dex + // [230] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [230] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [230] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [231] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + txa + lsr + tax jmp b3 // bsearch16u::@3 b3: - // [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + // [232] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 cpx #0 - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -9113,7 +10361,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -9121,110 +10369,45 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [223] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [235] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [223] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [235] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [224] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [224] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [225] return - rts - // bsearch16u::@4 - b4: - // [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 - txa - lsr - // [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - // [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [219] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [219] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [219] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx - dex - // [235] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [235] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [235] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 - txa - lsr - tax - // [219] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [219] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $16 - .label return_2 = $14 - // [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $18 + .label return_2 = $16 + // [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + // [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa tay lda (SQUARES),y sta return @@ -9234,61 +10417,61 @@ sqr: { jmp breturn // sqr::@return breturn: - // [240] return + // [241] return rts } // init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $11 - .label sqr = $1a - // [242] call malloc - // [254] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $1a + .label sqr = $18 + // [243] call malloc + // [255] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: - // [254] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + // [255] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc jmp b2 // init_squares::@2 b2: - // [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - // [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + // [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [245] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] b1_from_b2: - // [245] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [245] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [245] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [245] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [245] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -9296,38 +10479,38 @@ init_squares: { bcc !+ inc squares+1 !: - // [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - // [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [253] return + // [254] return rts } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage(9) size) +// malloc(word zeropage($13) size) malloc: { - .label mem = 9 - .label size = 9 - // [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 + .label mem = $13 + .label size = $13 + // [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 lda heap_head sec sbc mem @@ -9335,7 +10518,7 @@ malloc: { lda heap_head+1 sbc mem+1 sta mem+1 - // [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 + // [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 lda mem sta heap_head lda mem+1 @@ -9343,7 +10526,7 @@ malloc: { jmp breturn // malloc::@return breturn: - // [257] return + // [258] return rts } // File Data @@ -9433,15 +10616,15 @@ Removing instruction jmp b9 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b8 +Removing instruction jmp b7 Removing instruction jmp b3 Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp breturn -Removing instruction jmp b8 -Removing instruction jmp b9 -Removing instruction jmp b7 -Removing instruction jmp breturn Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn @@ -9489,9 +10672,8 @@ Replacing label b8_from_b6 with b8 Replacing label b4_from_b2 with b4 Replacing label b2_from_b5 with b2 Replacing label b2_from_b5 with b2 -Replacing label breturn_from_b8 with b2 -Replacing label b7_from_b6 with b7 -Replacing label b7_from_b6 with b7 +Replacing label breturn_from_b2 with breturn +Replacing label b7_from_b10 with b7 Replacing label b1_from_b1 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: @@ -9555,13 +10737,12 @@ Removing instruction b5_from_b13: Removing instruction b8_from_b6: Removing instruction b8_from_b7: Removing instruction sqr_from_b8: +Removing instruction breturn_from_b2: +Removing instruction breturn_from_b4: +Removing instruction b7_from_b10: +Removing instruction b7_from_b8: Removing instruction b2_from_b1: Removing instruction b2_from_b5: -Removing instruction breturn_from_b2: -Removing instruction breturn_from_b8: -Removing instruction breturn: -Removing instruction b7_from_b6: -Removing instruction b7_from_b9: Removing instruction b1_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction b3: @@ -9623,12 +10804,12 @@ Removing instruction breturn: Removing instruction bsearch16u_from_sqrt: Removing instruction b1: Removing instruction breturn: -Removing instruction b3_from_bsearch16u: +Removing instruction b4_from_bsearch16u: +Removing instruction b8: +Removing instruction b3: Removing instruction b5: Removing instruction b1: -Removing instruction b8: -Removing instruction b9: -Removing instruction b3_from_b7: +Removing instruction b4_from_b9: Removing instruction breturn: Removing instruction malloc_from_init_squares: Removing instruction b2: @@ -9636,7 +10817,9 @@ Removing instruction b1_from_b2: Removing instruction breturn: Removing instruction breturn: Succesful ASM optimization Pass5UnusedLabelElimination -Replacing jump to rts with rts in jmp b2 +Skipping double jump to breturn in beq b2 +Skipping double jump to breturn in bcc b2 +Replacing jump to rts with rts in jmp breturn Succesful ASM optimization Pass5DoubleJumpElimination Adding RTS to root block Succesful ASM optimization Pass5AddMainRts @@ -9651,6 +10834,8 @@ Removing instruction jmp b1 Removing instruction jmp b5 Removing instruction jmp b1 Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b2: +Succesful ASM optimization Pass5UnusedLabelElimination Fixing long branch [569] beq b12 to bne Fixing long branch [463] bpl b1 to bmi Fixing long branch [475] bpl b4 to bmi @@ -9706,12 +10891,12 @@ FINAL SYMBOL TABLE }} (const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2 (word*) SQUARES -(void*) SQUARES#1 SQUARES zp ZP_WORD:9 0.03225806451612903 +(void*) SQUARES#1 SQUARES zp ZP_WORD:19 0.03225806451612903 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) (signed word~) atan2_16::$2 $2 zp ZP_WORD:7 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:26 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:15 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -9735,27 +10920,27 @@ FINAL SYMBOL TABLE (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:17 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:17 190.66666666666666 -(word) atan2_16::angle#13 angle zp ZP_WORD:17 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:17 2004.0 +(word) atan2_16::angle#1 angle zp ZP_WORD:24 3.0 +(word) atan2_16::angle#11 angle zp ZP_WORD:24 4.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:24 190.66666666666666 +(word) atan2_16::angle#13 angle zp ZP_WORD:24 1334.6666666666667 +(word) atan2_16::angle#2 angle zp ZP_WORD:24 2002.0 +(word) atan2_16::angle#3 angle zp ZP_WORD:24 2002.0 +(word) atan2_16::angle#4 angle zp ZP_WORD:24 4.0 +(word) atan2_16::angle#5 angle zp ZP_WORD:24 4.0 +(word) atan2_16::angle#6 angle zp ZP_WORD:24 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 reg byte x 1501.5 (byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:17 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:17 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:24 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:24 202.0 (byte) atan2_16::shift (byte) atan2_16::shift#1 reg byte y 20002.0 (byte) atan2_16::shift#2 reg byte y 8001.25 (byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:20 2.8684210526315796 +(signed word) atan2_16::x#0 x zp ZP_WORD:19 2.8684210526315796 (signed word) atan2_16::xd (signed word) atan2_16::xd#1 xd zp ZP_WORD:9 6667.333333333333 (signed word~) atan2_16::xd#10 xd zp ZP_WORD:9 1001.0 @@ -9763,20 +10948,20 @@ FINAL SYMBOL TABLE (signed word) atan2_16::xd#3 xd zp ZP_WORD:9 7668.333333333332 (signed word) atan2_16::xd#5 xd zp ZP_WORD:9 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:26 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:26 500.5 -(signed word~) atan2_16::xi#13 xi zp ZP_WORD:26 4.0 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:26 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:26 267.0666666666667 -(signed word) atan2_16::xi#8 xi zp ZP_WORD:26 1001.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:15 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:15 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:15 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:15 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:15 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:15 1001.0 (signed word) atan2_16::y (signed word) atan2_16::y#0 y zp ZP_WORD:22 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#1 yd zp ZP_WORD:24 10001.0 -(signed word~) atan2_16::yd#10 yd zp ZP_WORD:24 2002.0 -(signed word) atan2_16::yd#2 yd zp ZP_WORD:24 2002.0 -(signed word) atan2_16::yd#3 yd zp ZP_WORD:24 4601.0 -(signed word) atan2_16::yd#5 yd zp ZP_WORD:24 2002.0 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:26 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:26 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:26 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:26 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:26 2002.0 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 yi zp ZP_WORD:7 1.2000000000000002 (signed word) atan2_16::yi#1 yi zp ZP_WORD:7 667.3333333333334 @@ -9786,9 +10971,10 @@ FINAL SYMBOL TABLE (signed word) atan2_16::yi#8 yi zp ZP_WORD:7 1001.0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:7 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:15 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -9799,26 +10985,27 @@ FINAL SYMBOL TABLE (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:7 1001.0 -(word*) bsearch16u::items#1 items zp ZP_WORD:7 2.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:7 334.5555555555556 -(word*) bsearch16u::items#8 items zp ZP_WORD:7 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:15 1001.0 +(word*) bsearch16u::items#1 items#1 zp ZP_WORD:7 2.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:7 429.2857142857143 +(word*) bsearch16u::items#11 items zp ZP_WORD:15 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:7 2002.0 +(word*~) bsearch16u::items#19 items zp ZP_WORD:15 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:22 0.26666666666666666 +(word) bsearch16u::key#0 key zp ZP_WORD:24 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:24 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:15 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 result zp ZP_WORD:26 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:7 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:7 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:7 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:7 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:15 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:15 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:15 4.0 (void()) doplasma((byte*) doplasma::screen) (byte~) doplasma::$2 reg byte a 2002.0 (label) doplasma::@1 @@ -9839,20 +11026,20 @@ FINAL SYMBOL TABLE (byte*) doplasma::screen#5 screen zp ZP_WORD:7 200.83333333333334 (byte*) doplasma::screen#6 screen zp ZP_WORD:7 0.4 (byte*) doplasma::sin_x -(byte*) doplasma::sin_x#0 sin_x zp ZP_WORD:26 77.15384615384616 +(byte*) doplasma::sin_x#0 sin_x zp ZP_WORD:19 77.15384615384616 (byte*) doplasma::sin_y -(byte*) doplasma::sin_y#0 sin_y zp ZP_WORD:17 83.58333333333334 +(byte*) doplasma::sin_y#0 sin_y zp ZP_WORD:15 83.58333333333334 (byte) doplasma::x (byte) doplasma::x#1 reg byte x 1501.5 (byte) doplasma::x#2 reg byte x 1668.3333333333335 (byte) doplasma::y -(byte) doplasma::y#1 y zp ZP_BYTE:16 151.5 -(byte) doplasma::y#4 y zp ZP_BYTE:16 22.444444444444443 +(byte) doplasma::y#1 y zp ZP_BYTE:18 151.5 +(byte) doplasma::y#4 y zp ZP_BYTE:18 22.444444444444443 (byte*) heap_head -(byte*) heap_head#1 heap_head zp ZP_WORD:24 0.6000000000000001 -(byte*) heap_head#12 heap_head zp ZP_WORD:24 6.0 +(byte*) heap_head#1 heap_head zp ZP_WORD:9 0.6000000000000001 +(byte*) heap_head#12 heap_head zp ZP_WORD:9 6.0 (void()) init_angle_screen((byte*) init_angle_screen::screen) -(word~) init_angle_screen::$10 $10 zp ZP_WORD:17 202.0 +(word~) init_angle_screen::$10 $10 zp ZP_WORD:24 202.0 (byte~) init_angle_screen::$12 reg byte a 202.0 (byte~) init_angle_screen::$13 reg byte a 202.0 (byte~) init_angle_screen::$14 reg byte a 202.0 @@ -9865,9 +11052,9 @@ FINAL SYMBOL TABLE (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:19 84.16666666666666 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:21 84.16666666666666 (word) init_angle_screen::angle_w -(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:17 202.0 +(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:24 202.0 (byte*) init_angle_screen::screen (byte*) init_angle_screen::screen#0 screen zp ZP_WORD:3 3.0 (byte*) init_angle_screen::screen_bottomline @@ -9879,16 +11066,16 @@ FINAL SYMBOL TABLE (byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:5 5.5 (byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:5 9.416666666666666 (byte) init_angle_screen::x -(byte) init_angle_screen::x#1 x zp ZP_BYTE:16 101.0 -(byte) init_angle_screen::x#2 x zp ZP_BYTE:16 25.25 +(byte) init_angle_screen::x#1 x zp ZP_BYTE:18 101.0 +(byte) init_angle_screen::x#2 x zp ZP_BYTE:18 25.25 (byte) init_angle_screen::xb (byte) init_angle_screen::xb#1 xb zp ZP_BYTE:2 101.0 (byte) init_angle_screen::xb#2 xb zp ZP_BYTE:2 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:20 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:19 33.666666666666664 (byte) init_angle_screen::y -(byte) init_angle_screen::y#1 y zp ZP_BYTE:15 16.5 -(byte) init_angle_screen::y#4 y zp ZP_BYTE:15 4.730769230769231 +(byte) init_angle_screen::y#1 y zp ZP_BYTE:17 16.5 +(byte) init_angle_screen::y#4 y zp ZP_BYTE:17 4.730769230769231 (signed word) init_angle_screen::yw (word) init_angle_screen::yw#0 yw zp ZP_WORD:22 50.5 (void()) init_dist_screen((byte*) init_dist_screen::screen) @@ -9913,7 +11100,7 @@ FINAL SYMBOL TABLE (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:22 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:24 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen#0 screen zp ZP_WORD:3 1.5 (byte*) init_dist_screen::screen_bottomline @@ -9924,17 +11111,17 @@ FINAL SYMBOL TABLE (byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:3 5.5 (byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:3 7.0625 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:15 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:15 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:17 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:17 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:16 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:16 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:18 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:18 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:22 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:24 202.0 (byte) init_dist_screen::y (byte) init_dist_screen::y#1 y zp ZP_BYTE:2 16.5 (byte) init_dist_screen::y#10 y zp ZP_BYTE:2 0.9705882352941178 @@ -9943,7 +11130,7 @@ FINAL SYMBOL TABLE (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:20 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:22 4.869565217391305 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -9954,12 +11141,12 @@ FINAL SYMBOL TABLE (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:26 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:26 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:24 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:24 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#0 squares zp ZP_WORD:17 4.0 -(word*) init_squares::squares#1 squares zp ZP_WORD:17 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:17 17.5 +(word*) init_squares::squares#0 squares zp ZP_WORD:26 4.0 +(word*) init_squares::squares#1 squares zp ZP_WORD:26 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:26 17.5 (void()) main() (label) main::@1 (label) main::@2 @@ -9998,12 +11185,12 @@ FINAL SYMBOL TABLE (byte*) main::toD0182_screen (void()) make_plasma_charset((byte*) make_plasma_charset::charset) (byte~) make_plasma_charset::$11 reg byte a 22.0 -(byte*~) make_plasma_charset::$16 $16 zp ZP_WORD:17 202.0 +(byte*~) make_plasma_charset::$16 $16 zp ZP_WORD:19 202.0 (byte~) make_plasma_charset::$2 reg byte a 22.0 (byte~) make_plasma_charset::$3 reg byte a 2002.0 -(byte~) make_plasma_charset::$4 $4 zp ZP_BYTE:16 2002.0 -(word~) make_plasma_charset::$8 $8 zp ZP_WORD:17 202.0 -(word~) make_plasma_charset::$9 $9 zp ZP_WORD:17 202.0 +(byte~) make_plasma_charset::$4 $4 zp ZP_BYTE:18 2002.0 +(word~) make_plasma_charset::$8 $8 zp ZP_WORD:19 202.0 +(word~) make_plasma_charset::$9 $9 zp ZP_WORD:19 202.0 (label) make_plasma_charset::@1 (label) make_plasma_charset::@10 (label) make_plasma_charset::@11 @@ -10033,14 +11220,14 @@ FINAL SYMBOL TABLE (byte) make_plasma_charset::ii#1 reg byte x 1501.5 (byte) make_plasma_charset::ii#2 reg byte x 375.375 (byte) make_plasma_charset::s -(byte) make_plasma_charset::s#0 s zp ZP_BYTE:15 56.22222222222223 +(byte) make_plasma_charset::s#0 s zp ZP_BYTE:17 56.22222222222223 (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem -(byte*) malloc::mem#0 mem zp ZP_WORD:9 0.6666666666666666 +(byte*) malloc::mem#0 mem zp ZP_WORD:19 0.6666666666666666 (void*) malloc::return (word) malloc::size -(word) malloc::size#3 size zp ZP_WORD:9 2.0 +(word) malloc::size#3 size zp ZP_WORD:19 2.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 (label) memset::@2 @@ -10052,7 +11239,7 @@ FINAL SYMBOL TABLE (byte*) memset::dst#2 dst zp ZP_WORD:3 17.5 (byte*~) memset::dst#3 dst zp ZP_WORD:3 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:26 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:15 2.1666666666666665 (word) memset::num (void*) memset::return (void*) memset::str @@ -10082,33 +11269,33 @@ FINAL SYMBOL TABLE (byte) sin_offset_x#12 sin_offset_x zp ZP_BYTE:2 2.666666666666667 (byte) sin_offset_x#14 sin_offset_x zp ZP_BYTE:2 11.0 (byte) sin_offset_y -(byte) sin_offset_y#10 sin_offset_y zp ZP_BYTE:15 1.5294117647058825 -(byte) sin_offset_y#12 sin_offset_y zp ZP_BYTE:15 3.0 -(byte) sin_offset_y#14 sin_offset_y zp ZP_BYTE:15 11.0 +(byte) sin_offset_y#10 sin_offset_y zp ZP_BYTE:17 1.5294117647058825 +(byte) sin_offset_y#12 sin_offset_y zp ZP_BYTE:17 3.0 +(byte) sin_offset_y#14 sin_offset_y zp ZP_BYTE:17 11.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:22 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:20 22.0 -(word) sqr::return#3 return zp ZP_WORD:22 202.0 +(word) sqr::return#0 return zp ZP_WORD:24 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:22 22.0 +(word) sqr::return#3 return zp ZP_WORD:24 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:7 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:7 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:15 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:15 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:7 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:15 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:22 103.0 +(word) sqrt::val#0 val zp ZP_WORD:24 103.0 reg byte x [ doplasma::x#2 doplasma::x#1 ] reg byte x [ memset::c#3 ] @@ -10121,49 +11308,49 @@ zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topl zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 make_plasma_charset::c#2 make_plasma_charset::c#1 doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:7 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +zp ZP_WORD:7 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:9 [ malloc::size#3 malloc::mem#0 SQUARES#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:9 [ heap_head#12 heap_head#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:11 [ SCREEN_DIST#0 ] zp ZP_WORD:13 [ SCREEN_ANGLE#0 ] reg byte a [ doplasma::$2 ] +zp ZP_WORD:15 [ memset::end#0 doplasma::sin_y#0 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ make_plasma_charset::$2 ] -zp ZP_BYTE:15 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +zp ZP_BYTE:17 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] reg byte a [ sid_rnd::return#2 ] reg byte a [ make_plasma_charset::$3 ] -zp ZP_BYTE:16 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] -zp ZP_WORD:17 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 doplasma::sin_y#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] +zp ZP_BYTE:18 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] reg byte a [ make_plasma_charset::$11 ] reg byte a [ sid_rnd::return#0 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] +zp ZP_WORD:19 [ init_angle_screen::xw#0 atan2_16::x#0 make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 doplasma::sin_x#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_BYTE:19 [ init_angle_screen::ang_w#0 ] +zp ZP_BYTE:21 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:20 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::xw#0 atan2_16::x#0 ] +zp ZP_WORD:22 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::yw#0 atan2_16::y#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:22 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_WORD:24 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:24 [ bsearch16u::pivot#0 heap_head#12 heap_head#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] -zp ZP_WORD:26 [ bsearch16u::result#0 memset::end#0 doplasma::sin_x#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +zp ZP_WORD:26 [ bsearch16u::result#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] FINAL ASSEMBLER -Score: 1206219 +Score: 1232761 // File Comments // Plasma based on the distance/angle to the screen center @@ -10195,28 +11382,28 @@ Score: 1206219 // Plasma screen 2 .label SCREEN2 = $2c00 .const NUM_SQUARES = $30 - .label heap_head = $18 - .label SQUARES = 9 + .label heap_head = 9 + .label SQUARES = $13 .label print_char_cursor = 7 // Screen containing distance to center .label SCREEN_DIST = $b // Screen containing angle to center .label SCREEN_ANGLE = $d .label sin_offset_x = 2 - .label sin_offset_y = $f + .label sin_offset_y = $11 // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] // @1 // malloc(1000) // [2] call malloc - // [254] phi from @1 to malloc [phi:@1->malloc] - // [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + // [255] phi from @1 to malloc [phi:@1->malloc] + // [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + // [255] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 lda #<HEAP_TOP sta heap_head lda #>HEAP_TOP @@ -10230,13 +11417,13 @@ bbegin: lda malloc.mem+1 sta SCREEN_DIST+1 // [4] call malloc - // [254] phi from @3 to malloc [phi:@3->malloc] - // [254] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + // [255] phi from @3 to malloc [phi:@3->malloc] + // [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy jsr malloc // @4 // malloc(1000) @@ -10351,10 +11538,10 @@ main: { doplasma: { .label angle = 3 .label dist = 5 - .label sin_x = $1a - .label sin_y = $11 + .label sin_x = $13 + .label sin_y = $f .label screen = 7 - .label y = $10 + .label y = $12 // angle = SCREEN_ANGLE // [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 lda SCREEN_ANGLE @@ -10484,7 +11671,7 @@ doplasma: { // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. // memset(void* zeropage(3) str, byte register(X) c) memset: { - .label end = $1a + .label end = $f .label dst = 3 .label str = 3 // memset::@1 @@ -10528,13 +11715,13 @@ memset: { // make_plasma_charset // Make a plasma-friendly charset where the chars are randomly filled make_plasma_charset: { - .label _4 = $10 - .label _8 = $11 - .label _9 = $11 - .label s = $f + .label _4 = $12 + .label _8 = $13 + .label _9 = $13 + .label s = $11 .label i = 2 .label c = 5 - .label _16 = $11 + .label _16 = $13 // sid_rnd_init() // [53] call sid_rnd_init jsr sid_rnd_init @@ -10771,17 +11958,17 @@ sid_rnd_init: { // Utilizes symmetry around the center // init_angle_screen(byte* zeropage(3) screen) init_angle_screen: { - .label _10 = $11 + .label _10 = $18 .label screen = 3 .label screen_topline = 5 .label screen_bottomline = 3 - .label xw = $14 + .label xw = $13 .label yw = $16 - .label angle_w = $11 - .label ang_w = $13 - .label x = $10 + .label angle_w = $18 + .label ang_w = $15 + .label x = $12 .label xb = 2 - .label y = $f + .label y = $11 // screen_topline = screen+40*12 // [95] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen @@ -10941,17 +12128,17 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($14) x, signed word zeropage($16) y) +// atan2_16(signed word zeropage($13) x, signed word zeropage($16) y) atan2_16: { .label _2 = 7 - .label _7 = $1a + .label _7 = $f .label yi = 7 - .label xi = $1a - .label angle = $11 + .label xi = $f + .label angle = $18 .label xd = 9 - .label yd = $18 - .label return = $11 - .label x = $14 + .label yd = $1a + .label return = $18 + .label x = $13 .label y = $16 // (y>=0)?y:-y // [126] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 @@ -11245,16 +12432,16 @@ atan2_16: { init_dist_screen: { .label screen = 3 .label screen_bottomline = 5 - .label yds = $14 - .label xds = $16 - .label ds = $16 - .label x = $f - .label xb = $10 + .label yds = $16 + .label xds = $18 + .label ds = $18 + .label x = $11 + .label xb = $12 .label screen_topline = 3 .label y = 2 // init_squares() // [170] call init_squares - // [241] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [242] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] jsr init_squares // init_dist_screen::@10 // screen_bottomline = screen+40*24 @@ -11298,8 +12485,8 @@ init_dist_screen: { // sqr(yd) // [177] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [178] call sqr - // [237] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - // [237] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [238] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [238] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // sqr(yd) // [179] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 @@ -11342,8 +12529,8 @@ init_dist_screen: { // sqr(xd) // [186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [187] call sqr - // [237] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - // [237] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [238] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [238] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // sqr(xd) // [188] (word) sqr::return#3 ← (word) sqr::return#0 @@ -11439,19 +12626,19 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($16) val) +// sqrt(word zeropage($18) val) sqrt: { - .label _1 = 7 - .label _3 = 7 - .label found = 7 - .label val = $16 + .label _1 = $f + .label _3 = $f + .label found = $f + .label val = $18 // bsearch16u(val, SQUARES, NUM_SQUARES) // [209] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [210] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [211] call bsearch16u // [218] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] jsr bsearch16u @@ -11486,74 +12673,39 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($16) key, word* zeropage(7) items, byte register(X) num) +// bsearch16u(word zeropage($18) key, word* zeropage($f) items, byte register(X) num) bsearch16u: { - .label _2 = 7 - .label pivot = $18 + .label _2 = $f + .label pivot = $f .label result = $1a - .label return = 7 - .label items = 7 - .label key = $16 - // [219] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - // [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [219] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + .label return = $f + .label items = $f + .label key = $18 + .label items_1 = 7 + .label items_10 = 7 + .label items_16 = 7 + // [219] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + // [219] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [219] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES - // bsearch16u::@3 - b3: - // while (num > 0) - // [220] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 - cpx #0 - bne b4 - // bsearch16u::@5 - // *items<=key?items:items-1 - // [221] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - // bsearch16u::@1 - // [222] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - // [223] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - // [223] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - // bsearch16u::@2 - b2: - // [224] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - // [224] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - // bsearch16u::@return - // } - // [225] return - rts // bsearch16u::@4 b4: // num >> 1 - // [226] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + // [220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr // items + (num >> 1) - // [227] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [221] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [228] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + // [222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 // result = (signed int)key-(signed int)*pivot - // [229] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + // [223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -11564,66 +12716,112 @@ bsearch16u: { sbc (pivot),y sta result+1 // if (result == 0) - // [230] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + // [224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 bne b6 lda result bne b6 - // bsearch16u::@8 - // [231] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 + // [225] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + // [225] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + // bsearch16u::@return + breturn: + // } + // [226] return rts // bsearch16u::@6 b6: // if (result > 0) - // [232] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + // [227] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: - // bsearch16u::@9 + // bsearch16u::@8 // items = pivot+1 - // [233] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + // [228] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: // num--; - // [234] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + // [229] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx dex - // [235] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - // [235] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [235] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + // [230] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + // [230] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [230] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy // bsearch16u::@7 b7: // num >>= 1 - // [236] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + // [231] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - // [219] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - // [219] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [219] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + // bsearch16u::@3 + // while (num > 0) + // [232] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 + cpx #0 + bne b9 + // bsearch16u::@5 + // *items<=key?items:items-1 + // [233] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + // bsearch16u::@1 + // [234] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + // [235] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [235] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // bsearch16u::@2 + rts + // bsearch16u::@9 + b9: + // [236] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [219] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + // [219] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [219] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [237] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $16 - .label return_2 = $14 + .label return = $18 + .label return_2 = $16 // return SQUARES[val]; - // [238] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [239] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + // [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa tay lda (SQUARES),y sta return @@ -11632,50 +12830,50 @@ sqr: { sta return+1 // sqr::@return // } - // [240] return + // [241] return rts } // init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $11 - .label sqr = $1a + .label squares = $1a + .label sqr = $18 // malloc(NUM_SQUARES*sizeof(word)) - // [242] call malloc - // [254] phi from init_squares to malloc [phi:init_squares->malloc] - // [254] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + // [243] call malloc + // [255] phi from init_squares to malloc [phi:init_squares->malloc] + // [255] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD sta malloc.size+1 - // [254] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc // init_squares::@2 // malloc(NUM_SQUARES*sizeof(word)) - // [243] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // squares = SQUARES - // [244] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [245] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - // [245] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [245] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 txa sta sqr sta sqr+1 - // [245] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [245] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [245] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [245] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy // init_squares::@1 b1: // *squares++ = sqr - // [246] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y @@ -11683,7 +12881,7 @@ init_squares: { lda sqr+1 sta (squares),y // *squares++ = sqr; - // [247] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -11692,15 +12890,15 @@ init_squares: { inc squares+1 !: // i*2 - // [248] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl // i*2+1 - // [249] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 // sqr += i*2+1 - // [250] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr @@ -11708,25 +12906,25 @@ init_squares: { inc sqr+1 !: // for( byte i: 0..NUM_SQUARES-1) - // [251] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [252] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1 // init_squares::@return // } - // [253] return + // [254] return rts } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage(9) size) +// malloc(word zeropage($13) size) malloc: { - .label mem = 9 - .label size = 9 + .label mem = $13 + .label size = $13 // mem = heap_head-size - // [255] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 + // [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 lda heap_head sec sbc mem @@ -11735,14 +12933,14 @@ malloc: { sbc mem+1 sta mem+1 // heap_head = mem - // [256] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 + // [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 lda mem sta heap_head lda mem+1 sta heap_head+1 // malloc::@return // } - // [257] return + // [258] return rts } // File Data diff --git a/src/test/ref/plasma-center.sym b/src/test/ref/plasma-center.sym index e060d7894..8853f7a49 100644 --- a/src/test/ref/plasma-center.sym +++ b/src/test/ref/plasma-center.sym @@ -48,12 +48,12 @@ }} (const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2 (word*) SQUARES -(void*) SQUARES#1 SQUARES zp ZP_WORD:9 0.03225806451612903 +(void*) SQUARES#1 SQUARES zp ZP_WORD:19 0.03225806451612903 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) (signed word~) atan2_16::$2 $2 zp ZP_WORD:7 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:26 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:15 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -77,27 +77,27 @@ (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:17 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:17 190.66666666666666 -(word) atan2_16::angle#13 angle zp ZP_WORD:17 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:17 2004.0 +(word) atan2_16::angle#1 angle zp ZP_WORD:24 3.0 +(word) atan2_16::angle#11 angle zp ZP_WORD:24 4.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:24 190.66666666666666 +(word) atan2_16::angle#13 angle zp ZP_WORD:24 1334.6666666666667 +(word) atan2_16::angle#2 angle zp ZP_WORD:24 2002.0 +(word) atan2_16::angle#3 angle zp ZP_WORD:24 2002.0 +(word) atan2_16::angle#4 angle zp ZP_WORD:24 4.0 +(word) atan2_16::angle#5 angle zp ZP_WORD:24 4.0 +(word) atan2_16::angle#6 angle zp ZP_WORD:24 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 reg byte x 1501.5 (byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:17 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:17 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:24 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:24 202.0 (byte) atan2_16::shift (byte) atan2_16::shift#1 reg byte y 20002.0 (byte) atan2_16::shift#2 reg byte y 8001.25 (byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:20 2.8684210526315796 +(signed word) atan2_16::x#0 x zp ZP_WORD:19 2.8684210526315796 (signed word) atan2_16::xd (signed word) atan2_16::xd#1 xd zp ZP_WORD:9 6667.333333333333 (signed word~) atan2_16::xd#10 xd zp ZP_WORD:9 1001.0 @@ -105,20 +105,20 @@ (signed word) atan2_16::xd#3 xd zp ZP_WORD:9 7668.333333333332 (signed word) atan2_16::xd#5 xd zp ZP_WORD:9 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:26 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:26 500.5 -(signed word~) atan2_16::xi#13 xi zp ZP_WORD:26 4.0 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:26 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:26 267.0666666666667 -(signed word) atan2_16::xi#8 xi zp ZP_WORD:26 1001.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:15 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:15 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:15 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:15 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:15 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:15 1001.0 (signed word) atan2_16::y (signed word) atan2_16::y#0 y zp ZP_WORD:22 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#1 yd zp ZP_WORD:24 10001.0 -(signed word~) atan2_16::yd#10 yd zp ZP_WORD:24 2002.0 -(signed word) atan2_16::yd#2 yd zp ZP_WORD:24 2002.0 -(signed word) atan2_16::yd#3 yd zp ZP_WORD:24 4601.0 -(signed word) atan2_16::yd#5 yd zp ZP_WORD:24 2002.0 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:26 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:26 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:26 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:26 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:26 2002.0 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 yi zp ZP_WORD:7 1.2000000000000002 (signed word) atan2_16::yi#1 yi zp ZP_WORD:7 667.3333333333334 @@ -128,9 +128,10 @@ (signed word) atan2_16::yi#8 yi zp ZP_WORD:7 1001.0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:7 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:15 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -141,26 +142,27 @@ (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:7 1001.0 -(word*) bsearch16u::items#1 items zp ZP_WORD:7 2.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:7 334.5555555555556 -(word*) bsearch16u::items#8 items zp ZP_WORD:7 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:15 1001.0 +(word*) bsearch16u::items#1 items#1 zp ZP_WORD:7 2.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:7 429.2857142857143 +(word*) bsearch16u::items#11 items zp ZP_WORD:15 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:7 2002.0 +(word*~) bsearch16u::items#19 items zp ZP_WORD:15 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:22 0.26666666666666666 +(word) bsearch16u::key#0 key zp ZP_WORD:24 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:24 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:15 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 result zp ZP_WORD:26 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:7 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:7 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:7 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:7 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:15 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:15 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:15 4.0 (void()) doplasma((byte*) doplasma::screen) (byte~) doplasma::$2 reg byte a 2002.0 (label) doplasma::@1 @@ -181,20 +183,20 @@ (byte*) doplasma::screen#5 screen zp ZP_WORD:7 200.83333333333334 (byte*) doplasma::screen#6 screen zp ZP_WORD:7 0.4 (byte*) doplasma::sin_x -(byte*) doplasma::sin_x#0 sin_x zp ZP_WORD:26 77.15384615384616 +(byte*) doplasma::sin_x#0 sin_x zp ZP_WORD:19 77.15384615384616 (byte*) doplasma::sin_y -(byte*) doplasma::sin_y#0 sin_y zp ZP_WORD:17 83.58333333333334 +(byte*) doplasma::sin_y#0 sin_y zp ZP_WORD:15 83.58333333333334 (byte) doplasma::x (byte) doplasma::x#1 reg byte x 1501.5 (byte) doplasma::x#2 reg byte x 1668.3333333333335 (byte) doplasma::y -(byte) doplasma::y#1 y zp ZP_BYTE:16 151.5 -(byte) doplasma::y#4 y zp ZP_BYTE:16 22.444444444444443 +(byte) doplasma::y#1 y zp ZP_BYTE:18 151.5 +(byte) doplasma::y#4 y zp ZP_BYTE:18 22.444444444444443 (byte*) heap_head -(byte*) heap_head#1 heap_head zp ZP_WORD:24 0.6000000000000001 -(byte*) heap_head#12 heap_head zp ZP_WORD:24 6.0 +(byte*) heap_head#1 heap_head zp ZP_WORD:9 0.6000000000000001 +(byte*) heap_head#12 heap_head zp ZP_WORD:9 6.0 (void()) init_angle_screen((byte*) init_angle_screen::screen) -(word~) init_angle_screen::$10 $10 zp ZP_WORD:17 202.0 +(word~) init_angle_screen::$10 $10 zp ZP_WORD:24 202.0 (byte~) init_angle_screen::$12 reg byte a 202.0 (byte~) init_angle_screen::$13 reg byte a 202.0 (byte~) init_angle_screen::$14 reg byte a 202.0 @@ -207,9 +209,9 @@ (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:19 84.16666666666666 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:21 84.16666666666666 (word) init_angle_screen::angle_w -(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:17 202.0 +(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:24 202.0 (byte*) init_angle_screen::screen (byte*) init_angle_screen::screen#0 screen zp ZP_WORD:3 3.0 (byte*) init_angle_screen::screen_bottomline @@ -221,16 +223,16 @@ (byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:5 5.5 (byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:5 9.416666666666666 (byte) init_angle_screen::x -(byte) init_angle_screen::x#1 x zp ZP_BYTE:16 101.0 -(byte) init_angle_screen::x#2 x zp ZP_BYTE:16 25.25 +(byte) init_angle_screen::x#1 x zp ZP_BYTE:18 101.0 +(byte) init_angle_screen::x#2 x zp ZP_BYTE:18 25.25 (byte) init_angle_screen::xb (byte) init_angle_screen::xb#1 xb zp ZP_BYTE:2 101.0 (byte) init_angle_screen::xb#2 xb zp ZP_BYTE:2 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:20 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:19 33.666666666666664 (byte) init_angle_screen::y -(byte) init_angle_screen::y#1 y zp ZP_BYTE:15 16.5 -(byte) init_angle_screen::y#4 y zp ZP_BYTE:15 4.730769230769231 +(byte) init_angle_screen::y#1 y zp ZP_BYTE:17 16.5 +(byte) init_angle_screen::y#4 y zp ZP_BYTE:17 4.730769230769231 (signed word) init_angle_screen::yw (word) init_angle_screen::yw#0 yw zp ZP_WORD:22 50.5 (void()) init_dist_screen((byte*) init_dist_screen::screen) @@ -255,7 +257,7 @@ (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:22 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:24 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen#0 screen zp ZP_WORD:3 1.5 (byte*) init_dist_screen::screen_bottomline @@ -266,17 +268,17 @@ (byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:3 5.5 (byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:3 7.0625 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:15 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:15 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:17 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:17 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:16 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:16 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:18 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:18 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:22 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:24 202.0 (byte) init_dist_screen::y (byte) init_dist_screen::y#1 y zp ZP_BYTE:2 16.5 (byte) init_dist_screen::y#10 y zp ZP_BYTE:2 0.9705882352941178 @@ -285,7 +287,7 @@ (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:20 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:22 4.869565217391305 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -296,12 +298,12 @@ (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:26 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:26 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:24 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:24 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#0 squares zp ZP_WORD:17 4.0 -(word*) init_squares::squares#1 squares zp ZP_WORD:17 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:17 17.5 +(word*) init_squares::squares#0 squares zp ZP_WORD:26 4.0 +(word*) init_squares::squares#1 squares zp ZP_WORD:26 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:26 17.5 (void()) main() (label) main::@1 (label) main::@2 @@ -340,12 +342,12 @@ (byte*) main::toD0182_screen (void()) make_plasma_charset((byte*) make_plasma_charset::charset) (byte~) make_plasma_charset::$11 reg byte a 22.0 -(byte*~) make_plasma_charset::$16 $16 zp ZP_WORD:17 202.0 +(byte*~) make_plasma_charset::$16 $16 zp ZP_WORD:19 202.0 (byte~) make_plasma_charset::$2 reg byte a 22.0 (byte~) make_plasma_charset::$3 reg byte a 2002.0 -(byte~) make_plasma_charset::$4 $4 zp ZP_BYTE:16 2002.0 -(word~) make_plasma_charset::$8 $8 zp ZP_WORD:17 202.0 -(word~) make_plasma_charset::$9 $9 zp ZP_WORD:17 202.0 +(byte~) make_plasma_charset::$4 $4 zp ZP_BYTE:18 2002.0 +(word~) make_plasma_charset::$8 $8 zp ZP_WORD:19 202.0 +(word~) make_plasma_charset::$9 $9 zp ZP_WORD:19 202.0 (label) make_plasma_charset::@1 (label) make_plasma_charset::@10 (label) make_plasma_charset::@11 @@ -375,14 +377,14 @@ (byte) make_plasma_charset::ii#1 reg byte x 1501.5 (byte) make_plasma_charset::ii#2 reg byte x 375.375 (byte) make_plasma_charset::s -(byte) make_plasma_charset::s#0 s zp ZP_BYTE:15 56.22222222222223 +(byte) make_plasma_charset::s#0 s zp ZP_BYTE:17 56.22222222222223 (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem -(byte*) malloc::mem#0 mem zp ZP_WORD:9 0.6666666666666666 +(byte*) malloc::mem#0 mem zp ZP_WORD:19 0.6666666666666666 (void*) malloc::return (word) malloc::size -(word) malloc::size#3 size zp ZP_WORD:9 2.0 +(word) malloc::size#3 size zp ZP_WORD:19 2.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 (label) memset::@2 @@ -394,7 +396,7 @@ (byte*) memset::dst#2 dst zp ZP_WORD:3 17.5 (byte*~) memset::dst#3 dst zp ZP_WORD:3 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:26 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:15 2.1666666666666665 (word) memset::num (void*) memset::return (void*) memset::str @@ -424,33 +426,33 @@ (byte) sin_offset_x#12 sin_offset_x zp ZP_BYTE:2 2.666666666666667 (byte) sin_offset_x#14 sin_offset_x zp ZP_BYTE:2 11.0 (byte) sin_offset_y -(byte) sin_offset_y#10 sin_offset_y zp ZP_BYTE:15 1.5294117647058825 -(byte) sin_offset_y#12 sin_offset_y zp ZP_BYTE:15 3.0 -(byte) sin_offset_y#14 sin_offset_y zp ZP_BYTE:15 11.0 +(byte) sin_offset_y#10 sin_offset_y zp ZP_BYTE:17 1.5294117647058825 +(byte) sin_offset_y#12 sin_offset_y zp ZP_BYTE:17 3.0 +(byte) sin_offset_y#14 sin_offset_y zp ZP_BYTE:17 11.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:22 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:20 22.0 -(word) sqr::return#3 return zp ZP_WORD:22 202.0 +(word) sqr::return#0 return zp ZP_WORD:24 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:22 22.0 +(word) sqr::return#3 return zp ZP_WORD:24 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:7 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:7 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:15 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:15 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:7 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:15 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:22 103.0 +(word) sqrt::val#0 val zp ZP_WORD:24 103.0 reg byte x [ doplasma::x#2 doplasma::x#1 ] reg byte x [ memset::c#3 ] @@ -463,42 +465,42 @@ zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topl zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 make_plasma_charset::c#2 make_plasma_charset::c#1 doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:7 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +zp ZP_WORD:7 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:9 [ malloc::size#3 malloc::mem#0 SQUARES#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:9 [ heap_head#12 heap_head#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:11 [ SCREEN_DIST#0 ] zp ZP_WORD:13 [ SCREEN_ANGLE#0 ] reg byte a [ doplasma::$2 ] +zp ZP_WORD:15 [ memset::end#0 doplasma::sin_y#0 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ make_plasma_charset::$2 ] -zp ZP_BYTE:15 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +zp ZP_BYTE:17 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::y#4 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] reg byte a [ sid_rnd::return#2 ] reg byte a [ make_plasma_charset::$3 ] -zp ZP_BYTE:16 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] -zp ZP_WORD:17 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 doplasma::sin_y#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] +zp ZP_BYTE:18 [ make_plasma_charset::$4 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] reg byte a [ make_plasma_charset::$11 ] reg byte a [ sid_rnd::return#0 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] +zp ZP_WORD:19 [ init_angle_screen::xw#0 atan2_16::x#0 make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 doplasma::sin_x#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_BYTE:19 [ init_angle_screen::ang_w#0 ] +zp ZP_BYTE:21 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:20 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::xw#0 atan2_16::x#0 ] +zp ZP_WORD:22 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::yw#0 atan2_16::y#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:22 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_WORD:24 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:24 [ bsearch16u::pivot#0 heap_head#12 heap_head#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] -zp ZP_WORD:26 [ bsearch16u::result#0 memset::end#0 doplasma::sin_x#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +zp ZP_WORD:26 [ bsearch16u::result#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] diff --git a/src/test/ref/ptrtest.asm b/src/test/ref/ptrtest.asm index 45b93e35b..0cf6d36b2 100644 --- a/src/test/ref/ptrtest.asm +++ b/src/test/ref/ptrtest.asm @@ -18,10 +18,6 @@ lvaluevar: { lda #>$400 sta screen+1 ldx #2 - b1: - cpx #$a - bcc b2 - rts b2: lda #b ldy #0 @@ -31,49 +27,43 @@ lvaluevar: { inc screen+1 !: inx - jmp b1 + cpx #$a + bcc b2 + rts } rvaluevar: { .label screen2 = $400 .label screen = 2 - ldy #0 lda #<$400 sta screen lda #>$400 sta screen+1 ldx #2 - b1: - cpx #$a - bcc b2 - sty screen2 - rts b2: ldy #0 lda (screen),y - tay inc screen bne !+ inc screen+1 !: inx - jmp b1 + cpx #$a + bcc b2 + sta screen2 + rts } rvalue: { // A constant pointer .label SCREEN = $400 .label screen2 = $400 - // RValue constant array pointer constant index - lda SCREEN+1 ldx #2 - b1: + b2: + lda SCREEN,x + inx cpx #$a bcc b2 sta screen2 rts - b2: - lda SCREEN,x - inx - jmp b1 } lvalue: { // A constant pointer @@ -85,13 +75,11 @@ lvalue: { lda #2 sta SCREEN+1 tax - b1: - cpx #$a - bcc b2 - rts b2: lda #3 sta SCREEN,x inx - jmp b1 + cpx #$a + bcc b2 + rts } diff --git a/src/test/ref/ptrtest.cfg b/src/test/ref/ptrtest.cfg index e23b1e486..1b5e286d8 100644 --- a/src/test/ref/ptrtest.cfg +++ b/src/test/ref/ptrtest.cfg @@ -28,70 +28,68 @@ main::@return: scope:[main] from main::@3 to:@return lvaluevar: scope:[lvaluevar] from main::@3 [13] phi() + to:lvaluevar::@2 +lvaluevar::@2: scope:[lvaluevar] from lvaluevar lvaluevar::@1 + [14] (byte*) lvaluevar::screen#4 ← phi( lvaluevar::@1/(byte*) lvaluevar::screen#1 lvaluevar/(byte*) 1024 ) + [14] (byte) lvaluevar::i#4 ← phi( lvaluevar::@1/(byte) lvaluevar::i#1 lvaluevar/(byte) 2 ) + [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 + [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 + [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 to:lvaluevar::@1 -lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2 - [14] (byte*) lvaluevar::screen#2 ← phi( lvaluevar/(byte*) 1024 lvaluevar::@2/(byte*) lvaluevar::screen#1 ) - [14] (byte) lvaluevar::i#2 ← phi( lvaluevar/(byte) 2 lvaluevar::@2/(byte) lvaluevar::i#1 ) - [15] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar::@2 + [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 to:lvaluevar::@return lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 - [16] return + [19] return to:@return -lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 - [17] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 - [18] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 - [19] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 - to:lvaluevar::@1 rvaluevar: scope:[rvaluevar] from main::@2 [20] phi() + to:rvaluevar::@2 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar rvaluevar::@1 + [21] (byte*) rvaluevar::screen#4 ← phi( rvaluevar::@1/(byte*) rvaluevar::screen#1 rvaluevar/(byte*) 1024 ) + [21] (byte) rvaluevar::i#4 ← phi( rvaluevar::@1/(byte) rvaluevar::i#1 rvaluevar/(byte) 2 ) + [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) + [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 + [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 to:rvaluevar::@1 -rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 - [21] (byte) rvaluevar::b#2 ← phi( rvaluevar/(byte) 0 rvaluevar::@2/(byte) rvaluevar::b#1 ) - [21] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(byte*) 1024 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) - [21] (byte) rvaluevar::i#2 ← phi( rvaluevar/(byte) 2 rvaluevar::@2/(byte) rvaluevar::i#1 ) - [22] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar::@2 + [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 to:rvaluevar::@3 rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 - [23] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 to:rvaluevar::@return rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 - [24] return + [27] return to:@return -rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 - [25] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) - [26] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 - [27] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 - to:rvaluevar::@1 rvalue: scope:[rvalue] from main::@1 - [28] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0+(byte) 1) + [28] phi() + to:rvalue::@2 +rvalue::@2: scope:[rvalue] from rvalue rvalue::@1 + [29] (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#1 rvalue/(byte) 2 ) + [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 to:rvalue::@1 -rvalue::@1: scope:[rvalue] from rvalue rvalue::@2 - [29] (byte) rvalue::b#3 ← phi( rvalue/(byte) rvalue::b#1 rvalue::@2/(byte) rvalue::b#2 ) - [29] (byte) rvalue::i#2 ← phi( rvalue/(byte) 2 rvalue::@2/(byte) rvalue::i#1 ) - [30] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 +rvalue::@1: scope:[rvalue] from rvalue::@2 + [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 to:rvalue::@3 rvalue::@3: scope:[rvalue] from rvalue::@1 - [31] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#3 + [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 to:rvalue::@return rvalue::@return: scope:[rvalue] from rvalue::@3 - [32] return + [34] return to:@return -rvalue::@2: scope:[rvalue] from rvalue::@1 - [33] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) - [34] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 - to:rvalue::@1 lvalue: scope:[lvalue] from main [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 + to:lvalue::@2 +lvalue::@2: scope:[lvalue] from lvalue lvalue::@1 + [37] (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#1 lvalue/(byte) 2 ) + [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 to:lvalue::@1 -lvalue::@1: scope:[lvalue] from lvalue lvalue::@2 - [37] (byte) lvalue::i#2 ← phi( lvalue/(byte) 2 lvalue::@2/(byte) lvalue::i#1 ) - [38] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 to:lvalue::@return lvalue::@return: scope:[lvalue] from lvalue::@1 - [39] return + [41] return to:@return -lvalue::@2: scope:[lvalue] from lvalue::@1 - [40] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 - [41] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 - to:lvalue::@1 diff --git a/src/test/ref/ptrtest.log b/src/test/ref/ptrtest.log index 11cc82078..9d585f940 100644 --- a/src/test/ref/ptrtest.log +++ b/src/test/ref/ptrtest.log @@ -319,24 +319,926 @@ Constant (const byte*) rvaluevar::screen2#0 = (byte*) 1024 Successful SSA optimization Pass2ConstantIdentification Eliminating unused variable (byte) rvalue::b#0 and assignment [12] (byte) rvalue::b#0 ← *((const byte[$400]) rvalue::SCREEN#0) Successful SSA optimization PassNEliminateUnusedVars +GRAPH (NEW VERSIONS for lvalue::i#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1 +lvalue::@1: scope:[lvalue] from lvalue lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue/(const byte) lvalue::i#0 lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 + (byte) lvalue::i#4 ← phi( ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1 +rvalue::@1: scope:[rvalue] from rvalue rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue/(byte) rvalue::b#1 rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue/(const byte) rvalue::i#0 rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#3 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar/(const byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 + [21] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for rvalue::i#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1_1 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#2 lvalue::@1_1/(byte) lvalue::i#5 ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + phi() + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1 +rvalue::@1: scope:[rvalue] from rvalue rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue/(byte) rvalue::b#1 rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue/(const byte) rvalue::i#0 rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 + (byte) rvalue::i#4 ← phi( ) + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#3 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar/(const byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 + [21] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +lvalue::@1_1: scope:[lvalue] from lvalue + (byte) lvalue::i#5 ← phi( lvalue/(const byte) lvalue::i#0 ) + if((byte) lvalue::i#5<(byte) $a) goto lvalue::@2 + to:lvalue::@return + +GRAPH (NEW VERSIONS for rvalue::b#3) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1_1 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#2 lvalue::@1_1/(byte) lvalue::i#5 ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + phi() + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1 +rvalue::@1: scope:[rvalue] from rvalue rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue/(byte) rvalue::b#1 rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue/(const byte) rvalue::i#0 rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 + (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#2 ) + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 + (byte) rvalue::b#5 ← phi( ) + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#5 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar/(const byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 + [21] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +lvalue::@1_1: scope:[lvalue] from lvalue + (byte) lvalue::i#5 ← phi( lvalue/(const byte) lvalue::i#0 ) + if((byte) lvalue::i#5<(byte) $a) goto lvalue::@2 + to:lvalue::@return + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for lvaluevar::i#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1_1 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#2 lvalue::@1_1/(byte) lvalue::i#5 ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + phi() + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1_1 +rvalue::@1: scope:[rvalue] from rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#2 rvalue::@1_1/(byte) rvalue::i#5 ) + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::b#5 ← phi( rvalue::@1/(byte) rvalue::b#3 rvalue::@1_1/(byte) rvalue::b#6 ) + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#5 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar/(const byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 + (byte) lvaluevar::i#4 ← phi( ) + [21] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +lvalue::@1_1: scope:[lvalue] from lvalue + (byte) lvalue::i#5 ← phi( lvalue/(const byte) lvalue::i#0 ) + if((byte) lvalue::i#5<(byte) $a) goto lvalue::@2 + to:lvalue::@return +rvalue::@1_1: scope:[rvalue] from rvalue + (byte) rvalue::b#6 ← phi( rvalue/(byte) rvalue::b#1 ) + (byte) rvalue::i#5 ← phi( rvalue/(const byte) rvalue::i#0 ) + if((byte) rvalue::i#5<(byte) $a) goto rvalue::@2 + to:rvalue::@3 + +GRAPH (NEW VERSIONS for lvaluevar::screen#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1_1 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#2 lvalue::@1_1/(byte) lvalue::i#5 ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + phi() + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1_1 +rvalue::@1: scope:[rvalue] from rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#2 rvalue::@1_1/(byte) rvalue::i#5 ) + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::b#5 ← phi( rvalue::@1/(byte) rvalue::b#3 rvalue::@1_1/(byte) rvalue::b#6 ) + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#5 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar/(const byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 + (byte*) lvaluevar::screen#4 ← phi( ) + (byte) lvaluevar::i#4 ← phi( lvaluevar::@1/(byte) lvaluevar::i#2 ) + [21] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +lvalue::@1_1: scope:[lvalue] from lvalue + (byte) lvalue::i#5 ← phi( lvalue/(const byte) lvalue::i#0 ) + if((byte) lvalue::i#5<(byte) $a) goto lvalue::@2 + to:lvalue::@return +rvalue::@1_1: scope:[rvalue] from rvalue + (byte) rvalue::b#6 ← phi( rvalue/(byte) rvalue::b#1 ) + (byte) rvalue::i#5 ← phi( rvalue/(const byte) rvalue::i#0 ) + if((byte) rvalue::i#5<(byte) $a) goto rvalue::@2 + to:rvalue::@3 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for rvaluevar::i#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1_1 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#2 lvalue::@1_1/(byte) lvalue::i#5 ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + phi() + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1_1 +rvalue::@1: scope:[rvalue] from rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#2 rvalue::@1_1/(byte) rvalue::i#5 ) + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::b#5 ← phi( rvalue::@1/(byte) rvalue::b#3 rvalue::@1_1/(byte) rvalue::b#6 ) + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#5 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1_1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 lvaluevar::@1_1 + (byte*) lvaluevar::screen#4 ← phi( lvaluevar::@1/(byte*) lvaluevar::screen#2 lvaluevar::@1_1/(byte*) lvaluevar::screen#5 ) + (byte) lvaluevar::i#4 ← phi( lvaluevar::@1/(byte) lvaluevar::i#2 lvaluevar::@1_1/(byte) lvaluevar::i#5 ) + [21] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 lvaluevar::@1_1 + phi() + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + (byte) rvaluevar::i#4 ← phi( ) + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +lvalue::@1_1: scope:[lvalue] from lvalue + (byte) lvalue::i#5 ← phi( lvalue/(const byte) lvalue::i#0 ) + if((byte) lvalue::i#5<(byte) $a) goto lvalue::@2 + to:lvalue::@return +rvalue::@1_1: scope:[rvalue] from rvalue + (byte) rvalue::b#6 ← phi( rvalue/(byte) rvalue::b#1 ) + (byte) rvalue::i#5 ← phi( rvalue/(const byte) rvalue::i#0 ) + if((byte) rvalue::i#5<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +lvaluevar::@1_1: scope:[lvaluevar] from lvaluevar + (byte*) lvaluevar::screen#5 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 ) + (byte) lvaluevar::i#5 ← phi( lvaluevar/(const byte) lvaluevar::i#0 ) + if((byte) lvaluevar::i#5<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return + +GRAPH (NEW VERSIONS for rvaluevar::screen#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1_1 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#2 lvalue::@1_1/(byte) lvalue::i#5 ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + phi() + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1_1 +rvalue::@1: scope:[rvalue] from rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#2 rvalue::@1_1/(byte) rvalue::i#5 ) + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::b#5 ← phi( rvalue::@1/(byte) rvalue::b#3 rvalue::@1_1/(byte) rvalue::b#6 ) + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#5 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1_1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 lvaluevar::@1_1 + (byte*) lvaluevar::screen#4 ← phi( lvaluevar::@1/(byte*) lvaluevar::screen#2 lvaluevar::@1_1/(byte*) lvaluevar::screen#5 ) + (byte) lvaluevar::i#4 ← phi( lvaluevar::@1/(byte) lvaluevar::i#2 lvaluevar::@1_1/(byte) lvaluevar::i#5 ) + [21] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 lvaluevar::@1_1 + phi() + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + (byte*) rvaluevar::screen#4 ← phi( ) + (byte) rvaluevar::i#4 ← phi( rvaluevar::@1/(byte) rvaluevar::i#2 ) + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +lvalue::@1_1: scope:[lvalue] from lvalue + (byte) lvalue::i#5 ← phi( lvalue/(const byte) lvalue::i#0 ) + if((byte) lvalue::i#5<(byte) $a) goto lvalue::@2 + to:lvalue::@return +rvalue::@1_1: scope:[rvalue] from rvalue + (byte) rvalue::b#6 ← phi( rvalue/(byte) rvalue::b#1 ) + (byte) rvalue::i#5 ← phi( rvalue/(const byte) rvalue::i#0 ) + if((byte) rvalue::i#5<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +lvaluevar::@1_1: scope:[lvaluevar] from lvaluevar + (byte*) lvaluevar::screen#5 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 ) + (byte) lvaluevar::i#5 ← phi( lvaluevar/(const byte) lvaluevar::i#0 ) + if((byte) lvaluevar::i#5<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return + +GRAPH (NEW VERSIONS for rvaluevar::b#2) +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + [0] call lvalue + to:main::@1 +main::@1: scope:[main] from main + [1] call rvalue + to:main::@2 +main::@2: scope:[main] from main::@1 + [2] call rvaluevar + to:main::@3 +main::@3: scope:[main] from main::@2 + [3] call lvaluevar + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + [4] return + to:@return +lvalue: scope:[lvalue] from main + [5] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 + [6] *((const byte[$400]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2 + to:lvalue::@1_1 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [7] (byte) lvalue::i#2 ← phi( lvalue::@2/(byte) lvalue::i#1 ) + [8] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 + to:lvalue::@return +lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#2 lvalue::@1_1/(byte) lvalue::i#5 ) + [9] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [10] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 + to:lvalue::@1 +lvalue::@return: scope:[lvalue] from lvalue::@1 lvalue::@1_1 + phi() + [11] return + to:@return +rvalue: scope:[rvalue] from main::@1 + [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) + to:rvalue::@1_1 +rvalue::@1: scope:[rvalue] from rvalue::@2 + [13] (byte) rvalue::b#3 ← phi( rvalue::@2/(byte) rvalue::b#2 ) + [13] (byte) rvalue::i#2 ← phi( rvalue::@2/(byte) rvalue::i#1 ) + [14] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +rvalue::@2: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#2 rvalue::@1_1/(byte) rvalue::i#5 ) + [15] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [16] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 + to:rvalue::@1 +rvalue::@3: scope:[rvalue] from rvalue::@1 rvalue::@1_1 + (byte) rvalue::b#5 ← phi( rvalue::@1/(byte) rvalue::b#3 rvalue::@1_1/(byte) rvalue::b#6 ) + [17] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#5 + to:rvalue::@return +rvalue::@return: scope:[rvalue] from rvalue::@3 + [18] return + to:@return +lvaluevar: scope:[lvaluevar] from main::@3 + to:lvaluevar::@1_1 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar::@2 + [19] (byte*) lvaluevar::screen#2 ← phi( lvaluevar::@2/(byte*) lvaluevar::screen#1 ) + [19] (byte) lvaluevar::i#2 ← phi( lvaluevar::@2/(byte) lvaluevar::i#1 ) + [20] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return +lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 lvaluevar::@1_1 + (byte*) lvaluevar::screen#4 ← phi( lvaluevar::@1/(byte*) lvaluevar::screen#2 lvaluevar::@1_1/(byte*) lvaluevar::screen#5 ) + (byte) lvaluevar::i#4 ← phi( lvaluevar::@1/(byte) lvaluevar::i#2 lvaluevar::@1_1/(byte) lvaluevar::i#5 ) + [21] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 + [22] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 + [23] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 + to:lvaluevar::@1 +lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 lvaluevar::@1_1 + phi() + [24] return + to:@return +rvaluevar: scope:[rvaluevar] from main::@2 + to:rvaluevar::@1 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 + [25] (byte) rvaluevar::b#2 ← phi( rvaluevar/(const byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 ) + [25] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) + [25] (byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 ) + [26] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 + to:rvaluevar::@3 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 + (byte*) rvaluevar::screen#4 ← phi( rvaluevar::@1/(byte*) rvaluevar::screen#2 ) + (byte) rvaluevar::i#4 ← phi( rvaluevar::@1/(byte) rvaluevar::i#2 ) + [27] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) + [28] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 + [29] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 + to:rvaluevar::@1 +rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 + (byte) rvaluevar::b#4 ← phi( ) + [30] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#4 + to:rvaluevar::@return +rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 + [31] return + to:@return +@5: scope:[] from @begin + [32] call main + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 +lvalue::@1_1: scope:[lvalue] from lvalue + (byte) lvalue::i#5 ← phi( lvalue/(const byte) lvalue::i#0 ) + if((byte) lvalue::i#5<(byte) $a) goto lvalue::@2 + to:lvalue::@return +rvalue::@1_1: scope:[rvalue] from rvalue + (byte) rvalue::b#6 ← phi( rvalue/(byte) rvalue::b#1 ) + (byte) rvalue::i#5 ← phi( rvalue/(const byte) rvalue::i#0 ) + if((byte) rvalue::i#5<(byte) $a) goto rvalue::@2 + to:rvalue::@3 +lvaluevar::@1_1: scope:[lvaluevar] from lvaluevar + (byte*) lvaluevar::screen#5 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 ) + (byte) lvaluevar::i#5 ← phi( lvaluevar/(const byte) lvaluevar::i#0 ) + if((byte) lvaluevar::i#5<(byte) $a) goto lvaluevar::@2 + to:lvaluevar::@return + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) lvalue::i#1 = (byte) lvalue::i#2 +Alias (byte) rvalue::i#1 = (byte) rvalue::i#2 +Alias (byte) rvalue::b#2 = (byte) rvalue::b#3 +Alias (byte) lvaluevar::i#1 = (byte) lvaluevar::i#2 +Alias (byte*) lvaluevar::screen#1 = (byte*) lvaluevar::screen#2 +Alias (byte) rvaluevar::i#1 = (byte) rvaluevar::i#2 +Alias (byte*) rvaluevar::screen#1 = (byte*) rvaluevar::screen#2 +Alias (byte) rvaluevar::b#1 = (byte) rvaluevar::b#2 +Alias (byte) rvalue::b#1 = (byte) rvalue::b#6 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) lvalue::i#5 (const byte) lvalue::i#0 +Identical Phi Values (byte) rvalue::i#5 (const byte) rvalue::i#0 +Identical Phi Values (byte) lvaluevar::i#5 (const byte) lvaluevar::i#0 +Identical Phi Values (byte*) lvaluevar::screen#5 (const byte*) lvaluevar::screen#0 +Identical Phi Values (byte) rvaluevar::i#5 (const byte) rvaluevar::i#0 +Identical Phi Values (byte*) rvaluevar::screen#5 (const byte*) rvaluevar::screen#0 +Identical Phi Values (byte) rvaluevar::b#5 (const byte) rvaluevar::b#0 +Successful SSA optimization Pass2IdenticalPhiElimination +if() condition always true - replacing block destination [42] if((const byte) lvalue::i#0<(byte) $a) goto lvalue::@2 +Removing PHI-reference to removed block (rvalue::@1_1) in block rvalue::@3 +if() condition always true - replacing block destination [44] if((const byte) rvalue::i#0<(byte) $a) goto rvalue::@2 +if() condition always true - replacing block destination [46] if((const byte) lvaluevar::i#0<(byte) $a) goto lvaluevar::@2 +Removing PHI-reference to removed block (rvaluevar::@1_1) in block rvaluevar::@3 +if() condition always true - replacing block destination [48] if((const byte) rvaluevar::i#0<(byte) $a) goto rvaluevar::@2 +Successful SSA optimization Pass2ConstantIfs +Eliminating unused variable (byte) rvalue::b#1 and assignment [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1) +Eliminating unused constant (const byte) rvaluevar::b#0 +Successful SSA optimization PassNEliminateUnusedVars +Alias (byte) rvalue::b#2 = (byte) rvalue::b#5 +Alias (byte) rvaluevar::b#1 = (byte) rvaluevar::b#4 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) lvalue::i#0 Inlining constant with var siblings (const byte) rvalue::i#0 Inlining constant with var siblings (const byte*) lvaluevar::screen#0 Inlining constant with var siblings (const byte) lvaluevar::i#0 Inlining constant with var siblings (const byte*) rvaluevar::screen#0 -Inlining constant with var siblings (const byte) rvaluevar::b#0 Inlining constant with var siblings (const byte) rvaluevar::i#0 Constant inlined lvalue::i#0 = (byte) 2 Constant inlined rvaluevar::screen#0 = (byte*) 1024 -Constant inlined rvaluevar::b#0 = (byte) 0 Constant inlined rvalue::i#0 = (byte) 2 Constant inlined lvaluevar::i#0 = (byte) 2 Constant inlined lvaluevar::screen#0 = (byte*) 1024 Constant inlined rvaluevar::i#0 = (byte) 2 Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in *(lvalue::SCREEN#0+1) -Consolidated array index constant in *(rvalue::SCREEN#0+1) Successful SSA optimization Pass2ConstantAdditionElimination +Added new block during phi lifting lvalue::@7(between lvalue::@1 and lvalue::@2) +Added new block during phi lifting rvalue::@7(between rvalue::@1 and rvalue::@2) +Added new block during phi lifting lvaluevar::@7(between lvaluevar::@1 and lvaluevar::@2) +Added new block during phi lifting rvaluevar::@7(between rvaluevar::@1 and rvaluevar::@2) Adding NOP phi() at start of @begin Adding NOP phi() at start of @5 Adding NOP phi() at start of @6 @@ -347,24 +1249,34 @@ Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::@4 Adding NOP phi() at start of lvaluevar +Adding NOP phi() at start of lvaluevar::@1_1 Adding NOP phi() at start of rvaluevar +Adding NOP phi() at start of rvaluevar::@1_1 +Adding NOP phi() at start of rvalue +Adding NOP phi() at start of rvalue::@1_1 +Adding NOP phi() at start of lvalue::@1_1 CALL GRAPH Calls in [] to main:2 Calls in [main] to lvalue:6 rvalue:8 rvaluevar:10 lvaluevar:12 -Created 8 initial phi equivalence classes -Coalesced [22] lvaluevar::i#4 ← lvaluevar::i#1 -Coalesced [23] lvaluevar::screen#4 ← lvaluevar::screen#1 -Coalesced [32] rvaluevar::i#4 ← rvaluevar::i#1 -Coalesced [33] rvaluevar::screen#4 ← rvaluevar::screen#1 -Coalesced [34] rvaluevar::b#4 ← rvaluevar::b#1 -Coalesced [36] rvalue::b#5 ← rvalue::b#1 -Coalesced [43] rvalue::i#4 ← rvalue::i#1 -Coalesced [44] rvalue::b#6 ← rvalue::b#2 -Coalesced [52] lvalue::i#4 ← lvalue::i#1 -Coalesced down to 8 phi equivalence classes +Created 6 initial phi equivalence classes +Coalesced [23] lvaluevar::i#6 ← lvaluevar::i#1 +Coalesced [24] lvaluevar::screen#6 ← lvaluevar::screen#1 +Coalesced [34] rvaluevar::i#6 ← rvaluevar::i#1 +Coalesced [35] rvaluevar::screen#6 ← rvaluevar::screen#1 +Coalesced [44] rvalue::i#6 ← rvalue::i#1 +Coalesced [53] lvalue::i#6 ← lvalue::i#1 +Coalesced down to 6 phi equivalence classes Culled Empty Block (label) @6 Culled Empty Block (label) main::@4 +Culled Empty Block (label) lvaluevar::@1_1 +Culled Empty Block (label) lvaluevar::@7 +Culled Empty Block (label) rvaluevar::@1_1 +Culled Empty Block (label) rvaluevar::@7 +Culled Empty Block (label) rvalue::@1_1 +Culled Empty Block (label) rvalue::@7 +Culled Empty Block (label) lvalue::@1_1 +Culled Empty Block (label) lvalue::@7 Renumbering block @5 to @1 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 @@ -375,6 +1287,7 @@ Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::@3 Adding NOP phi() at start of lvaluevar Adding NOP phi() at start of rvaluevar +Adding NOP phi() at start of rvalue FINAL CONTROL FLOW GRAPH @begin: scope:[] from @@ -407,138 +1320,133 @@ main::@return: scope:[main] from main::@3 to:@return lvaluevar: scope:[lvaluevar] from main::@3 [13] phi() + to:lvaluevar::@2 +lvaluevar::@2: scope:[lvaluevar] from lvaluevar lvaluevar::@1 + [14] (byte*) lvaluevar::screen#4 ← phi( lvaluevar::@1/(byte*) lvaluevar::screen#1 lvaluevar/(byte*) 1024 ) + [14] (byte) lvaluevar::i#4 ← phi( lvaluevar::@1/(byte) lvaluevar::i#1 lvaluevar/(byte) 2 ) + [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 + [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 + [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 to:lvaluevar::@1 -lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2 - [14] (byte*) lvaluevar::screen#2 ← phi( lvaluevar/(byte*) 1024 lvaluevar::@2/(byte*) lvaluevar::screen#1 ) - [14] (byte) lvaluevar::i#2 ← phi( lvaluevar/(byte) 2 lvaluevar::@2/(byte) lvaluevar::i#1 ) - [15] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 +lvaluevar::@1: scope:[lvaluevar] from lvaluevar::@2 + [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 to:lvaluevar::@return lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 - [16] return + [19] return to:@return -lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 - [17] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 - [18] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 - [19] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 - to:lvaluevar::@1 rvaluevar: scope:[rvaluevar] from main::@2 [20] phi() + to:rvaluevar::@2 +rvaluevar::@2: scope:[rvaluevar] from rvaluevar rvaluevar::@1 + [21] (byte*) rvaluevar::screen#4 ← phi( rvaluevar::@1/(byte*) rvaluevar::screen#1 rvaluevar/(byte*) 1024 ) + [21] (byte) rvaluevar::i#4 ← phi( rvaluevar::@1/(byte) rvaluevar::i#1 rvaluevar/(byte) 2 ) + [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) + [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 + [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 to:rvaluevar::@1 -rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2 - [21] (byte) rvaluevar::b#2 ← phi( rvaluevar/(byte) 0 rvaluevar::@2/(byte) rvaluevar::b#1 ) - [21] (byte*) rvaluevar::screen#2 ← phi( rvaluevar/(byte*) 1024 rvaluevar::@2/(byte*) rvaluevar::screen#1 ) - [21] (byte) rvaluevar::i#2 ← phi( rvaluevar/(byte) 2 rvaluevar::@2/(byte) rvaluevar::i#1 ) - [22] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 +rvaluevar::@1: scope:[rvaluevar] from rvaluevar::@2 + [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 to:rvaluevar::@3 rvaluevar::@3: scope:[rvaluevar] from rvaluevar::@1 - [23] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 + [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 to:rvaluevar::@return rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@3 - [24] return + [27] return to:@return -rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 - [25] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) - [26] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 - [27] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 - to:rvaluevar::@1 rvalue: scope:[rvalue] from main::@1 - [28] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0+(byte) 1) + [28] phi() + to:rvalue::@2 +rvalue::@2: scope:[rvalue] from rvalue rvalue::@1 + [29] (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#1 rvalue/(byte) 2 ) + [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) + [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 to:rvalue::@1 -rvalue::@1: scope:[rvalue] from rvalue rvalue::@2 - [29] (byte) rvalue::b#3 ← phi( rvalue/(byte) rvalue::b#1 rvalue::@2/(byte) rvalue::b#2 ) - [29] (byte) rvalue::i#2 ← phi( rvalue/(byte) 2 rvalue::@2/(byte) rvalue::i#1 ) - [30] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 +rvalue::@1: scope:[rvalue] from rvalue::@2 + [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 to:rvalue::@3 rvalue::@3: scope:[rvalue] from rvalue::@1 - [31] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#3 + [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 to:rvalue::@return rvalue::@return: scope:[rvalue] from rvalue::@3 - [32] return + [34] return to:@return -rvalue::@2: scope:[rvalue] from rvalue::@1 - [33] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) - [34] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 - to:rvalue::@1 lvalue: scope:[lvalue] from main [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 + to:lvalue::@2 +lvalue::@2: scope:[lvalue] from lvalue lvalue::@1 + [37] (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#1 lvalue/(byte) 2 ) + [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 + [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 to:lvalue::@1 -lvalue::@1: scope:[lvalue] from lvalue lvalue::@2 - [37] (byte) lvalue::i#2 ← phi( lvalue/(byte) 2 lvalue::@2/(byte) lvalue::i#1 ) - [38] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 +lvalue::@1: scope:[lvalue] from lvalue::@2 + [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 to:lvalue::@return lvalue::@return: scope:[lvalue] from lvalue::@1 - [39] return + [41] return to:@return -lvalue::@2: scope:[lvalue] from lvalue::@1 - [40] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 - [41] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 - to:lvalue::@1 VARIABLE REGISTER WEIGHTS (void()) lvalue() (byte[$400]) lvalue::SCREEN (byte) lvalue::i -(byte) lvalue::i#1 22.0 -(byte) lvalue::i#2 14.666666666666666 +(byte) lvalue::i#1 16.5 +(byte) lvalue::i#4 16.5 (void()) lvaluevar() (byte) lvaluevar::b (byte) lvaluevar::i -(byte) lvaluevar::i#1 22.0 -(byte) lvaluevar::i#2 8.25 +(byte) lvaluevar::i#1 16.5 +(byte) lvaluevar::i#4 7.333333333333333 (byte*) lvaluevar::screen -(byte*) lvaluevar::screen#1 11.0 -(byte*) lvaluevar::screen#2 11.0 +(byte*) lvaluevar::screen#1 7.333333333333333 +(byte*) lvaluevar::screen#4 16.5 (void()) main() (void()) rvalue() (byte[$400]) rvalue::SCREEN (byte) rvalue::b -(byte) rvalue::b#1 4.0 -(byte) rvalue::b#2 11.0 -(byte) rvalue::b#3 7.5 +(byte) rvalue::b#2 4.333333333333333 (byte) rvalue::i -(byte) rvalue::i#1 22.0 -(byte) rvalue::i#2 14.666666666666666 +(byte) rvalue::i#1 16.5 +(byte) rvalue::i#4 16.5 (byte*) rvalue::screen2 (void()) rvaluevar() (byte) rvaluevar::b -(byte) rvaluevar::b#1 7.333333333333333 -(byte) rvaluevar::b#2 6.5 +(byte) rvaluevar::b#1 3.25 (byte) rvaluevar::i -(byte) rvaluevar::i#1 22.0 -(byte) rvaluevar::i#2 8.25 +(byte) rvaluevar::i#1 16.5 +(byte) rvaluevar::i#4 7.333333333333333 (byte*) rvaluevar::screen -(byte*) rvaluevar::screen#1 11.0 -(byte*) rvaluevar::screen#2 11.0 +(byte*) rvaluevar::screen#1 7.333333333333333 +(byte*) rvaluevar::screen#4 16.5 (byte*) rvaluevar::screen2 Initial phi equivalence classes -[ lvaluevar::i#2 lvaluevar::i#1 ] -[ lvaluevar::screen#2 lvaluevar::screen#1 ] -[ rvaluevar::i#2 rvaluevar::i#1 ] -[ rvaluevar::screen#2 rvaluevar::screen#1 ] -[ rvaluevar::b#2 rvaluevar::b#1 ] -[ rvalue::i#2 rvalue::i#1 ] -[ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] -[ lvalue::i#2 lvalue::i#1 ] +[ lvaluevar::i#4 lvaluevar::i#1 ] +[ lvaluevar::screen#4 lvaluevar::screen#1 ] +[ rvaluevar::i#4 rvaluevar::i#1 ] +[ rvaluevar::screen#4 rvaluevar::screen#1 ] +[ rvalue::i#4 rvalue::i#1 ] +[ lvalue::i#4 lvalue::i#1 ] +Added variable rvaluevar::b#1 to zero page equivalence class [ rvaluevar::b#1 ] +Added variable rvalue::b#2 to zero page equivalence class [ rvalue::b#2 ] Complete equivalence classes -[ lvaluevar::i#2 lvaluevar::i#1 ] -[ lvaluevar::screen#2 lvaluevar::screen#1 ] -[ rvaluevar::i#2 rvaluevar::i#1 ] -[ rvaluevar::screen#2 rvaluevar::screen#1 ] -[ rvaluevar::b#2 rvaluevar::b#1 ] -[ rvalue::i#2 rvalue::i#1 ] -[ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] -[ lvalue::i#2 lvalue::i#1 ] -Allocated zp ZP_BYTE:2 [ lvaluevar::i#2 lvaluevar::i#1 ] -Allocated zp ZP_WORD:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] -Allocated zp ZP_BYTE:5 [ rvaluevar::i#2 rvaluevar::i#1 ] -Allocated zp ZP_WORD:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] -Allocated zp ZP_BYTE:8 [ rvaluevar::b#2 rvaluevar::b#1 ] -Allocated zp ZP_BYTE:9 [ rvalue::i#2 rvalue::i#1 ] -Allocated zp ZP_BYTE:10 [ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] -Allocated zp ZP_BYTE:11 [ lvalue::i#2 lvalue::i#1 ] +[ lvaluevar::i#4 lvaluevar::i#1 ] +[ lvaluevar::screen#4 lvaluevar::screen#1 ] +[ rvaluevar::i#4 rvaluevar::i#1 ] +[ rvaluevar::screen#4 rvaluevar::screen#1 ] +[ rvalue::i#4 rvalue::i#1 ] +[ lvalue::i#4 lvalue::i#1 ] +[ rvaluevar::b#1 ] +[ rvalue::b#2 ] +Allocated zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ] +Allocated zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] +Allocated zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ] +Allocated zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] +Allocated zp ZP_BYTE:8 [ rvalue::i#4 rvalue::i#1 ] +Allocated zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ] +Allocated zp ZP_BYTE:10 [ rvaluevar::b#1 ] +Allocated zp ZP_BYTE:11 [ rvalue::b#2 ] INITIAL ASM Target platform is c64basic @@ -575,6 +1483,8 @@ main: { // main::@1 b1: // [7] call rvalue + // [28] phi from main::@1 to rvalue [phi:main::@1->rvalue] + rvalue_from_b1: jsr rvalue // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: @@ -606,158 +1516,151 @@ lvaluevar: { .const b = 4 .label screen = 3 .label i = 2 - // [14] phi from lvaluevar to lvaluevar::@1 [phi:lvaluevar->lvaluevar::@1] - b1_from_lvaluevar: - // [14] phi (byte*) lvaluevar::screen#2 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@1#0] -- pbuz1=pbuc1 + // [14] phi from lvaluevar to lvaluevar::@2 [phi:lvaluevar->lvaluevar::@2] + b2_from_lvaluevar: + // [14] phi (byte*) lvaluevar::screen#4 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@2#0] -- pbuz1=pbuc1 lda #<$400 sta screen lda #>$400 sta screen+1 - // [14] phi (byte) lvaluevar::i#2 = (byte) 2 [phi:lvaluevar->lvaluevar::@1#1] -- vbuz1=vbuc1 + // [14] phi (byte) lvaluevar::i#4 = (byte) 2 [phi:lvaluevar->lvaluevar::@2#1] -- vbuz1=vbuc1 lda #2 sta i - jmp b1 - // lvaluevar::@1 - b1: - // [15] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #$a - bcc b2 - jmp breturn - // lvaluevar::@return - breturn: - // [16] return - rts + jmp b2 + // [14] phi from lvaluevar::@1 to lvaluevar::@2 [phi:lvaluevar::@1->lvaluevar::@2] + b2_from_b1: + // [14] phi (byte*) lvaluevar::screen#4 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@1->lvaluevar::@2#0] -- register_copy + // [14] phi (byte) lvaluevar::i#4 = (byte) lvaluevar::i#1 [phi:lvaluevar::@1->lvaluevar::@2#1] -- register_copy + jmp b2 // lvaluevar::@2 b2: - // [17] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 + // [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 lda #b ldy #0 sta (screen),y - // [18] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 -- pbuz1=_inc_pbuz1 + // [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [19] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 -- vbuz1=_inc_vbuz1 + // [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 -- vbuz1=_inc_vbuz1 inc i - // [14] phi from lvaluevar::@2 to lvaluevar::@1 [phi:lvaluevar::@2->lvaluevar::@1] - b1_from_b2: - // [14] phi (byte*) lvaluevar::screen#2 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@2->lvaluevar::@1#0] -- register_copy - // [14] phi (byte) lvaluevar::i#2 = (byte) lvaluevar::i#1 [phi:lvaluevar::@2->lvaluevar::@1#1] -- register_copy jmp b1 + // lvaluevar::@1 + b1: + // [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$a + bcc b2_from_b1 + jmp breturn + // lvaluevar::@return + breturn: + // [19] return + rts } // rvaluevar rvaluevar: { .label screen2 = $400 - .label b = 8 + .label b = $a .label screen = 6 .label i = 5 - // [21] phi from rvaluevar to rvaluevar::@1 [phi:rvaluevar->rvaluevar::@1] - b1_from_rvaluevar: - // [21] phi (byte) rvaluevar::b#2 = (byte) 0 [phi:rvaluevar->rvaluevar::@1#0] -- vbuz1=vbuc1 - lda #0 - sta b - // [21] phi (byte*) rvaluevar::screen#2 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@1#1] -- pbuz1=pbuc1 + // [21] phi from rvaluevar to rvaluevar::@2 [phi:rvaluevar->rvaluevar::@2] + b2_from_rvaluevar: + // [21] phi (byte*) rvaluevar::screen#4 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@2#0] -- pbuz1=pbuc1 lda #<$400 sta screen lda #>$400 sta screen+1 - // [21] phi (byte) rvaluevar::i#2 = (byte) 2 [phi:rvaluevar->rvaluevar::@1#2] -- vbuz1=vbuc1 + // [21] phi (byte) rvaluevar::i#4 = (byte) 2 [phi:rvaluevar->rvaluevar::@2#1] -- vbuz1=vbuc1 lda #2 sta i + jmp b2 + // [21] phi from rvaluevar::@1 to rvaluevar::@2 [phi:rvaluevar::@1->rvaluevar::@2] + b2_from_b1: + // [21] phi (byte*) rvaluevar::screen#4 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@1->rvaluevar::@2#0] -- register_copy + // [21] phi (byte) rvaluevar::i#4 = (byte) rvaluevar::i#1 [phi:rvaluevar::@1->rvaluevar::@2#1] -- register_copy + jmp b2 + // rvaluevar::@2 + b2: + // [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (screen),y + sta b + // [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 -- pbuz1=_inc_pbuz1 + inc screen + bne !+ + inc screen+1 + !: + // [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 -- vbuz1=_inc_vbuz1 + inc i jmp b1 // rvaluevar::@1 b1: - // [22] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 -- vbuz1_lt_vbuc1_then_la1 + // [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 -- vbuz1_lt_vbuc1_then_la1 lda i cmp #$a - bcc b2 + bcc b2_from_b1 jmp b3 // rvaluevar::@3 b3: - // [23] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 -- _deref_pbuc1=vbuz1 + // [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 -- _deref_pbuc1=vbuz1 lda b sta screen2 jmp breturn // rvaluevar::@return breturn: - // [24] return + // [27] return rts - // rvaluevar::@2 - b2: - // [25] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) -- vbuz1=_deref_pbuz2 - ldy #0 - lda (screen),y - sta b - // [26] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - // [27] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 -- vbuz1=_inc_vbuz1 - inc i - // [21] phi from rvaluevar::@2 to rvaluevar::@1 [phi:rvaluevar::@2->rvaluevar::@1] - b1_from_b2: - // [21] phi (byte) rvaluevar::b#2 = (byte) rvaluevar::b#1 [phi:rvaluevar::@2->rvaluevar::@1#0] -- register_copy - // [21] phi (byte*) rvaluevar::screen#2 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@2->rvaluevar::@1#1] -- register_copy - // [21] phi (byte) rvaluevar::i#2 = (byte) rvaluevar::i#1 [phi:rvaluevar::@2->rvaluevar::@1#2] -- register_copy - jmp b1 } // rvalue rvalue: { // A constant pointer .label SCREEN = $400 .label screen2 = $400 - .label b = $a - .label i = 9 - // [28] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0+(byte) 1) -- vbuz1=_deref_pbuc1 - // RValue constant array pointer constant index - lda SCREEN+1 - sta b - // [29] phi from rvalue to rvalue::@1 [phi:rvalue->rvalue::@1] - b1_from_rvalue: - // [29] phi (byte) rvalue::b#3 = (byte) rvalue::b#1 [phi:rvalue->rvalue::@1#0] -- register_copy - // [29] phi (byte) rvalue::i#2 = (byte) 2 [phi:rvalue->rvalue::@1#1] -- vbuz1=vbuc1 + .label b = $b + .label i = 8 + // [29] phi from rvalue to rvalue::@2 [phi:rvalue->rvalue::@2] + b2_from_rvalue: + // [29] phi (byte) rvalue::i#4 = (byte) 2 [phi:rvalue->rvalue::@2#0] -- vbuz1=vbuc1 lda #2 sta i + jmp b2 + // [29] phi from rvalue::@1 to rvalue::@2 [phi:rvalue::@1->rvalue::@2] + b2_from_b1: + // [29] phi (byte) rvalue::i#4 = (byte) rvalue::i#1 [phi:rvalue::@1->rvalue::@2#0] -- register_copy + jmp b2 + // rvalue::@2 + b2: + // [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy i + lda SCREEN,y + sta b + // [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 -- vbuz1=_inc_vbuz1 + inc i jmp b1 // rvalue::@1 b1: - // [30] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 -- vbuz1_lt_vbuc1_then_la1 + // [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 -- vbuz1_lt_vbuc1_then_la1 lda i cmp #$a - bcc b2 + bcc b2_from_b1 jmp b3 // rvalue::@3 b3: - // [31] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#3 -- _deref_pbuc1=vbuz1 + // [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 -- _deref_pbuc1=vbuz1 lda b sta screen2 jmp breturn // rvalue::@return breturn: - // [32] return + // [34] return rts - // rvalue::@2 - b2: - // [33] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) -- vbuz1=pbuc1_derefidx_vbuz2 - ldy i - lda SCREEN,y - sta b - // [34] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 -- vbuz1=_inc_vbuz1 - inc i - // [29] phi from rvalue::@2 to rvalue::@1 [phi:rvalue::@2->rvalue::@1] - b1_from_b2: - // [29] phi (byte) rvalue::b#3 = (byte) rvalue::b#2 [phi:rvalue::@2->rvalue::@1#0] -- register_copy - // [29] phi (byte) rvalue::i#2 = (byte) rvalue::i#1 [phi:rvalue::@2->rvalue::@1#1] -- register_copy - jmp b1 } // lvalue lvalue: { // A constant pointer .label SCREEN = $400 - .label i = $b + .label i = 9 // [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 -- _deref_pbuc1=vbuc2 // LValue constant pointer dereference lda #1 @@ -766,79 +1669,80 @@ lvalue: { // LValue constant array constant indexing lda #2 sta SCREEN+1 - // [37] phi from lvalue to lvalue::@1 [phi:lvalue->lvalue::@1] - b1_from_lvalue: - // [37] phi (byte) lvalue::i#2 = (byte) 2 [phi:lvalue->lvalue::@1#0] -- vbuz1=vbuc1 + // [37] phi from lvalue to lvalue::@2 [phi:lvalue->lvalue::@2] + b2_from_lvalue: + // [37] phi (byte) lvalue::i#4 = (byte) 2 [phi:lvalue->lvalue::@2#0] -- vbuz1=vbuc1 lda #2 sta i - jmp b1 - // lvalue::@1 - b1: - // [38] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #$a - bcc b2 - jmp breturn - // lvalue::@return - breturn: - // [39] return - rts + jmp b2 + // [37] phi from lvalue::@1 to lvalue::@2 [phi:lvalue::@1->lvalue::@2] + b2_from_b1: + // [37] phi (byte) lvalue::i#4 = (byte) lvalue::i#1 [phi:lvalue::@1->lvalue::@2#0] -- register_copy + jmp b2 // lvalue::@2 b2: - // [40] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 -- pbuc1_derefidx_vbuz1=vbuc2 + // [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 -- pbuc1_derefidx_vbuz1=vbuc2 lda #3 ldy i sta SCREEN,y - // [41] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 -- vbuz1=_inc_vbuz1 + // [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 -- vbuz1=_inc_vbuz1 inc i - // [37] phi from lvalue::@2 to lvalue::@1 [phi:lvalue::@2->lvalue::@1] - b1_from_b2: - // [37] phi (byte) lvalue::i#2 = (byte) lvalue::i#1 [phi:lvalue::@2->lvalue::@1#0] -- register_copy jmp b1 + // lvalue::@1 + b1: + // [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$a + bcc b2_from_b1 + jmp breturn + // lvalue::@return + breturn: + // [41] return + rts } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [17] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#2 lvaluevar::screen#2 ] ( main:2::lvaluevar:11 [ lvaluevar::i#2 lvaluevar::screen#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ lvaluevar::i#2 lvaluevar::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ lvaluevar::i#2 lvaluevar::i#1 ] -Statement [25] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) [ rvaluevar::i#2 rvaluevar::screen#2 rvaluevar::b#1 ] ( main:2::rvaluevar:9 [ rvaluevar::i#2 rvaluevar::screen#2 rvaluevar::b#1 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ rvaluevar::i#2 rvaluevar::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ rvaluevar::i#2 rvaluevar::i#1 ] +Statement [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#4 lvaluevar::screen#4 ] ( main:2::lvaluevar:11 [ lvaluevar::i#4 lvaluevar::screen#4 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ] +Statement [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ( main:2::rvaluevar:9 [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ] Statement [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a Statement [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a -Statement [40] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] ( main:2::lvalue:5 [ lvalue::i#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ lvalue::i#2 lvalue::i#1 ] -Statement [17] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#2 lvaluevar::screen#2 ] ( main:2::lvaluevar:11 [ lvaluevar::i#2 lvaluevar::screen#2 ] ) always clobbers reg byte a reg byte y -Statement [25] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) [ rvaluevar::i#2 rvaluevar::screen#2 rvaluevar::b#1 ] ( main:2::rvaluevar:9 [ rvaluevar::i#2 rvaluevar::screen#2 rvaluevar::b#1 ] ) always clobbers reg byte a reg byte y +Statement [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 [ lvalue::i#4 ] ( main:2::lvalue:5 [ lvalue::i#4 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ] +Statement [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#4 lvaluevar::screen#4 ] ( main:2::lvaluevar:11 [ lvaluevar::i#4 lvaluevar::screen#4 ] ) always clobbers reg byte a reg byte y +Statement [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ( main:2::rvaluevar:9 [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ) always clobbers reg byte a reg byte y Statement [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a Statement [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a -Statement [40] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] ( main:2::lvalue:5 [ lvalue::i#2 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ lvaluevar::i#2 lvaluevar::i#1 ] : zp ZP_BYTE:2 , reg byte x , -Potential registers zp ZP_WORD:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] : zp ZP_WORD:3 , -Potential registers zp ZP_BYTE:5 [ rvaluevar::i#2 rvaluevar::i#1 ] : zp ZP_BYTE:5 , reg byte x , -Potential registers zp ZP_WORD:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] : zp ZP_WORD:6 , -Potential registers zp ZP_BYTE:8 [ rvaluevar::b#2 rvaluevar::b#1 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:9 [ rvalue::i#2 rvalue::i#1 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:10 [ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:11 [ lvalue::i#2 lvalue::i#1 ] : zp ZP_BYTE:11 , reg byte x , reg byte y , +Statement [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 [ lvalue::i#4 ] ( main:2::lvalue:5 [ lvalue::i#4 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ] : zp ZP_BYTE:2 , reg byte x , +Potential registers zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] : zp ZP_WORD:3 , +Potential registers zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ] : zp ZP_BYTE:5 , reg byte x , +Potential registers zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] : zp ZP_WORD:6 , +Potential registers zp ZP_BYTE:8 [ rvalue::i#4 rvalue::i#1 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:10 [ rvaluevar::b#1 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:11 [ rvalue::b#2 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [rvaluevar] 30.25: zp ZP_BYTE:5 [ rvaluevar::i#2 rvaluevar::i#1 ] 22: zp ZP_WORD:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] 13.83: zp ZP_BYTE:8 [ rvaluevar::b#2 rvaluevar::b#1 ] -Uplift Scope [rvalue] 36.67: zp ZP_BYTE:9 [ rvalue::i#2 rvalue::i#1 ] 22.5: zp ZP_BYTE:10 [ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] -Uplift Scope [lvaluevar] 30.25: zp ZP_BYTE:2 [ lvaluevar::i#2 lvaluevar::i#1 ] 22: zp ZP_WORD:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] -Uplift Scope [lvalue] 36.67: zp ZP_BYTE:11 [ lvalue::i#2 lvalue::i#1 ] +Uplift Scope [rvaluevar] 23.83: zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ] 23.83: zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] 3.25: zp ZP_BYTE:10 [ rvaluevar::b#1 ] +Uplift Scope [lvaluevar] 23.83: zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ] 23.83: zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] +Uplift Scope [rvalue] 33: zp ZP_BYTE:8 [ rvalue::i#4 rvalue::i#1 ] 4.33: zp ZP_BYTE:11 [ rvalue::b#2 ] +Uplift Scope [lvalue] 33: zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ] Uplift Scope [main] Uplift Scope [] -Uplifting [rvaluevar] best 1954 combination reg byte x [ rvaluevar::i#2 rvaluevar::i#1 ] zp ZP_WORD:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] reg byte y [ rvaluevar::b#2 rvaluevar::b#1 ] -Uplifting [rvalue] best 1798 combination reg byte x [ rvalue::i#2 rvalue::i#1 ] reg byte a [ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] -Uplifting [lvaluevar] best 1708 combination reg byte x [ lvaluevar::i#2 lvaluevar::i#1 ] zp ZP_WORD:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] -Uplifting [lvalue] best 1588 combination reg byte x [ lvalue::i#2 lvalue::i#1 ] -Uplifting [main] best 1588 combination -Uplifting [] best 1588 combination -Coalescing zero page register [ zp ZP_WORD:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] ] with [ zp ZP_WORD:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] ] -Allocated (was zp ZP_WORD:6) zp ZP_WORD:2 [ rvaluevar::screen#2 rvaluevar::screen#1 lvaluevar::screen#2 lvaluevar::screen#1 ] +Uplifting [rvaluevar] best 2027 combination reg byte x [ rvaluevar::i#4 rvaluevar::i#1 ] zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] reg byte a [ rvaluevar::b#1 ] +Uplifting [lvaluevar] best 1937 combination reg byte x [ lvaluevar::i#4 lvaluevar::i#1 ] zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] +Uplifting [rvalue] best 1784 combination reg byte x [ rvalue::i#4 rvalue::i#1 ] reg byte a [ rvalue::b#2 ] +Uplifting [lvalue] best 1664 combination reg byte x [ lvalue::i#4 lvalue::i#1 ] +Uplifting [main] best 1664 combination +Uplifting [] best 1664 combination +Coalescing zero page register [ zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] ] with [ zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] ] +Allocated (was zp ZP_WORD:6) zp ZP_WORD:2 [ rvaluevar::screen#4 rvaluevar::screen#1 lvaluevar::screen#4 lvaluevar::screen#1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -874,6 +1778,8 @@ main: { // main::@1 b1: // [7] call rvalue + // [28] phi from main::@1 to rvalue [phi:main::@1->rvalue] + rvalue_from_b1: jsr rvalue // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: @@ -904,136 +1810,130 @@ lvaluevar: { // LValue Variable pointer dereference .const b = 4 .label screen = 2 - // [14] phi from lvaluevar to lvaluevar::@1 [phi:lvaluevar->lvaluevar::@1] - b1_from_lvaluevar: - // [14] phi (byte*) lvaluevar::screen#2 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@1#0] -- pbuz1=pbuc1 + // [14] phi from lvaluevar to lvaluevar::@2 [phi:lvaluevar->lvaluevar::@2] + b2_from_lvaluevar: + // [14] phi (byte*) lvaluevar::screen#4 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@2#0] -- pbuz1=pbuc1 lda #<$400 sta screen lda #>$400 sta screen+1 - // [14] phi (byte) lvaluevar::i#2 = (byte) 2 [phi:lvaluevar->lvaluevar::@1#1] -- vbuxx=vbuc1 + // [14] phi (byte) lvaluevar::i#4 = (byte) 2 [phi:lvaluevar->lvaluevar::@2#1] -- vbuxx=vbuc1 ldx #2 - jmp b1 - // lvaluevar::@1 - b1: - // [15] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b2 - jmp breturn - // lvaluevar::@return - breturn: - // [16] return - rts + jmp b2 + // [14] phi from lvaluevar::@1 to lvaluevar::@2 [phi:lvaluevar::@1->lvaluevar::@2] + b2_from_b1: + // [14] phi (byte*) lvaluevar::screen#4 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@1->lvaluevar::@2#0] -- register_copy + // [14] phi (byte) lvaluevar::i#4 = (byte) lvaluevar::i#1 [phi:lvaluevar::@1->lvaluevar::@2#1] -- register_copy + jmp b2 // lvaluevar::@2 b2: - // [17] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 + // [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 lda #b ldy #0 sta (screen),y - // [18] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 -- pbuz1=_inc_pbuz1 + // [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [19] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 -- vbuxx=_inc_vbuxx + // [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 -- vbuxx=_inc_vbuxx inx - // [14] phi from lvaluevar::@2 to lvaluevar::@1 [phi:lvaluevar::@2->lvaluevar::@1] - b1_from_b2: - // [14] phi (byte*) lvaluevar::screen#2 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@2->lvaluevar::@1#0] -- register_copy - // [14] phi (byte) lvaluevar::i#2 = (byte) lvaluevar::i#1 [phi:lvaluevar::@2->lvaluevar::@1#1] -- register_copy jmp b1 + // lvaluevar::@1 + b1: + // [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b2_from_b1 + jmp breturn + // lvaluevar::@return + breturn: + // [19] return + rts } // rvaluevar rvaluevar: { .label screen2 = $400 .label screen = 2 - // [21] phi from rvaluevar to rvaluevar::@1 [phi:rvaluevar->rvaluevar::@1] - b1_from_rvaluevar: - // [21] phi (byte) rvaluevar::b#2 = (byte) 0 [phi:rvaluevar->rvaluevar::@1#0] -- vbuyy=vbuc1 - ldy #0 - // [21] phi (byte*) rvaluevar::screen#2 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@1#1] -- pbuz1=pbuc1 + // [21] phi from rvaluevar to rvaluevar::@2 [phi:rvaluevar->rvaluevar::@2] + b2_from_rvaluevar: + // [21] phi (byte*) rvaluevar::screen#4 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@2#0] -- pbuz1=pbuc1 lda #<$400 sta screen lda #>$400 sta screen+1 - // [21] phi (byte) rvaluevar::i#2 = (byte) 2 [phi:rvaluevar->rvaluevar::@1#2] -- vbuxx=vbuc1 + // [21] phi (byte) rvaluevar::i#4 = (byte) 2 [phi:rvaluevar->rvaluevar::@2#1] -- vbuxx=vbuc1 ldx #2 - jmp b1 - // rvaluevar::@1 - b1: - // [22] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b2 - jmp b3 - // rvaluevar::@3 - b3: - // [23] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 -- _deref_pbuc1=vbuyy - sty screen2 - jmp breturn - // rvaluevar::@return - breturn: - // [24] return - rts + jmp b2 + // [21] phi from rvaluevar::@1 to rvaluevar::@2 [phi:rvaluevar::@1->rvaluevar::@2] + b2_from_b1: + // [21] phi (byte*) rvaluevar::screen#4 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@1->rvaluevar::@2#0] -- register_copy + // [21] phi (byte) rvaluevar::i#4 = (byte) rvaluevar::i#1 [phi:rvaluevar::@1->rvaluevar::@2#1] -- register_copy + jmp b2 // rvaluevar::@2 b2: - // [25] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) -- vbuyy=_deref_pbuz1 + // [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) -- vbuaa=_deref_pbuz1 ldy #0 lda (screen),y - tay - // [26] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 -- pbuz1=_inc_pbuz1 + // [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: - // [27] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 -- vbuxx=_inc_vbuxx + // [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 -- vbuxx=_inc_vbuxx inx - // [21] phi from rvaluevar::@2 to rvaluevar::@1 [phi:rvaluevar::@2->rvaluevar::@1] - b1_from_b2: - // [21] phi (byte) rvaluevar::b#2 = (byte) rvaluevar::b#1 [phi:rvaluevar::@2->rvaluevar::@1#0] -- register_copy - // [21] phi (byte*) rvaluevar::screen#2 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@2->rvaluevar::@1#1] -- register_copy - // [21] phi (byte) rvaluevar::i#2 = (byte) rvaluevar::i#1 [phi:rvaluevar::@2->rvaluevar::@1#2] -- register_copy jmp b1 + // rvaluevar::@1 + b1: + // [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b2_from_b1 + jmp b3 + // rvaluevar::@3 + b3: + // [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 -- _deref_pbuc1=vbuaa + sta screen2 + jmp breturn + // rvaluevar::@return + breturn: + // [27] return + rts } // rvalue rvalue: { // A constant pointer .label SCREEN = $400 .label screen2 = $400 - // [28] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0+(byte) 1) -- vbuaa=_deref_pbuc1 - // RValue constant array pointer constant index - lda SCREEN+1 - // [29] phi from rvalue to rvalue::@1 [phi:rvalue->rvalue::@1] - b1_from_rvalue: - // [29] phi (byte) rvalue::b#3 = (byte) rvalue::b#1 [phi:rvalue->rvalue::@1#0] -- register_copy - // [29] phi (byte) rvalue::i#2 = (byte) 2 [phi:rvalue->rvalue::@1#1] -- vbuxx=vbuc1 + // [29] phi from rvalue to rvalue::@2 [phi:rvalue->rvalue::@2] + b2_from_rvalue: + // [29] phi (byte) rvalue::i#4 = (byte) 2 [phi:rvalue->rvalue::@2#0] -- vbuxx=vbuc1 ldx #2 + jmp b2 + // [29] phi from rvalue::@1 to rvalue::@2 [phi:rvalue::@1->rvalue::@2] + b2_from_b1: + // [29] phi (byte) rvalue::i#4 = (byte) rvalue::i#1 [phi:rvalue::@1->rvalue::@2#0] -- register_copy + jmp b2 + // rvalue::@2 + b2: + // [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) -- vbuaa=pbuc1_derefidx_vbuxx + lda SCREEN,x + // [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 -- vbuxx=_inc_vbuxx + inx jmp b1 // rvalue::@1 b1: - // [30] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 -- vbuxx_lt_vbuc1_then_la1 + // [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #$a - bcc b2 + bcc b2_from_b1 jmp b3 // rvalue::@3 b3: - // [31] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#3 -- _deref_pbuc1=vbuaa + // [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 -- _deref_pbuc1=vbuaa sta screen2 jmp breturn // rvalue::@return breturn: - // [32] return + // [34] return rts - // rvalue::@2 - b2: - // [33] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) -- vbuaa=pbuc1_derefidx_vbuxx - lda SCREEN,x - // [34] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 -- vbuxx=_inc_vbuxx - inx - // [29] phi from rvalue::@2 to rvalue::@1 [phi:rvalue::@2->rvalue::@1] - b1_from_b2: - // [29] phi (byte) rvalue::b#3 = (byte) rvalue::b#2 [phi:rvalue::@2->rvalue::@1#0] -- register_copy - // [29] phi (byte) rvalue::i#2 = (byte) rvalue::i#1 [phi:rvalue::@2->rvalue::@1#1] -- register_copy - jmp b1 } // lvalue lvalue: { @@ -1047,32 +1947,33 @@ lvalue: { // LValue constant array constant indexing lda #2 sta SCREEN+1 - // [37] phi from lvalue to lvalue::@1 [phi:lvalue->lvalue::@1] - b1_from_lvalue: - // [37] phi (byte) lvalue::i#2 = (byte) 2 [phi:lvalue->lvalue::@1#0] -- vbuxx=vbuc1 + // [37] phi from lvalue to lvalue::@2 [phi:lvalue->lvalue::@2] + b2_from_lvalue: + // [37] phi (byte) lvalue::i#4 = (byte) 2 [phi:lvalue->lvalue::@2#0] -- vbuxx=vbuc1 ldx #2 + jmp b2 + // [37] phi from lvalue::@1 to lvalue::@2 [phi:lvalue::@1->lvalue::@2] + b2_from_b1: + // [37] phi (byte) lvalue::i#4 = (byte) lvalue::i#1 [phi:lvalue::@1->lvalue::@2#0] -- register_copy + jmp b2 + // lvalue::@2 + b2: + // [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #3 + sta SCREEN,x + // [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 -- vbuxx=_inc_vbuxx + inx jmp b1 // lvalue::@1 b1: - // [38] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 -- vbuxx_lt_vbuc1_then_la1 + // [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #$a - bcc b2 + bcc b2_from_b1 jmp breturn // lvalue::@return breturn: - // [39] return + // [41] return rts - // lvalue::@2 - b2: - // [40] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 - lda #3 - sta SCREEN,x - // [41] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 -- vbuxx=_inc_vbuxx - inx - // [37] phi from lvalue::@2 to lvalue::@1 [phi:lvalue::@2->lvalue::@1] - b1_from_b2: - // [37] phi (byte) lvalue::i#2 = (byte) lvalue::i#1 [phi:lvalue::@2->lvalue::@1#0] -- register_copy - jmp b1 } // File Data @@ -1083,50 +1984,68 @@ Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp breturn +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp breturn +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: Removing instruction b1_from_main: +Removing instruction rvalue_from_b1: Removing instruction b2_from_b1: Removing instruction rvaluevar_from_b2: Removing instruction b3_from_b2: Removing instruction lvaluevar_from_b3: +Removing instruction b2_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction b1: Removing instruction b2: Removing instruction b3: Removing instruction breturn: -Removing instruction b1_from_lvaluevar: +Removing instruction b2_from_lvaluevar: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b2: -Removing instruction b1_from_rvaluevar: +Removing instruction b2_from_rvaluevar: +Removing instruction b1: Removing instruction b3: Removing instruction breturn: -Removing instruction b1_from_b2: -Removing instruction b1_from_rvalue: +Removing instruction b2_from_rvalue: +Removing instruction b1: Removing instruction b3: Removing instruction breturn: -Removing instruction b1_from_b2: -Removing instruction b1_from_lvalue: +Removing instruction b2_from_lvalue: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b2: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 +Removing instruction jmp b2 +Removing instruction jmp b2 +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination Replacing instruction ldx #2 with TAX Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -1142,8 +2061,8 @@ FINAL SYMBOL TABLE (byte[$400]) lvalue::SCREEN (const byte[$400]) lvalue::SCREEN#0 SCREEN = (byte*) 1024 (byte) lvalue::i -(byte) lvalue::i#1 reg byte x 22.0 -(byte) lvalue::i#2 reg byte x 14.666666666666666 +(byte) lvalue::i#1 reg byte x 16.5 +(byte) lvalue::i#4 reg byte x 16.5 (void()) lvaluevar() (label) lvaluevar::@1 (label) lvaluevar::@2 @@ -1151,11 +2070,11 @@ FINAL SYMBOL TABLE (byte) lvaluevar::b (const byte) lvaluevar::b#0 b = (byte) 4 (byte) lvaluevar::i -(byte) lvaluevar::i#1 reg byte x 22.0 -(byte) lvaluevar::i#2 reg byte x 8.25 +(byte) lvaluevar::i#1 reg byte x 16.5 +(byte) lvaluevar::i#4 reg byte x 7.333333333333333 (byte*) lvaluevar::screen -(byte*) lvaluevar::screen#1 screen zp ZP_WORD:2 11.0 -(byte*) lvaluevar::screen#2 screen zp ZP_WORD:2 11.0 +(byte*) lvaluevar::screen#1 screen zp ZP_WORD:2 7.333333333333333 +(byte*) lvaluevar::screen#4 screen zp ZP_WORD:2 16.5 (void()) main() (label) main::@1 (label) main::@2 @@ -1169,12 +2088,10 @@ FINAL SYMBOL TABLE (byte[$400]) rvalue::SCREEN (const byte[$400]) rvalue::SCREEN#0 SCREEN = (byte*) 1024 (byte) rvalue::b -(byte) rvalue::b#1 reg byte a 4.0 -(byte) rvalue::b#2 reg byte a 11.0 -(byte) rvalue::b#3 reg byte a 7.5 +(byte) rvalue::b#2 reg byte a 4.333333333333333 (byte) rvalue::i -(byte) rvalue::i#1 reg byte x 22.0 -(byte) rvalue::i#2 reg byte x 14.666666666666666 +(byte) rvalue::i#1 reg byte x 16.5 +(byte) rvalue::i#4 reg byte x 16.5 (byte*) rvalue::screen2 (const byte*) rvalue::screen2#0 screen2 = (byte*) 1024 (void()) rvaluevar() @@ -1183,28 +2100,27 @@ FINAL SYMBOL TABLE (label) rvaluevar::@3 (label) rvaluevar::@return (byte) rvaluevar::b -(byte) rvaluevar::b#1 reg byte y 7.333333333333333 -(byte) rvaluevar::b#2 reg byte y 6.5 +(byte) rvaluevar::b#1 reg byte a 3.25 (byte) rvaluevar::i -(byte) rvaluevar::i#1 reg byte x 22.0 -(byte) rvaluevar::i#2 reg byte x 8.25 +(byte) rvaluevar::i#1 reg byte x 16.5 +(byte) rvaluevar::i#4 reg byte x 7.333333333333333 (byte*) rvaluevar::screen -(byte*) rvaluevar::screen#1 screen zp ZP_WORD:2 11.0 -(byte*) rvaluevar::screen#2 screen zp ZP_WORD:2 11.0 +(byte*) rvaluevar::screen#1 screen zp ZP_WORD:2 7.333333333333333 +(byte*) rvaluevar::screen#4 screen zp ZP_WORD:2 16.5 (byte*) rvaluevar::screen2 (const byte*) rvaluevar::screen2#0 screen2 = (byte*) 1024 -reg byte x [ lvaluevar::i#2 lvaluevar::i#1 ] -reg byte x [ rvaluevar::i#2 rvaluevar::i#1 ] -zp ZP_WORD:2 [ rvaluevar::screen#2 rvaluevar::screen#1 lvaluevar::screen#2 lvaluevar::screen#1 ] -reg byte y [ rvaluevar::b#2 rvaluevar::b#1 ] -reg byte x [ rvalue::i#2 rvalue::i#1 ] -reg byte a [ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] -reg byte x [ lvalue::i#2 lvalue::i#1 ] +reg byte x [ lvaluevar::i#4 lvaluevar::i#1 ] +reg byte x [ rvaluevar::i#4 rvaluevar::i#1 ] +zp ZP_WORD:2 [ rvaluevar::screen#4 rvaluevar::screen#1 lvaluevar::screen#4 lvaluevar::screen#1 ] +reg byte x [ rvalue::i#4 rvalue::i#1 ] +reg byte x [ lvalue::i#4 lvalue::i#1 ] +reg byte a [ rvaluevar::b#1 ] +reg byte a [ rvalue::b#2 ] FINAL ASSEMBLER -Score: 1318 +Score: 1154 // File Comments // Test all types of pointers @@ -1229,6 +2145,7 @@ main: { // main::@1 // rvalue() // [7] call rvalue + // [28] phi from main::@1 to rvalue [phi:main::@1->rvalue] jsr rvalue // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] // main::@2 @@ -1252,134 +2169,118 @@ lvaluevar: { // LValue Variable pointer dereference .const b = 4 .label screen = 2 - // [14] phi from lvaluevar to lvaluevar::@1 [phi:lvaluevar->lvaluevar::@1] - // [14] phi (byte*) lvaluevar::screen#2 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@1#0] -- pbuz1=pbuc1 + // [14] phi from lvaluevar to lvaluevar::@2 [phi:lvaluevar->lvaluevar::@2] + // [14] phi (byte*) lvaluevar::screen#4 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@2#0] -- pbuz1=pbuc1 lda #<$400 sta screen lda #>$400 sta screen+1 - // [14] phi (byte) lvaluevar::i#2 = (byte) 2 [phi:lvaluevar->lvaluevar::@1#1] -- vbuxx=vbuc1 + // [14] phi (byte) lvaluevar::i#4 = (byte) 2 [phi:lvaluevar->lvaluevar::@2#1] -- vbuxx=vbuc1 ldx #2 - // lvaluevar::@1 - b1: - // while(i<10) - // [15] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b2 - // lvaluevar::@return - // } - // [16] return - rts + // [14] phi from lvaluevar::@1 to lvaluevar::@2 [phi:lvaluevar::@1->lvaluevar::@2] + // [14] phi (byte*) lvaluevar::screen#4 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@1->lvaluevar::@2#0] -- register_copy + // [14] phi (byte) lvaluevar::i#4 = (byte) lvaluevar::i#1 [phi:lvaluevar::@1->lvaluevar::@2#1] -- register_copy // lvaluevar::@2 b2: // *screen = b - // [17] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 + // [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 lda #b ldy #0 sta (screen),y // screen++; - // [18] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 -- pbuz1=_inc_pbuz1 + // [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: // i++; - // [19] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 -- vbuxx=_inc_vbuxx + // [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 -- vbuxx=_inc_vbuxx inx - // [14] phi from lvaluevar::@2 to lvaluevar::@1 [phi:lvaluevar::@2->lvaluevar::@1] - // [14] phi (byte*) lvaluevar::screen#2 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@2->lvaluevar::@1#0] -- register_copy - // [14] phi (byte) lvaluevar::i#2 = (byte) lvaluevar::i#1 [phi:lvaluevar::@2->lvaluevar::@1#1] -- register_copy - jmp b1 + // lvaluevar::@1 + // while(i<10) + // [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b2 + // lvaluevar::@return + // } + // [19] return + rts } // rvaluevar rvaluevar: { .label screen2 = $400 .label screen = 2 - // [21] phi from rvaluevar to rvaluevar::@1 [phi:rvaluevar->rvaluevar::@1] - // [21] phi (byte) rvaluevar::b#2 = (byte) 0 [phi:rvaluevar->rvaluevar::@1#0] -- vbuyy=vbuc1 - ldy #0 - // [21] phi (byte*) rvaluevar::screen#2 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@1#1] -- pbuz1=pbuc1 + // [21] phi from rvaluevar to rvaluevar::@2 [phi:rvaluevar->rvaluevar::@2] + // [21] phi (byte*) rvaluevar::screen#4 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@2#0] -- pbuz1=pbuc1 lda #<$400 sta screen lda #>$400 sta screen+1 - // [21] phi (byte) rvaluevar::i#2 = (byte) 2 [phi:rvaluevar->rvaluevar::@1#2] -- vbuxx=vbuc1 + // [21] phi (byte) rvaluevar::i#4 = (byte) 2 [phi:rvaluevar->rvaluevar::@2#1] -- vbuxx=vbuc1 ldx #2 - // rvaluevar::@1 - b1: - // while(i<10) - // [22] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b2 - // rvaluevar::@3 - // *screen2 = b - // [23] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2 -- _deref_pbuc1=vbuyy - sty screen2 - // rvaluevar::@return - // } - // [24] return - rts + // [21] phi from rvaluevar::@1 to rvaluevar::@2 [phi:rvaluevar::@1->rvaluevar::@2] + // [21] phi (byte*) rvaluevar::screen#4 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@1->rvaluevar::@2#0] -- register_copy + // [21] phi (byte) rvaluevar::i#4 = (byte) rvaluevar::i#1 [phi:rvaluevar::@1->rvaluevar::@2#1] -- register_copy // rvaluevar::@2 b2: // b = *screen - // [25] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2) -- vbuyy=_deref_pbuz1 + // [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) -- vbuaa=_deref_pbuz1 ldy #0 lda (screen),y - tay // screen++; - // [26] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 -- pbuz1=_inc_pbuz1 + // [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 -- pbuz1=_inc_pbuz1 inc screen bne !+ inc screen+1 !: // i++; - // [27] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 -- vbuxx=_inc_vbuxx + // [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 -- vbuxx=_inc_vbuxx inx - // [21] phi from rvaluevar::@2 to rvaluevar::@1 [phi:rvaluevar::@2->rvaluevar::@1] - // [21] phi (byte) rvaluevar::b#2 = (byte) rvaluevar::b#1 [phi:rvaluevar::@2->rvaluevar::@1#0] -- register_copy - // [21] phi (byte*) rvaluevar::screen#2 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@2->rvaluevar::@1#1] -- register_copy - // [21] phi (byte) rvaluevar::i#2 = (byte) rvaluevar::i#1 [phi:rvaluevar::@2->rvaluevar::@1#2] -- register_copy - jmp b1 + // rvaluevar::@1 + // while(i<10) + // [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b2 + // rvaluevar::@3 + // *screen2 = b + // [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 -- _deref_pbuc1=vbuaa + sta screen2 + // rvaluevar::@return + // } + // [27] return + rts } // rvalue rvalue: { // A constant pointer .label SCREEN = $400 .label screen2 = $400 - // b = SCREEN[1] - // [28] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0+(byte) 1) -- vbuaa=_deref_pbuc1 - // RValue constant array pointer constant index - lda SCREEN+1 - // [29] phi from rvalue to rvalue::@1 [phi:rvalue->rvalue::@1] - // [29] phi (byte) rvalue::b#3 = (byte) rvalue::b#1 [phi:rvalue->rvalue::@1#0] -- register_copy - // [29] phi (byte) rvalue::i#2 = (byte) 2 [phi:rvalue->rvalue::@1#1] -- vbuxx=vbuc1 + // [29] phi from rvalue to rvalue::@2 [phi:rvalue->rvalue::@2] + // [29] phi (byte) rvalue::i#4 = (byte) 2 [phi:rvalue->rvalue::@2#0] -- vbuxx=vbuc1 ldx #2 + // [29] phi from rvalue::@1 to rvalue::@2 [phi:rvalue::@1->rvalue::@2] + // [29] phi (byte) rvalue::i#4 = (byte) rvalue::i#1 [phi:rvalue::@1->rvalue::@2#0] -- register_copy + // rvalue::@2 + b2: + // b = SCREEN[i++] + // [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) -- vbuaa=pbuc1_derefidx_vbuxx + lda SCREEN,x + // b = SCREEN[i++]; + // [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 -- vbuxx=_inc_vbuxx + inx // rvalue::@1 - b1: // while(i<10) - // [30] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 -- vbuxx_lt_vbuc1_then_la1 + // [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #$a bcc b2 // rvalue::@3 // *screen2 = b - // [31] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#3 -- _deref_pbuc1=vbuaa + // [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 -- _deref_pbuc1=vbuaa sta screen2 // rvalue::@return // } - // [32] return + // [34] return rts - // rvalue::@2 - b2: - // b = SCREEN[i++] - // [33] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) -- vbuaa=pbuc1_derefidx_vbuxx - lda SCREEN,x - // b = SCREEN[i++]; - // [34] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 -- vbuxx=_inc_vbuxx - inx - // [29] phi from rvalue::@2 to rvalue::@1 [phi:rvalue::@2->rvalue::@1] - // [29] phi (byte) rvalue::b#3 = (byte) rvalue::b#2 [phi:rvalue::@2->rvalue::@1#0] -- register_copy - // [29] phi (byte) rvalue::i#2 = (byte) rvalue::i#1 [phi:rvalue::@2->rvalue::@1#1] -- register_copy - jmp b1 } // lvalue lvalue: { @@ -1395,31 +2296,29 @@ lvalue: { // LValue constant array constant indexing lda #2 sta SCREEN+1 - // [37] phi from lvalue to lvalue::@1 [phi:lvalue->lvalue::@1] - // [37] phi (byte) lvalue::i#2 = (byte) 2 [phi:lvalue->lvalue::@1#0] -- vbuxx=vbuc1 + // [37] phi from lvalue to lvalue::@2 [phi:lvalue->lvalue::@2] + // [37] phi (byte) lvalue::i#4 = (byte) 2 [phi:lvalue->lvalue::@2#0] -- vbuxx=vbuc1 tax + // [37] phi from lvalue::@1 to lvalue::@2 [phi:lvalue::@1->lvalue::@2] + // [37] phi (byte) lvalue::i#4 = (byte) lvalue::i#1 [phi:lvalue::@1->lvalue::@2#0] -- register_copy + // lvalue::@2 + b2: + // SCREEN[i++] = 3 + // [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #3 + sta SCREEN,x + // SCREEN[i++] = 3; + // [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 -- vbuxx=_inc_vbuxx + inx // lvalue::@1 - b1: // while(i<10) - // [38] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 -- vbuxx_lt_vbuc1_then_la1 + // [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #$a bcc b2 // lvalue::@return // } - // [39] return + // [41] return rts - // lvalue::@2 - b2: - // SCREEN[i++] = 3 - // [40] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 - lda #3 - sta SCREEN,x - // SCREEN[i++] = 3; - // [41] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 -- vbuxx=_inc_vbuxx - inx - // [37] phi from lvalue::@2 to lvalue::@1 [phi:lvalue::@2->lvalue::@1] - // [37] phi (byte) lvalue::i#2 = (byte) lvalue::i#1 [phi:lvalue::@2->lvalue::@1#0] -- register_copy - jmp b1 } // File Data diff --git a/src/test/ref/ptrtest.sym b/src/test/ref/ptrtest.sym index 676f372cd..1a7da404a 100644 --- a/src/test/ref/ptrtest.sym +++ b/src/test/ref/ptrtest.sym @@ -8,8 +8,8 @@ (byte[$400]) lvalue::SCREEN (const byte[$400]) lvalue::SCREEN#0 SCREEN = (byte*) 1024 (byte) lvalue::i -(byte) lvalue::i#1 reg byte x 22.0 -(byte) lvalue::i#2 reg byte x 14.666666666666666 +(byte) lvalue::i#1 reg byte x 16.5 +(byte) lvalue::i#4 reg byte x 16.5 (void()) lvaluevar() (label) lvaluevar::@1 (label) lvaluevar::@2 @@ -17,11 +17,11 @@ (byte) lvaluevar::b (const byte) lvaluevar::b#0 b = (byte) 4 (byte) lvaluevar::i -(byte) lvaluevar::i#1 reg byte x 22.0 -(byte) lvaluevar::i#2 reg byte x 8.25 +(byte) lvaluevar::i#1 reg byte x 16.5 +(byte) lvaluevar::i#4 reg byte x 7.333333333333333 (byte*) lvaluevar::screen -(byte*) lvaluevar::screen#1 screen zp ZP_WORD:2 11.0 -(byte*) lvaluevar::screen#2 screen zp ZP_WORD:2 11.0 +(byte*) lvaluevar::screen#1 screen zp ZP_WORD:2 7.333333333333333 +(byte*) lvaluevar::screen#4 screen zp ZP_WORD:2 16.5 (void()) main() (label) main::@1 (label) main::@2 @@ -35,12 +35,10 @@ (byte[$400]) rvalue::SCREEN (const byte[$400]) rvalue::SCREEN#0 SCREEN = (byte*) 1024 (byte) rvalue::b -(byte) rvalue::b#1 reg byte a 4.0 -(byte) rvalue::b#2 reg byte a 11.0 -(byte) rvalue::b#3 reg byte a 7.5 +(byte) rvalue::b#2 reg byte a 4.333333333333333 (byte) rvalue::i -(byte) rvalue::i#1 reg byte x 22.0 -(byte) rvalue::i#2 reg byte x 14.666666666666666 +(byte) rvalue::i#1 reg byte x 16.5 +(byte) rvalue::i#4 reg byte x 16.5 (byte*) rvalue::screen2 (const byte*) rvalue::screen2#0 screen2 = (byte*) 1024 (void()) rvaluevar() @@ -49,21 +47,20 @@ (label) rvaluevar::@3 (label) rvaluevar::@return (byte) rvaluevar::b -(byte) rvaluevar::b#1 reg byte y 7.333333333333333 -(byte) rvaluevar::b#2 reg byte y 6.5 +(byte) rvaluevar::b#1 reg byte a 3.25 (byte) rvaluevar::i -(byte) rvaluevar::i#1 reg byte x 22.0 -(byte) rvaluevar::i#2 reg byte x 8.25 +(byte) rvaluevar::i#1 reg byte x 16.5 +(byte) rvaluevar::i#4 reg byte x 7.333333333333333 (byte*) rvaluevar::screen -(byte*) rvaluevar::screen#1 screen zp ZP_WORD:2 11.0 -(byte*) rvaluevar::screen#2 screen zp ZP_WORD:2 11.0 +(byte*) rvaluevar::screen#1 screen zp ZP_WORD:2 7.333333333333333 +(byte*) rvaluevar::screen#4 screen zp ZP_WORD:2 16.5 (byte*) rvaluevar::screen2 (const byte*) rvaluevar::screen2#0 screen2 = (byte*) 1024 -reg byte x [ lvaluevar::i#2 lvaluevar::i#1 ] -reg byte x [ rvaluevar::i#2 rvaluevar::i#1 ] -zp ZP_WORD:2 [ rvaluevar::screen#2 rvaluevar::screen#1 lvaluevar::screen#2 lvaluevar::screen#1 ] -reg byte y [ rvaluevar::b#2 rvaluevar::b#1 ] -reg byte x [ rvalue::i#2 rvalue::i#1 ] -reg byte a [ rvalue::b#3 rvalue::b#1 rvalue::b#2 ] -reg byte x [ lvalue::i#2 lvalue::i#1 ] +reg byte x [ lvaluevar::i#4 lvaluevar::i#1 ] +reg byte x [ rvaluevar::i#4 rvaluevar::i#1 ] +zp ZP_WORD:2 [ rvaluevar::screen#4 rvaluevar::screen#1 lvaluevar::screen#4 lvaluevar::screen#1 ] +reg byte x [ rvalue::i#4 rvalue::i#1 ] +reg byte x [ lvalue::i#4 lvalue::i#1 ] +reg byte a [ rvaluevar::b#1 ] +reg byte a [ rvalue::b#2 ] diff --git a/src/test/ref/ptrtestmin.asm b/src/test/ref/ptrtestmin.asm index 13d0e0368..62b3d7626 100644 --- a/src/test/ref/ptrtestmin.asm +++ b/src/test/ref/ptrtestmin.asm @@ -5,15 +5,12 @@ main: { // A constant pointer .label SCREEN = $400 - lda #0 ldx #2 - b1: + b2: + lda SCREEN,x + inx cpx #$a bcc b2 sta SCREEN+$3e7 rts - b2: - lda SCREEN,x - inx - jmp b1 } diff --git a/src/test/ref/ptrtestmin.cfg b/src/test/ref/ptrtestmin.cfg index c2308fbae..8b68cd390 100644 --- a/src/test/ref/ptrtestmin.cfg +++ b/src/test/ref/ptrtestmin.cfg @@ -9,19 +9,18 @@ [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main/(byte) 2 ) + [6] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#4) + [7] (byte) main::i#1 ← ++ (byte) main::i#4 to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::b#2 ← phi( main/(byte) 0 main::@2/(byte) main::b#1 ) - [5] (byte) main::i#2 ← phi( main/(byte) 2 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) $a) goto main::@2 +main::@1: scope:[main] from main::@2 + [8] if((byte) main::i#1<(byte) $a) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@1 - [7] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#2 + [9] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#1 to:main::@return main::@return: scope:[main] from main::@3 - [8] return + [10] return to:@return -main::@2: scope:[main] from main::@1 - [9] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#2) - [10] (byte) main::i#1 ← ++ (byte) main::i#2 - to:main::@1 diff --git a/src/test/ref/ptrtestmin.log b/src/test/ref/ptrtestmin.log index fb6026903..04c5ec519 100644 --- a/src/test/ref/ptrtestmin.log +++ b/src/test/ref/ptrtestmin.log @@ -86,29 +86,103 @@ Constant (const byte) main::i#0 = 2 Successful SSA optimization Pass2ConstantIdentification De-inlining pointer[w] to *(pointer+w) [10] *((const byte[$400]) main::SCREEN#0 + (word) $3e7) ← (byte) main::b#2 Successful SSA optimization Pass2DeInlineWordDerefIdx -Constant right-side identified [4] (byte*~) main::$1 ← (const byte[$400]) main::SCREEN#0 + (word) $3e7 +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::b#2 ← phi( main/(const byte) main::b#0 main::@2/(byte) main::b#1 ) + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#2<(byte) $a) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::i#4 ← phi( ) + [2] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#4) + [3] (byte) main::i#1 ← ++ (byte) main::i#4 + to:main::@1 +main::@3: scope:[main] from main::@1 + [4] (byte*~) main::$1 ← (const byte[$400]) main::SCREEN#0 + (word) $3e7 + [5] *((byte*~) main::$1) ← (byte) main::b#2 + to:main::@return +main::@return: scope:[main] from main::@3 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::b#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::b#2 ← phi( main/(const byte) main::b#0 main::@2/(byte) main::b#1 ) + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#2<(byte) $a) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::i#4 ← phi( main::@1/(byte) main::i#2 ) + [2] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#4) + [3] (byte) main::i#1 ← ++ (byte) main::i#4 + to:main::@1 +main::@3: scope:[main] from main::@1 + (byte) main::b#4 ← phi( ) + [4] (byte*~) main::$1 ← (const byte[$400]) main::SCREEN#0 + (word) $3e7 + [5] *((byte*~) main::$1) ← (byte) main::b#4 + to:main::@return +main::@return: scope:[main] from main::@3 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::i#1 = (byte) main::i#2 +Alias (byte) main::b#1 = (byte) main::b#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#5 (const byte) main::i#0 +Identical Phi Values (byte) main::b#5 (const byte) main::b#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [6] (byte*~) main::$1 ← (const byte[$400]) main::SCREEN#0 + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::$1 = main::SCREEN#0+$3e7 Successful SSA optimization Pass2ConstantIdentification -Inlining constant with var siblings (const byte) main::b#0 +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +if() condition always true - replacing block destination [11] if((const byte) main::i#0<(byte) $a) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Eliminating unused constant (const byte) main::b#0 +Successful SSA optimization PassNEliminateUnusedVars +Alias (byte) main::b#1 = (byte) main::b#4 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::$1 = (const byte[$400]) main::SCREEN#0+(word) $3e7 Constant inlined main::i#0 = (byte) 2 -Constant inlined main::b#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting main::@7(between main::@1 and main::@2) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 -Created 2 initial phi equivalence classes -Coalesced [12] main::i#4 ← main::i#1 -Coalesced [13] main::b#4 ← main::b#1 -Coalesced down to 2 phi equivalence classes +Created 1 initial phi equivalence classes +Coalesced [13] main::i#6 ← main::i#1 +Coalesced down to 1 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@7 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -126,42 +200,40 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main/(byte) 2 ) + [6] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#4) + [7] (byte) main::i#1 ← ++ (byte) main::i#4 to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::b#2 ← phi( main/(byte) 0 main::@2/(byte) main::b#1 ) - [5] (byte) main::i#2 ← phi( main/(byte) 2 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) $a) goto main::@2 +main::@1: scope:[main] from main::@2 + [8] if((byte) main::i#1<(byte) $a) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@1 - [7] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#2 + [9] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#1 to:main::@return main::@return: scope:[main] from main::@3 - [8] return + [10] return to:@return -main::@2: scope:[main] from main::@1 - [9] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#2) - [10] (byte) main::i#1 ← ++ (byte) main::i#2 - to:main::@1 VARIABLE REGISTER WEIGHTS (void()) main() (byte[$400]) main::SCREEN (byte) main::b -(byte) main::b#1 11.0 -(byte) main::b#2 6.5 +(byte) main::b#1 4.333333333333333 (byte) main::i -(byte) main::i#1 22.0 -(byte) main::i#2 14.666666666666666 +(byte) main::i#1 16.5 +(byte) main::i#4 16.5 Initial phi equivalence classes -[ main::i#2 main::i#1 ] -[ main::b#2 main::b#1 ] +[ main::i#4 main::i#1 ] +Added variable main::b#1 to zero page equivalence class [ main::b#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -[ main::b#2 main::b#1 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::b#2 main::b#1 ] +[ main::i#4 main::i#1 ] +[ main::b#1 ] +Allocated zp ZP_BYTE:2 [ main::i#4 main::i#1 ] +Allocated zp ZP_BYTE:3 [ main::b#1 ] INITIAL ASM Target platform is c64basic @@ -194,58 +266,55 @@ main: { .label SCREEN = $400 .label b = 3 .label i = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::b#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 - lda #0 - sta b - // [5] phi (byte) main::i#2 = (byte) 2 [phi:main->main::@1#1] -- vbuz1=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#4 = (byte) 2 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #2 sta i + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::i#4 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy + jmp b2 + // main::@2 + b2: + // [6] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#4) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy i + lda SCREEN,y + sta b + // [7] (byte) main::i#1 ← ++ (byte) main::i#4 -- vbuz1=_inc_vbuz1 + inc i jmp b1 // main::@1 b1: - // [6] if((byte) main::i#2<(byte) $a) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + // [8] if((byte) main::i#1<(byte) $a) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 lda i cmp #$a - bcc b2 + bcc b2_from_b1 jmp b3 // main::@3 b3: - // [7] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#2 -- _deref_pbuc1=vbuz1 + // [9] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#1 -- _deref_pbuc1=vbuz1 lda b sta SCREEN+$3e7 jmp breturn // main::@return breturn: - // [8] return + // [10] return rts - // main::@2 - b2: - // [9] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#2) -- vbuz1=pbuc1_derefidx_vbuz2 - ldy i - lda SCREEN,y - sta b - // [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 - inc i - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::b#2 main::b#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:2 [ main::i#4 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::b#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 36.67: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 17.5: zp ZP_BYTE:3 [ main::b#2 main::b#1 ] +Uplift Scope [main] 33: zp ZP_BYTE:2 [ main::i#4 main::i#1 ] 4.33: zp ZP_BYTE:3 [ main::b#1 ] Uplift Scope [] -Uplifting [main] best 265 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::b#2 main::b#1 ] -Uplifting [] best 265 combination +Uplifting [main] best 275 combination reg byte x [ main::i#4 main::i#1 ] reg byte a [ main::b#1 ] +Uplifting [] best 275 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -275,63 +344,66 @@ bend: main: { // A constant pointer .label SCREEN = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::b#2 = (byte) 0 [phi:main->main::@1#0] -- vbuaa=vbuc1 - lda #0 - // [5] phi (byte) main::i#2 = (byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#4 = (byte) 2 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #2 + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::i#4 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy + jmp b2 + // main::@2 + b2: + // [6] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#4) -- vbuaa=pbuc1_derefidx_vbuxx + lda SCREEN,x + // [7] (byte) main::i#1 ← ++ (byte) main::i#4 -- vbuxx=_inc_vbuxx + inx jmp b1 // main::@1 b1: - // [6] if((byte) main::i#2<(byte) $a) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + // [8] if((byte) main::i#1<(byte) $a) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #$a - bcc b2 + bcc b2_from_b1 jmp b3 // main::@3 b3: - // [7] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#2 -- _deref_pbuc1=vbuaa + // [9] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#1 -- _deref_pbuc1=vbuaa sta SCREEN+$3e7 jmp breturn // main::@return breturn: - // [8] return + // [10] return rts - // main::@2 - b2: - // [9] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#2) -- vbuaa=pbuc1_derefidx_vbuxx - lda SCREEN,x - // [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination +Replacing label b2_from_b1 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: +Removing instruction b2_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: +Removing instruction b2_from_main: +Removing instruction b1: Removing instruction b3: Removing instruction breturn: -Removing instruction b1_from_b2: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -347,18 +419,17 @@ FINAL SYMBOL TABLE (byte[$400]) main::SCREEN (const byte[$400]) main::SCREEN#0 SCREEN = (byte*) 1024 (byte) main::b -(byte) main::b#1 reg byte a 11.0 -(byte) main::b#2 reg byte a 6.5 +(byte) main::b#1 reg byte a 4.333333333333333 (byte) main::i -(byte) main::i#1 reg byte x 22.0 -(byte) main::i#2 reg byte x 14.666666666666666 +(byte) main::i#1 reg byte x 16.5 +(byte) main::i#4 reg byte x 16.5 -reg byte x [ main::i#2 main::i#1 ] -reg byte a [ main::b#2 main::b#1 ] +reg byte x [ main::i#4 main::i#1 ] +reg byte a [ main::b#1 ] FINAL ASSEMBLER -Score: 190 +Score: 140 // File Comments // Test all types of pointers @@ -378,37 +449,32 @@ Score: 190 main: { // A constant pointer .label SCREEN = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::b#2 = (byte) 0 [phi:main->main::@1#0] -- vbuaa=vbuc1 - lda #0 - // [5] phi (byte) main::i#2 = (byte) 2 [phi:main->main::@1#1] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::i#4 = (byte) 2 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi (byte) main::i#4 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy + // main::@2 + b2: + // b = SCREEN[i++] + // [6] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#4) -- vbuaa=pbuc1_derefidx_vbuxx + lda SCREEN,x + // b = SCREEN[i++]; + // [7] (byte) main::i#1 ← ++ (byte) main::i#4 -- vbuxx=_inc_vbuxx + inx // main::@1 - b1: // while(i<10) - // [6] if((byte) main::i#2<(byte) $a) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + // [8] if((byte) main::i#1<(byte) $a) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #$a bcc b2 // main::@3 // SCREEN[999] = b - // [7] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#2 -- _deref_pbuc1=vbuaa + // [9] *((const byte[$400]) main::SCREEN#0+(word) $3e7) ← (byte) main::b#1 -- _deref_pbuc1=vbuaa sta SCREEN+$3e7 // main::@return // } - // [8] return + // [10] return rts - // main::@2 - b2: - // b = SCREEN[i++] - // [9] (byte) main::b#1 ← *((const byte[$400]) main::SCREEN#0 + (byte) main::i#2) -- vbuaa=pbuc1_derefidx_vbuxx - lda SCREEN,x - // b = SCREEN[i++]; - // [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 } // File Data diff --git a/src/test/ref/ptrtestmin.sym b/src/test/ref/ptrtestmin.sym index ece81cc5c..093603d1e 100644 --- a/src/test/ref/ptrtestmin.sym +++ b/src/test/ref/ptrtestmin.sym @@ -9,11 +9,10 @@ (byte[$400]) main::SCREEN (const byte[$400]) main::SCREEN#0 SCREEN = (byte*) 1024 (byte) main::b -(byte) main::b#1 reg byte a 11.0 -(byte) main::b#2 reg byte a 6.5 +(byte) main::b#1 reg byte a 4.333333333333333 (byte) main::i -(byte) main::i#1 reg byte x 22.0 -(byte) main::i#2 reg byte x 14.666666666666666 +(byte) main::i#1 reg byte x 16.5 +(byte) main::i#4 reg byte x 16.5 -reg byte x [ main::i#2 main::i#1 ] -reg byte a [ main::b#2 main::b#1 ] +reg byte x [ main::i#4 main::i#1 ] +reg byte a [ main::b#1 ] diff --git a/src/test/ref/sandbox-ternary-error.asm b/src/test/ref/sandbox-ternary-error.asm index a599c7f2c..6ba5c59e6 100644 --- a/src/test/ref/sandbox-ternary-error.asm +++ b/src/test/ref/sandbox-ternary-error.asm @@ -5,22 +5,22 @@ main: { .label SCREEN = $400 ldx #0 - b1: - cpx #0 - beq b2 - cpx #1 - beq b4 - lda #'c' - jmp b3 - b4: - lda #'b' - jmp b3 b2: lda #'a' - b3: + b4: sta SCREEN inx cpx #3 bne b1 rts + b1: + cpx #0 + beq b2 + cpx #1 + beq b5 + lda #'c' + jmp b4 + b5: + lda #'b' + jmp b4 } diff --git a/src/test/ref/sandbox-ternary-error.cfg b/src/test/ref/sandbox-ternary-error.cfg index c9f03353f..d0b1f502f 100644 --- a/src/test/ref/sandbox-ternary-error.cfg +++ b/src/test/ref/sandbox-ternary-error.cfg @@ -9,26 +9,29 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::b#2 ← phi( main/(byte) 0 main::@3/(byte) main::b#1 ) - [6] if((byte) main::b#2==(byte) 0) goto main::@3 to:main::@2 -main::@2: scope:[main] from main::@1 - [7] if((byte) main::b#2==(byte) 1) goto main::@4 - to:main::@5 -main::@4: scope:[main] from main::@2 - [8] phi() - to:main::@5 -main::@5: scope:[main] from main::@2 main::@4 - [9] (byte~) main::$5 ← phi( main::@4/(byte) 'b' main::@2/(byte) 'c' ) - to:main::@3 -main::@3: scope:[main] from main::@1 main::@5 - [10] (byte~) main::$7 ← phi( main::@1/(byte) 'a' main::@5/(byte~) main::$5 ) - [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 - [12] (byte) main::b#1 ← ++ (byte) main::b#2 - [13] if((byte) main::b#1!=(byte) 3) goto main::@1 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::b#11 ← phi( main::@1/(byte) main::b#1 main/(byte) 0 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@6 + [6] (byte) main::b#10 ← phi( main::@2/(byte) main::b#11 main::@6/(byte) main::b#1 ) + [6] (byte~) main::$7 ← phi( main::@2/(byte) 'a' main::@6/(byte~) main::$5 ) + [7] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + [8] (byte) main::b#1 ← ++ (byte) main::b#10 + [9] if((byte) main::b#1!=(byte) 3) goto main::@1 to:main::@return -main::@return: scope:[main] from main::@3 - [14] return +main::@return: scope:[main] from main::@4 + [10] return to:@return +main::@1: scope:[main] from main::@4 + [11] if((byte) main::b#1==(byte) 0) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@1 + [12] if((byte) main::b#1==(byte) 1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + [13] phi() + to:main::@6 +main::@6: scope:[main] from main::@3 main::@5 + [14] (byte~) main::$5 ← phi( main::@5/(byte) 'b' main::@3/(byte) 'c' ) + to:main::@4 diff --git a/src/test/ref/sandbox-ternary-error.log b/src/test/ref/sandbox-ternary-error.log index cb1aa0817..ca1d259b8 100644 --- a/src/test/ref/sandbox-ternary-error.log +++ b/src/test/ref/sandbox-ternary-error.log @@ -123,47 +123,98 @@ Constant (const byte) main::$2 = 'c' Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [18] main::b#1 ← ++ main::b#2 to ++ Resolved ranged comparison value [20] if(main::b#1!=rangelast(0,2)) goto main::@1 to (number) 3 +GRAPH (NEW VERSIONS for main::b#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [0] (byte) main::b#2 ← phi( main/(const byte) main::b#0 main::@4/(byte) main::b#1 ) + [1] if((byte) main::b#2==(byte) 0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + to:main::@4 +main::@3: scope:[main] from main::@1 + (byte) main::b#9 ← phi( ) + [2] if((byte) main::b#9==(byte) 1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + to:main::@7 +main::@6: scope:[main] from main::@3 + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + [3] (byte~) main::$5 ← phi( main::@5/(const byte) main::$3 main::@6/(const byte) main::$2 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + [4] (byte) main::b#10 ← phi( ) + [4] (byte~) main::$7 ← phi( main::@2/(const byte) main::$6 main::@7/(byte~) main::$5 ) + [5] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + [6] (byte) main::b#1 ← ++ (byte) main::b#10 + [7] if((byte) main::b#1!=(number) 3) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [8] return + to:@return +@1: scope:[] from @begin + [9] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 3 in if((byte) main::b#1!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 3 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte) main::b#1 = (byte) main::b#2 +Alias (byte) main::b#13 = (byte) main::b#9 (byte) main::b#14 +Successful SSA optimization Pass2AliasElimination +Alias (byte) main::b#12 = (byte) main::b#13 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::b#15 (const byte) main::b#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +if() condition always true - replacing block destination [15] if((const byte) main::b#0==(byte) 0) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Alias (byte) main::b#1 = (byte) main::b#12 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::b#0 Constant inlined main::$6 = (byte) 'a' Constant inlined main::$3 = (byte) 'b' Constant inlined main::b#0 = (byte) 0 Constant inlined main::$2 = (byte) 'c' Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@13(between main::@4 and main::@1) +Added new block during phi lifting main::@13(between main::@1 and main::@2) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 Adding NOP phi() at start of main::@6 Adding NOP phi() at start of main::@5 -Adding NOP phi() at start of main::@2 CALL GRAPH Calls in [] to main:2 -Created 3 initial phi equivalence classes -Coalesced [11] main::$9 ← main::$5 -Coalesced [17] main::b#9 ← main::b#1 +Created 4 initial phi equivalence classes +Coalesced [8] main::b#17 ← main::b#11 +Coalesced [18] main::$9 ← main::$5 +Coalesced [19] main::b#18 ← main::b#1 +Coalesced (already) [21] main::b#16 ← main::b#1 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@6 Culled Empty Block (label) main::@13 -Culled Empty Block (label) main::@2 -Renumbering block main::@3 to main::@2 -Renumbering block main::@4 to main::@3 -Renumbering block main::@5 to main::@4 -Renumbering block main::@7 to main::@5 +Renumbering block main::@7 to main::@6 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@4 +Adding NOP phi() at start of main::@5 FINAL CONTROL FLOW GRAPH @begin: scope:[] from @@ -177,48 +228,52 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::b#2 ← phi( main/(byte) 0 main::@3/(byte) main::b#1 ) - [6] if((byte) main::b#2==(byte) 0) goto main::@3 to:main::@2 -main::@2: scope:[main] from main::@1 - [7] if((byte) main::b#2==(byte) 1) goto main::@4 - to:main::@5 -main::@4: scope:[main] from main::@2 - [8] phi() - to:main::@5 -main::@5: scope:[main] from main::@2 main::@4 - [9] (byte~) main::$5 ← phi( main::@4/(byte) 'b' main::@2/(byte) 'c' ) - to:main::@3 -main::@3: scope:[main] from main::@1 main::@5 - [10] (byte~) main::$7 ← phi( main::@1/(byte) 'a' main::@5/(byte~) main::$5 ) - [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 - [12] (byte) main::b#1 ← ++ (byte) main::b#2 - [13] if((byte) main::b#1!=(byte) 3) goto main::@1 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::b#11 ← phi( main::@1/(byte) main::b#1 main/(byte) 0 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@6 + [6] (byte) main::b#10 ← phi( main::@2/(byte) main::b#11 main::@6/(byte) main::b#1 ) + [6] (byte~) main::$7 ← phi( main::@2/(byte) 'a' main::@6/(byte~) main::$5 ) + [7] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + [8] (byte) main::b#1 ← ++ (byte) main::b#10 + [9] if((byte) main::b#1!=(byte) 3) goto main::@1 to:main::@return -main::@return: scope:[main] from main::@3 - [14] return +main::@return: scope:[main] from main::@4 + [10] return to:@return +main::@1: scope:[main] from main::@4 + [11] if((byte) main::b#1==(byte) 0) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@1 + [12] if((byte) main::b#1==(byte) 1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + [13] phi() + to:main::@6 +main::@6: scope:[main] from main::@3 main::@5 + [14] (byte~) main::$5 ← phi( main::@5/(byte) 'b' main::@3/(byte) 'c' ) + to:main::@4 VARIABLE REGISTER WEIGHTS (void()) main() -(byte~) main::$5 11.0 -(byte~) main::$7 22.0 +(byte~) main::$5 101.0 +(byte~) main::$7 202.0 (byte*) main::SCREEN (byte) main::b -(byte) main::b#1 16.5 -(byte) main::b#2 6.285714285714286 +(byte) main::b#1 100.99999999999999 +(byte) main::b#10 106.5 +(byte) main::b#11 112.0 Initial phi equivalence classes -[ main::b#2 main::b#1 ] [ main::$7 main::$5 ] +[ main::b#10 main::b#11 main::b#1 ] Complete equivalence classes -[ main::b#2 main::b#1 ] [ main::$7 main::$5 ] -Allocated zp ZP_BYTE:2 [ main::b#2 main::b#1 ] -Allocated zp ZP_BYTE:3 [ main::$7 main::$5 ] +[ main::b#10 main::b#11 main::b#1 ] +Allocated zp ZP_BYTE:2 [ main::$7 main::$5 ] +Allocated zp ZP_BYTE:3 [ main::b#10 main::b#11 main::b#1 ] INITIAL ASM Target platform is c64basic @@ -248,90 +303,94 @@ bend: // main main: { .label SCREEN = $400 - .label _5 = 3 - .label _7 = 3 - .label b = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::b#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + .label _5 = 2 + .label _7 = 2 + .label b = 3 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::b#11 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 sta b - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::b#2==(byte) 0) goto main::@3 -- vbuz1_eq_0_then_la1 - lda b - cmp #0 - beq b3_from_b1 + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::b#11 = (byte) main::b#1 [phi:main::@1->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [7] if((byte) main::b#2==(byte) 1) goto main::@4 -- vbuz1_eq_vbuc1_then_la1 - lda #1 - cmp b - beq b4_from_b2 - // [9] phi from main::@2 to main::@5 [phi:main::@2->main::@5] - b5_from_b2: - // [9] phi (byte~) main::$5 = (byte) 'c' [phi:main::@2->main::@5#0] -- vbuz1=vbuc1 - lda #'c' - sta _5 - jmp b5 - // [8] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + // [6] phi from main::@2 to main::@4 [phi:main::@2->main::@4] b4_from_b2: + // [6] phi (byte) main::b#10 = (byte) main::b#11 [phi:main::@2->main::@4#0] -- register_copy + // [6] phi (byte~) main::$7 = (byte) 'a' [phi:main::@2->main::@4#1] -- vbuz1=vbuc1 + lda #'a' + sta _7 jmp b4 // main::@4 b4: - // [9] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - b5_from_b4: - // [9] phi (byte~) main::$5 = (byte) 'b' [phi:main::@4->main::@5#0] -- vbuz1=vbuc1 - lda #'b' - sta _5 - jmp b5 - // main::@5 - b5: - // [10] phi from main::@5 to main::@3 [phi:main::@5->main::@3] - b3_from_b5: - // [10] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@5->main::@3#0] -- register_copy - jmp b3 - // [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [10] phi (byte~) main::$7 = (byte) 'a' [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 - lda #'a' - sta _7 - jmp b3 - // main::@3 - b3: - // [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuz1 + // [7] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuz1 lda _7 sta SCREEN - // [12] (byte) main::b#1 ← ++ (byte) main::b#2 -- vbuz1=_inc_vbuz1 + // [8] (byte) main::b#1 ← ++ (byte) main::b#10 -- vbuz1=_inc_vbuz1 inc b - // [13] if((byte) main::b#1!=(byte) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + // [9] if((byte) main::b#1!=(byte) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #3 cmp b - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [14] return + // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::b#1==(byte) 0) goto main::@2 -- vbuz1_eq_0_then_la1 + lda b + cmp #0 + beq b2_from_b1 + jmp b3 + // main::@3 + b3: + // [12] if((byte) main::b#1==(byte) 1) goto main::@5 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp b + beq b5_from_b3 + // [14] phi from main::@3 to main::@6 [phi:main::@3->main::@6] + b6_from_b3: + // [14] phi (byte~) main::$5 = (byte) 'c' [phi:main::@3->main::@6#0] -- vbuz1=vbuc1 + lda #'c' + sta _5 + jmp b6 + // [13] phi from main::@3 to main::@5 [phi:main::@3->main::@5] + b5_from_b3: + jmp b5 + // main::@5 + b5: + // [14] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + b6_from_b5: + // [14] phi (byte~) main::$5 = (byte) 'b' [phi:main::@5->main::@6#0] -- vbuz1=vbuc1 + lda #'b' + sta _5 + jmp b6 + // main::@6 + b6: + // [6] phi from main::@6 to main::@4 [phi:main::@6->main::@4] + b4_from_b6: + // [6] phi (byte) main::b#10 = (byte) main::b#1 [phi:main::@6->main::@4#0] -- register_copy + // [6] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@6->main::@4#1] -- register_copy + jmp b4 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp ZP_BYTE:2 [ main::b#2 main::b#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::$7 main::$5 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:2 [ main::$7 main::$5 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::b#10 main::b#11 main::b#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 33: zp ZP_BYTE:3 [ main::$7 main::$5 ] 22.79: zp ZP_BYTE:2 [ main::b#2 main::b#1 ] +Uplift Scope [main] 319.5: zp ZP_BYTE:3 [ main::b#10 main::b#11 main::b#1 ] 303: zp ZP_BYTE:2 [ main::$7 main::$5 ] Uplift Scope [] -Uplifting [main] best 563 combination reg byte a [ main::$7 main::$5 ] reg byte x [ main::b#2 main::b#1 ] -Uplifting [] best 563 combination +Uplifting [main] best 4748 combination reg byte x [ main::b#10 main::b#11 main::b#1 ] reg byte a [ main::$7 main::$5 ] +Uplifting [] best 4748 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -360,107 +419,110 @@ bend: // main main: { .label SCREEN = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::b#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::b#11 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::b#2==(byte) 0) goto main::@3 -- vbuxx_eq_0_then_la1 - cpx #0 - beq b3_from_b1 + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::b#11 = (byte) main::b#1 [phi:main::@1->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [7] if((byte) main::b#2==(byte) 1) goto main::@4 -- vbuxx_eq_vbuc1_then_la1 - cpx #1 - beq b4_from_b2 - // [9] phi from main::@2 to main::@5 [phi:main::@2->main::@5] - b5_from_b2: - // [9] phi (byte~) main::$5 = (byte) 'c' [phi:main::@2->main::@5#0] -- vbuaa=vbuc1 - lda #'c' - jmp b5 - // [8] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + // [6] phi from main::@2 to main::@4 [phi:main::@2->main::@4] b4_from_b2: + // [6] phi (byte) main::b#10 = (byte) main::b#11 [phi:main::@2->main::@4#0] -- register_copy + // [6] phi (byte~) main::$7 = (byte) 'a' [phi:main::@2->main::@4#1] -- vbuaa=vbuc1 + lda #'a' jmp b4 // main::@4 b4: - // [9] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - b5_from_b4: - // [9] phi (byte~) main::$5 = (byte) 'b' [phi:main::@4->main::@5#0] -- vbuaa=vbuc1 - lda #'b' - jmp b5 - // main::@5 - b5: - // [10] phi from main::@5 to main::@3 [phi:main::@5->main::@3] - b3_from_b5: - // [10] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@5->main::@3#0] -- register_copy - jmp b3 - // [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [10] phi (byte~) main::$7 = (byte) 'a' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'a' - jmp b3 - // main::@3 - b3: - // [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuaa + // [7] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuaa sta SCREEN - // [12] (byte) main::b#1 ← ++ (byte) main::b#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::b#1 ← ++ (byte) main::b#10 -- vbuxx=_inc_vbuxx inx - // [13] if((byte) main::b#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + // [9] if((byte) main::b#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #3 - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [14] return + // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::b#1==(byte) 0) goto main::@2 -- vbuxx_eq_0_then_la1 + cpx #0 + beq b2_from_b1 + jmp b3 + // main::@3 + b3: + // [12] if((byte) main::b#1==(byte) 1) goto main::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b5_from_b3 + // [14] phi from main::@3 to main::@6 [phi:main::@3->main::@6] + b6_from_b3: + // [14] phi (byte~) main::$5 = (byte) 'c' [phi:main::@3->main::@6#0] -- vbuaa=vbuc1 + lda #'c' + jmp b6 + // [13] phi from main::@3 to main::@5 [phi:main::@3->main::@5] + b5_from_b3: + jmp b5 + // main::@5 + b5: + // [14] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + b6_from_b5: + // [14] phi (byte~) main::$5 = (byte) 'b' [phi:main::@5->main::@6#0] -- vbuaa=vbuc1 + lda #'b' + jmp b6 + // main::@6 + b6: + // [6] phi from main::@6 to main::@4 [phi:main::@6->main::@4] + b4_from_b6: + // [6] phi (byte) main::b#10 = (byte) main::b#1 [phi:main::@6->main::@4#0] -- register_copy + // [6] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@6->main::@4#1] -- register_copy + jmp b4 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b4 -Removing instruction jmp b5 -Removing instruction jmp b3 Removing instruction jmp breturn +Removing instruction jmp b3 +Removing instruction jmp b5 +Removing instruction jmp b6 Succesful ASM optimization Pass5NextJumpElimination -Replacing label b4_from_b2 with b4 -Replacing label b1_from_b3 with b1 +Replacing label b2_from_b1 with b2 +Replacing label b5_from_b3 with b5 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b3: +Removing instruction b2_from_b1: Removing instruction b4_from_b2: -Removing instruction b5_from_b4: -Removing instruction b3_from_b5: +Removing instruction b5_from_b3: +Removing instruction b6_from_b5: +Removing instruction b4_from_b6: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b2: -Removing instruction b5_from_b2: +Removing instruction b2_from_main: Removing instruction breturn: +Removing instruction b3: +Removing instruction b6_from_b3: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Skipping double jump to b3 in jmp b5 +Skipping double jump to b4 in jmp b6 Succesful ASM optimization Pass5DoubleJumpElimination -Relabelling long label b3_from_b1 to b2 -Succesful ASM optimization Pass5RelabelLongLabels -Removing instruction jmp b1 +Removing instruction jmp b2 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: -Removing instruction b5: +Removing instruction b6: Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE @@ -468,26 +530,28 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (void()) main() -(byte~) main::$5 reg byte a 11.0 -(byte~) main::$7 reg byte a 22.0 +(byte~) main::$5 reg byte a 101.0 +(byte~) main::$7 reg byte a 202.0 (label) main::@1 (label) main::@2 (label) main::@3 (label) main::@4 (label) main::@5 +(label) main::@6 (label) main::@return (byte*) main::SCREEN (const byte*) main::SCREEN#0 SCREEN = (byte*) 1024 (byte) main::b -(byte) main::b#1 reg byte x 16.5 -(byte) main::b#2 reg byte x 6.285714285714286 +(byte) main::b#1 reg byte x 100.99999999999999 +(byte) main::b#10 reg byte x 106.5 +(byte) main::b#11 reg byte x 112.0 -reg byte x [ main::b#2 main::b#1 ] reg byte a [ main::$7 main::$5 ] +reg byte x [ main::b#10 main::b#11 main::b#1 ] FINAL ASSEMBLER -Score: 341 +Score: 3176 // File Comments // Demonstrates error with nested ternary operator @@ -506,55 +570,58 @@ Score: 341 // main main: { .label SCREEN = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::b#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::b#11 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - // [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@3->main::@1#0] -- register_copy - // main::@1 - b1: - // (b == 0) ? 'a' : ((b == 1) ? 'b' : 'c') - // [6] if((byte) main::b#2==(byte) 0) goto main::@3 -- vbuxx_eq_0_then_la1 - cpx #0 - beq b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi (byte) main::b#11 = (byte) main::b#1 [phi:main::@1->main::@2#0] -- register_copy // main::@2 - // (b == 1) ? 'b' : 'c' - // [7] if((byte) main::b#2==(byte) 1) goto main::@4 -- vbuxx_eq_vbuc1_then_la1 - cpx #1 - beq b4 - // [9] phi from main::@2 to main::@5 [phi:main::@2->main::@5] - // [9] phi (byte~) main::$5 = (byte) 'c' [phi:main::@2->main::@5#0] -- vbuaa=vbuc1 - lda #'c' - jmp b3 - // [8] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + b2: + // [6] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + // [6] phi (byte) main::b#10 = (byte) main::b#11 [phi:main::@2->main::@4#0] -- register_copy + // [6] phi (byte~) main::$7 = (byte) 'a' [phi:main::@2->main::@4#1] -- vbuaa=vbuc1 + lda #'a' // main::@4 b4: - // [9] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - // [9] phi (byte~) main::$5 = (byte) 'b' [phi:main::@4->main::@5#0] -- vbuaa=vbuc1 - lda #'b' - // main::@5 - // [10] phi from main::@5 to main::@3 [phi:main::@5->main::@3] - // [10] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@5->main::@3#0] -- register_copy - jmp b3 - // [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b2: - // [10] phi (byte~) main::$7 = (byte) 'a' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'a' - // main::@3 - b3: // *SCREEN = (b == 0) ? 'a' : ((b == 1) ? 'b' : 'c') - // [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuaa + // [7] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuaa sta SCREEN // for ( byte b: 0..2 ) - // [12] (byte) main::b#1 ← ++ (byte) main::b#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::b#1 ← ++ (byte) main::b#10 -- vbuxx=_inc_vbuxx inx - // [13] if((byte) main::b#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + // [9] if((byte) main::b#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #3 bne b1 // main::@return // } - // [14] return + // [10] return rts + // main::@1 + b1: + // (b == 0) ? 'a' : ((b == 1) ? 'b' : 'c') + // [11] if((byte) main::b#1==(byte) 0) goto main::@2 -- vbuxx_eq_0_then_la1 + cpx #0 + beq b2 + // main::@3 + // (b == 1) ? 'b' : 'c' + // [12] if((byte) main::b#1==(byte) 1) goto main::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b5 + // [14] phi from main::@3 to main::@6 [phi:main::@3->main::@6] + // [14] phi (byte~) main::$5 = (byte) 'c' [phi:main::@3->main::@6#0] -- vbuaa=vbuc1 + lda #'c' + jmp b4 + // [13] phi from main::@3 to main::@5 [phi:main::@3->main::@5] + // main::@5 + b5: + // [14] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + // [14] phi (byte~) main::$5 = (byte) 'b' [phi:main::@5->main::@6#0] -- vbuaa=vbuc1 + lda #'b' + // main::@6 + // [6] phi from main::@6 to main::@4 [phi:main::@6->main::@4] + // [6] phi (byte) main::b#10 = (byte) main::b#1 [phi:main::@6->main::@4#0] -- register_copy + // [6] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@6->main::@4#1] -- register_copy + jmp b4 } // File Data diff --git a/src/test/ref/sandbox-ternary-error.sym b/src/test/ref/sandbox-ternary-error.sym index 0e0be9fe1..ece257cc5 100644 --- a/src/test/ref/sandbox-ternary-error.sym +++ b/src/test/ref/sandbox-ternary-error.sym @@ -2,19 +2,21 @@ (label) @begin (label) @end (void()) main() -(byte~) main::$5 reg byte a 11.0 -(byte~) main::$7 reg byte a 22.0 +(byte~) main::$5 reg byte a 101.0 +(byte~) main::$7 reg byte a 202.0 (label) main::@1 (label) main::@2 (label) main::@3 (label) main::@4 (label) main::@5 +(label) main::@6 (label) main::@return (byte*) main::SCREEN (const byte*) main::SCREEN#0 SCREEN = (byte*) 1024 (byte) main::b -(byte) main::b#1 reg byte x 16.5 -(byte) main::b#2 reg byte x 6.285714285714286 +(byte) main::b#1 reg byte x 100.99999999999999 +(byte) main::b#10 reg byte x 106.5 +(byte) main::b#11 reg byte x 112.0 -reg byte x [ main::b#2 main::b#1 ] reg byte a [ main::$7 main::$5 ] +reg byte x [ main::b#10 main::b#11 main::b#1 ] diff --git a/src/test/ref/sandbox.asm b/src/test/ref/sandbox.asm index 3965e3d8c..4b235563c 100644 --- a/src/test/ref/sandbox.asm +++ b/src/test/ref/sandbox.asm @@ -140,22 +140,24 @@ Print: { done: rts } -// myprintf(byte* zeropage($d) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage($17) w3) +// myprintf(byte* zeropage($f) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage($17) w3) myprintf: { - .label str = $d + .label str = $f .label bDigits = $c .label bLen = $b .label b = $a .label bArg = 7 - .label return = $b .label w1 = 2 .label w2 = 4 .label w3 = $17 + .label w = $d .label bFormat = 6 - .label w = $f .label bTrailing = 8 .label bLeadZero = 9 - lda #0 + ldy #0 + lda (str),y + tax + tya sta bLeadZero sta bDigits sta bTrailing @@ -164,19 +166,37 @@ myprintf: { sta bLen sta bArg sta bFormat - b1: - ldy #0 - lda (str),y - tax - lda bFormat + b2: + cpx #'%' + beq !b28+ + jmp b28 + !b28: + // default format + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] + lda bArg cmp #0 - bne !b2+ - jmp b2 - !b2: - cpx #'0' - bne b3 + bne !b29+ + jmp b29 + !b29: lda #1 + cmp bArg + bne !b30+ + jmp b30 + !b30: + lda w3 + sta w + lda w3+1 + sta w+1 + b31: + inc bArg + lda #0 sta bLeadZero + lda #1 + sta bDigits + lda #0 + sta bTrailing + lda #1 + sta bFormat b27: inc str bne !+ @@ -187,9 +207,21 @@ myprintf: { cmp #0 bne b1 tya - ldy return + ldy bLen sta strTemp,y rts + b1: + ldy #0 + lda (str),y + tax + lda bFormat + cmp #0 + beq b2 + cpx #'0' + bne b3 + lda #1 + sta bLeadZero + jmp b27 b3: cpx #'1' bcc b4 @@ -340,32 +372,6 @@ myprintf: { axs #'0' stx bDigits jmp b27 - b2: - cpx #'%' - bne b28 - // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] - lda bArg - cmp #0 - beq b29 - lda #1 - cmp bArg - beq b30 - lda w3 - sta w - lda w3+1 - sta w+1 - b31: - inc bArg - lda #0 - sta bLeadZero - lda #1 - sta bDigits - lda #0 - sta bTrailing - lda #1 - sta bFormat - jmp b27 b30: lda w2 sta w diff --git a/src/test/ref/sandbox.cfg b/src/test/ref/sandbox.cfg index c09a42633..07296f3ea 100644 --- a/src/test/ref/sandbox.cfg +++ b/src/test/ref/sandbox.cfg @@ -96,350 +96,355 @@ myprintf: scope:[myprintf] from main::@3 main::@7 [54] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) [54] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) [54] (byte*) myprintf::str#5 ← phi( main::@3/(const string) main::str main::@7/(const string) main::str1 ) - to:myprintf::@1 -myprintf::@1: scope:[myprintf] from myprintf myprintf::@27 - [55] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bLeadZero#18 ) - [55] (byte) myprintf::bDigits#14 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bDigits#24 ) - [55] (byte) myprintf::bTrailing#10 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bTrailing#21 ) - [55] (word) myprintf::w#10 ← phi( myprintf/(word) 0 myprintf::@27/(word) myprintf::w#17 ) - [55] (byte) myprintf::bLen#14 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::return#0 ) - [55] (byte) myprintf::bArg#12 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bArg#10 ) - [55] (byte) myprintf::bFormat#10 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bFormat#4 ) - [55] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@27/(byte*) myprintf::str#0 ) - [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) - [57] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 - to:myprintf::@33 -myprintf::@33: scope:[myprintf] from myprintf::@1 - [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 - to:myprintf::@27 -myprintf::@27: scope:[myprintf] from myprintf::@22 myprintf::@23 myprintf::@31 myprintf::@32 myprintf::@33 myprintf::@4 - [59] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@22/(byte) myprintf::bLeadZero#10 myprintf::@23/(byte) myprintf::bLeadZero#10 myprintf::@4/(byte) myprintf::bLeadZero#10 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bLeadZero#10 myprintf::@33/(byte) 1 ) - [59] (byte) myprintf::bDigits#24 ← phi( myprintf::@22/(byte) myprintf::bDigits#25 myprintf::@23/(byte) myprintf::bDigits#1 myprintf::@4/(byte) myprintf::bDigits#14 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bDigits#14 myprintf::@33/(byte) myprintf::bDigits#14 ) - [59] (byte) myprintf::bTrailing#21 ← phi( myprintf::@22/(byte) myprintf::bTrailing#10 myprintf::@23/(byte) myprintf::bTrailing#10 myprintf::@4/(byte) 1 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bTrailing#10 myprintf::@33/(byte) myprintf::bTrailing#10 ) - [59] (word) myprintf::w#17 ← phi( myprintf::@22/(word) myprintf::w#10 myprintf::@23/(word) myprintf::w#10 myprintf::@4/(word) myprintf::w#10 myprintf::@31/(word) myprintf::w#21 myprintf::@32/(word) myprintf::w#10 myprintf::@33/(word) myprintf::w#10 ) - [59] (byte) myprintf::bArg#10 ← phi( myprintf::@22/(byte) myprintf::bArg#12 myprintf::@23/(byte) myprintf::bArg#12 myprintf::@4/(byte) myprintf::bArg#12 myprintf::@31/(byte) myprintf::bArg#1 myprintf::@32/(byte) myprintf::bArg#12 myprintf::@33/(byte) myprintf::bArg#12 ) - [59] (byte) myprintf::return#0 ← phi( myprintf::@22/(byte) myprintf::bLen#28 myprintf::@23/(byte) myprintf::bLen#14 myprintf::@4/(byte) myprintf::bLen#14 myprintf::@31/(byte) myprintf::bLen#14 myprintf::@32/(byte) myprintf::bLen#7 myprintf::@33/(byte) myprintf::bLen#14 ) - [59] (byte) myprintf::bFormat#4 ← phi( myprintf::@22/(byte) 0 myprintf::@23/(byte) myprintf::bFormat#10 myprintf::@4/(byte) myprintf::bFormat#10 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bFormat#10 myprintf::@33/(byte) myprintf::bFormat#10 ) - [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 - [61] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 - to:myprintf::@38 -myprintf::@38: scope:[myprintf] from myprintf::@27 - [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte) 0 - to:myprintf::@return -myprintf::@return: scope:[myprintf] from myprintf::@38 - [63] return - to:@return -myprintf::@3: scope:[myprintf] from myprintf::@33 - [64] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 - to:myprintf::@39 -myprintf::@39: scope:[myprintf] from myprintf::@3 - [65] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 - to:myprintf::@4 -myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@39 - [66] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 - to:myprintf::@27 -myprintf::@5: scope:[myprintf] from myprintf::@4 - [67] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 - to:myprintf::@24 -myprintf::@24: scope:[myprintf] from myprintf::@5 - [68] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 - to:myprintf::@25 -myprintf::@25: scope:[myprintf] from myprintf::@24 - [69] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 - to:myprintf::@40 -myprintf::@40: scope:[myprintf] from myprintf::@25 - [70] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 - to:myprintf::@22 -myprintf::@22: scope:[myprintf] from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@42 myprintf::@6 - [71] (byte) myprintf::bDigits#25 ← phi( myprintf::@11/(byte) myprintf::bDigits#14 myprintf::@20/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 myprintf::@40/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) - [71] (byte) myprintf::bLen#28 ← phi( myprintf::@11/(byte) myprintf::bLen#3 myprintf::@20/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 myprintf::@40/(byte) myprintf::bLen#14 myprintf::@6/(byte) myprintf::bLen#1 ) - to:myprintf::@27 -myprintf::@26: scope:[myprintf] from myprintf::@25 myprintf::@40 - [72] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 - [73] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 - [74] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f - [75] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 - to:myprintf::@9 -myprintf::@8: scope:[myprintf] from myprintf::@26 - [76] phi() - to:myprintf::@9 -myprintf::@9: scope:[myprintf] from myprintf::@26 myprintf::@8 - [77] (byte~) myprintf::$23 ← phi( myprintf::@8/(byte) '0' myprintf::@26/(byte) $57 ) - [78] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 - [79] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 - [80] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 - [81] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 - [82] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f - [83] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 - to:myprintf::@11 -myprintf::@10: scope:[myprintf] from myprintf::@9 - [84] phi() - to:myprintf::@11 -myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 - [85] (byte~) myprintf::$30 ← phi( myprintf::@10/(byte) '0' myprintf::@9/(byte) $57 ) - [86] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 - [87] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 - [88] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 - to:myprintf::@22 -myprintf::@7: scope:[myprintf] from myprintf::@24 - [89] (word) utoa::value#4 ← (word) myprintf::w#10 - [90] call utoa - to:myprintf::@12 -myprintf::@12: scope:[myprintf] from myprintf::@13 myprintf::@7 - [91] (byte) myprintf::b#17 ← phi( myprintf::@13/(byte) myprintf::b#5 myprintf::@7/(byte) 1 ) - [92] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 - to:myprintf::@14 -myprintf::@14: scope:[myprintf] from myprintf::@12 - [93] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 - to:myprintf::@41 -myprintf::@41: scope:[myprintf] from myprintf::@14 - [94] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 - to:myprintf::@15 -myprintf::@15: scope:[myprintf] from myprintf::@14 myprintf::@18 myprintf::@41 - [95] (byte) myprintf::bDigits#16 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) - [95] (byte) myprintf::bLen#23 ← phi( myprintf::@14/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) - to:myprintf::@19 -myprintf::@19: scope:[myprintf] from myprintf::@15 myprintf::@19 - [96] (byte) myprintf::bLen#12 ← phi( myprintf::@15/(byte) myprintf::bLen#23 myprintf::@19/(byte) myprintf::bLen#24 ) - [96] (byte) myprintf::digit#3 ← phi( myprintf::@15/(byte) 0 myprintf::@19/(byte) myprintf::digit#2 ) - [97] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) - [98] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 - [99] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 - [100] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 - to:myprintf::@20 -myprintf::@20: scope:[myprintf] from myprintf::@19 - [101] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 - to:myprintf::@42 -myprintf::@42: scope:[myprintf] from myprintf::@20 - [102] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 - to:myprintf::@21 -myprintf::@21: scope:[myprintf] from myprintf::@21 myprintf::@42 - [103] (byte) myprintf::bDigits#8 ← phi( myprintf::@42/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 ) - [103] (byte) myprintf::bLen#13 ← phi( myprintf::@42/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 ) - [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' - [105] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 - [106] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 - [107] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 - to:myprintf::@22 -myprintf::@16: scope:[myprintf] from myprintf::@18 myprintf::@41 - [108] (byte) myprintf::bDigits#10 ← phi( myprintf::@41/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) - [108] (byte) myprintf::bLen#11 ← phi( myprintf::@41/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) - [109] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 - to:myprintf::@18 -myprintf::@17: scope:[myprintf] from myprintf::@16 - [110] phi() - to:myprintf::@18 -myprintf::@18: scope:[myprintf] from myprintf::@16 myprintf::@17 - [111] (byte~) myprintf::$41 ← phi( myprintf::@17/(byte) ' ' myprintf::@16/(byte) '0' ) - [112] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 - [113] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 - [114] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 - [115] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 - to:myprintf::@15 -myprintf::@13: scope:[myprintf] from myprintf::@12 - [116] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 - to:myprintf::@12 -myprintf::@6: scope:[myprintf] from myprintf::@5 - [117] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 - [118] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 - [119] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 - to:myprintf::@22 -myprintf::@23: scope:[myprintf] from myprintf::@39 - [120] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' - to:myprintf::@27 -myprintf::@2: scope:[myprintf] from myprintf::@1 - [121] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 + to:myprintf::@1_1 +myprintf::@1_1: scope:[myprintf] from myprintf + [55] (byte) myprintf::b#47 ← *((byte*) myprintf::str#5) + to:myprintf::@2 +myprintf::@2: scope:[myprintf] from myprintf::@1 myprintf::@1_1 + [56] (byte) myprintf::b#35 ← phi( myprintf::@1/(byte) myprintf::b#1 myprintf::@1_1/(byte) myprintf::b#47 ) + [56] (byte) myprintf::bLeadZero#47 ← phi( myprintf::@1/(byte) myprintf::bLeadZero#10 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bDigits#47 ← phi( myprintf::@1/(byte) myprintf::bDigits#14 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bTrailing#46 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 myprintf::@1_1/(byte) 0 ) + [56] (word) myprintf::w#45 ← phi( myprintf::@1/(word) myprintf::w#10 myprintf::@1_1/(word) 0 ) + [56] (byte) myprintf::bLen#54 ← phi( myprintf::@1/(byte) myprintf::bLen#14 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bArg#48 ← phi( myprintf::@1/(byte) myprintf::bArg#10 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bFormat#22 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 myprintf::@1_1/(byte) 0 ) + [56] (byte*) myprintf::str#51 ← phi( myprintf::@1/(byte*) myprintf::str#0 myprintf::@1_1/(byte*) myprintf::str#5 ) + [57] if((byte) myprintf::b#35!=(byte) '%') goto myprintf::@28 to:myprintf::@34 myprintf::@34: scope:[myprintf] from myprintf::@2 - [122] if((byte) myprintf::bArg#12==(byte) 0) goto myprintf::@29 + [58] if((byte) myprintf::bArg#48==(byte) 0) goto myprintf::@29 to:myprintf::@35 myprintf::@35: scope:[myprintf] from myprintf::@34 - [123] if((byte) myprintf::bArg#12==(byte) 1) goto myprintf::@30 + [59] if((byte) myprintf::bArg#48==(byte) 1) goto myprintf::@30 to:myprintf::@36 myprintf::@36: scope:[myprintf] from myprintf::@35 - [124] (word~) myprintf::w#51 ← (word) myprintf::w3#7 + [60] (word~) myprintf::w#92 ← (word) myprintf::w3#7 to:myprintf::@31 myprintf::@31: scope:[myprintf] from myprintf::@29 myprintf::@30 myprintf::@36 - [125] (word) myprintf::w#21 ← phi( myprintf::@29/(word~) myprintf::w#49 myprintf::@30/(word~) myprintf::w#50 myprintf::@36/(word~) myprintf::w#51 ) - [126] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 + [61] (word) myprintf::w#21 ← phi( myprintf::@29/(word~) myprintf::w#90 myprintf::@30/(word~) myprintf::w#91 myprintf::@36/(word~) myprintf::w#92 ) + [62] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#48 + to:myprintf::@27 +myprintf::@27: scope:[myprintf] from myprintf::@22 myprintf::@23 myprintf::@31 myprintf::@32 myprintf::@33 myprintf::@4 + [63] (byte*) myprintf::str#47 ← phi( myprintf::@22/(byte*) myprintf::str#0 myprintf::@23/(byte*) myprintf::str#0 myprintf::@4/(byte*) myprintf::str#0 myprintf::@31/(byte*) myprintf::str#51 myprintf::@32/(byte*) myprintf::str#51 myprintf::@33/(byte*) myprintf::str#0 ) + [63] (byte) myprintf::bLeadZero#10 ← phi( myprintf::@22/(byte) myprintf::bLeadZero#10 myprintf::@23/(byte) myprintf::bLeadZero#10 myprintf::@4/(byte) myprintf::bLeadZero#10 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bLeadZero#47 myprintf::@33/(byte) 1 ) + [63] (byte) myprintf::bDigits#14 ← phi( myprintf::@22/(byte) myprintf::bDigits#25 myprintf::@23/(byte) myprintf::bDigits#1 myprintf::@4/(byte) myprintf::bDigits#14 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bDigits#47 myprintf::@33/(byte) myprintf::bDigits#14 ) + [63] (byte) myprintf::bTrailing#10 ← phi( myprintf::@22/(byte) myprintf::bTrailing#10 myprintf::@23/(byte) myprintf::bTrailing#10 myprintf::@4/(byte) 1 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bTrailing#46 myprintf::@33/(byte) myprintf::bTrailing#10 ) + [63] (word) myprintf::w#10 ← phi( myprintf::@22/(word) myprintf::w#10 myprintf::@23/(word) myprintf::w#10 myprintf::@4/(word) myprintf::w#10 myprintf::@31/(word) myprintf::w#21 myprintf::@32/(word) myprintf::w#45 myprintf::@33/(word) myprintf::w#10 ) + [63] (byte) myprintf::bArg#10 ← phi( myprintf::@22/(byte) myprintf::bArg#10 myprintf::@23/(byte) myprintf::bArg#10 myprintf::@4/(byte) myprintf::bArg#10 myprintf::@31/(byte) myprintf::bArg#1 myprintf::@32/(byte) myprintf::bArg#48 myprintf::@33/(byte) myprintf::bArg#10 ) + [63] (byte) myprintf::bLen#14 ← phi( myprintf::@22/(byte) myprintf::bLen#28 myprintf::@23/(byte) myprintf::bLen#14 myprintf::@4/(byte) myprintf::bLen#14 myprintf::@31/(byte) myprintf::bLen#54 myprintf::@32/(byte) myprintf::bLen#7 myprintf::@33/(byte) myprintf::bLen#14 ) + [63] (byte) myprintf::bFormat#10 ← phi( myprintf::@22/(byte) 0 myprintf::@23/(byte) myprintf::bFormat#10 myprintf::@4/(byte) myprintf::bFormat#10 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bFormat#22 myprintf::@33/(byte) myprintf::bFormat#10 ) + [64] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [65] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@38 +myprintf::@38: scope:[myprintf] from myprintf::@27 + [66] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@38 + [67] return + to:@return +myprintf::@1: scope:[myprintf] from myprintf::@27 + [68] (byte) myprintf::b#1 ← *((byte*) myprintf::str#0) + [69] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@33 +myprintf::@33: scope:[myprintf] from myprintf::@1 + [70] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@27 +myprintf::@3: scope:[myprintf] from myprintf::@33 + [71] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 + to:myprintf::@39 +myprintf::@39: scope:[myprintf] from myprintf::@3 + [72] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 + to:myprintf::@4 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@39 + [73] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@27 +myprintf::@5: scope:[myprintf] from myprintf::@4 + [74] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@24 +myprintf::@24: scope:[myprintf] from myprintf::@5 + [75] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@25 +myprintf::@25: scope:[myprintf] from myprintf::@24 + [76] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@25 + [77] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 + to:myprintf::@22 +myprintf::@22: scope:[myprintf] from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@42 myprintf::@6 + [78] (byte) myprintf::bDigits#25 ← phi( myprintf::@11/(byte) myprintf::bDigits#14 myprintf::@20/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 myprintf::@40/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [78] (byte) myprintf::bLen#28 ← phi( myprintf::@11/(byte) myprintf::bLen#3 myprintf::@20/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 myprintf::@40/(byte) myprintf::bLen#14 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@27 +myprintf::@26: scope:[myprintf] from myprintf::@25 myprintf::@40 + [79] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 + [80] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [81] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [82] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 + to:myprintf::@9 +myprintf::@8: scope:[myprintf] from myprintf::@26 + [83] phi() + to:myprintf::@9 +myprintf::@9: scope:[myprintf] from myprintf::@26 myprintf::@8 + [84] (byte~) myprintf::$23 ← phi( myprintf::@8/(byte) '0' myprintf::@26/(byte) $57 ) + [85] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [86] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 + [87] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 + [88] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 + [89] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [90] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@9 + [91] phi() + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [92] (byte~) myprintf::$30 ← phi( myprintf::@10/(byte) '0' myprintf::@9/(byte) $57 ) + [93] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [94] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [95] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@22 +myprintf::@7: scope:[myprintf] from myprintf::@24 + [96] (word) utoa::value#4 ← (word) myprintf::w#10 + [97] call utoa + to:myprintf::@12 +myprintf::@12: scope:[myprintf] from myprintf::@13 myprintf::@7 + [98] (byte) myprintf::b#17 ← phi( myprintf::@13/(byte) myprintf::b#5 myprintf::@7/(byte) 1 ) + [99] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 + [100] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 + to:myprintf::@41 +myprintf::@41: scope:[myprintf] from myprintf::@14 + [101] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@15: scope:[myprintf] from myprintf::@14 myprintf::@18 myprintf::@41 + [102] (byte) myprintf::bDigits#16 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [102] (byte) myprintf::bLen#23 ← phi( myprintf::@14/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + to:myprintf::@19 +myprintf::@19: scope:[myprintf] from myprintf::@15 myprintf::@19 + [103] (byte) myprintf::bLen#12 ← phi( myprintf::@15/(byte) myprintf::bLen#23 myprintf::@19/(byte) myprintf::bLen#24 ) + [103] (byte) myprintf::digit#3 ← phi( myprintf::@15/(byte) 0 myprintf::@19/(byte) myprintf::digit#2 ) + [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [105] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [106] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [107] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 + to:myprintf::@20 +myprintf::@20: scope:[myprintf] from myprintf::@19 + [108] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 + to:myprintf::@42 +myprintf::@42: scope:[myprintf] from myprintf::@20 + [109] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 + to:myprintf::@21 +myprintf::@21: scope:[myprintf] from myprintf::@21 myprintf::@42 + [110] (byte) myprintf::bDigits#8 ← phi( myprintf::@42/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 ) + [110] (byte) myprintf::bLen#13 ← phi( myprintf::@42/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 ) + [111] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' + [112] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [113] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [114] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 + to:myprintf::@22 +myprintf::@16: scope:[myprintf] from myprintf::@18 myprintf::@41 + [115] (byte) myprintf::bDigits#10 ← phi( myprintf::@41/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [115] (byte) myprintf::bLen#11 ← phi( myprintf::@41/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + [116] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 + to:myprintf::@18 +myprintf::@17: scope:[myprintf] from myprintf::@16 + [117] phi() + to:myprintf::@18 +myprintf::@18: scope:[myprintf] from myprintf::@16 myprintf::@17 + [118] (byte~) myprintf::$41 ← phi( myprintf::@17/(byte) ' ' myprintf::@16/(byte) '0' ) + [119] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [120] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [121] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [122] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@13: scope:[myprintf] from myprintf::@12 + [123] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@12 +myprintf::@6: scope:[myprintf] from myprintf::@5 + [124] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 + [125] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 + [126] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@22 +myprintf::@23: scope:[myprintf] from myprintf::@39 + [127] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' to:myprintf::@27 myprintf::@30: scope:[myprintf] from myprintf::@35 - [127] (word~) myprintf::w#50 ← (word) myprintf::w2#7 + [128] (word~) myprintf::w#91 ← (word) myprintf::w2#7 to:myprintf::@31 myprintf::@29: scope:[myprintf] from myprintf::@34 - [128] (word~) myprintf::w#49 ← (word) myprintf::w1#6 + [129] (word~) myprintf::w#90 ← (word) myprintf::w1#6 to:myprintf::@31 myprintf::@28: scope:[myprintf] from myprintf::@2 - [129] if((byte) myprintf::b#1<(byte) $41) goto myprintf::@32 + [130] if((byte) myprintf::b#35<(byte) $41) goto myprintf::@32 to:myprintf::@43 myprintf::@43: scope:[myprintf] from myprintf::@28 - [130] if((byte) myprintf::b#1>=(byte) $5a+(byte) 1) goto myprintf::@32 + [131] if((byte) myprintf::b#35>=(byte) $5a+(byte) 1) goto myprintf::@32 to:myprintf::@37 myprintf::@37: scope:[myprintf] from myprintf::@43 - [131] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + [132] (byte) myprintf::b#6 ← (byte) myprintf::b#35 + (byte) $20 to:myprintf::@32 myprintf::@32: scope:[myprintf] from myprintf::@28 myprintf::@37 myprintf::@43 - [132] (byte) myprintf::b#25 ← phi( myprintf::@28/(byte) myprintf::b#1 myprintf::@37/(byte) myprintf::b#6 ) - [133] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 - [134] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + [133] (byte) myprintf::b#25 ← phi( myprintf::@28/(byte) myprintf::b#35 myprintf::@37/(byte) myprintf::b#6 ) + [134] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#54) ← (byte) myprintf::b#25 + [135] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#54 to:myprintf::@27 utoa: scope:[utoa] from myprintf::@7 - [135] phi() + [136] phi() to:utoa::@13 utoa::@13: scope:[utoa] from utoa - [136] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 + [137] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 to:utoa::@1 utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 - [137] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte[6]) myprintf::buf6#0 utoa::@9/++(const byte[6]) myprintf::buf6#0 ) - [137] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) - [137] (byte) utoa::bStarted#5 ← phi( utoa::@13/(byte) 0 utoa::@9/(byte) 1 ) - [138] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 + [138] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte[6]) myprintf::buf6#0 utoa::@9/++(const byte[6]) myprintf::buf6#0 ) + [138] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [138] (byte) utoa::bStarted#5 ← phi( utoa::@13/(byte) 0 utoa::@9/(byte) 1 ) + [139] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 to:utoa::@14 utoa::@14: scope:[utoa] from utoa::@1 - [139] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 + [140] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 to:utoa::@2 utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 - [140] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) - [140] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) - [140] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(byte) 1 ) - [141] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 + [141] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [141] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [141] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(byte) 1 ) + [142] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 to:utoa::@15 utoa::@15: scope:[utoa] from utoa::@2 - [142] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 + [143] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 to:utoa::@3 utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 - [143] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) - [143] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) - [143] (byte) utoa::bStarted#7 ← phi( utoa::@11/(byte) 1 utoa::@15/(byte) utoa::bStarted#6 ) - [144] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 + [144] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [144] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [144] (byte) utoa::bStarted#7 ← phi( utoa::@11/(byte) 1 utoa::@15/(byte) utoa::bStarted#6 ) + [145] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 to:utoa::@16 utoa::@16: scope:[utoa] from utoa::@3 - [145] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 + [146] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 to:utoa::@4 utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 - [146] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) - [146] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) - [147] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 - [148] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 - [149] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 - [150] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 - [151] *((byte*) utoa::dst#3) ← (byte) 0 + [147] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [147] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [148] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [149] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [150] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [151] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [152] *((byte*) utoa::dst#3) ← (byte) 0 to:utoa::@return utoa::@return: scope:[utoa] from utoa::@4 - [152] return + [153] return to:@return utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 - [153] (byte*) append::dst#3 ← (byte*) utoa::dst#13 - [154] (word) append::value#4 ← (word) utoa::value#10 - [155] call append - [156] (word) append::return#10 ← (word) append::value#5 + [154] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [155] (word) append::value#4 ← (word) utoa::value#10 + [156] call append + [157] (word) append::return#10 ← (word) append::value#5 to:utoa::@12 utoa::@12: scope:[utoa] from utoa::@8 - [157] (word) utoa::value#3 ← (word) append::return#10 - [158] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + [158] (word) utoa::value#3 ← (word) append::return#10 + [159] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 to:utoa::@4 utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 - [159] (byte*) append::dst#2 ← (byte*) utoa::dst#10 - [160] (word) append::value#3 ← (word) utoa::value#11 - [161] call append - [162] (word) append::return#4 ← (word) append::value#5 + [160] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [161] (word) append::value#3 ← (word) utoa::value#11 + [162] call append + [163] (word) append::return#4 ← (word) append::value#5 to:utoa::@11 utoa::@11: scope:[utoa] from utoa::@7 - [163] (word) utoa::value#2 ← (word) append::return#4 - [164] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + [164] (word) utoa::value#2 ← (word) append::return#4 + [165] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 to:utoa::@3 utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 - [165] (byte*) append::dst#1 ← (byte*) utoa::dst#16 - [166] (word) append::value#2 ← (word) utoa::value#6 - [167] call append - [168] (word) append::return#3 ← (word) append::value#5 + [166] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [167] (word) append::value#2 ← (word) utoa::value#6 + [168] call append + [169] (word) append::return#3 ← (word) append::value#5 to:utoa::@10 utoa::@10: scope:[utoa] from utoa::@6 - [169] (word) utoa::value#1 ← (word) append::return#3 - [170] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + [170] (word) utoa::value#1 ← (word) append::return#3 + [171] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 to:utoa::@2 utoa::@5: scope:[utoa] from utoa::@13 - [171] (word) append::value#1 ← (word) utoa::value#4 - [172] call append - [173] (word) append::return#2 ← (word) append::value#5 + [172] (word) append::value#1 ← (word) utoa::value#4 + [173] call append + [174] (word) append::return#2 ← (word) append::value#5 to:utoa::@9 utoa::@9: scope:[utoa] from utoa::@5 - [174] (word) utoa::value#0 ← (word) append::return#2 + [175] (word) utoa::value#0 ← (word) append::return#2 to:utoa::@1 append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 - [175] (word) append::sub#6 ← phi( utoa::@5/(word) $2710 utoa::@6/(word) $3e8 utoa::@7/(byte) $64 utoa::@8/(byte) $a ) - [175] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) - [175] (byte*) append::dst#4 ← phi( utoa::@5/(const byte[6]) myprintf::buf6#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) - [176] *((byte*) append::dst#4) ← (byte) '0' + [176] (word) append::sub#6 ← phi( utoa::@5/(word) $2710 utoa::@6/(word) $3e8 utoa::@7/(byte) $64 utoa::@8/(byte) $a ) + [176] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [176] (byte*) append::dst#4 ← phi( utoa::@5/(const byte[6]) myprintf::buf6#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [177] *((byte*) append::dst#4) ← (byte) '0' to:append::@1 append::@1: scope:[append] from append append::@2 - [177] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) - [178] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + [178] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [179] if((word) append::value#5>=(word) append::sub#6) goto append::@2 to:append::@return append::@return: scope:[append] from append::@1 - [179] return + [180] return to:@return append::@2: scope:[append] from append::@1 - [180] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) - [181] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + [181] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [182] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 to:append::@1 div10: scope:[div10] from main::@6 - [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 - [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 - [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 - [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 - [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 - [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 - [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 - [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 - [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + [183] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [184] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [185] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [186] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [187] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [188] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [189] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [190] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [191] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 to:div10::@return div10::@return: scope:[div10] from div10 - [191] return + [192] return to:@return div16u: scope:[div16u] from main::@2 - [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 - [193] call divr16u - [194] (word) divr16u::return#2 ← (word) divr16u::return#0 + [193] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [194] call divr16u + [195] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div16u::@1 div16u::@1: scope:[div16u] from div16u - [195] (word) div16u::return#0 ← (word) divr16u::return#2 + [196] (word) div16u::return#0 ← (word) divr16u::return#2 to:div16u::@return div16u::@return: scope:[div16u] from div16u::@1 - [196] return + [197] return to:@return divr16u: scope:[divr16u] from div16u - [197] phi() + [198] phi() to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [198] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [198] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [198] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) - [198] (word) divr16u::rem#4 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::rem#9 ) - [199] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 - [200] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 - [201] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [202] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [199] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [199] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [199] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [199] (word) divr16u::rem#4 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::rem#9 ) + [200] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [201] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [202] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [203] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [203] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [204] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [204] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [205] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 - [206] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [207] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 + [205] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [206] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [207] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [208] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [208] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [209] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 + [209] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [210] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [210] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [210] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) - [211] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [212] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [211] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [211] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [212] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [213] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@3 - [213] return + [214] return to:@return diff --git a/src/test/ref/sandbox.log b/src/test/ref/sandbox.log index 80cf1c231..045a50484 100644 --- a/src/test/ref/sandbox.log +++ b/src/test/ref/sandbox.log @@ -2972,53 +2972,5835 @@ Eliminating unused constant (const signed word) main::return#2 Successful SSA optimization PassNEliminateUnusedVars Eliminating unused constant (const signed word) main::return#0 Successful SSA optimization PassNEliminateUnusedVars +GRAPH (NEW VERSIONS for myprintf::str#10) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#10 myprintf::@41/(byte) myprintf::bLeadZero#10 myprintf::@43/(byte) myprintf::bLeadZero#10 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#10 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#14 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#14 myprintf::@62/(byte) myprintf::bDigits#14 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#10 myprintf::@41/(byte) myprintf::bTrailing#10 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#10 myprintf::@62/(byte) myprintf::bTrailing#10 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#10 myprintf::@41/(word) myprintf::w#10 myprintf::@43/(word) myprintf::w#10 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#10 myprintf::@62/(word) myprintf::w#10 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#12 myprintf::@41/(byte) myprintf::bArg#12 myprintf::@43/(byte) myprintf::bArg#12 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#12 myprintf::@62/(byte) myprintf::bArg#12 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#14 myprintf::@43/(byte) myprintf::bLen#14 myprintf::@57/(byte) myprintf::bLen#14 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#14 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#10 myprintf::@43/(byte) myprintf::bFormat#10 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#10 myprintf::@62/(byte) myprintf::bFormat#10 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + [92] (word) utoa::value#4 ← (word) myprintf::w#10 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#10 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#14 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#10 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#14 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + [143] if((byte) myprintf::bArg#12==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + [144] if((byte) myprintf::bArg#12==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::bFormat#10) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bFormat#23 ← phi( ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#10 myprintf::@41/(byte) myprintf::bLeadZero#10 myprintf::@43/(byte) myprintf::bLeadZero#10 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#10 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#14 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#14 myprintf::@62/(byte) myprintf::bDigits#14 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#10 myprintf::@41/(byte) myprintf::bTrailing#10 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#10 myprintf::@62/(byte) myprintf::bTrailing#10 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#10 myprintf::@41/(word) myprintf::w#10 myprintf::@43/(word) myprintf::w#10 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#10 myprintf::@62/(word) myprintf::w#10 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#12 myprintf::@41/(byte) myprintf::bArg#12 myprintf::@43/(byte) myprintf::bArg#12 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#12 myprintf::@62/(byte) myprintf::bArg#12 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#14 myprintf::@43/(byte) myprintf::bLen#14 myprintf::@57/(byte) myprintf::bLen#14 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#14 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (byte) myprintf::bFormat#20 ← phi( ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bFormat#21 ← phi( ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#10 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#10 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#14 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#10 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#14 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#12==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#12==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::bFormat#22 ← phi( ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::bArg#12) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bFormat#31 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bFormat#29 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bFormat#30 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bArg#49 ← phi( ) + (byte) myprintf::bFormat#23 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#10 myprintf::@41/(byte) myprintf::bLeadZero#10 myprintf::@43/(byte) myprintf::bLeadZero#10 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#10 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#14 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#14 myprintf::@62/(byte) myprintf::bDigits#14 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#10 myprintf::@41/(byte) myprintf::bTrailing#10 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#10 myprintf::@62/(byte) myprintf::bTrailing#10 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#10 myprintf::@41/(word) myprintf::w#10 myprintf::@43/(word) myprintf::w#10 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#10 myprintf::@62/(word) myprintf::w#10 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#45 myprintf::@41/(byte) myprintf::bArg#46 myprintf::@43/(byte) myprintf::bArg#47 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#48 myprintf::@62/(byte) myprintf::bArg#49 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#14 myprintf::@43/(byte) myprintf::bLen#14 myprintf::@57/(byte) myprintf::bLen#14 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#14 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (byte) myprintf::bFormat#25 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (byte) myprintf::bArg#46 ← phi( ) + (byte) myprintf::bFormat#20 ← phi( myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bArg#47 ← phi( ) + (byte) myprintf::bFormat#21 ← phi( myprintf::@4/(byte) myprintf::bFormat#25 ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#10 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#10 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#14 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#10 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte) myprintf::bArg#45 ← phi( ) + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#14 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bFormat#26 ← phi( myprintf::@2/(byte) myprintf::bFormat#31 ) + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bArg#50 ← phi( ) + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#50==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bArg#51 ← phi( ) + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#51==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte) myprintf::bArg#52 ← phi( ) + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#52 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::bArg#48 ← phi( ) + [147] (byte) myprintf::bFormat#22 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 myprintf::@68/(byte) myprintf::bFormat#27 myprintf::@76/(byte) myprintf::bFormat#28 ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (byte) myprintf::bFormat#27 ← phi( myprintf::@76/(byte) myprintf::bFormat#28 ) + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (byte) myprintf::bFormat#24 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 ) + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (byte) myprintf::bFormat#28 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 ) + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::bLen#14) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bArg#65 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#31 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bArg#64 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#29 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bArg#74 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#30 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bLen#55 ← phi( ) + (byte) myprintf::bArg#49 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#23 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#10 myprintf::@41/(byte) myprintf::bLeadZero#10 myprintf::@43/(byte) myprintf::bLeadZero#10 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#10 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#14 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#14 myprintf::@62/(byte) myprintf::bDigits#14 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#10 myprintf::@41/(byte) myprintf::bTrailing#10 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#10 myprintf::@62/(byte) myprintf::bTrailing#10 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#10 myprintf::@41/(word) myprintf::w#10 myprintf::@43/(word) myprintf::w#10 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#10 myprintf::@62/(word) myprintf::w#10 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#45 myprintf::@41/(byte) myprintf::bArg#46 myprintf::@43/(byte) myprintf::bArg#47 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#48 myprintf::@62/(byte) myprintf::bArg#49 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#52 myprintf::@43/(byte) myprintf::bLen#53 myprintf::@57/(byte) myprintf::bLen#54 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#55 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (byte) myprintf::bArg#60 ← phi( myprintf::@3/(byte) myprintf::bArg#74 myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#25 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (byte) myprintf::bLen#52 ← phi( ) + (byte) myprintf::bArg#46 ← phi( myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#20 ← phi( myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bArg#72 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bLen#53 ← phi( ) + (byte) myprintf::bArg#47 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte) myprintf::bFormat#21 ← phi( myprintf::@4/(byte) myprintf::bFormat#25 ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bLen#56 ← phi( ) + (byte) myprintf::bArg#56 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#56) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#56 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bArg#77 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bArg#90 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#10 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (byte) myprintf::bArg#88 ← phi( myprintf::@7/(byte) myprintf::bArg#90 ) + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bArg#73 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (byte) myprintf::bArg#83 ← phi( myprintf::@46/(byte) myprintf::bArg#73 myprintf::@73/(byte) myprintf::bArg#57 ) + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bArg#79 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bArg#78 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (byte) myprintf::bLen#57 ← phi( ) + [101] (byte) myprintf::bArg#75 ← phi( myprintf::@10/(byte) myprintf::bArg#78 myprintf::@9/(byte) myprintf::bArg#79 ) + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#57) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#57 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bArg#69 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bArg#70 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte) myprintf::bArg#53 ← phi( myprintf::@12/(byte) myprintf::bArg#69 myprintf::@13/(byte) myprintf::bArg#70 ) + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte) myprintf::bArg#84 ← phi( myprintf::@20/(byte) myprintf::bArg#87 myprintf::@71/(byte) myprintf::bArg#88 ) + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bArg#87 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bLen#58 ← phi( ) + (byte) myprintf::bArg#80 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#10 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#14 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte) myprintf::bArg#76 ← phi( myprintf::@21/(byte) myprintf::bArg#80 myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#58 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte) myprintf::bArg#89 ← phi( myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#59 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bArg#85 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bArg#86 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte) myprintf::bArg#81 ← phi( myprintf::@28/(byte) myprintf::bArg#85 myprintf::@29/(byte) myprintf::bArg#86 ) + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte) myprintf::bArg#71 ← phi( myprintf::@26/(byte) myprintf::bArg#76 myprintf::@34/(byte) myprintf::bArg#71 ) + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte) myprintf::bArg#54 ← phi( myprintf::@34/(byte) myprintf::bArg#71 ) + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#10 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte) myprintf::bArg#55 ← phi( myprintf::@38/(byte) myprintf::bArg#55 myprintf::@75/(byte) myprintf::bArg#58 ) + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte) myprintf::bArg#45 ← phi( myprintf::@14/(byte) myprintf::bArg#53 myprintf::@35/(byte) myprintf::bArg#54 myprintf::@38/(byte) myprintf::bArg#55 myprintf::@6/(byte) myprintf::bArg#56 myprintf::@73/(byte) myprintf::bArg#57 myprintf::@75/(byte) myprintf::bArg#58 ) + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#60 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bArg#61 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte) myprintf::bFormat#26 ← phi( myprintf::@2/(byte) myprintf::bFormat#31 ) + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bArg#50 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#50==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bArg#66 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bArg#51 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#51==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bArg#67 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bArg#68 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte) myprintf::bLen#54 ← phi( ) + [145] (byte) myprintf::bArg#52 ← phi( myprintf::@54/(byte) myprintf::bArg#66 myprintf::@55/(byte) myprintf::bArg#67 myprintf::@66/(byte) myprintf::bArg#68 ) + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#52 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::bLen#61 ← phi( ) + [147] (byte) myprintf::bArg#48 ← phi( myprintf::@53/(byte) myprintf::bArg#61 myprintf::@68/(byte) myprintf::bArg#62 myprintf::@76/(byte) myprintf::bArg#63 ) + [147] (byte) myprintf::bFormat#22 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 myprintf::@68/(byte) myprintf::bFormat#27 myprintf::@76/(byte) myprintf::bFormat#28 ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#61) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#61 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (byte) myprintf::bArg#62 ← phi( myprintf::@76/(byte) myprintf::bArg#63 ) + (byte) myprintf::bFormat#27 ← phi( myprintf::@76/(byte) myprintf::bFormat#28 ) + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (byte) myprintf::bArg#59 ← phi( myprintf::@3/(byte) myprintf::bArg#74 ) + (byte) myprintf::bFormat#24 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 ) + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (byte) myprintf::bLen#60 ← phi( ) + (byte) myprintf::bArg#57 ← phi( myprintf::@46/(byte) myprintf::bArg#73 ) + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (byte) myprintf::bLen#59 ← phi( ) + (byte) myprintf::bArg#82 ← phi( myprintf::@21/(byte) myprintf::bArg#80 ) + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (byte) myprintf::bArg#58 ← phi( myprintf::@35/(byte) myprintf::bArg#54 ) + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (byte) myprintf::bArg#63 ← phi( myprintf::@53/(byte) myprintf::bArg#61 ) + (byte) myprintf::bFormat#28 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 ) + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::w#10) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bLen#83 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#65 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#31 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bLen#67 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#64 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#29 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bLen#76 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#74 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#30 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (word) myprintf::w#46 ← phi( ) + (byte) myprintf::bLen#55 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#49 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#23 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#10 myprintf::@41/(byte) myprintf::bLeadZero#10 myprintf::@43/(byte) myprintf::bLeadZero#10 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#10 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#14 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#14 myprintf::@62/(byte) myprintf::bDigits#14 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#10 myprintf::@41/(byte) myprintf::bTrailing#10 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#10 myprintf::@62/(byte) myprintf::bTrailing#10 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#42 myprintf::@41/(word) myprintf::w#43 myprintf::@43/(word) myprintf::w#44 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#45 myprintf::@62/(word) myprintf::w#46 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#45 myprintf::@41/(byte) myprintf::bArg#46 myprintf::@43/(byte) myprintf::bArg#47 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#48 myprintf::@62/(byte) myprintf::bArg#49 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#52 myprintf::@43/(byte) myprintf::bLen#53 myprintf::@57/(byte) myprintf::bLen#54 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#55 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (byte) myprintf::bLen#63 ← phi( myprintf::@3/(byte) myprintf::bLen#76 myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#60 ← phi( myprintf::@3/(byte) myprintf::bArg#74 myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#25 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (word) myprintf::w#43 ← phi( ) + (byte) myprintf::bLen#52 ← phi( myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#46 ← phi( myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#20 ← phi( myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bLen#68 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#72 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (word) myprintf::w#44 ← phi( ) + (byte) myprintf::bLen#53 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#47 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte) myprintf::bFormat#21 ← phi( myprintf::@4/(byte) myprintf::bFormat#25 ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (word) myprintf::w#47 ← phi( ) + (byte) myprintf::bLen#56 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#56 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#47 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#56) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#56 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bLen#82 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#77 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (word) myprintf::w#48 ← phi( ) + (byte) myprintf::bLen#84 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#90 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#48 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (byte) myprintf::bLen#81 ← phi( myprintf::@7/(byte) myprintf::bLen#84 ) + (byte) myprintf::bArg#88 ← phi( myprintf::@7/(byte) myprintf::bArg#90 ) + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bLen#72 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#73 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (word) myprintf::w#49 ← phi( ) + (byte) myprintf::bLen#79 ← phi( myprintf::@46/(byte) myprintf::bLen#72 myprintf::@73/(byte) myprintf::bLen#60 ) + (byte) myprintf::bArg#83 ← phi( myprintf::@46/(byte) myprintf::bArg#73 myprintf::@73/(byte) myprintf::bArg#57 ) + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#49 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bLen#70 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#79 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bLen#69 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#78 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (word) myprintf::w#50 ← phi( ) + [101] (byte) myprintf::bLen#57 ← phi( myprintf::@10/(byte) myprintf::bLen#69 myprintf::@9/(byte) myprintf::bLen#70 ) + [101] (byte) myprintf::bArg#75 ← phi( myprintf::@10/(byte) myprintf::bArg#78 myprintf::@9/(byte) myprintf::bArg#79 ) + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#57) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#57 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#50 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bArg#69 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bArg#70 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte) myprintf::bArg#53 ← phi( myprintf::@12/(byte) myprintf::bArg#69 myprintf::@13/(byte) myprintf::bArg#70 ) + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte) myprintf::bLen#71 ← phi( myprintf::@20/(byte) myprintf::bLen#80 myprintf::@71/(byte) myprintf::bLen#81 ) + [112] (byte) myprintf::bArg#84 ← phi( myprintf::@20/(byte) myprintf::bArg#87 myprintf::@71/(byte) myprintf::bArg#88 ) + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bLen#80 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#87 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bLen#58 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#80 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#10 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#14 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte) myprintf::bArg#76 ← phi( myprintf::@21/(byte) myprintf::bArg#80 myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#58 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte) myprintf::bArg#89 ← phi( myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#59 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bArg#85 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bArg#86 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte) myprintf::bArg#81 ← phi( myprintf::@28/(byte) myprintf::bArg#85 myprintf::@29/(byte) myprintf::bArg#86 ) + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte) myprintf::bArg#71 ← phi( myprintf::@26/(byte) myprintf::bArg#76 myprintf::@34/(byte) myprintf::bArg#71 ) + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte) myprintf::bArg#54 ← phi( myprintf::@34/(byte) myprintf::bArg#71 ) + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#10 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte) myprintf::bArg#55 ← phi( myprintf::@38/(byte) myprintf::bArg#55 myprintf::@75/(byte) myprintf::bArg#58 ) + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (word) myprintf::w#42 ← phi( ) + [139] (byte) myprintf::bArg#45 ← phi( myprintf::@14/(byte) myprintf::bArg#53 myprintf::@35/(byte) myprintf::bArg#54 myprintf::@38/(byte) myprintf::bArg#55 myprintf::@6/(byte) myprintf::bArg#56 myprintf::@73/(byte) myprintf::bArg#57 myprintf::@75/(byte) myprintf::bArg#58 ) + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#60 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLen#73 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#61 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte) myprintf::bFormat#26 ← phi( myprintf::@2/(byte) myprintf::bFormat#31 ) + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLen#77 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#50 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#50==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#64 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#66 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#78 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#51 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#51==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#65 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#67 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#66 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#68 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte) myprintf::bLen#54 ← phi( myprintf::@54/(byte) myprintf::bLen#64 myprintf::@55/(byte) myprintf::bLen#65 myprintf::@66/(byte) myprintf::bLen#66 ) + [145] (byte) myprintf::bArg#52 ← phi( myprintf::@54/(byte) myprintf::bArg#66 myprintf::@55/(byte) myprintf::bArg#67 myprintf::@66/(byte) myprintf::bArg#68 ) + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#52 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (word) myprintf::w#45 ← phi( ) + [147] (byte) myprintf::bLen#61 ← phi( myprintf::@53/(byte) myprintf::bLen#73 myprintf::@68/(byte) myprintf::bLen#74 myprintf::@76/(byte) myprintf::bLen#75 ) + [147] (byte) myprintf::bArg#48 ← phi( myprintf::@53/(byte) myprintf::bArg#61 myprintf::@68/(byte) myprintf::bArg#62 myprintf::@76/(byte) myprintf::bArg#63 ) + [147] (byte) myprintf::bFormat#22 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 myprintf::@68/(byte) myprintf::bFormat#27 myprintf::@76/(byte) myprintf::bFormat#28 ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#61) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#61 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (byte) myprintf::bLen#74 ← phi( myprintf::@76/(byte) myprintf::bLen#75 ) + (byte) myprintf::bArg#62 ← phi( myprintf::@76/(byte) myprintf::bArg#63 ) + (byte) myprintf::bFormat#27 ← phi( myprintf::@76/(byte) myprintf::bFormat#28 ) + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (byte) myprintf::bLen#62 ← phi( myprintf::@3/(byte) myprintf::bLen#76 ) + (byte) myprintf::bArg#59 ← phi( myprintf::@3/(byte) myprintf::bArg#74 ) + (byte) myprintf::bFormat#24 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 ) + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (byte) myprintf::bLen#60 ← phi( myprintf::@46/(byte) myprintf::bLen#72 ) + (byte) myprintf::bArg#57 ← phi( myprintf::@46/(byte) myprintf::bArg#73 ) + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (byte) myprintf::bLen#59 ← phi( myprintf::@21/(byte) myprintf::bLen#58 ) + (byte) myprintf::bArg#82 ← phi( myprintf::@21/(byte) myprintf::bArg#80 ) + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (byte) myprintf::bArg#58 ← phi( myprintf::@35/(byte) myprintf::bArg#54 ) + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (byte) myprintf::bLen#75 ← phi( myprintf::@53/(byte) myprintf::bLen#73 ) + (byte) myprintf::bArg#63 ← phi( myprintf::@53/(byte) myprintf::bArg#61 ) + (byte) myprintf::bFormat#28 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 ) + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::bTrailing#10) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (word) myprintf::w#71 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#83 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#65 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#31 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (word) myprintf::w#61 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#67 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#64 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#29 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (word) myprintf::w#70 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#76 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#74 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#30 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bTrailing#47 ← phi( ) + (word) myprintf::w#46 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#55 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#49 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#23 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#10 myprintf::@41/(byte) myprintf::bLeadZero#10 myprintf::@43/(byte) myprintf::bLeadZero#10 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#10 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#14 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#14 myprintf::@62/(byte) myprintf::bDigits#14 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#44 myprintf::@41/(byte) myprintf::bTrailing#45 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#46 myprintf::@62/(byte) myprintf::bTrailing#47 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#42 myprintf::@41/(word) myprintf::w#43 myprintf::@43/(word) myprintf::w#44 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#45 myprintf::@62/(word) myprintf::w#46 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#45 myprintf::@41/(byte) myprintf::bArg#46 myprintf::@43/(byte) myprintf::bArg#47 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#48 myprintf::@62/(byte) myprintf::bArg#49 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#52 myprintf::@43/(byte) myprintf::bLen#53 myprintf::@57/(byte) myprintf::bLen#54 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#55 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (word) myprintf::w#57 ← phi( myprintf::@3/(word) myprintf::w#70 myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#63 ← phi( myprintf::@3/(byte) myprintf::bLen#76 myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#60 ← phi( myprintf::@3/(byte) myprintf::bArg#74 myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#25 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (byte) myprintf::bTrailing#45 ← phi( ) + (word) myprintf::w#43 ← phi( myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#52 ← phi( myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#46 ← phi( myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#20 ← phi( myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (word) myprintf::w#62 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#68 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#72 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (word) myprintf::w#44 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#53 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#47 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte) myprintf::bFormat#21 ← phi( myprintf::@4/(byte) myprintf::bFormat#25 ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (word) myprintf::w#47 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#56 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#56 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#47 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#56) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#56 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (word) myprintf::w#63 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#82 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#77 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (word) myprintf::w#48 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#84 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#90 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#48 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (word) myprintf::w#80 ← phi( myprintf::@7/(word) myprintf::w#48 ) + (byte) myprintf::bLen#81 ← phi( myprintf::@7/(byte) myprintf::bLen#84 ) + (byte) myprintf::bArg#88 ← phi( myprintf::@7/(byte) myprintf::bArg#90 ) + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (word) myprintf::w#64 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#72 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#73 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (word) myprintf::w#49 ← phi( myprintf::@46/(word) myprintf::w#64 myprintf::@73/(word) myprintf::w#54 ) + (byte) myprintf::bLen#79 ← phi( myprintf::@46/(byte) myprintf::bLen#72 myprintf::@73/(byte) myprintf::bLen#60 ) + (byte) myprintf::bArg#83 ← phi( myprintf::@46/(byte) myprintf::bArg#73 myprintf::@73/(byte) myprintf::bArg#57 ) + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#49 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (word) myprintf::w#66 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#70 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#79 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (word) myprintf::w#65 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#69 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#78 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (word) myprintf::w#50 ← phi( myprintf::@10/(word) myprintf::w#65 myprintf::@9/(word) myprintf::w#66 ) + [101] (byte) myprintf::bLen#57 ← phi( myprintf::@10/(byte) myprintf::bLen#69 myprintf::@9/(byte) myprintf::bLen#70 ) + [101] (byte) myprintf::bArg#75 ← phi( myprintf::@10/(byte) myprintf::bArg#78 myprintf::@9/(byte) myprintf::bArg#79 ) + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#57) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#57 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#50 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (word) myprintf::w#67 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#69 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (word) myprintf::w#68 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#70 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (word) myprintf::w#51 ← phi( myprintf::@12/(word) myprintf::w#67 myprintf::@13/(word) myprintf::w#68 ) + [108] (byte) myprintf::bArg#53 ← phi( myprintf::@12/(byte) myprintf::bArg#69 myprintf::@13/(byte) myprintf::bArg#70 ) + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (word) myprintf::w#76 ← phi( myprintf::@20/(word) myprintf::w#79 myprintf::@71/(word) myprintf::w#80 ) + [112] (byte) myprintf::bLen#71 ← phi( myprintf::@20/(byte) myprintf::bLen#80 myprintf::@71/(byte) myprintf::bLen#81 ) + [112] (byte) myprintf::bArg#84 ← phi( myprintf::@20/(byte) myprintf::bArg#87 myprintf::@71/(byte) myprintf::bArg#88 ) + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (word) myprintf::w#79 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#80 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#87 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bTrailing#48 ← phi( ) + (word) myprintf::w#73 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#58 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#80 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#48 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#14 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (word) myprintf::w#72 ← phi( myprintf::@21/(word) myprintf::w#73 myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [118] (byte) myprintf::bArg#76 ← phi( myprintf::@21/(byte) myprintf::bArg#80 myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#58 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (word) myprintf::w#81 ← phi( myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [119] (byte) myprintf::bArg#89 ← phi( myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#14 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#59 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (word) myprintf::w#77 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#85 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (word) myprintf::w#78 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#86 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (word) myprintf::w#74 ← phi( myprintf::@28/(word) myprintf::w#77 myprintf::@29/(word) myprintf::w#78 ) + [121] (byte) myprintf::bArg#81 ← phi( myprintf::@28/(byte) myprintf::bArg#85 myprintf::@29/(byte) myprintf::bArg#86 ) + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (word) myprintf::w#69 ← phi( myprintf::@26/(word) myprintf::w#72 myprintf::@34/(word) myprintf::w#69 ) + [126] (byte) myprintf::bArg#71 ← phi( myprintf::@26/(byte) myprintf::bArg#76 myprintf::@34/(byte) myprintf::bArg#71 ) + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte) myprintf::bTrailing#49 ← phi( ) + (word) myprintf::w#52 ← phi( myprintf::@34/(word) myprintf::w#69 ) + (byte) myprintf::bArg#54 ← phi( myprintf::@34/(byte) myprintf::bArg#71 ) + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#49 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (word) myprintf::w#53 ← phi( myprintf::@38/(word) myprintf::w#53 myprintf::@75/(word) myprintf::w#55 ) + [134] (byte) myprintf::bArg#55 ← phi( myprintf::@38/(byte) myprintf::bArg#55 myprintf::@75/(byte) myprintf::bArg#58 ) + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte) myprintf::bTrailing#44 ← phi( ) + [139] (word) myprintf::w#42 ← phi( myprintf::@14/(word) myprintf::w#51 myprintf::@35/(word) myprintf::w#52 myprintf::@38/(word) myprintf::w#53 myprintf::@6/(word) myprintf::w#47 myprintf::@73/(word) myprintf::w#54 myprintf::@75/(word) myprintf::w#55 ) + [139] (byte) myprintf::bArg#45 ← phi( myprintf::@14/(byte) myprintf::bArg#53 myprintf::@35/(byte) myprintf::bArg#54 myprintf::@38/(byte) myprintf::bArg#55 myprintf::@6/(byte) myprintf::bArg#56 myprintf::@73/(byte) myprintf::bArg#57 myprintf::@75/(byte) myprintf::bArg#58 ) + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#60 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (word) myprintf::w#58 ← phi( myprintf::@2/(word) myprintf::w#71 ) + (byte) myprintf::bLen#73 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#61 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte) myprintf::bFormat#26 ← phi( myprintf::@2/(byte) myprintf::bFormat#31 ) + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLen#77 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#50 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#50==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#64 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#66 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#78 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#51 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#51==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#65 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#67 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#66 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#68 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte) myprintf::bLen#54 ← phi( myprintf::@54/(byte) myprintf::bLen#64 myprintf::@55/(byte) myprintf::bLen#65 myprintf::@66/(byte) myprintf::bLen#66 ) + [145] (byte) myprintf::bArg#52 ← phi( myprintf::@54/(byte) myprintf::bArg#66 myprintf::@55/(byte) myprintf::bArg#67 myprintf::@66/(byte) myprintf::bArg#68 ) + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#52 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::bTrailing#46 ← phi( ) + [147] (word) myprintf::w#45 ← phi( myprintf::@53/(word) myprintf::w#58 myprintf::@68/(word) myprintf::w#59 myprintf::@76/(word) myprintf::w#60 ) + [147] (byte) myprintf::bLen#61 ← phi( myprintf::@53/(byte) myprintf::bLen#73 myprintf::@68/(byte) myprintf::bLen#74 myprintf::@76/(byte) myprintf::bLen#75 ) + [147] (byte) myprintf::bArg#48 ← phi( myprintf::@53/(byte) myprintf::bArg#61 myprintf::@68/(byte) myprintf::bArg#62 myprintf::@76/(byte) myprintf::bArg#63 ) + [147] (byte) myprintf::bFormat#22 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 myprintf::@68/(byte) myprintf::bFormat#27 myprintf::@76/(byte) myprintf::bFormat#28 ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#61) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#61 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (word) myprintf::w#59 ← phi( myprintf::@76/(word) myprintf::w#60 ) + (byte) myprintf::bLen#74 ← phi( myprintf::@76/(byte) myprintf::bLen#75 ) + (byte) myprintf::bArg#62 ← phi( myprintf::@76/(byte) myprintf::bArg#63 ) + (byte) myprintf::bFormat#27 ← phi( myprintf::@76/(byte) myprintf::bFormat#28 ) + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (word) myprintf::w#56 ← phi( myprintf::@3/(word) myprintf::w#70 ) + (byte) myprintf::bLen#62 ← phi( myprintf::@3/(byte) myprintf::bLen#76 ) + (byte) myprintf::bArg#59 ← phi( myprintf::@3/(byte) myprintf::bArg#74 ) + (byte) myprintf::bFormat#24 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 ) + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (word) myprintf::w#54 ← phi( myprintf::@46/(word) myprintf::w#64 ) + (byte) myprintf::bLen#60 ← phi( myprintf::@46/(byte) myprintf::bLen#72 ) + (byte) myprintf::bArg#57 ← phi( myprintf::@46/(byte) myprintf::bArg#73 ) + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (word) myprintf::w#75 ← phi( myprintf::@21/(word) myprintf::w#73 ) + (byte) myprintf::bLen#59 ← phi( myprintf::@21/(byte) myprintf::bLen#58 ) + (byte) myprintf::bArg#82 ← phi( myprintf::@21/(byte) myprintf::bArg#80 ) + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (word) myprintf::w#55 ← phi( myprintf::@35/(word) myprintf::w#52 ) + (byte) myprintf::bArg#58 ← phi( myprintf::@35/(byte) myprintf::bArg#54 ) + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (word) myprintf::w#60 ← phi( myprintf::@53/(word) myprintf::w#58 ) + (byte) myprintf::bLen#75 ← phi( myprintf::@53/(byte) myprintf::bLen#73 ) + (byte) myprintf::bArg#63 ← phi( myprintf::@53/(byte) myprintf::bArg#61 ) + (byte) myprintf::bFormat#28 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 ) + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::bDigits#14) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bTrailing#67 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 ) + (word) myprintf::w#71 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#83 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#65 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#31 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bTrailing#59 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 ) + (word) myprintf::w#61 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#67 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#64 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#29 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bTrailing#66 ← phi( myprintf::@61/(byte) myprintf::bTrailing#59 ) + (word) myprintf::w#70 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#76 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#74 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#30 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bDigits#48 ← phi( ) + (byte) myprintf::bTrailing#47 ← phi( myprintf::@61/(byte) myprintf::bTrailing#59 ) + (word) myprintf::w#46 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#55 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#49 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#23 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#10 myprintf::@41/(byte) myprintf::bLeadZero#10 myprintf::@43/(byte) myprintf::bLeadZero#10 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#10 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#46 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#47 myprintf::@62/(byte) myprintf::bDigits#48 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#44 myprintf::@41/(byte) myprintf::bTrailing#45 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#46 myprintf::@62/(byte) myprintf::bTrailing#47 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#42 myprintf::@41/(word) myprintf::w#43 myprintf::@43/(word) myprintf::w#44 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#45 myprintf::@62/(word) myprintf::w#46 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#45 myprintf::@41/(byte) myprintf::bArg#46 myprintf::@43/(byte) myprintf::bArg#47 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#48 myprintf::@62/(byte) myprintf::bArg#49 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#52 myprintf::@43/(byte) myprintf::bLen#53 myprintf::@57/(byte) myprintf::bLen#54 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#55 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (byte) myprintf::bTrailing#72 ← phi( myprintf::@3/(byte) myprintf::bTrailing#66 myprintf::@72/(byte) myprintf::bTrailing#55 ) + (word) myprintf::w#57 ← phi( myprintf::@3/(word) myprintf::w#70 myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#63 ← phi( myprintf::@3/(byte) myprintf::bLen#76 myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#60 ← phi( myprintf::@3/(byte) myprintf::bArg#74 myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#25 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (byte) myprintf::bTrailing#45 ← phi( myprintf::@72/(byte) myprintf::bTrailing#55 ) + (word) myprintf::w#43 ← phi( myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#52 ← phi( myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#46 ← phi( myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#20 ← phi( myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bTrailing#64 ← phi( myprintf::@4/(byte) myprintf::bTrailing#72 ) + (word) myprintf::w#62 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#68 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#72 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bDigits#46 ← phi( ) + (word) myprintf::w#44 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#53 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#47 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte) myprintf::bFormat#21 ← phi( myprintf::@4/(byte) myprintf::bFormat#25 ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bDigits#53 ← phi( ) + (byte) myprintf::bTrailing#52 ← phi( myprintf::@5/(byte) myprintf::bTrailing#64 ) + (word) myprintf::w#47 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#56 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#56 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#47 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#56) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#56 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bTrailing#73 ← phi( myprintf::@5/(byte) myprintf::bTrailing#64 ) + (word) myprintf::w#63 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#82 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#77 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bTrailing#74 ← phi( myprintf::@45/(byte) myprintf::bTrailing#73 ) + (word) myprintf::w#48 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#84 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#90 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#48 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (byte) myprintf::bTrailing#69 ← phi( myprintf::@7/(byte) myprintf::bTrailing#74 ) + (word) myprintf::w#80 ← phi( myprintf::@7/(word) myprintf::w#48 ) + (byte) myprintf::bLen#81 ← phi( myprintf::@7/(byte) myprintf::bLen#84 ) + (byte) myprintf::bArg#88 ← phi( myprintf::@7/(byte) myprintf::bArg#90 ) + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bTrailing#65 ← phi( myprintf::@45/(byte) myprintf::bTrailing#73 ) + (word) myprintf::w#64 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#72 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#73 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (byte) myprintf::bTrailing#81 ← phi( myprintf::@46/(byte) myprintf::bTrailing#65 myprintf::@73/(byte) myprintf::bTrailing#53 ) + (word) myprintf::w#49 ← phi( myprintf::@46/(word) myprintf::w#64 myprintf::@73/(word) myprintf::w#54 ) + (byte) myprintf::bLen#79 ← phi( myprintf::@46/(byte) myprintf::bLen#72 myprintf::@73/(byte) myprintf::bLen#60 ) + (byte) myprintf::bArg#83 ← phi( myprintf::@46/(byte) myprintf::bArg#73 myprintf::@73/(byte) myprintf::bArg#57 ) + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#49 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bTrailing#78 ← phi( myprintf::@47/(byte) myprintf::bTrailing#81 ) + (word) myprintf::w#66 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#70 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#79 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bTrailing#77 ← phi( myprintf::@47/(byte) myprintf::bTrailing#81 ) + (word) myprintf::w#65 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#69 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#78 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (byte) myprintf::bTrailing#71 ← phi( myprintf::@10/(byte) myprintf::bTrailing#77 myprintf::@9/(byte) myprintf::bTrailing#78 ) + [101] (word) myprintf::w#50 ← phi( myprintf::@10/(word) myprintf::w#65 myprintf::@9/(word) myprintf::w#66 ) + [101] (byte) myprintf::bLen#57 ← phi( myprintf::@10/(byte) myprintf::bLen#69 myprintf::@9/(byte) myprintf::bLen#70 ) + [101] (byte) myprintf::bArg#75 ← phi( myprintf::@10/(byte) myprintf::bArg#78 myprintf::@9/(byte) myprintf::bArg#79 ) + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#57) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#57 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#50 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bTrailing#62 ← phi( myprintf::@11/(byte) myprintf::bTrailing#71 ) + (word) myprintf::w#67 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#69 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bTrailing#63 ← phi( myprintf::@11/(byte) myprintf::bTrailing#71 ) + (word) myprintf::w#68 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#70 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte) myprintf::bDigits#51 ← phi( ) + [108] (byte) myprintf::bTrailing#50 ← phi( myprintf::@12/(byte) myprintf::bTrailing#62 myprintf::@13/(byte) myprintf::bTrailing#63 ) + [108] (word) myprintf::w#51 ← phi( myprintf::@12/(word) myprintf::w#67 myprintf::@13/(word) myprintf::w#68 ) + [108] (byte) myprintf::bArg#53 ← phi( myprintf::@12/(byte) myprintf::bArg#69 myprintf::@13/(byte) myprintf::bArg#70 ) + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte) myprintf::bTrailing#60 ← phi( myprintf::@20/(byte) myprintf::bTrailing#68 myprintf::@71/(byte) myprintf::bTrailing#69 ) + [112] (word) myprintf::w#76 ← phi( myprintf::@20/(word) myprintf::w#79 myprintf::@71/(word) myprintf::w#80 ) + [112] (byte) myprintf::bLen#71 ← phi( myprintf::@20/(byte) myprintf::bLen#80 myprintf::@71/(byte) myprintf::bLen#81 ) + [112] (byte) myprintf::bArg#84 ← phi( myprintf::@20/(byte) myprintf::bArg#87 myprintf::@71/(byte) myprintf::bArg#88 ) + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bTrailing#68 ← phi( myprintf::@19/(byte) myprintf::bTrailing#60 ) + (word) myprintf::w#79 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#80 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#87 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bDigits#49 ← phi( ) + (byte) myprintf::bTrailing#48 ← phi( myprintf::@19/(byte) myprintf::bTrailing#60 ) + (word) myprintf::w#73 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#58 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#80 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#48 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#49 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte) myprintf::bTrailing#70 ← phi( myprintf::@21/(byte) myprintf::bTrailing#48 myprintf::@30/(byte) myprintf::bTrailing#75 myprintf::@74/(byte) myprintf::bTrailing#76 ) + [118] (word) myprintf::w#72 ← phi( myprintf::@21/(word) myprintf::w#73 myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [118] (byte) myprintf::bArg#76 ← phi( myprintf::@21/(byte) myprintf::bArg#80 myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#49 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#58 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte) myprintf::bTrailing#82 ← phi( myprintf::@30/(byte) myprintf::bTrailing#75 myprintf::@74/(byte) myprintf::bTrailing#76 ) + [119] (word) myprintf::w#81 ← phi( myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [119] (byte) myprintf::bArg#89 ← phi( myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#50 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#59 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bTrailing#79 ← phi( myprintf::@27/(byte) myprintf::bTrailing#82 ) + (word) myprintf::w#77 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#85 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bTrailing#80 ← phi( myprintf::@27/(byte) myprintf::bTrailing#82 ) + (word) myprintf::w#78 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#86 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte) myprintf::bTrailing#75 ← phi( myprintf::@28/(byte) myprintf::bTrailing#79 myprintf::@29/(byte) myprintf::bTrailing#80 ) + [121] (word) myprintf::w#74 ← phi( myprintf::@28/(word) myprintf::w#77 myprintf::@29/(word) myprintf::w#78 ) + [121] (byte) myprintf::bArg#81 ← phi( myprintf::@28/(byte) myprintf::bArg#85 myprintf::@29/(byte) myprintf::bArg#86 ) + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte) myprintf::bTrailing#61 ← phi( myprintf::@26/(byte) myprintf::bTrailing#70 myprintf::@34/(byte) myprintf::bTrailing#61 ) + [126] (word) myprintf::w#69 ← phi( myprintf::@26/(word) myprintf::w#72 myprintf::@34/(word) myprintf::w#69 ) + [126] (byte) myprintf::bArg#71 ← phi( myprintf::@26/(byte) myprintf::bArg#76 myprintf::@34/(byte) myprintf::bArg#71 ) + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte) myprintf::bTrailing#49 ← phi( myprintf::@34/(byte) myprintf::bTrailing#61 ) + (word) myprintf::w#52 ← phi( myprintf::@34/(word) myprintf::w#69 ) + (byte) myprintf::bArg#54 ← phi( myprintf::@34/(byte) myprintf::bArg#71 ) + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#49 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte) myprintf::bTrailing#51 ← phi( myprintf::@38/(byte) myprintf::bTrailing#51 myprintf::@75/(byte) myprintf::bTrailing#54 ) + [134] (word) myprintf::w#53 ← phi( myprintf::@38/(word) myprintf::w#53 myprintf::@75/(word) myprintf::w#55 ) + [134] (byte) myprintf::bArg#55 ← phi( myprintf::@38/(byte) myprintf::bArg#55 myprintf::@75/(byte) myprintf::bArg#58 ) + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte) myprintf::bTrailing#44 ← phi( myprintf::@14/(byte) myprintf::bTrailing#50 myprintf::@35/(byte) myprintf::bTrailing#49 myprintf::@38/(byte) myprintf::bTrailing#51 myprintf::@6/(byte) myprintf::bTrailing#52 myprintf::@73/(byte) myprintf::bTrailing#53 myprintf::@75/(byte) myprintf::bTrailing#54 ) + [139] (word) myprintf::w#42 ← phi( myprintf::@14/(word) myprintf::w#51 myprintf::@35/(word) myprintf::w#52 myprintf::@38/(word) myprintf::w#53 myprintf::@6/(word) myprintf::w#47 myprintf::@73/(word) myprintf::w#54 myprintf::@75/(word) myprintf::w#55 ) + [139] (byte) myprintf::bArg#45 ← phi( myprintf::@14/(byte) myprintf::bArg#53 myprintf::@35/(byte) myprintf::bArg#54 myprintf::@38/(byte) myprintf::bArg#55 myprintf::@6/(byte) myprintf::bArg#56 myprintf::@73/(byte) myprintf::bArg#57 myprintf::@75/(byte) myprintf::bArg#58 ) + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#51 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#52 myprintf::@6/(byte) myprintf::bDigits#53 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#60 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bTrailing#56 ← phi( myprintf::@2/(byte) myprintf::bTrailing#67 ) + (word) myprintf::w#58 ← phi( myprintf::@2/(word) myprintf::w#71 ) + (byte) myprintf::bLen#73 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#61 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte) myprintf::bFormat#26 ← phi( myprintf::@2/(byte) myprintf::bFormat#31 ) + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLen#77 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#50 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#50==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#64 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#66 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#78 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#51 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#51==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#65 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#67 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#66 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#68 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte) myprintf::bLen#54 ← phi( myprintf::@54/(byte) myprintf::bLen#64 myprintf::@55/(byte) myprintf::bLen#65 myprintf::@66/(byte) myprintf::bLen#66 ) + [145] (byte) myprintf::bArg#52 ← phi( myprintf::@54/(byte) myprintf::bArg#66 myprintf::@55/(byte) myprintf::bArg#67 myprintf::@66/(byte) myprintf::bArg#68 ) + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#52 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::bDigits#47 ← phi( ) + [147] (byte) myprintf::bTrailing#46 ← phi( myprintf::@53/(byte) myprintf::bTrailing#56 myprintf::@68/(byte) myprintf::bTrailing#57 myprintf::@76/(byte) myprintf::bTrailing#58 ) + [147] (word) myprintf::w#45 ← phi( myprintf::@53/(word) myprintf::w#58 myprintf::@68/(word) myprintf::w#59 myprintf::@76/(word) myprintf::w#60 ) + [147] (byte) myprintf::bLen#61 ← phi( myprintf::@53/(byte) myprintf::bLen#73 myprintf::@68/(byte) myprintf::bLen#74 myprintf::@76/(byte) myprintf::bLen#75 ) + [147] (byte) myprintf::bArg#48 ← phi( myprintf::@53/(byte) myprintf::bArg#61 myprintf::@68/(byte) myprintf::bArg#62 myprintf::@76/(byte) myprintf::bArg#63 ) + [147] (byte) myprintf::bFormat#22 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 myprintf::@68/(byte) myprintf::bFormat#27 myprintf::@76/(byte) myprintf::bFormat#28 ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#61) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#61 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (byte) myprintf::bTrailing#57 ← phi( myprintf::@76/(byte) myprintf::bTrailing#58 ) + (word) myprintf::w#59 ← phi( myprintf::@76/(word) myprintf::w#60 ) + (byte) myprintf::bLen#74 ← phi( myprintf::@76/(byte) myprintf::bLen#75 ) + (byte) myprintf::bArg#62 ← phi( myprintf::@76/(byte) myprintf::bArg#63 ) + (byte) myprintf::bFormat#27 ← phi( myprintf::@76/(byte) myprintf::bFormat#28 ) + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (byte) myprintf::bTrailing#55 ← phi( myprintf::@3/(byte) myprintf::bTrailing#66 ) + (word) myprintf::w#56 ← phi( myprintf::@3/(word) myprintf::w#70 ) + (byte) myprintf::bLen#62 ← phi( myprintf::@3/(byte) myprintf::bLen#76 ) + (byte) myprintf::bArg#59 ← phi( myprintf::@3/(byte) myprintf::bArg#74 ) + (byte) myprintf::bFormat#24 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 ) + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (byte) myprintf::bDigits#52 ← phi( ) + (byte) myprintf::bTrailing#53 ← phi( myprintf::@46/(byte) myprintf::bTrailing#65 ) + (word) myprintf::w#54 ← phi( myprintf::@46/(word) myprintf::w#64 ) + (byte) myprintf::bLen#60 ← phi( myprintf::@46/(byte) myprintf::bLen#72 ) + (byte) myprintf::bArg#57 ← phi( myprintf::@46/(byte) myprintf::bArg#73 ) + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (byte) myprintf::bDigits#50 ← phi( ) + (byte) myprintf::bTrailing#76 ← phi( myprintf::@21/(byte) myprintf::bTrailing#48 ) + (word) myprintf::w#75 ← phi( myprintf::@21/(word) myprintf::w#73 ) + (byte) myprintf::bLen#59 ← phi( myprintf::@21/(byte) myprintf::bLen#58 ) + (byte) myprintf::bArg#82 ← phi( myprintf::@21/(byte) myprintf::bArg#80 ) + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (byte) myprintf::bTrailing#54 ← phi( myprintf::@35/(byte) myprintf::bTrailing#49 ) + (word) myprintf::w#55 ← phi( myprintf::@35/(word) myprintf::w#52 ) + (byte) myprintf::bArg#58 ← phi( myprintf::@35/(byte) myprintf::bArg#54 ) + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (byte) myprintf::bTrailing#58 ← phi( myprintf::@53/(byte) myprintf::bTrailing#56 ) + (word) myprintf::w#60 ← phi( myprintf::@53/(word) myprintf::w#58 ) + (byte) myprintf::bLen#75 ← phi( myprintf::@53/(byte) myprintf::bLen#73 ) + (byte) myprintf::bArg#63 ← phi( myprintf::@53/(byte) myprintf::bArg#61 ) + (byte) myprintf::bFormat#28 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 ) + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::bLeadZero#10) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bDigits#66 ← phi( myprintf::@1/(byte) myprintf::bDigits#14 ) + (byte) myprintf::bTrailing#67 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 ) + (word) myprintf::w#71 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#83 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#65 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#31 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bDigits#58 ← phi( myprintf::@1/(byte) myprintf::bDigits#14 ) + (byte) myprintf::bTrailing#59 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 ) + (word) myprintf::w#61 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#67 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#64 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#29 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bDigits#64 ← phi( myprintf::@61/(byte) myprintf::bDigits#58 ) + (byte) myprintf::bTrailing#66 ← phi( myprintf::@61/(byte) myprintf::bTrailing#59 ) + (word) myprintf::w#70 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#76 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#74 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#30 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#1 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#1 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bDigits#48 ← phi( myprintf::@61/(byte) myprintf::bDigits#58 ) + (byte) myprintf::bTrailing#47 ← phi( myprintf::@61/(byte) myprintf::bTrailing#59 ) + (word) myprintf::w#46 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#55 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#49 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#23 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#44 myprintf::@41/(byte) myprintf::bLeadZero#45 myprintf::@43/(byte) myprintf::bLeadZero#46 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#47 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#46 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#47 myprintf::@62/(byte) myprintf::bDigits#48 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#44 myprintf::@41/(byte) myprintf::bTrailing#45 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#46 myprintf::@62/(byte) myprintf::bTrailing#47 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#42 myprintf::@41/(word) myprintf::w#43 myprintf::@43/(word) myprintf::w#44 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#45 myprintf::@62/(word) myprintf::w#46 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#45 myprintf::@41/(byte) myprintf::bArg#46 myprintf::@43/(byte) myprintf::bArg#47 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#48 myprintf::@62/(byte) myprintf::bArg#49 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#52 myprintf::@43/(byte) myprintf::bLen#53 myprintf::@57/(byte) myprintf::bLen#54 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#55 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (byte) myprintf::bDigits#54 ← phi( myprintf::@3/(byte) myprintf::bDigits#64 myprintf::@72/(byte) myprintf::bDigits#65 ) + (byte) myprintf::bTrailing#72 ← phi( myprintf::@3/(byte) myprintf::bTrailing#66 myprintf::@72/(byte) myprintf::bTrailing#55 ) + (word) myprintf::w#57 ← phi( myprintf::@3/(word) myprintf::w#70 myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#63 ← phi( myprintf::@3/(byte) myprintf::bLen#76 myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#60 ← phi( myprintf::@3/(byte) myprintf::bArg#74 myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#25 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (byte) myprintf::bLeadZero#45 ← phi( ) + (byte) myprintf::bTrailing#45 ← phi( myprintf::@72/(byte) myprintf::bTrailing#55 ) + (word) myprintf::w#43 ← phi( myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#52 ← phi( myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#46 ← phi( myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#20 ← phi( myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bDigits#63 ← phi( myprintf::@4/(byte) myprintf::bDigits#54 ) + (byte) myprintf::bTrailing#64 ← phi( myprintf::@4/(byte) myprintf::bTrailing#72 ) + (word) myprintf::w#62 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#68 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#72 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bLeadZero#46 ← phi( ) + (byte) myprintf::bDigits#46 ← phi( myprintf::@4/(byte) myprintf::bDigits#54 ) + (word) myprintf::w#44 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#53 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#47 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte) myprintf::bFormat#21 ← phi( myprintf::@4/(byte) myprintf::bFormat#25 ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bDigits#53 ← phi( myprintf::@5/(byte) myprintf::bDigits#63 ) + (byte) myprintf::bTrailing#52 ← phi( myprintf::@5/(byte) myprintf::bTrailing#64 ) + (word) myprintf::w#47 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#56 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#56 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#47 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#56) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#56 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bDigits#70 ← phi( myprintf::@5/(byte) myprintf::bDigits#63 ) + (byte) myprintf::bTrailing#73 ← phi( myprintf::@5/(byte) myprintf::bTrailing#64 ) + (word) myprintf::w#63 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#82 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#77 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bDigits#71 ← phi( myprintf::@45/(byte) myprintf::bDigits#70 ) + (byte) myprintf::bTrailing#74 ← phi( myprintf::@45/(byte) myprintf::bTrailing#73 ) + (word) myprintf::w#48 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#84 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#90 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#48 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (byte) myprintf::bDigits#68 ← phi( myprintf::@7/(byte) myprintf::bDigits#71 ) + (byte) myprintf::bTrailing#69 ← phi( myprintf::@7/(byte) myprintf::bTrailing#74 ) + (word) myprintf::w#80 ← phi( myprintf::@7/(word) myprintf::w#48 ) + (byte) myprintf::bLen#81 ← phi( myprintf::@7/(byte) myprintf::bLen#84 ) + (byte) myprintf::bArg#88 ← phi( myprintf::@7/(byte) myprintf::bArg#90 ) + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bDigits#62 ← phi( myprintf::@45/(byte) myprintf::bDigits#70 ) + (byte) myprintf::bTrailing#65 ← phi( myprintf::@45/(byte) myprintf::bTrailing#73 ) + (word) myprintf::w#64 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#72 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#73 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#1 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#1 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (byte) myprintf::bDigits#74 ← phi( myprintf::@46/(byte) myprintf::bDigits#62 myprintf::@73/(byte) myprintf::bDigits#52 ) + (byte) myprintf::bTrailing#81 ← phi( myprintf::@46/(byte) myprintf::bTrailing#65 myprintf::@73/(byte) myprintf::bTrailing#53 ) + (word) myprintf::w#49 ← phi( myprintf::@46/(word) myprintf::w#64 myprintf::@73/(word) myprintf::w#54 ) + (byte) myprintf::bLen#79 ← phi( myprintf::@46/(byte) myprintf::bLen#72 myprintf::@73/(byte) myprintf::bLen#60 ) + (byte) myprintf::bArg#83 ← phi( myprintf::@46/(byte) myprintf::bArg#73 myprintf::@73/(byte) myprintf::bArg#57 ) + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#49 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bDigits#73 ← phi( myprintf::@47/(byte) myprintf::bDigits#74 ) + (byte) myprintf::bTrailing#78 ← phi( myprintf::@47/(byte) myprintf::bTrailing#81 ) + (word) myprintf::w#66 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#70 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#79 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bDigits#72 ← phi( myprintf::@47/(byte) myprintf::bDigits#74 ) + (byte) myprintf::bTrailing#77 ← phi( myprintf::@47/(byte) myprintf::bTrailing#81 ) + (word) myprintf::w#65 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#69 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#78 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (byte) myprintf::bDigits#69 ← phi( myprintf::@10/(byte) myprintf::bDigits#72 myprintf::@9/(byte) myprintf::bDigits#73 ) + [101] (byte) myprintf::bTrailing#71 ← phi( myprintf::@10/(byte) myprintf::bTrailing#77 myprintf::@9/(byte) myprintf::bTrailing#78 ) + [101] (word) myprintf::w#50 ← phi( myprintf::@10/(word) myprintf::w#65 myprintf::@9/(word) myprintf::w#66 ) + [101] (byte) myprintf::bLen#57 ← phi( myprintf::@10/(byte) myprintf::bLen#69 myprintf::@9/(byte) myprintf::bLen#70 ) + [101] (byte) myprintf::bArg#75 ← phi( myprintf::@10/(byte) myprintf::bArg#78 myprintf::@9/(byte) myprintf::bArg#79 ) + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#57) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#57 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#50 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bDigits#60 ← phi( myprintf::@11/(byte) myprintf::bDigits#69 ) + (byte) myprintf::bTrailing#62 ← phi( myprintf::@11/(byte) myprintf::bTrailing#71 ) + (word) myprintf::w#67 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#69 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bDigits#61 ← phi( myprintf::@11/(byte) myprintf::bDigits#69 ) + (byte) myprintf::bTrailing#63 ← phi( myprintf::@11/(byte) myprintf::bTrailing#71 ) + (word) myprintf::w#68 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#70 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte) myprintf::bDigits#51 ← phi( myprintf::@12/(byte) myprintf::bDigits#60 myprintf::@13/(byte) myprintf::bDigits#61 ) + [108] (byte) myprintf::bTrailing#50 ← phi( myprintf::@12/(byte) myprintf::bTrailing#62 myprintf::@13/(byte) myprintf::bTrailing#63 ) + [108] (word) myprintf::w#51 ← phi( myprintf::@12/(word) myprintf::w#67 myprintf::@13/(word) myprintf::w#68 ) + [108] (byte) myprintf::bArg#53 ← phi( myprintf::@12/(byte) myprintf::bArg#69 myprintf::@13/(byte) myprintf::bArg#70 ) + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte) myprintf::bDigits#59 ← phi( myprintf::@20/(byte) myprintf::bDigits#67 myprintf::@71/(byte) myprintf::bDigits#68 ) + [112] (byte) myprintf::bTrailing#60 ← phi( myprintf::@20/(byte) myprintf::bTrailing#68 myprintf::@71/(byte) myprintf::bTrailing#69 ) + [112] (word) myprintf::w#76 ← phi( myprintf::@20/(word) myprintf::w#79 myprintf::@71/(word) myprintf::w#80 ) + [112] (byte) myprintf::bLen#71 ← phi( myprintf::@20/(byte) myprintf::bLen#80 myprintf::@71/(byte) myprintf::bLen#81 ) + [112] (byte) myprintf::bArg#84 ← phi( myprintf::@20/(byte) myprintf::bArg#87 myprintf::@71/(byte) myprintf::bArg#88 ) + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bDigits#67 ← phi( myprintf::@19/(byte) myprintf::bDigits#59 ) + (byte) myprintf::bTrailing#68 ← phi( myprintf::@19/(byte) myprintf::bTrailing#60 ) + (word) myprintf::w#79 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#80 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#87 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bDigits#49 ← phi( myprintf::@19/(byte) myprintf::bDigits#59 ) + (byte) myprintf::bTrailing#48 ← phi( myprintf::@19/(byte) myprintf::bTrailing#60 ) + (word) myprintf::w#73 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#58 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#80 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#48 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#49 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte) myprintf::bTrailing#70 ← phi( myprintf::@21/(byte) myprintf::bTrailing#48 myprintf::@30/(byte) myprintf::bTrailing#75 myprintf::@74/(byte) myprintf::bTrailing#76 ) + [118] (word) myprintf::w#72 ← phi( myprintf::@21/(word) myprintf::w#73 myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [118] (byte) myprintf::bArg#76 ← phi( myprintf::@21/(byte) myprintf::bArg#80 myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#49 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#58 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte) myprintf::bLeadZero#48 ← phi( ) + [119] (byte) myprintf::bTrailing#82 ← phi( myprintf::@30/(byte) myprintf::bTrailing#75 myprintf::@74/(byte) myprintf::bTrailing#76 ) + [119] (word) myprintf::w#81 ← phi( myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [119] (byte) myprintf::bArg#89 ← phi( myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#50 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#59 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#48==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bTrailing#79 ← phi( myprintf::@27/(byte) myprintf::bTrailing#82 ) + (word) myprintf::w#77 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#85 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bTrailing#80 ← phi( myprintf::@27/(byte) myprintf::bTrailing#82 ) + (word) myprintf::w#78 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#86 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte) myprintf::bTrailing#75 ← phi( myprintf::@28/(byte) myprintf::bTrailing#79 myprintf::@29/(byte) myprintf::bTrailing#80 ) + [121] (word) myprintf::w#74 ← phi( myprintf::@28/(word) myprintf::w#77 myprintf::@29/(word) myprintf::w#78 ) + [121] (byte) myprintf::bArg#81 ← phi( myprintf::@28/(byte) myprintf::bArg#85 myprintf::@29/(byte) myprintf::bArg#86 ) + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte) myprintf::bTrailing#61 ← phi( myprintf::@26/(byte) myprintf::bTrailing#70 myprintf::@34/(byte) myprintf::bTrailing#61 ) + [126] (word) myprintf::w#69 ← phi( myprintf::@26/(word) myprintf::w#72 myprintf::@34/(word) myprintf::w#69 ) + [126] (byte) myprintf::bArg#71 ← phi( myprintf::@26/(byte) myprintf::bArg#76 myprintf::@34/(byte) myprintf::bArg#71 ) + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte) myprintf::bTrailing#49 ← phi( myprintf::@34/(byte) myprintf::bTrailing#61 ) + (word) myprintf::w#52 ← phi( myprintf::@34/(word) myprintf::w#69 ) + (byte) myprintf::bArg#54 ← phi( myprintf::@34/(byte) myprintf::bArg#71 ) + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#49 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte) myprintf::bTrailing#51 ← phi( myprintf::@38/(byte) myprintf::bTrailing#51 myprintf::@75/(byte) myprintf::bTrailing#54 ) + [134] (word) myprintf::w#53 ← phi( myprintf::@38/(word) myprintf::w#53 myprintf::@75/(word) myprintf::w#55 ) + [134] (byte) myprintf::bArg#55 ← phi( myprintf::@38/(byte) myprintf::bArg#55 myprintf::@75/(byte) myprintf::bArg#58 ) + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte) myprintf::bLeadZero#44 ← phi( ) + [139] (byte) myprintf::bTrailing#44 ← phi( myprintf::@14/(byte) myprintf::bTrailing#50 myprintf::@35/(byte) myprintf::bTrailing#49 myprintf::@38/(byte) myprintf::bTrailing#51 myprintf::@6/(byte) myprintf::bTrailing#52 myprintf::@73/(byte) myprintf::bTrailing#53 myprintf::@75/(byte) myprintf::bTrailing#54 ) + [139] (word) myprintf::w#42 ← phi( myprintf::@14/(word) myprintf::w#51 myprintf::@35/(word) myprintf::w#52 myprintf::@38/(word) myprintf::w#53 myprintf::@6/(word) myprintf::w#47 myprintf::@73/(word) myprintf::w#54 myprintf::@75/(word) myprintf::w#55 ) + [139] (byte) myprintf::bArg#45 ← phi( myprintf::@14/(byte) myprintf::bArg#53 myprintf::@35/(byte) myprintf::bArg#54 myprintf::@38/(byte) myprintf::bArg#55 myprintf::@6/(byte) myprintf::bArg#56 myprintf::@73/(byte) myprintf::bArg#57 myprintf::@75/(byte) myprintf::bArg#58 ) + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#51 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#52 myprintf::@6/(byte) myprintf::bDigits#53 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#60 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bDigits#55 ← phi( myprintf::@2/(byte) myprintf::bDigits#66 ) + (byte) myprintf::bTrailing#56 ← phi( myprintf::@2/(byte) myprintf::bTrailing#67 ) + (word) myprintf::w#58 ← phi( myprintf::@2/(word) myprintf::w#71 ) + (byte) myprintf::bLen#73 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#61 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte) myprintf::bFormat#26 ← phi( myprintf::@2/(byte) myprintf::bFormat#31 ) + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#1 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#1 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLen#77 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#50 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#50==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#64 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#66 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#78 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#51 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#51==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#65 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#67 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#66 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#68 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte) myprintf::bLen#54 ← phi( myprintf::@54/(byte) myprintf::bLen#64 myprintf::@55/(byte) myprintf::bLen#65 myprintf::@66/(byte) myprintf::bLen#66 ) + [145] (byte) myprintf::bArg#52 ← phi( myprintf::@54/(byte) myprintf::bArg#66 myprintf::@55/(byte) myprintf::bArg#67 myprintf::@66/(byte) myprintf::bArg#68 ) + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#52 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::bLeadZero#47 ← phi( ) + [147] (byte) myprintf::bDigits#47 ← phi( myprintf::@53/(byte) myprintf::bDigits#55 myprintf::@68/(byte) myprintf::bDigits#56 myprintf::@76/(byte) myprintf::bDigits#57 ) + [147] (byte) myprintf::bTrailing#46 ← phi( myprintf::@53/(byte) myprintf::bTrailing#56 myprintf::@68/(byte) myprintf::bTrailing#57 myprintf::@76/(byte) myprintf::bTrailing#58 ) + [147] (word) myprintf::w#45 ← phi( myprintf::@53/(word) myprintf::w#58 myprintf::@68/(word) myprintf::w#59 myprintf::@76/(word) myprintf::w#60 ) + [147] (byte) myprintf::bLen#61 ← phi( myprintf::@53/(byte) myprintf::bLen#73 myprintf::@68/(byte) myprintf::bLen#74 myprintf::@76/(byte) myprintf::bLen#75 ) + [147] (byte) myprintf::bArg#48 ← phi( myprintf::@53/(byte) myprintf::bArg#61 myprintf::@68/(byte) myprintf::bArg#62 myprintf::@76/(byte) myprintf::bArg#63 ) + [147] (byte) myprintf::bFormat#22 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 myprintf::@68/(byte) myprintf::bFormat#27 myprintf::@76/(byte) myprintf::bFormat#28 ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#1 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#61) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#61 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (byte) myprintf::bDigits#56 ← phi( myprintf::@76/(byte) myprintf::bDigits#57 ) + (byte) myprintf::bTrailing#57 ← phi( myprintf::@76/(byte) myprintf::bTrailing#58 ) + (word) myprintf::w#59 ← phi( myprintf::@76/(word) myprintf::w#60 ) + (byte) myprintf::bLen#74 ← phi( myprintf::@76/(byte) myprintf::bLen#75 ) + (byte) myprintf::bArg#62 ← phi( myprintf::@76/(byte) myprintf::bArg#63 ) + (byte) myprintf::bFormat#27 ← phi( myprintf::@76/(byte) myprintf::bFormat#28 ) + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (byte) myprintf::bDigits#65 ← phi( myprintf::@3/(byte) myprintf::bDigits#64 ) + (byte) myprintf::bTrailing#55 ← phi( myprintf::@3/(byte) myprintf::bTrailing#66 ) + (word) myprintf::w#56 ← phi( myprintf::@3/(word) myprintf::w#70 ) + (byte) myprintf::bLen#62 ← phi( myprintf::@3/(byte) myprintf::bLen#76 ) + (byte) myprintf::bArg#59 ← phi( myprintf::@3/(byte) myprintf::bArg#74 ) + (byte) myprintf::bFormat#24 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 ) + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (byte) myprintf::bDigits#52 ← phi( myprintf::@46/(byte) myprintf::bDigits#62 ) + (byte) myprintf::bTrailing#53 ← phi( myprintf::@46/(byte) myprintf::bTrailing#65 ) + (word) myprintf::w#54 ← phi( myprintf::@46/(word) myprintf::w#64 ) + (byte) myprintf::bLen#60 ← phi( myprintf::@46/(byte) myprintf::bLen#72 ) + (byte) myprintf::bArg#57 ← phi( myprintf::@46/(byte) myprintf::bArg#73 ) + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (byte) myprintf::bDigits#50 ← phi( myprintf::@21/(byte) myprintf::bDigits#49 ) + (byte) myprintf::bTrailing#76 ← phi( myprintf::@21/(byte) myprintf::bTrailing#48 ) + (word) myprintf::w#75 ← phi( myprintf::@21/(word) myprintf::w#73 ) + (byte) myprintf::bLen#59 ← phi( myprintf::@21/(byte) myprintf::bLen#58 ) + (byte) myprintf::bArg#82 ← phi( myprintf::@21/(byte) myprintf::bArg#80 ) + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (byte) myprintf::bTrailing#54 ← phi( myprintf::@35/(byte) myprintf::bTrailing#49 ) + (word) myprintf::w#55 ← phi( myprintf::@35/(word) myprintf::w#52 ) + (byte) myprintf::bArg#58 ← phi( myprintf::@35/(byte) myprintf::bArg#54 ) + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (byte) myprintf::bDigits#57 ← phi( myprintf::@53/(byte) myprintf::bDigits#55 ) + (byte) myprintf::bTrailing#58 ← phi( myprintf::@53/(byte) myprintf::bTrailing#56 ) + (word) myprintf::w#60 ← phi( myprintf::@53/(word) myprintf::w#58 ) + (byte) myprintf::bLen#75 ← phi( myprintf::@53/(byte) myprintf::bLen#73 ) + (byte) myprintf::bArg#63 ← phi( myprintf::@53/(byte) myprintf::bArg#61 ) + (byte) myprintf::bFormat#28 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 ) + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +GRAPH (NEW VERSIONS for myprintf::b#1) +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [0] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [0] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [0] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [0] (word) divr16u::rem#4 ← phi( divr16u/(const word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) + [1] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [2] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [3] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [4] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [5] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [6] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [7] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [8] if((word) divr16u::rem#5<(const word) divr16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [9] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [10] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [10] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [11] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [12] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [13] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [14] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) divr16u::divisor#0 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [15] return + to:@return +div16u: scope:[div16u] from main::@2 + [16] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [17] call divr16u + [18] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + [19] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + [20] return + to:@return +@8: scope:[] from @begin + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [21] (word) append::sub#6 ← phi( utoa::@5/(const word) append::sub#0 utoa::@6/(const word) append::sub#1 utoa::@7/(const word) append::sub#2 utoa::@8/(const word) append::sub#3 ) + [21] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [21] (byte*) append::dst#4 ← phi( utoa::@5/(const byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [22] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [23] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [24] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + [25] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [26] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +append::@3: scope:[append] from append::@1 + to:append::@return +append::@return: scope:[append] from append::@3 + [27] return + to:@return +utoa: scope:[utoa] from myprintf::@7 + [28] (bool~) utoa::$0 ← (const byte) utoa::bStarted#0 == (byte) 1 + [29] (bool~) utoa::$1 ← (word) utoa::value#4 >= (word) $2710 + [30] if((bool~) utoa::$0) goto utoa::@5 + to:utoa::@13 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [31] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte*) utoa::dst#5 utoa::@9/(byte*) utoa::dst#0 ) + [31] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [31] (byte) utoa::bStarted#5 ← phi( utoa::@13/(const byte) utoa::bStarted#0 utoa::@9/(const byte) utoa::bStarted#1 ) + [32] (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte) 1 + [33] (bool~) utoa::$5 ← (word) utoa::value#6 >= (word) $3e8 + [34] if((bool~) utoa::$4) goto utoa::@6 + to:utoa::@14 +utoa::@5: scope:[utoa] from utoa utoa::@13 + [35] (word) append::value#1 ← (word) utoa::value#4 + [36] call append + [37] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [38] (word) utoa::value#0 ← (word) append::return#2 + [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [40] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [40] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [40] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(const byte) utoa::bStarted#2 ) + [41] (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte) 1 + [42] (bool~) utoa::$9 ← (word) utoa::value#11 >= (byte) $64 + [43] if((bool~) utoa::$8) goto utoa::@7 + to:utoa::@15 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [44] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [45] (word) append::value#2 ← (word) utoa::value#6 + [46] call append + [47] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [48] (word) utoa::value#1 ← (word) append::return#3 + [49] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [50] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [50] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [50] (byte) utoa::bStarted#7 ← phi( utoa::@11/(const byte) utoa::bStarted#3 utoa::@15/(byte) utoa::bStarted#6 ) + [51] (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte) 1 + [52] (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte) $a + [53] if((bool~) utoa::$12) goto utoa::@8 + to:utoa::@16 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [54] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [55] (word) append::value#3 ← (word) utoa::value#11 + [56] call append + [57] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [58] (word) utoa::value#2 ← (word) append::return#4 + [59] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [60] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [60] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [61] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [62] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [63] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [64] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [65] *((byte*) utoa::dst#3) ← (byte) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [66] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [67] (word) append::value#4 ← (word) utoa::value#10 + [68] call append + [69] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [70] (word) utoa::value#3 ← (word) append::return#10 + [71] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + [72] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [73] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [73] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [73] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [73] (byte*) myprintf::dst#40 ← phi( main::@3/(const byte*) myprintf::dst#0 main::@7/(const byte*) myprintf::dst#1 ) + [73] (byte*) myprintf::str#5 ← phi( main::@3/(const byte*) myprintf::str#1 main::@7/(const byte*) myprintf::str#2 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + [74] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(const byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + [74] (byte) myprintf::bDigits#14 ← phi( myprintf/(const byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + [74] (byte) myprintf::bTrailing#10 ← phi( myprintf/(const byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + [74] (word) myprintf::w#10 ← phi( myprintf/(const word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + [74] (byte) myprintf::bLen#14 ← phi( myprintf/(const byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::return#0 ) + [74] (byte) myprintf::bArg#12 ← phi( myprintf/(const byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + [74] (byte) myprintf::bFormat#10 ← phi( myprintf/(const byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + [74] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + [75] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [76] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte) myprintf::b#35 ← phi( ) + (byte) myprintf::bLeadZero#68 ← phi( myprintf::@1/(byte) myprintf::bLeadZero#10 ) + (byte) myprintf::bDigits#66 ← phi( myprintf::@1/(byte) myprintf::bDigits#14 ) + (byte) myprintf::bTrailing#67 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 ) + (word) myprintf::w#71 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#83 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#65 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#31 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#77 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [77] if((byte) myprintf::b#35!=(byte) '%') goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte) myprintf::b#36 ← phi( ) + (byte) myprintf::bLeadZero#75 ← phi( myprintf::@1/(byte) myprintf::bLeadZero#10 ) + (byte) myprintf::bDigits#58 ← phi( myprintf::@1/(byte) myprintf::bDigits#14 ) + (byte) myprintf::bTrailing#59 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 ) + (word) myprintf::w#61 ← phi( myprintf::@1/(word) myprintf::w#10 ) + (byte) myprintf::bLen#67 ← phi( myprintf::@1/(byte) myprintf::bLen#14 ) + (byte) myprintf::bArg#64 ← phi( myprintf::@1/(byte) myprintf::bArg#12 ) + (byte) myprintf::bFormat#29 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#68 ← phi( myprintf::@1/(byte*) myprintf::str#10 ) + [78] if((byte) myprintf::b#36!=(byte) '0') goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte) myprintf::b#37 ← phi( ) + (byte) myprintf::bLeadZero#67 ← phi( myprintf::@61/(byte) myprintf::bLeadZero#75 ) + (byte) myprintf::bDigits#64 ← phi( myprintf::@61/(byte) myprintf::bDigits#58 ) + (byte) myprintf::bTrailing#66 ← phi( myprintf::@61/(byte) myprintf::bTrailing#59 ) + (word) myprintf::w#70 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#76 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#74 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#30 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#74 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + [79] (bool~) myprintf::$4 ← (byte) myprintf::b#37 >= (byte) '1' + [80] (bool~) myprintf::$5 ← (byte) myprintf::b#37 <= (byte) '9' + [81] if((bool~) myprintf::$4) goto myprintf::@72 + to:myprintf::@4 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bDigits#48 ← phi( myprintf::@61/(byte) myprintf::bDigits#58 ) + (byte) myprintf::bTrailing#47 ← phi( myprintf::@61/(byte) myprintf::bTrailing#59 ) + (word) myprintf::w#46 ← phi( myprintf::@61/(word) myprintf::w#61 ) + (byte) myprintf::bLen#55 ← phi( myprintf::@61/(byte) myprintf::bLen#67 ) + (byte) myprintf::bArg#49 ← phi( myprintf::@61/(byte) myprintf::bArg#64 ) + (byte) myprintf::bFormat#23 ← phi( myprintf::@61/(byte) myprintf::bFormat#29 ) + (byte*) myprintf::str#53 ← phi( myprintf::@61/(byte*) myprintf::str#68 ) + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + [82] (byte*) myprintf::str#47 ← phi( myprintf::@40/(byte*) myprintf::str#48 myprintf::@41/(byte*) myprintf::str#49 myprintf::@43/(byte*) myprintf::str#50 myprintf::@57/(byte*) myprintf::str#51 myprintf::@60/(byte*) myprintf::str#52 myprintf::@62/(byte*) myprintf::str#53 ) + [82] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#44 myprintf::@41/(byte) myprintf::bLeadZero#45 myprintf::@43/(byte) myprintf::bLeadZero#46 myprintf::@57/(const byte) myprintf::bLeadZero#2 myprintf::@60/(byte) myprintf::bLeadZero#47 myprintf::@62/(const byte) myprintf::bLeadZero#1 ) + [82] (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#46 myprintf::@57/(const byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#47 myprintf::@62/(byte) myprintf::bDigits#48 ) + [82] (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#44 myprintf::@41/(byte) myprintf::bTrailing#45 myprintf::@43/(const byte) myprintf::bTrailing#1 myprintf::@57/(const byte) myprintf::bTrailing#2 myprintf::@60/(byte) myprintf::bTrailing#46 myprintf::@62/(byte) myprintf::bTrailing#47 ) + [82] (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#42 myprintf::@41/(word) myprintf::w#43 myprintf::@43/(word) myprintf::w#44 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#45 myprintf::@62/(word) myprintf::w#46 ) + [82] (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#45 myprintf::@41/(byte) myprintf::bArg#46 myprintf::@43/(byte) myprintf::bArg#47 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#48 myprintf::@62/(byte) myprintf::bArg#49 ) + [82] (byte) myprintf::return#0 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#52 myprintf::@43/(byte) myprintf::bLen#53 myprintf::@57/(byte) myprintf::bLen#54 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#55 ) + [82] (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(const byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#20 myprintf::@43/(byte) myprintf::bFormat#21 myprintf::@57/(const byte) myprintf::bFormat#13 myprintf::@60/(byte) myprintf::bFormat#22 myprintf::@62/(byte) myprintf::bFormat#23 ) + [83] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [84] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@72 + (byte) myprintf::b#38 ← phi( ) + (byte) myprintf::bLeadZero#56 ← phi( myprintf::@3/(byte) myprintf::bLeadZero#67 myprintf::@72/(byte) myprintf::bLeadZero#55 ) + (byte) myprintf::bDigits#54 ← phi( myprintf::@3/(byte) myprintf::bDigits#64 myprintf::@72/(byte) myprintf::bDigits#65 ) + (byte) myprintf::bTrailing#72 ← phi( myprintf::@3/(byte) myprintf::bTrailing#66 myprintf::@72/(byte) myprintf::bTrailing#55 ) + (word) myprintf::w#57 ← phi( myprintf::@3/(word) myprintf::w#70 myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#63 ← phi( myprintf::@3/(byte) myprintf::bLen#76 myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#60 ← phi( myprintf::@3/(byte) myprintf::bArg#74 myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#25 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#61 ← phi( myprintf::@3/(byte*) myprintf::str#74 myprintf::@72/(byte*) myprintf::str#60 ) + [85] if((byte) myprintf::b#38!=(byte) '-') goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@72 + (byte) myprintf::b#39 ← phi( ) + (byte) myprintf::bLeadZero#45 ← phi( myprintf::@72/(byte) myprintf::bLeadZero#55 ) + (byte) myprintf::bTrailing#45 ← phi( myprintf::@72/(byte) myprintf::bTrailing#55 ) + (word) myprintf::w#43 ← phi( myprintf::@72/(word) myprintf::w#56 ) + (byte) myprintf::bLen#52 ← phi( myprintf::@72/(byte) myprintf::bLen#62 ) + (byte) myprintf::bArg#46 ← phi( myprintf::@72/(byte) myprintf::bArg#59 ) + (byte) myprintf::bFormat#20 ← phi( myprintf::@72/(byte) myprintf::bFormat#24 ) + (byte*) myprintf::str#49 ← phi( myprintf::@72/(byte*) myprintf::str#60 ) + [86] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#39 - (byte) '0' + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (byte) myprintf::b#40 ← phi( ) + (byte) myprintf::bLeadZero#65 ← phi( myprintf::@4/(byte) myprintf::bLeadZero#56 ) + (byte) myprintf::bDigits#63 ← phi( myprintf::@4/(byte) myprintf::bDigits#54 ) + (byte) myprintf::bTrailing#64 ← phi( myprintf::@4/(byte) myprintf::bTrailing#72 ) + (word) myprintf::w#62 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#68 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#72 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte*) myprintf::str#72 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + [87] if((byte) myprintf::b#40==(byte) 'c') goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bLeadZero#46 ← phi( myprintf::@4/(byte) myprintf::bLeadZero#56 ) + (byte) myprintf::bDigits#46 ← phi( myprintf::@4/(byte) myprintf::bDigits#54 ) + (word) myprintf::w#44 ← phi( myprintf::@4/(word) myprintf::w#57 ) + (byte) myprintf::bLen#53 ← phi( myprintf::@4/(byte) myprintf::bLen#63 ) + (byte) myprintf::bArg#47 ← phi( myprintf::@4/(byte) myprintf::bArg#60 ) + (byte) myprintf::bFormat#21 ← phi( myprintf::@4/(byte) myprintf::bFormat#25 ) + (byte*) myprintf::str#50 ← phi( myprintf::@4/(byte*) myprintf::str#61 ) + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bLeadZero#52 ← phi( myprintf::@5/(byte) myprintf::bLeadZero#65 ) + (byte) myprintf::bDigits#53 ← phi( myprintf::@5/(byte) myprintf::bDigits#63 ) + (byte) myprintf::bTrailing#52 ← phi( myprintf::@5/(byte) myprintf::bTrailing#64 ) + (word) myprintf::w#47 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#56 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#56 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#57 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [88] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#47 + [89] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#56) ← (byte~) myprintf::$49 + [90] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#56 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (byte) myprintf::b#41 ← phi( ) + (byte) myprintf::bLeadZero#74 ← phi( myprintf::@5/(byte) myprintf::bLeadZero#65 ) + (byte) myprintf::bDigits#70 ← phi( myprintf::@5/(byte) myprintf::bDigits#63 ) + (byte) myprintf::bTrailing#73 ← phi( myprintf::@5/(byte) myprintf::bTrailing#64 ) + (word) myprintf::w#63 ← phi( myprintf::@5/(word) myprintf::w#62 ) + (byte) myprintf::bLen#82 ← phi( myprintf::@5/(byte) myprintf::bLen#68 ) + (byte) myprintf::bArg#77 ← phi( myprintf::@5/(byte) myprintf::bArg#72 ) + (byte*) myprintf::str#80 ← phi( myprintf::@5/(byte*) myprintf::str#72 ) + [91] if((byte) myprintf::b#41==(byte) 'd') goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bLeadZero#82 ← phi( myprintf::@45/(byte) myprintf::bLeadZero#74 ) + (byte) myprintf::bDigits#71 ← phi( myprintf::@45/(byte) myprintf::bDigits#70 ) + (byte) myprintf::bTrailing#74 ← phi( myprintf::@45/(byte) myprintf::bTrailing#73 ) + (word) myprintf::w#48 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#84 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#90 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#93 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [92] (word) utoa::value#4 ← (word) myprintf::w#48 + [93] call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (byte) myprintf::bLeadZero#80 ← phi( myprintf::@7/(byte) myprintf::bLeadZero#82 ) + (byte) myprintf::bDigits#68 ← phi( myprintf::@7/(byte) myprintf::bDigits#71 ) + (byte) myprintf::bTrailing#69 ← phi( myprintf::@7/(byte) myprintf::bTrailing#74 ) + (word) myprintf::w#80 ← phi( myprintf::@7/(word) myprintf::w#48 ) + (byte) myprintf::bLen#81 ← phi( myprintf::@7/(byte) myprintf::bLen#84 ) + (byte) myprintf::bArg#88 ← phi( myprintf::@7/(byte) myprintf::bArg#90 ) + (byte*) myprintf::str#91 ← phi( myprintf::@7/(byte*) myprintf::str#93 ) + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte) myprintf::b#42 ← phi( ) + (byte) myprintf::bLeadZero#66 ← phi( myprintf::@45/(byte) myprintf::bLeadZero#74 ) + (byte) myprintf::bDigits#62 ← phi( myprintf::@45/(byte) myprintf::bDigits#70 ) + (byte) myprintf::bTrailing#65 ← phi( myprintf::@45/(byte) myprintf::bTrailing#73 ) + (word) myprintf::w#64 ← phi( myprintf::@45/(word) myprintf::w#63 ) + (byte) myprintf::bLen#72 ← phi( myprintf::@45/(byte) myprintf::bLen#82 ) + (byte) myprintf::bArg#73 ← phi( myprintf::@45/(byte) myprintf::bArg#77 ) + (byte*) myprintf::str#73 ← phi( myprintf::@45/(byte*) myprintf::str#80 ) + [94] (bool~) myprintf::$13 ← (byte) myprintf::b#42 == (byte) 'x' + [95] (bool~) myprintf::$14 ← (byte) myprintf::b#42 == (byte) 'X' + [96] if((bool~) myprintf::$13) goto myprintf::@47 + to:myprintf::@73 +myprintf::@47: scope:[myprintf] from myprintf::@46 myprintf::@73 + (byte) myprintf::bLeadZero#81 ← phi( myprintf::@46/(byte) myprintf::bLeadZero#66 myprintf::@73/(byte) myprintf::bLeadZero#53 ) + (byte) myprintf::bDigits#74 ← phi( myprintf::@46/(byte) myprintf::bDigits#62 myprintf::@73/(byte) myprintf::bDigits#52 ) + (byte) myprintf::bTrailing#81 ← phi( myprintf::@46/(byte) myprintf::bTrailing#65 myprintf::@73/(byte) myprintf::bTrailing#53 ) + (word) myprintf::w#49 ← phi( myprintf::@46/(word) myprintf::w#64 myprintf::@73/(word) myprintf::w#54 ) + (byte) myprintf::bLen#79 ← phi( myprintf::@46/(byte) myprintf::bLen#72 myprintf::@73/(byte) myprintf::bLen#60 ) + (byte) myprintf::bArg#83 ← phi( myprintf::@46/(byte) myprintf::bArg#73 myprintf::@73/(byte) myprintf::bArg#57 ) + (byte*) myprintf::str#86 ← phi( myprintf::@46/(byte*) myprintf::str#73 myprintf::@73/(byte*) myprintf::str#58 ) + [97] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#49 + [98] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [99] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [100] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bLeadZero#78 ← phi( myprintf::@47/(byte) myprintf::bLeadZero#81 ) + (byte) myprintf::bDigits#73 ← phi( myprintf::@47/(byte) myprintf::bDigits#74 ) + (byte) myprintf::bTrailing#78 ← phi( myprintf::@47/(byte) myprintf::bTrailing#81 ) + (word) myprintf::w#66 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#70 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#79 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#82 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bLeadZero#77 ← phi( myprintf::@47/(byte) myprintf::bLeadZero#81 ) + (byte) myprintf::bDigits#72 ← phi( myprintf::@47/(byte) myprintf::bDigits#74 ) + (byte) myprintf::bTrailing#77 ← phi( myprintf::@47/(byte) myprintf::bTrailing#81 ) + (word) myprintf::w#65 ← phi( myprintf::@47/(word) myprintf::w#49 ) + (byte) myprintf::bLen#69 ← phi( myprintf::@47/(byte) myprintf::bLen#79 ) + (byte) myprintf::bArg#78 ← phi( myprintf::@47/(byte) myprintf::bArg#83 ) + (byte*) myprintf::str#81 ← phi( myprintf::@47/(byte*) myprintf::str#86 ) + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [101] (byte) myprintf::bLeadZero#72 ← phi( myprintf::@10/(byte) myprintf::bLeadZero#77 myprintf::@9/(byte) myprintf::bLeadZero#78 ) + [101] (byte) myprintf::bDigits#69 ← phi( myprintf::@10/(byte) myprintf::bDigits#72 myprintf::@9/(byte) myprintf::bDigits#73 ) + [101] (byte) myprintf::bTrailing#71 ← phi( myprintf::@10/(byte) myprintf::bTrailing#77 myprintf::@9/(byte) myprintf::bTrailing#78 ) + [101] (word) myprintf::w#50 ← phi( myprintf::@10/(word) myprintf::w#65 myprintf::@9/(word) myprintf::w#66 ) + [101] (byte) myprintf::bLen#57 ← phi( myprintf::@10/(byte) myprintf::bLen#69 myprintf::@9/(byte) myprintf::bLen#70 ) + [101] (byte) myprintf::bArg#75 ← phi( myprintf::@10/(byte) myprintf::bArg#78 myprintf::@9/(byte) myprintf::bArg#79 ) + [101] (byte*) myprintf::str#78 ← phi( myprintf::@10/(byte*) myprintf::str#81 myprintf::@9/(byte*) myprintf::str#82 ) + [101] (byte~) myprintf::$23 ← phi( myprintf::@9/(const byte) myprintf::$22 myprintf::@10/(const byte) myprintf::$21 ) + [102] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [103] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#57) ← (byte~) myprintf::$24 + [104] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#57 + [105] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#50 + [106] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [107] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bLeadZero#62 ← phi( myprintf::@11/(byte) myprintf::bLeadZero#72 ) + (byte) myprintf::bDigits#60 ← phi( myprintf::@11/(byte) myprintf::bDigits#69 ) + (byte) myprintf::bTrailing#62 ← phi( myprintf::@11/(byte) myprintf::bTrailing#71 ) + (word) myprintf::w#67 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#69 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#69 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bLeadZero#63 ← phi( myprintf::@11/(byte) myprintf::bLeadZero#72 ) + (byte) myprintf::bDigits#61 ← phi( myprintf::@11/(byte) myprintf::bDigits#69 ) + (byte) myprintf::bTrailing#63 ← phi( myprintf::@11/(byte) myprintf::bTrailing#71 ) + (word) myprintf::w#68 ← phi( myprintf::@11/(word) myprintf::w#50 ) + (byte) myprintf::bArg#70 ← phi( myprintf::@11/(byte) myprintf::bArg#75 ) + (byte*) myprintf::str#70 ← phi( myprintf::@11/(byte*) myprintf::str#78 ) + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + [108] (byte) myprintf::bLeadZero#49 ← phi( myprintf::@12/(byte) myprintf::bLeadZero#62 myprintf::@13/(byte) myprintf::bLeadZero#63 ) + [108] (byte) myprintf::bDigits#51 ← phi( myprintf::@12/(byte) myprintf::bDigits#60 myprintf::@13/(byte) myprintf::bDigits#61 ) + [108] (byte) myprintf::bTrailing#50 ← phi( myprintf::@12/(byte) myprintf::bTrailing#62 myprintf::@13/(byte) myprintf::bTrailing#63 ) + [108] (word) myprintf::w#51 ← phi( myprintf::@12/(word) myprintf::w#67 myprintf::@13/(word) myprintf::w#68 ) + [108] (byte) myprintf::bArg#53 ← phi( myprintf::@12/(byte) myprintf::bArg#69 myprintf::@13/(byte) myprintf::bArg#70 ) + [108] (byte*) myprintf::str#54 ← phi( myprintf::@12/(byte*) myprintf::str#69 myprintf::@13/(byte*) myprintf::str#70 ) + [108] (byte~) myprintf::$30 ← phi( myprintf::@12/(const byte) myprintf::$29 myprintf::@13/(const byte) myprintf::$28 ) + [109] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [110] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [111] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + [112] (byte) myprintf::bLeadZero#76 ← phi( myprintf::@20/(byte) myprintf::bLeadZero#79 myprintf::@71/(byte) myprintf::bLeadZero#80 ) + [112] (byte) myprintf::bDigits#59 ← phi( myprintf::@20/(byte) myprintf::bDigits#67 myprintf::@71/(byte) myprintf::bDigits#68 ) + [112] (byte) myprintf::bTrailing#60 ← phi( myprintf::@20/(byte) myprintf::bTrailing#68 myprintf::@71/(byte) myprintf::bTrailing#69 ) + [112] (word) myprintf::w#76 ← phi( myprintf::@20/(word) myprintf::w#79 myprintf::@71/(word) myprintf::w#80 ) + [112] (byte) myprintf::bLen#71 ← phi( myprintf::@20/(byte) myprintf::bLen#80 myprintf::@71/(byte) myprintf::bLen#81 ) + [112] (byte) myprintf::bArg#84 ← phi( myprintf::@20/(byte) myprintf::bArg#87 myprintf::@71/(byte) myprintf::bArg#88 ) + [112] (byte*) myprintf::str#87 ← phi( myprintf::@20/(byte*) myprintf::str#90 myprintf::@71/(byte*) myprintf::str#91 ) + [112] (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(const byte) myprintf::b#2 ) + [113] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bLeadZero#79 ← phi( myprintf::@19/(byte) myprintf::bLeadZero#76 ) + (byte) myprintf::bDigits#67 ← phi( myprintf::@19/(byte) myprintf::bDigits#59 ) + (byte) myprintf::bTrailing#68 ← phi( myprintf::@19/(byte) myprintf::bTrailing#60 ) + (word) myprintf::w#79 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#80 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#87 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#90 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [114] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (byte) myprintf::bLeadZero#71 ← phi( myprintf::@19/(byte) myprintf::bLeadZero#76 ) + (byte) myprintf::bDigits#49 ← phi( myprintf::@19/(byte) myprintf::bDigits#59 ) + (byte) myprintf::bTrailing#48 ← phi( myprintf::@19/(byte) myprintf::bTrailing#60 ) + (word) myprintf::w#73 ← phi( myprintf::@19/(word) myprintf::w#76 ) + (byte) myprintf::bLen#58 ← phi( myprintf::@19/(byte) myprintf::bLen#71 ) + (byte) myprintf::bArg#80 ← phi( myprintf::@19/(byte) myprintf::bArg#84 ) + (byte*) myprintf::str#83 ← phi( myprintf::@19/(byte*) myprintf::str#87 ) + [115] (bool~) myprintf::$34 ← (byte) myprintf::bTrailing#48 == (byte) 0 + [116] (bool~) myprintf::$35 ← (byte) myprintf::bDigits#49 > (byte) myprintf::b#17 + [117] if((bool~) myprintf::$34) goto myprintf::@74 + to:myprintf::@26 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 myprintf::@74 + [118] (byte) myprintf::bLeadZero#73 ← phi( myprintf::@21/(byte) myprintf::bLeadZero#71 myprintf::@30/(byte) myprintf::bLeadZero#60 myprintf::@74/(byte) myprintf::bLeadZero#61 ) + [118] (byte) myprintf::bTrailing#70 ← phi( myprintf::@21/(byte) myprintf::bTrailing#48 myprintf::@30/(byte) myprintf::bTrailing#75 myprintf::@74/(byte) myprintf::bTrailing#76 ) + [118] (word) myprintf::w#72 ← phi( myprintf::@21/(word) myprintf::w#73 myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [118] (byte) myprintf::bArg#76 ← phi( myprintf::@21/(byte) myprintf::bArg#80 myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [118] (byte*) myprintf::str#79 ← phi( myprintf::@21/(byte*) myprintf::str#83 myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [118] (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#49 myprintf::@30/(byte) myprintf::bDigits#2 ) + [118] (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#58 myprintf::@30/(byte) myprintf::bLen#4 ) + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@30 myprintf::@74 + [119] (byte) myprintf::bLeadZero#48 ← phi( myprintf::@30/(byte) myprintf::bLeadZero#60 myprintf::@74/(byte) myprintf::bLeadZero#61 ) + [119] (byte) myprintf::bTrailing#82 ← phi( myprintf::@30/(byte) myprintf::bTrailing#75 myprintf::@74/(byte) myprintf::bTrailing#76 ) + [119] (word) myprintf::w#81 ← phi( myprintf::@30/(word) myprintf::w#74 myprintf::@74/(word) myprintf::w#75 ) + [119] (byte) myprintf::bArg#89 ← phi( myprintf::@30/(byte) myprintf::bArg#81 myprintf::@74/(byte) myprintf::bArg#82 ) + [119] (byte*) myprintf::str#92 ← phi( myprintf::@30/(byte*) myprintf::str#84 myprintf::@74/(byte*) myprintf::str#85 ) + [119] (byte) myprintf::bDigits#10 ← phi( myprintf::@74/(byte) myprintf::bDigits#50 myprintf::@30/(byte) myprintf::bDigits#2 ) + [119] (byte) myprintf::bLen#11 ← phi( myprintf::@74/(byte) myprintf::bLen#59 myprintf::@30/(byte) myprintf::bLen#4 ) + [120] if((byte) myprintf::bLeadZero#48==(byte) 0) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bLeadZero#69 ← phi( myprintf::@27/(byte) myprintf::bLeadZero#48 ) + (byte) myprintf::bTrailing#79 ← phi( myprintf::@27/(byte) myprintf::bTrailing#82 ) + (word) myprintf::w#77 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#85 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#88 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (byte) myprintf::bLeadZero#70 ← phi( myprintf::@27/(byte) myprintf::bLeadZero#48 ) + (byte) myprintf::bTrailing#80 ← phi( myprintf::@27/(byte) myprintf::bTrailing#82 ) + (word) myprintf::w#78 ← phi( myprintf::@27/(word) myprintf::w#81 ) + (byte) myprintf::bArg#86 ← phi( myprintf::@27/(byte) myprintf::bArg#89 ) + (byte*) myprintf::str#89 ← phi( myprintf::@27/(byte*) myprintf::str#92 ) + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + [121] (byte) myprintf::bLeadZero#60 ← phi( myprintf::@28/(byte) myprintf::bLeadZero#69 myprintf::@29/(byte) myprintf::bLeadZero#70 ) + [121] (byte) myprintf::bTrailing#75 ← phi( myprintf::@28/(byte) myprintf::bTrailing#79 myprintf::@29/(byte) myprintf::bTrailing#80 ) + [121] (word) myprintf::w#74 ← phi( myprintf::@28/(word) myprintf::w#77 myprintf::@29/(word) myprintf::w#78 ) + [121] (byte) myprintf::bArg#81 ← phi( myprintf::@28/(byte) myprintf::bArg#85 myprintf::@29/(byte) myprintf::bArg#86 ) + [121] (byte*) myprintf::str#84 ← phi( myprintf::@28/(byte*) myprintf::str#88 myprintf::@29/(byte*) myprintf::str#89 ) + [121] (byte~) myprintf::$41 ← phi( myprintf::@28/(const byte) myprintf::$40 myprintf::@29/(const byte) myprintf::$39 ) + [122] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [123] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [124] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [125] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + [126] (byte) myprintf::bLeadZero#64 ← phi( myprintf::@26/(byte) myprintf::bLeadZero#73 myprintf::@34/(byte) myprintf::bLeadZero#64 ) + [126] (byte) myprintf::bTrailing#61 ← phi( myprintf::@26/(byte) myprintf::bTrailing#70 myprintf::@34/(byte) myprintf::bTrailing#61 ) + [126] (word) myprintf::w#69 ← phi( myprintf::@26/(word) myprintf::w#72 myprintf::@34/(word) myprintf::w#69 ) + [126] (byte) myprintf::bArg#71 ← phi( myprintf::@26/(byte) myprintf::bArg#76 myprintf::@34/(byte) myprintf::bArg#71 ) + [126] (byte*) myprintf::str#71 ← phi( myprintf::@26/(byte*) myprintf::str#79 myprintf::@34/(byte*) myprintf::str#71 ) + [126] (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#24 ) + [126] (byte) myprintf::digit#3 ← phi( myprintf::@26/(const byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + [127] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [128] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [129] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [130] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte) myprintf::bLeadZero#50 ← phi( myprintf::@34/(byte) myprintf::bLeadZero#64 ) + (byte) myprintf::bTrailing#49 ← phi( myprintf::@34/(byte) myprintf::bTrailing#61 ) + (word) myprintf::w#52 ← phi( myprintf::@34/(word) myprintf::w#69 ) + (byte) myprintf::bArg#54 ← phi( myprintf::@34/(byte) myprintf::bArg#71 ) + (byte*) myprintf::str#55 ← phi( myprintf::@34/(byte*) myprintf::str#71 ) + [131] (bool~) myprintf::$44 ← (byte) myprintf::bTrailing#49 != (byte) 0 + [132] (bool~) myprintf::$45 ← (byte) myprintf::bDigits#16 > (byte) myprintf::b#17 + [133] if((bool~) myprintf::$44) goto myprintf::@75 + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@38 myprintf::@75 + [134] (byte) myprintf::bLeadZero#51 ← phi( myprintf::@38/(byte) myprintf::bLeadZero#51 myprintf::@75/(byte) myprintf::bLeadZero#54 ) + [134] (byte) myprintf::bTrailing#51 ← phi( myprintf::@38/(byte) myprintf::bTrailing#51 myprintf::@75/(byte) myprintf::bTrailing#54 ) + [134] (word) myprintf::w#53 ← phi( myprintf::@38/(word) myprintf::w#53 myprintf::@75/(word) myprintf::w#55 ) + [134] (byte) myprintf::bArg#55 ← phi( myprintf::@38/(byte) myprintf::bArg#55 myprintf::@75/(byte) myprintf::bArg#58 ) + [134] (byte*) myprintf::str#56 ← phi( myprintf::@38/(byte*) myprintf::str#56 myprintf::@75/(byte*) myprintf::str#59 ) + [134] (byte) myprintf::bDigits#8 ← phi( myprintf::@75/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 ) + [134] (byte) myprintf::bLen#13 ← phi( myprintf::@75/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + [135] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#13) ← (byte) ' ' + [136] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [137] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [138] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@35 myprintf::@38 myprintf::@6 myprintf::@73 myprintf::@75 + [139] (byte) myprintf::bLeadZero#44 ← phi( myprintf::@14/(byte) myprintf::bLeadZero#49 myprintf::@35/(byte) myprintf::bLeadZero#50 myprintf::@38/(byte) myprintf::bLeadZero#51 myprintf::@6/(byte) myprintf::bLeadZero#52 myprintf::@73/(byte) myprintf::bLeadZero#53 myprintf::@75/(byte) myprintf::bLeadZero#54 ) + [139] (byte) myprintf::bTrailing#44 ← phi( myprintf::@14/(byte) myprintf::bTrailing#50 myprintf::@35/(byte) myprintf::bTrailing#49 myprintf::@38/(byte) myprintf::bTrailing#51 myprintf::@6/(byte) myprintf::bTrailing#52 myprintf::@73/(byte) myprintf::bTrailing#53 myprintf::@75/(byte) myprintf::bTrailing#54 ) + [139] (word) myprintf::w#42 ← phi( myprintf::@14/(word) myprintf::w#51 myprintf::@35/(word) myprintf::w#52 myprintf::@38/(word) myprintf::w#53 myprintf::@6/(word) myprintf::w#47 myprintf::@73/(word) myprintf::w#54 myprintf::@75/(word) myprintf::w#55 ) + [139] (byte) myprintf::bArg#45 ← phi( myprintf::@14/(byte) myprintf::bArg#53 myprintf::@35/(byte) myprintf::bArg#54 myprintf::@38/(byte) myprintf::bArg#55 myprintf::@6/(byte) myprintf::bArg#56 myprintf::@73/(byte) myprintf::bArg#57 myprintf::@75/(byte) myprintf::bArg#58 ) + [139] (byte*) myprintf::str#48 ← phi( myprintf::@14/(byte*) myprintf::str#54 myprintf::@35/(byte*) myprintf::str#55 myprintf::@38/(byte*) myprintf::str#56 myprintf::@6/(byte*) myprintf::str#57 myprintf::@73/(byte*) myprintf::str#58 myprintf::@75/(byte*) myprintf::str#59 ) + [139] (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#51 myprintf::@35/(byte) myprintf::bDigits#16 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@73/(byte) myprintf::bDigits#52 myprintf::@6/(byte) myprintf::bDigits#53 ) + [139] (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@73/(byte) myprintf::bLen#60 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte) myprintf::b#43 ← phi( ) + (byte) myprintf::bLeadZero#57 ← phi( myprintf::@2/(byte) myprintf::bLeadZero#68 ) + (byte) myprintf::bDigits#55 ← phi( myprintf::@2/(byte) myprintf::bDigits#66 ) + (byte) myprintf::bTrailing#56 ← phi( myprintf::@2/(byte) myprintf::bTrailing#67 ) + (word) myprintf::w#58 ← phi( myprintf::@2/(word) myprintf::w#71 ) + (byte) myprintf::bLen#73 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#61 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte) myprintf::bFormat#26 ← phi( myprintf::@2/(byte) myprintf::bFormat#31 ) + (byte*) myprintf::str#65 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [140] (bool~) myprintf::$54 ← (byte) myprintf::b#43 >= (byte) $41 + [141] (bool~) myprintf::$55 ← (byte) myprintf::b#43 <= (byte) $5a + [142] if((bool~) myprintf::$54) goto myprintf::@76 + to:myprintf::@60 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLen#77 ← phi( myprintf::@2/(byte) myprintf::bLen#83 ) + (byte) myprintf::bArg#50 ← phi( myprintf::@2/(byte) myprintf::bArg#65 ) + (byte*) myprintf::str#75 ← phi( myprintf::@2/(byte*) myprintf::str#77 ) + [143] if((byte) myprintf::bArg#50==(byte) 0) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#64 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#66 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#62 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLen#78 ← phi( myprintf::@64/(byte) myprintf::bLen#77 ) + (byte) myprintf::bArg#51 ← phi( myprintf::@64/(byte) myprintf::bArg#50 ) + (byte*) myprintf::str#76 ← phi( myprintf::@64/(byte*) myprintf::str#75 ) + [144] if((byte) myprintf::bArg#51==(byte) 1) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#65 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#67 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#63 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLen#66 ← phi( myprintf::@65/(byte) myprintf::bLen#78 ) + (byte) myprintf::bArg#68 ← phi( myprintf::@65/(byte) myprintf::bArg#51 ) + (byte*) myprintf::str#64 ← phi( myprintf::@65/(byte*) myprintf::str#76 ) + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + [145] (byte) myprintf::bLen#54 ← phi( myprintf::@54/(byte) myprintf::bLen#64 myprintf::@55/(byte) myprintf::bLen#65 myprintf::@66/(byte) myprintf::bLen#66 ) + [145] (byte) myprintf::bArg#52 ← phi( myprintf::@54/(byte) myprintf::bArg#66 myprintf::@55/(byte) myprintf::bArg#67 myprintf::@66/(byte) myprintf::bArg#68 ) + [145] (byte*) myprintf::str#51 ← phi( myprintf::@54/(byte*) myprintf::str#62 myprintf::@55/(byte*) myprintf::str#63 myprintf::@66/(byte*) myprintf::str#64 ) + [145] (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w1#6 myprintf::@55/(word) myprintf::w2#7 myprintf::@66/(word) myprintf::w3#7 ) + [146] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#52 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 myprintf::@76 + [147] (byte) myprintf::bLeadZero#47 ← phi( myprintf::@53/(byte) myprintf::bLeadZero#57 myprintf::@68/(byte) myprintf::bLeadZero#58 myprintf::@76/(byte) myprintf::bLeadZero#59 ) + [147] (byte) myprintf::bDigits#47 ← phi( myprintf::@53/(byte) myprintf::bDigits#55 myprintf::@68/(byte) myprintf::bDigits#56 myprintf::@76/(byte) myprintf::bDigits#57 ) + [147] (byte) myprintf::bTrailing#46 ← phi( myprintf::@53/(byte) myprintf::bTrailing#56 myprintf::@68/(byte) myprintf::bTrailing#57 myprintf::@76/(byte) myprintf::bTrailing#58 ) + [147] (word) myprintf::w#45 ← phi( myprintf::@53/(word) myprintf::w#58 myprintf::@68/(word) myprintf::w#59 myprintf::@76/(word) myprintf::w#60 ) + [147] (byte) myprintf::bLen#61 ← phi( myprintf::@53/(byte) myprintf::bLen#73 myprintf::@68/(byte) myprintf::bLen#74 myprintf::@76/(byte) myprintf::bLen#75 ) + [147] (byte) myprintf::bArg#48 ← phi( myprintf::@53/(byte) myprintf::bArg#61 myprintf::@68/(byte) myprintf::bArg#62 myprintf::@76/(byte) myprintf::bArg#63 ) + [147] (byte) myprintf::bFormat#22 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 myprintf::@68/(byte) myprintf::bFormat#27 myprintf::@76/(byte) myprintf::bFormat#28 ) + [147] (byte*) myprintf::str#52 ← phi( myprintf::@53/(byte*) myprintf::str#65 myprintf::@68/(byte*) myprintf::str#66 myprintf::@76/(byte*) myprintf::str#67 ) + [147] (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#43 myprintf::@68/(byte) myprintf::b#6 ) + [148] *((byte*) myprintf::dst#40 + (byte) myprintf::bLen#61) ← (byte) myprintf::b#25 + [149] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#61 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@76 + (byte) myprintf::b#44 ← phi( ) + (byte) myprintf::bLeadZero#58 ← phi( myprintf::@76/(byte) myprintf::bLeadZero#59 ) + (byte) myprintf::bDigits#56 ← phi( myprintf::@76/(byte) myprintf::bDigits#57 ) + (byte) myprintf::bTrailing#57 ← phi( myprintf::@76/(byte) myprintf::bTrailing#58 ) + (word) myprintf::w#59 ← phi( myprintf::@76/(word) myprintf::w#60 ) + (byte) myprintf::bLen#74 ← phi( myprintf::@76/(byte) myprintf::bLen#75 ) + (byte) myprintf::bArg#62 ← phi( myprintf::@76/(byte) myprintf::bArg#63 ) + (byte) myprintf::bFormat#27 ← phi( myprintf::@76/(byte) myprintf::bFormat#28 ) + (byte*) myprintf::str#66 ← phi( myprintf::@76/(byte*) myprintf::str#67 ) + [150] (byte) myprintf::b#6 ← (byte) myprintf::b#44 + (byte) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + [151] *((byte*) myprintf::dst#40 + (byte) myprintf::return#0) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + [152] return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [154] return + to:@return +div10: scope:[div10] from main::@6 + [155] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [156] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [157] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [158] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [159] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [160] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [161] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [162] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [163] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [164] return + to:@return +main: scope:[main] from @14 + [165] *((const byte*) VICBANK#0) ← (byte) $17 + [166] *((const byte*) zp1#0) ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + [167] (word) main::u#11 ← phi( main/(const word) main::u#1 main::@12/(word) main::u#2 ) + [168] *((const byte*) TIMEHI#0) ← (byte) 0 + [169] *((const byte*) TIMELO#0) ← (byte) 0 + [170] *((const byte*) zp2#0) ← (byte) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + [171] (word) div16u::dividend#0 ← (word) main::u#11 + [172] call div16u + [173] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [174] (word) main::v#1 ← (word) div16u::return#2 + [175] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [176] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + [177] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) + [178] (word~) main::$3 ← (word~) main::$2 << (byte) 8 + [179] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) + [180] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [181] (word) myprintf::w1#0 ← (word) main::u#11 + [182] (word) myprintf::w2#0 ← (word) main::v#1 + [183] call myprintf + to:main::@11 +main::@11: scope:[main] from main::@3 + [184] call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + [185] (word) main::u#2 ← (word) main::u#11 - (word) $4d2 + [186] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [187] if(*((const byte*) zp1#0)<(byte) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + [188] *((const byte*) zp1#0) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + [189] (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(const word) main::u#3 ) + [190] *((const byte*) TIMEHI#0) ← (byte) 0 + [191] *((const byte*) TIMELO#0) ← (byte) 0 + [192] *((const byte*) zp2#0) ← (byte) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + [193] (word) div10::val#4 ← (word) main::u#15 + [194] call div10 + [195] (word) div10::return#2 ← (word) div10::return#0 + to:main::@13 +main::@13: scope:[main] from main::@6 + [196] (word) main::v#2 ← (word) div10::return#2 + [197] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [198] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + [199] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) + [200] (word~) main::$12 ← (word~) main::$11 << (byte) 8 + [201] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) + [202] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [203] (word) myprintf::w1#1 ← (word) main::u#15 + [204] (word) myprintf::w2#1 ← (word) main::v#2 + [205] call myprintf + to:main::@14 +main::@14: scope:[main] from main::@7 + [206] call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + [207] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 + [208] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [209] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + to:main::@return +main::@return: scope:[main] from main::@8 + [210] return + to:@return +@14: scope:[] from @8 + [211] call main + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 +utoa::@13: scope:[utoa] from utoa + [212] if((bool~) utoa::$1) goto utoa::@5 + to:utoa::@1 +utoa::@14: scope:[utoa] from utoa::@1 + [213] if((bool~) utoa::$5) goto utoa::@6 + to:utoa::@2 +utoa::@15: scope:[utoa] from utoa::@2 + [214] if((bool~) utoa::$9) goto utoa::@7 + to:utoa::@3 +utoa::@16: scope:[utoa] from utoa::@3 + [215] if((bool~) utoa::$13) goto utoa::@8 + to:utoa::@4 +myprintf::@72: scope:[myprintf] from myprintf::@3 + (byte) myprintf::bLeadZero#55 ← phi( myprintf::@3/(byte) myprintf::bLeadZero#67 ) + (byte) myprintf::bDigits#65 ← phi( myprintf::@3/(byte) myprintf::bDigits#64 ) + (byte) myprintf::bTrailing#55 ← phi( myprintf::@3/(byte) myprintf::bTrailing#66 ) + (word) myprintf::w#56 ← phi( myprintf::@3/(word) myprintf::w#70 ) + (byte) myprintf::bLen#62 ← phi( myprintf::@3/(byte) myprintf::bLen#76 ) + (byte) myprintf::bArg#59 ← phi( myprintf::@3/(byte) myprintf::bArg#74 ) + (byte) myprintf::bFormat#24 ← phi( myprintf::@3/(byte) myprintf::bFormat#30 ) + (byte*) myprintf::str#60 ← phi( myprintf::@3/(byte*) myprintf::str#74 ) + [216] if((bool~) myprintf::$5) goto myprintf::@41 + to:myprintf::@4 +myprintf::@73: scope:[myprintf] from myprintf::@46 + (byte) myprintf::bLeadZero#53 ← phi( myprintf::@46/(byte) myprintf::bLeadZero#66 ) + (byte) myprintf::bDigits#52 ← phi( myprintf::@46/(byte) myprintf::bDigits#62 ) + (byte) myprintf::bTrailing#53 ← phi( myprintf::@46/(byte) myprintf::bTrailing#65 ) + (word) myprintf::w#54 ← phi( myprintf::@46/(word) myprintf::w#64 ) + (byte) myprintf::bLen#60 ← phi( myprintf::@46/(byte) myprintf::bLen#72 ) + (byte) myprintf::bArg#57 ← phi( myprintf::@46/(byte) myprintf::bArg#73 ) + (byte*) myprintf::str#58 ← phi( myprintf::@46/(byte*) myprintf::str#73 ) + [217] if((bool~) myprintf::$14) goto myprintf::@47 + to:myprintf::@40 +myprintf::@74: scope:[myprintf] from myprintf::@21 + (byte) myprintf::bLeadZero#61 ← phi( myprintf::@21/(byte) myprintf::bLeadZero#71 ) + (byte) myprintf::bDigits#50 ← phi( myprintf::@21/(byte) myprintf::bDigits#49 ) + (byte) myprintf::bTrailing#76 ← phi( myprintf::@21/(byte) myprintf::bTrailing#48 ) + (word) myprintf::w#75 ← phi( myprintf::@21/(word) myprintf::w#73 ) + (byte) myprintf::bLen#59 ← phi( myprintf::@21/(byte) myprintf::bLen#58 ) + (byte) myprintf::bArg#82 ← phi( myprintf::@21/(byte) myprintf::bArg#80 ) + (byte*) myprintf::str#85 ← phi( myprintf::@21/(byte*) myprintf::str#83 ) + [218] if((bool~) myprintf::$35) goto myprintf::@27 + to:myprintf::@26 +myprintf::@75: scope:[myprintf] from myprintf::@35 + (byte) myprintf::bLeadZero#54 ← phi( myprintf::@35/(byte) myprintf::bLeadZero#50 ) + (byte) myprintf::bTrailing#54 ← phi( myprintf::@35/(byte) myprintf::bTrailing#49 ) + (word) myprintf::w#55 ← phi( myprintf::@35/(word) myprintf::w#52 ) + (byte) myprintf::bArg#58 ← phi( myprintf::@35/(byte) myprintf::bArg#54 ) + (byte*) myprintf::str#59 ← phi( myprintf::@35/(byte*) myprintf::str#55 ) + [219] if((bool~) myprintf::$45) goto myprintf::@38 + to:myprintf::@40 +myprintf::@76: scope:[myprintf] from myprintf::@53 + (byte) myprintf::bLeadZero#59 ← phi( myprintf::@53/(byte) myprintf::bLeadZero#57 ) + (byte) myprintf::bDigits#57 ← phi( myprintf::@53/(byte) myprintf::bDigits#55 ) + (byte) myprintf::bTrailing#58 ← phi( myprintf::@53/(byte) myprintf::bTrailing#56 ) + (word) myprintf::w#60 ← phi( myprintf::@53/(word) myprintf::w#58 ) + (byte) myprintf::bLen#75 ← phi( myprintf::@53/(byte) myprintf::bLen#73 ) + (byte) myprintf::bArg#63 ← phi( myprintf::@53/(byte) myprintf::bArg#61 ) + (byte) myprintf::bFormat#28 ← phi( myprintf::@53/(byte) myprintf::bFormat#26 ) + (byte*) myprintf::str#67 ← phi( myprintf::@53/(byte*) myprintf::str#65 ) + [220] if((bool~) myprintf::$55) goto myprintf::@68 + to:myprintf::@60 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $10 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $10 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte*) myprintf::str#0 = (byte*) myprintf::str#10 +Alias (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#4 +Alias (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 +Alias (byte) myprintf::bLen#14 = (byte) myprintf::return#0 +Alias (word) myprintf::w#10 = (word) myprintf::w#17 +Alias (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#21 +Alias (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#24 +Alias (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#18 +Alias (byte) myprintf::bDigits#48 = (byte) myprintf::bDigits#64 (byte) myprintf::bDigits#58 (byte) myprintf::bDigits#65 +Alias (byte*) myprintf::str#49 = (byte*) myprintf::str#60 (byte*) myprintf::str#74 (byte*) myprintf::str#68 (byte*) myprintf::str#53 +Alias (byte) myprintf::bFormat#20 = (byte) myprintf::bFormat#24 (byte) myprintf::bFormat#30 (byte) myprintf::bFormat#29 (byte) myprintf::bFormat#23 +Alias (byte) myprintf::bArg#46 = (byte) myprintf::bArg#59 (byte) myprintf::bArg#74 (byte) myprintf::bArg#64 (byte) myprintf::bArg#49 +Alias (byte) myprintf::bLen#52 = (byte) myprintf::bLen#62 (byte) myprintf::bLen#76 (byte) myprintf::bLen#67 (byte) myprintf::bLen#55 +Alias (word) myprintf::w#43 = (word) myprintf::w#56 (word) myprintf::w#70 (word) myprintf::w#61 (word) myprintf::w#46 +Alias (byte) myprintf::bTrailing#45 = (byte) myprintf::bTrailing#55 (byte) myprintf::bTrailing#66 (byte) myprintf::bTrailing#59 (byte) myprintf::bTrailing#47 +Alias (byte) myprintf::bLeadZero#45 = (byte) myprintf::bLeadZero#55 (byte) myprintf::bLeadZero#67 (byte) myprintf::bLeadZero#75 +Alias (byte) myprintf::b#36 = (byte) myprintf::b#39 (byte) myprintf::b#45 (byte) myprintf::b#37 +Alias (byte*) myprintf::str#50 = (byte*) myprintf::str#72 (byte*) myprintf::str#61 (byte*) myprintf::str#57 (byte*) myprintf::str#80 (byte*) myprintf::str#93 (byte*) myprintf::str#91 (byte*) myprintf::str#73 (byte*) myprintf::str#58 +Alias (byte) myprintf::bArg#47 = (byte) myprintf::bArg#72 (byte) myprintf::bArg#60 (byte) myprintf::bArg#56 (byte) myprintf::bArg#77 (byte) myprintf::bArg#90 (byte) myprintf::bArg#88 (byte) myprintf::bArg#73 (byte) myprintf::bArg#57 +Alias (byte) myprintf::bLen#53 = (byte) myprintf::bLen#68 (byte) myprintf::bLen#63 (byte) myprintf::bLen#56 (byte) myprintf::bLen#82 (byte) myprintf::bLen#84 (byte) myprintf::bLen#81 (byte) myprintf::bLen#72 (byte) myprintf::bLen#60 +Alias (word) myprintf::w#44 = (word) myprintf::w#62 (word) myprintf::w#57 (word) myprintf::w#47 (word) myprintf::w#63 (word) myprintf::w#48 (word) myprintf::w#80 (word) myprintf::w#64 (word) myprintf::w#54 +Alias (byte) myprintf::bTrailing#52 = (byte) myprintf::bTrailing#64 (byte) myprintf::bTrailing#72 (byte) myprintf::bTrailing#73 (byte) myprintf::bTrailing#74 (byte) myprintf::bTrailing#69 (byte) myprintf::bTrailing#65 (byte) myprintf::bTrailing#53 +Alias (byte) myprintf::bDigits#46 = (byte) myprintf::bDigits#63 (byte) myprintf::bDigits#54 (byte) myprintf::bDigits#53 (byte) myprintf::bDigits#70 (byte) myprintf::bDigits#71 (byte) myprintf::bDigits#68 (byte) myprintf::bDigits#62 (byte) myprintf::bDigits#52 +Alias (byte) myprintf::bLeadZero#46 = (byte) myprintf::bLeadZero#65 (byte) myprintf::bLeadZero#56 (byte) myprintf::bLeadZero#52 (byte) myprintf::bLeadZero#74 (byte) myprintf::bLeadZero#82 (byte) myprintf::bLeadZero#80 (byte) myprintf::bLeadZero#66 (byte) myprintf::bLeadZero#53 +Alias (byte) myprintf::b#38 = (byte) myprintf::b#40 (byte) myprintf::b#41 (byte) myprintf::b#42 +Alias (byte) myprintf::bFormat#21 = (byte) myprintf::bFormat#25 +Alias (byte*) myprintf::str#81 = (byte*) myprintf::str#82 (byte*) myprintf::str#86 +Alias (byte) myprintf::bArg#78 = (byte) myprintf::bArg#79 (byte) myprintf::bArg#83 +Alias (byte) myprintf::bLen#69 = (byte) myprintf::bLen#70 (byte) myprintf::bLen#79 +Alias (word) myprintf::w#49 = (word) myprintf::w#66 (word) myprintf::w#65 +Alias (byte) myprintf::bTrailing#77 = (byte) myprintf::bTrailing#78 (byte) myprintf::bTrailing#81 +Alias (byte) myprintf::bDigits#72 = (byte) myprintf::bDigits#73 (byte) myprintf::bDigits#74 +Alias (byte) myprintf::bLeadZero#77 = (byte) myprintf::bLeadZero#78 (byte) myprintf::bLeadZero#81 +Alias (byte*) myprintf::str#69 = (byte*) myprintf::str#78 (byte*) myprintf::str#70 +Alias (byte) myprintf::bArg#69 = (byte) myprintf::bArg#75 (byte) myprintf::bArg#70 +Alias (word) myprintf::w#50 = (word) myprintf::w#67 (word) myprintf::w#68 +Alias (byte) myprintf::bTrailing#62 = (byte) myprintf::bTrailing#71 (byte) myprintf::bTrailing#63 +Alias (byte) myprintf::bDigits#60 = (byte) myprintf::bDigits#69 (byte) myprintf::bDigits#61 +Alias (byte) myprintf::bLeadZero#62 = (byte) myprintf::bLeadZero#72 (byte) myprintf::bLeadZero#63 +Alias (byte*) myprintf::str#83 = (byte*) myprintf::str#90 (byte*) myprintf::str#87 (byte*) myprintf::str#85 +Alias (byte) myprintf::bArg#80 = (byte) myprintf::bArg#87 (byte) myprintf::bArg#84 (byte) myprintf::bArg#82 +Alias (byte) myprintf::bLen#58 = (byte) myprintf::bLen#80 (byte) myprintf::bLen#71 (byte) myprintf::bLen#59 +Alias (word) myprintf::w#73 = (word) myprintf::w#79 (word) myprintf::w#76 (word) myprintf::w#75 +Alias (byte) myprintf::bTrailing#48 = (byte) myprintf::bTrailing#68 (byte) myprintf::bTrailing#60 (byte) myprintf::bTrailing#76 +Alias (byte) myprintf::bDigits#49 = (byte) myprintf::bDigits#67 (byte) myprintf::bDigits#59 (byte) myprintf::bDigits#50 +Alias (byte) myprintf::bLeadZero#61 = (byte) myprintf::bLeadZero#79 (byte) myprintf::bLeadZero#76 (byte) myprintf::bLeadZero#71 +Alias (byte*) myprintf::str#88 = (byte*) myprintf::str#92 (byte*) myprintf::str#89 +Alias (byte) myprintf::bArg#85 = (byte) myprintf::bArg#89 (byte) myprintf::bArg#86 +Alias (word) myprintf::w#77 = (word) myprintf::w#81 (word) myprintf::w#78 +Alias (byte) myprintf::bTrailing#79 = (byte) myprintf::bTrailing#82 (byte) myprintf::bTrailing#80 +Alias (byte) myprintf::bLeadZero#48 = (byte) myprintf::bLeadZero#69 (byte) myprintf::bLeadZero#70 +Alias (byte*) myprintf::str#55 = (byte*) myprintf::str#71 (byte*) myprintf::str#59 +Alias (byte) myprintf::bArg#54 = (byte) myprintf::bArg#71 (byte) myprintf::bArg#58 +Alias (word) myprintf::w#52 = (word) myprintf::w#69 (word) myprintf::w#55 +Alias (byte) myprintf::bTrailing#49 = (byte) myprintf::bTrailing#61 (byte) myprintf::bTrailing#54 +Alias (byte) myprintf::bLeadZero#50 = (byte) myprintf::bLeadZero#64 (byte) myprintf::bLeadZero#54 +Alias (byte*) myprintf::str#62 = (byte*) myprintf::str#66 (byte*) myprintf::str#67 (byte*) myprintf::str#65 (byte*) myprintf::str#77 (byte*) myprintf::str#75 (byte*) myprintf::str#76 (byte*) myprintf::str#63 (byte*) myprintf::str#64 +Alias (byte) myprintf::bFormat#26 = (byte) myprintf::bFormat#27 (byte) myprintf::bFormat#28 (byte) myprintf::bFormat#31 +Alias (byte) myprintf::bArg#50 = (byte) myprintf::bArg#62 (byte) myprintf::bArg#63 (byte) myprintf::bArg#61 (byte) myprintf::bArg#65 (byte) myprintf::bArg#66 (byte) myprintf::bArg#51 (byte) myprintf::bArg#67 (byte) myprintf::bArg#68 +Alias (byte) myprintf::bLen#64 = (byte) myprintf::bLen#74 (byte) myprintf::bLen#75 (byte) myprintf::bLen#73 (byte) myprintf::bLen#83 (byte) myprintf::bLen#77 (byte) myprintf::bLen#78 (byte) myprintf::bLen#65 (byte) myprintf::bLen#66 +Alias (word) myprintf::w#58 = (word) myprintf::w#59 (word) myprintf::w#60 (word) myprintf::w#71 +Alias (byte) myprintf::bTrailing#56 = (byte) myprintf::bTrailing#57 (byte) myprintf::bTrailing#58 (byte) myprintf::bTrailing#67 +Alias (byte) myprintf::bDigits#55 = (byte) myprintf::bDigits#56 (byte) myprintf::bDigits#57 (byte) myprintf::bDigits#66 +Alias (byte) myprintf::bLeadZero#57 = (byte) myprintf::bLeadZero#58 (byte) myprintf::bLeadZero#59 (byte) myprintf::bLeadZero#68 +Alias (byte) myprintf::b#35 = (byte) myprintf::b#44 (byte) myprintf::b#46 (byte) myprintf::b#43 +Alias (byte*) myprintf::str#5 = (byte*) myprintf::str#94 +Successful SSA optimization Pass2AliasElimination +Alias (byte*) myprintf::str#49 = (byte*) myprintf::str#50 (byte*) myprintf::str#81 (byte*) myprintf::str#69 (byte*) myprintf::str#54 +Alias (byte) myprintf::bFormat#20 = (byte) myprintf::bFormat#21 +Alias (byte) myprintf::bArg#46 = (byte) myprintf::bArg#47 (byte) myprintf::bArg#78 (byte) myprintf::bArg#69 (byte) myprintf::bArg#53 +Alias (byte) myprintf::bLen#52 = (byte) myprintf::bLen#53 (byte) myprintf::bLen#69 (byte) myprintf::bLen#57 +Alias (word) myprintf::w#43 = (word) myprintf::w#44 (word) myprintf::w#49 (word) myprintf::w#50 (word) myprintf::w#51 +Alias (byte) myprintf::bTrailing#45 = (byte) myprintf::bTrailing#52 (byte) myprintf::bTrailing#77 (byte) myprintf::bTrailing#62 (byte) myprintf::bTrailing#50 +Alias (byte) myprintf::bDigits#46 = (byte) myprintf::bDigits#48 (byte) myprintf::bDigits#72 (byte) myprintf::bDigits#60 (byte) myprintf::bDigits#51 +Alias (byte) myprintf::bLeadZero#45 = (byte) myprintf::bLeadZero#46 (byte) myprintf::bLeadZero#77 (byte) myprintf::bLeadZero#62 (byte) myprintf::bLeadZero#49 +Alias (byte) myprintf::b#36 = (byte) myprintf::b#38 +Alias (byte*) myprintf::str#84 = (byte*) myprintf::str#88 +Alias (byte) myprintf::bArg#81 = (byte) myprintf::bArg#85 +Alias (word) myprintf::w#74 = (word) myprintf::w#77 +Alias (byte) myprintf::bTrailing#75 = (byte) myprintf::bTrailing#79 +Alias (byte) myprintf::bLeadZero#48 = (byte) myprintf::bLeadZero#60 +Alias (byte*) myprintf::str#51 = (byte*) myprintf::str#62 (byte*) myprintf::str#52 +Alias (byte) myprintf::bArg#48 = (byte) myprintf::bArg#52 (byte) myprintf::bArg#50 +Alias (byte) myprintf::bLen#54 = (byte) myprintf::bLen#64 (byte) myprintf::bLen#61 +Alias (byte) myprintf::bFormat#22 = (byte) myprintf::bFormat#26 +Alias (word) myprintf::w#45 = (word) myprintf::w#58 +Alias (byte) myprintf::bTrailing#46 = (byte) myprintf::bTrailing#56 +Alias (byte) myprintf::bDigits#47 = (byte) myprintf::bDigits#55 +Alias (byte) myprintf::bLeadZero#47 = (byte) myprintf::bLeadZero#57 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte*) myprintf::str#83 (byte*) myprintf::str#49 +Identical Phi Values (byte) myprintf::bArg#80 (byte) myprintf::bArg#46 +Identical Phi Values (byte) myprintf::bLen#58 (byte) myprintf::bLen#52 +Identical Phi Values (word) myprintf::w#73 (word) myprintf::w#43 +Identical Phi Values (byte) myprintf::bTrailing#48 (byte) myprintf::bTrailing#45 +Identical Phi Values (byte) myprintf::bDigits#49 (byte) myprintf::bDigits#46 +Identical Phi Values (byte) myprintf::bLeadZero#61 (byte) myprintf::bLeadZero#45 +Identical Phi Values (byte*) myprintf::str#84 (byte*) myprintf::str#83 +Identical Phi Values (byte) myprintf::bArg#81 (byte) myprintf::bArg#80 +Identical Phi Values (word) myprintf::w#74 (word) myprintf::w#73 +Identical Phi Values (byte) myprintf::bTrailing#75 (byte) myprintf::bTrailing#48 +Identical Phi Values (byte) myprintf::bLeadZero#48 (byte) myprintf::bLeadZero#61 +Identical Phi Values (byte*) myprintf::str#55 (byte*) myprintf::str#79 +Identical Phi Values (byte) myprintf::bArg#54 (byte) myprintf::bArg#76 +Identical Phi Values (word) myprintf::w#52 (word) myprintf::w#72 +Identical Phi Values (byte) myprintf::bTrailing#49 (byte) myprintf::bTrailing#70 +Identical Phi Values (byte) myprintf::bLeadZero#50 (byte) myprintf::bLeadZero#73 +Identical Phi Values (byte*) myprintf::str#56 (byte*) myprintf::str#55 +Identical Phi Values (byte) myprintf::bArg#55 (byte) myprintf::bArg#54 +Identical Phi Values (word) myprintf::w#53 (word) myprintf::w#52 +Identical Phi Values (byte) myprintf::bTrailing#51 (byte) myprintf::bTrailing#49 +Identical Phi Values (byte) myprintf::bLeadZero#51 (byte) myprintf::bLeadZero#50 +Identical Phi Values (byte) myprintf::bFormat#32 (const byte) myprintf::bFormat#0 +Identical Phi Values (byte) myprintf::bArg#91 (const byte) myprintf::bArg#0 +Identical Phi Values (byte) myprintf::bLen#85 (const byte) myprintf::bLen#0 +Identical Phi Values (word) myprintf::w#82 (const word) myprintf::w#0 +Identical Phi Values (byte) myprintf::bTrailing#83 (const byte) myprintf::bTrailing#0 +Identical Phi Values (byte) myprintf::bDigits#75 (const byte) myprintf::bDigits#0 +Identical Phi Values (byte) myprintf::bLeadZero#83 (const byte) myprintf::bLeadZero#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values (byte*) myprintf::str#79 (byte*) myprintf::str#49 +Identical Phi Values (byte) myprintf::bArg#76 (byte) myprintf::bArg#46 +Identical Phi Values (word) myprintf::w#72 (word) myprintf::w#43 +Identical Phi Values (byte) myprintf::bTrailing#70 (byte) myprintf::bTrailing#45 +Identical Phi Values (byte) myprintf::bLeadZero#73 (byte) myprintf::bLeadZero#45 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values (byte*) myprintf::str#48 (byte*) myprintf::str#49 +Identical Phi Values (byte) myprintf::bArg#45 (byte) myprintf::bArg#46 +Identical Phi Values (word) myprintf::w#42 (word) myprintf::w#43 +Identical Phi Values (byte) myprintf::bTrailing#44 (byte) myprintf::bTrailing#45 +Identical Phi Values (byte) myprintf::bLeadZero#44 (byte) myprintf::bLeadZero#45 +Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) utoa::$0 [30] if((const byte) utoa::bStarted#0==(byte) 1) goto utoa::@5 Simple Condition (bool~) utoa::$4 [34] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 Simple Condition (bool~) utoa::$8 [43] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 Simple Condition (bool~) utoa::$12 [53] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 -Simple Condition (bool~) myprintf::$4 [81] if((byte) myprintf::b#1>=(byte) '1') goto myprintf::@72 -Simple Condition (bool~) myprintf::$13 [96] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@47 -Simple Condition (bool~) myprintf::$34 [117] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@74 -Simple Condition (bool~) myprintf::$44 [133] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@75 -Simple Condition (bool~) myprintf::$54 [142] if((byte) myprintf::b#1>=(byte) $41) goto myprintf::@76 -Simple Condition (bool~) utoa::$1 [212] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 -Simple Condition (bool~) utoa::$5 [213] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 -Simple Condition (bool~) utoa::$9 [214] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 -Simple Condition (bool~) utoa::$13 [215] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 -Simple Condition (bool~) myprintf::$5 [216] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@41 -Simple Condition (bool~) myprintf::$14 [217] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@47 -Simple Condition (bool~) myprintf::$35 [218] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@27 -Simple Condition (bool~) myprintf::$45 [219] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@38 -Simple Condition (bool~) myprintf::$55 [220] if((byte) myprintf::b#1<=(byte) $5a) goto myprintf::@68 +Simple Condition (bool~) myprintf::$4 [84] if((byte) myprintf::b#36>=(byte) '1') goto myprintf::@72 +Simple Condition (bool~) myprintf::$13 [109] if((byte) myprintf::b#36==(byte) 'x') goto myprintf::@47 +Simple Condition (bool~) myprintf::$34 [137] if((byte) myprintf::bTrailing#45==(byte) 0) goto myprintf::@74 +Simple Condition (bool~) myprintf::$44 [156] if((byte) myprintf::bTrailing#45!=(byte) 0) goto myprintf::@75 +Simple Condition (bool~) myprintf::$54 [166] if((byte) myprintf::b#35>=(byte) $41) goto myprintf::@76 +Simple Condition (bool~) utoa::$1 [242] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 +Simple Condition (bool~) utoa::$5 [243] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 +Simple Condition (bool~) utoa::$9 [244] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 +Simple Condition (bool~) utoa::$13 [245] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 +Simple Condition (bool~) myprintf::$5 [247] if((byte) myprintf::b#36<=(byte) '9') goto myprintf::@41 +Simple Condition (bool~) myprintf::$14 [249] if((byte) myprintf::b#36==(byte) 'X') goto myprintf::@47 +Simple Condition (bool~) myprintf::$35 [251] if((byte) myprintf::bDigits#46>(byte) myprintf::b#17) goto myprintf::@27 +Simple Condition (bool~) myprintf::$45 [253] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@38 +Simple Condition (bool~) myprintf::$55 [255] if((byte) myprintf::b#35<=(byte) $5a) goto myprintf::@68 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [81] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 -Negating conditional jump and destination [117] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@26 -Negating conditional jump and destination [133] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@40 -Negating conditional jump and destination [142] if((byte) myprintf::b#1<(byte) $41) goto myprintf::@60 -Negating conditional jump and destination [219] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@40 -Negating conditional jump and destination [220] if((byte) myprintf::b#1>(byte) $5a) goto myprintf::@60 +Negating conditional jump and destination [84] if((byte) myprintf::b#36<(byte) '1') goto myprintf::@4 +Negating conditional jump and destination [137] if((byte) myprintf::bTrailing#45!=(byte) 0) goto myprintf::@26 +Negating conditional jump and destination [156] if((byte) myprintf::bTrailing#45==(byte) 0) goto myprintf::@40 +Negating conditional jump and destination [166] if((byte) myprintf::b#35<(byte) $41) goto myprintf::@60 +Negating conditional jump and destination [253] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@40 +Negating conditional jump and destination [255] if((byte) myprintf::b#35>(byte) $5a) goto myprintf::@60 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [39] (byte*) utoa::dst#0 ← ++ (const byte*) utoa::dst#5 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) utoa::dst#0 = ++utoa::dst#5 Successful SSA optimization Pass2ConstantIdentification if() condition always false - eliminating [30] if((const byte) utoa::bStarted#0==(byte) 1) goto utoa::@5 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +Removing PHI-reference to removed block (myprintf::@1_1) in block myprintf::@61 +if() condition always true - replacing block destination [258] if((const byte) myprintf::bFormat#0==(byte) 0) goto myprintf::@2 Successful SSA optimization Pass2ConstantIfs -Rewriting conditional comparison [220] if((byte) myprintf::b#1>(byte) $5a) goto myprintf::@60 -Adding number conversion cast (unumber) $5a+1 in if((byte) myprintf::b#1>=(byte) $5a+(number) 1) goto myprintf::@60 -Adding number conversion cast (unumber) 1 in if((byte) myprintf::b#1>=(unumber)(byte) $5a+(number) 1) goto myprintf::@60 +Rewriting conditional comparison [255] if((byte) myprintf::b#35>(byte) $5a) goto myprintf::@60 +Adding number conversion cast (unumber) $5a+1 in if((byte) myprintf::b#35>=(byte) $5a+(number) 1) goto myprintf::@60 +Adding number conversion cast (unumber) 1 in if((byte) myprintf::b#35>=(unumber)(byte) $5a+(number) 1) goto myprintf::@60 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast (byte) $5a+(unumber)(number) 1 Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte*) myprintf::str#0 = (byte*) myprintf::str#49 +Alias (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#20 +Alias (byte) myprintf::bArg#10 = (byte) myprintf::bArg#46 +Alias (byte) myprintf::bLen#14 = (byte) myprintf::bLen#52 +Alias (word) myprintf::w#10 = (word) myprintf::w#43 +Alias (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#45 +Alias (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#46 +Alias (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#45 +Alias (byte) myprintf::b#1 = (byte) myprintf::b#36 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const word) divr16u::quotient#0 Inlining constant with var siblings (const byte) divr16u::i#0 Inlining constant with var siblings (const word) divr16u::rem#3 @@ -3110,7 +8892,7 @@ Fixing phi predecessor for utoa::dst#16 to new block ( utoa::@13 -> utoa::@17 ) Added new block during phi lifting utoa::@18(between utoa::@14 and utoa::@2) Added new block during phi lifting utoa::@19(between utoa::@15 and utoa::@3) Added new block during phi lifting utoa::@20(between utoa::@16 and utoa::@4) -Added new block during phi lifting myprintf::@77(between myprintf::@52 and myprintf::@1) +Added new block during phi lifting myprintf::@77(between myprintf::@1 and myprintf::@2) Added new block during phi lifting myprintf::@78(between myprintf::@21 and myprintf::@26) Added new block during phi lifting myprintf::@79(between myprintf::@30 and myprintf::@26) Added new block during phi lifting myprintf::@80(between myprintf::@74 and myprintf::@27) @@ -3145,11 +8927,11 @@ Adding NOP phi() at start of divr16u::@6 CALL GRAPH Calls in [] to main:3 Calls in [main] to div16u:13 myprintf:27 Print:29 div10:39 myprintf:53 Print:55 -Calls in [myprintf] to utoa:134 -Calls in [utoa] to append:253 append:263 append:273 append:281 -Calls in [div16u] to divr16u:306 +Calls in [myprintf] to utoa:141 +Calls in [utoa] to append:262 append:272 append:282 append:290 +Calls in [div16u] to divr16u:315 -Created 59 initial phi equivalence classes +Created 61 initial phi equivalence classes Coalesced [24] myprintf::w1#46 ← myprintf::w1#0 Coalesced [25] myprintf::w2#46 ← myprintf::w2#0 Coalesced [26] myprintf::w3#46 ← myprintf::w3#0 @@ -3158,117 +8940,125 @@ Coalesced [51] myprintf::w2#47 ← myprintf::w2#1 Coalesced [52] myprintf::w3#47 ← myprintf::w3#1 Coalesced [61] main::u#18 ← main::u#4 Coalesced [62] main::u#17 ← main::u#2 -Coalesced [66] myprintf::str#47 ← myprintf::str#5 -Coalesced [71] myprintf::bFormat#24 ← myprintf::bFormat#10 -Coalesced [72] myprintf::return#10 ← myprintf::bLen#14 -Coalesced [73] myprintf::bArg#51 ← myprintf::bArg#12 -Coalesced [74] myprintf::w#48 ← myprintf::w#10 -Coalesced [75] myprintf::bTrailing#48 ← myprintf::bTrailing#10 -Coalesced [76] myprintf::bDigits#51 ← myprintf::bDigits#14 -Coalesced [82] myprintf::str#48 ← myprintf::str#0 -Coalesced (already) [83] myprintf::bFormat#20 ← myprintf::bFormat#4 -Coalesced (already) [84] myprintf::bArg#45 ← myprintf::bArg#10 -Coalesced (already) [85] myprintf::bLen#52 ← myprintf::return#0 -Coalesced (already) [86] myprintf::w#42 ← myprintf::w#17 -Coalesced (already) [87] myprintf::bTrailing#44 ← myprintf::bTrailing#21 -Coalesced (already) [88] myprintf::bDigits#46 ← myprintf::bDigits#24 -Coalesced [89] myprintf::bLeadZero#44 ← myprintf::bLeadZero#18 -Coalesced (already) [93] myprintf::bFormat#22 ← myprintf::bFormat#10 -Coalesced (already) [94] myprintf::return#7 ← myprintf::bLen#14 -Coalesced (already) [95] myprintf::bArg#48 ← myprintf::bArg#12 -Coalesced (already) [96] myprintf::w#45 ← myprintf::w#10 -Coalesced (already) [97] myprintf::bDigits#49 ← myprintf::bDigits#14 -Coalesced (already) [98] myprintf::bLeadZero#47 ← myprintf::bLeadZero#10 -Coalesced [103] myprintf::bLen#64 ← myprintf::bLen#14 -Coalesced [104] myprintf::bDigits#61 ← myprintf::bDigits#14 -Coalesced (already) [106] myprintf::return#5 ← myprintf::bLen#28 -Coalesced (already) [107] myprintf::bArg#46 ← myprintf::bArg#12 -Coalesced (already) [108] myprintf::w#43 ← myprintf::w#10 -Coalesced (already) [109] myprintf::bTrailing#45 ← myprintf::bTrailing#10 -Coalesced (already) [110] myprintf::bDigits#47 ← myprintf::bDigits#25 -Coalesced (already) [111] myprintf::bLeadZero#45 ← myprintf::bLeadZero#10 -Coalesced [129] myprintf::bLen#61 ← myprintf::bLen#3 -Coalesced (already) [130] myprintf::bDigits#58 ← myprintf::bDigits#14 -Coalesced [141] myprintf::bLen#57 ← myprintf::bLen#23 -Coalesced [149] myprintf::bLen#59 ← myprintf::bLen#24 -Coalesced [150] myprintf::bDigits#56 ← myprintf::bDigits#16 -Coalesced [156] myprintf::bLen#63 ← myprintf::bLen#6 -Coalesced [157] myprintf::bDigits#60 ← myprintf::bDigits#3 -Coalesced [158] myprintf::bLen#60 ← myprintf::bLen#6 -Coalesced [159] myprintf::bDigits#57 ← myprintf::bDigits#3 -Coalesced (already) [160] myprintf::bLen#62 ← myprintf::bLen#24 -Coalesced (already) [161] myprintf::bDigits#59 ← myprintf::bDigits#16 -Coalesced [162] myprintf::digit#4 ← myprintf::digit#2 -Coalesced [163] myprintf::bLen#58 ← myprintf::bLen#24 -Coalesced [164] myprintf::bLen#55 ← myprintf::bLen#14 -Coalesced [165] myprintf::bDigits#54 ← myprintf::bDigits#14 -Coalesced [174] myprintf::bLen#54 ← myprintf::bLen#4 -Coalesced [175] myprintf::bDigits#53 ← myprintf::bDigits#2 -Coalesced (already) [176] myprintf::bLen#56 ← myprintf::bLen#4 -Coalesced (already) [177] myprintf::bDigits#55 ← myprintf::bDigits#2 -Coalesced (already) [179] myprintf::bLen#53 ← myprintf::bLen#14 -Coalesced (already) [180] myprintf::bDigits#52 ← myprintf::bDigits#14 -Coalesced [182] myprintf::b#35 ← myprintf::b#5 -Coalesced [186] myprintf::bLen#65 ← myprintf::bLen#1 -Coalesced (already) [187] myprintf::bDigits#62 ← myprintf::bDigits#14 -Coalesced (already) [189] myprintf::bFormat#21 ← myprintf::bFormat#10 -Coalesced (already) [190] myprintf::return#6 ← myprintf::bLen#14 -Coalesced (already) [191] myprintf::bArg#47 ← myprintf::bArg#12 -Coalesced (already) [192] myprintf::w#44 ← myprintf::w#10 -Coalesced (already) [193] myprintf::bTrailing#46 ← myprintf::bTrailing#10 -Coalesced [194] myprintf::bDigits#48 ← myprintf::bDigits#1 -Coalesced (already) [195] myprintf::bLeadZero#46 ← myprintf::bLeadZero#10 -Not coalescing [199] myprintf::w#51 ← myprintf::w3#7 -Coalesced (already) [202] myprintf::return#8 ← myprintf::bLen#14 -Coalesced [203] myprintf::bArg#49 ← myprintf::bArg#1 -Coalesced [204] myprintf::w#46 ← myprintf::w#21 -Not coalescing [205] myprintf::w#50 ← myprintf::w2#7 -Not coalescing [206] myprintf::w#49 ← myprintf::w1#6 -Coalesced [210] myprintf::b#37 ← myprintf::b#6 -Coalesced (already) [214] myprintf::bFormat#23 ← myprintf::bFormat#10 -Coalesced [215] myprintf::return#9 ← myprintf::bLen#7 -Coalesced (already) [216] myprintf::bArg#50 ← myprintf::bArg#12 -Coalesced (already) [217] myprintf::w#47 ← myprintf::w#10 -Coalesced (already) [218] myprintf::bTrailing#47 ← myprintf::bTrailing#10 -Coalesced (already) [219] myprintf::bDigits#50 ← myprintf::bDigits#14 -Coalesced (already) [220] myprintf::bLeadZero#48 ← myprintf::bLeadZero#10 -Coalesced [221] myprintf::b#36 ← myprintf::b#1 -Coalesced [224] utoa::value#14 ← utoa::value#4 -Coalesced [228] utoa::bStarted#8 ← utoa::bStarted#5 -Coalesced [229] utoa::value#16 ← utoa::value#6 -Coalesced [230] utoa::dst#19 ← utoa::dst#16 -Coalesced [234] utoa::bStarted#9 ← utoa::bStarted#6 -Coalesced [235] utoa::value#19 ← utoa::value#11 -Coalesced [236] utoa::dst#22 ← utoa::dst#10 -Coalesced [240] utoa::value#21 ← utoa::value#10 -Coalesced [241] utoa::dst#24 ← utoa::dst#13 -Coalesced [251] append::dst#9 ← append::dst#3 -Coalesced [252] append::value#12 ← append::value#4 -Coalesced [257] utoa::value#20 ← utoa::value#3 -Coalesced [258] utoa::dst#23 ← utoa::dst#4 -Coalesced [261] append::dst#8 ← append::dst#2 -Coalesced [262] append::value#11 ← append::value#3 -Coalesced [267] utoa::value#18 ← utoa::value#2 -Coalesced [268] utoa::dst#21 ← utoa::dst#2 -Coalesced [271] append::dst#7 ← append::dst#1 -Coalesced [272] append::value#10 ← append::value#2 -Coalesced [277] utoa::value#17 ← utoa::value#1 -Coalesced [278] utoa::dst#20 ← utoa::dst#1 -Coalesced [280] append::value#9 ← append::value#1 -Coalesced [284] utoa::value#15 ← utoa::value#0 -Coalesced [287] append::value#13 ← append::value#8 -Coalesced [294] append::value#14 ← append::value#0 -Coalesced [310] divr16u::dividend#8 ← divr16u::dividend#1 -Coalesced [317] divr16u::rem#12 ← divr16u::rem#1 -Coalesced [324] divr16u::rem#14 ← divr16u::rem#2 -Coalesced [325] divr16u::return#6 ← divr16u::quotient#2 -Coalesced [331] divr16u::rem#10 ← divr16u::rem#9 -Coalesced [332] divr16u::dividend#9 ← divr16u::dividend#0 -Coalesced [333] divr16u::quotient#9 ← divr16u::return#0 -Coalesced [334] divr16u::i#7 ← divr16u::i#1 -Coalesced [335] divr16u::rem#13 ← divr16u::rem#5 -Coalesced [336] divr16u::return#5 ← divr16u::quotient#1 -Coalesced [337] divr16u::rem#11 ← divr16u::rem#0 +Coalesced [67] myprintf::str#96 ← myprintf::str#5 +Coalesced [68] myprintf::b#49 ← myprintf::b#47 +Not coalescing [73] myprintf::w#92 ← myprintf::w3#7 +Coalesced [76] myprintf::bLen#90 ← myprintf::bLen#54 +Coalesced [77] myprintf::bArg#96 ← myprintf::bArg#1 +Coalesced [78] myprintf::w#87 ← myprintf::w#21 +Coalesced [79] myprintf::str#100 ← myprintf::str#51 +Coalesced (already) [88] myprintf::bFormat#37 ← myprintf::bFormat#10 +Coalesced (already) [89] myprintf::bLen#92 ← myprintf::bLen#14 +Coalesced (already) [90] myprintf::bArg#98 ← myprintf::bArg#10 +Coalesced (already) [91] myprintf::w#89 ← myprintf::w#10 +Coalesced (already) [92] myprintf::bTrailing#88 ← myprintf::bTrailing#10 +Coalesced (already) [93] myprintf::bDigits#81 ← myprintf::bDigits#14 +Coalesced [94] myprintf::str#102 ← myprintf::str#0 +Coalesced (already) [98] myprintf::bFormat#35 ← myprintf::bFormat#10 +Coalesced (already) [99] myprintf::bLen#89 ← myprintf::bLen#14 +Coalesced (already) [100] myprintf::bArg#95 ← myprintf::bArg#10 +Coalesced (already) [101] myprintf::w#86 ← myprintf::w#10 +Coalesced (already) [102] myprintf::bDigits#79 ← myprintf::bDigits#14 +Coalesced (already) [103] myprintf::bLeadZero#87 ← myprintf::bLeadZero#10 +Coalesced (already) [104] myprintf::str#99 ← myprintf::str#0 +Coalesced [109] myprintf::bLen#104 ← myprintf::bLen#14 +Coalesced [110] myprintf::bDigits#91 ← myprintf::bDigits#14 +Coalesced (already) [112] myprintf::bLen#87 ← myprintf::bLen#28 +Coalesced (already) [113] myprintf::bArg#93 ← myprintf::bArg#10 +Coalesced (already) [114] myprintf::w#84 ← myprintf::w#10 +Coalesced (already) [115] myprintf::bTrailing#85 ← myprintf::bTrailing#10 +Coalesced (already) [116] myprintf::bDigits#77 ← myprintf::bDigits#25 +Coalesced (already) [117] myprintf::bLeadZero#85 ← myprintf::bLeadZero#10 +Coalesced (already) [118] myprintf::str#97 ← myprintf::str#0 +Coalesced [136] myprintf::bLen#101 ← myprintf::bLen#3 +Coalesced (already) [137] myprintf::bDigits#88 ← myprintf::bDigits#14 +Coalesced [148] myprintf::bLen#97 ← myprintf::bLen#23 +Coalesced [156] myprintf::bLen#99 ← myprintf::bLen#24 +Coalesced [157] myprintf::bDigits#86 ← myprintf::bDigits#16 +Coalesced [163] myprintf::bLen#103 ← myprintf::bLen#6 +Coalesced [164] myprintf::bDigits#90 ← myprintf::bDigits#3 +Coalesced [165] myprintf::bLen#100 ← myprintf::bLen#6 +Coalesced [166] myprintf::bDigits#87 ← myprintf::bDigits#3 +Coalesced (already) [167] myprintf::bLen#102 ← myprintf::bLen#24 +Coalesced (already) [168] myprintf::bDigits#89 ← myprintf::bDigits#16 +Coalesced [169] myprintf::digit#4 ← myprintf::digit#2 +Coalesced [170] myprintf::bLen#98 ← myprintf::bLen#24 +Coalesced [171] myprintf::bLen#95 ← myprintf::bLen#14 +Coalesced [172] myprintf::bDigits#84 ← myprintf::bDigits#14 +Coalesced [181] myprintf::bLen#94 ← myprintf::bLen#4 +Coalesced [182] myprintf::bDigits#83 ← myprintf::bDigits#2 +Coalesced (already) [183] myprintf::bLen#96 ← myprintf::bLen#4 +Coalesced (already) [184] myprintf::bDigits#85 ← myprintf::bDigits#2 +Coalesced (already) [186] myprintf::bLen#93 ← myprintf::bLen#14 +Coalesced (already) [187] myprintf::bDigits#82 ← myprintf::bDigits#14 +Coalesced [189] myprintf::b#50 ← myprintf::b#5 +Coalesced [193] myprintf::bLen#105 ← myprintf::bLen#1 +Coalesced (already) [194] myprintf::bDigits#92 ← myprintf::bDigits#14 +Coalesced (already) [196] myprintf::bFormat#34 ← myprintf::bFormat#10 +Coalesced (already) [197] myprintf::bLen#88 ← myprintf::bLen#14 +Coalesced (already) [198] myprintf::bArg#94 ← myprintf::bArg#10 +Coalesced (already) [199] myprintf::w#85 ← myprintf::w#10 +Coalesced (already) [200] myprintf::bTrailing#86 ← myprintf::bTrailing#10 +Coalesced [201] myprintf::bDigits#78 ← myprintf::bDigits#1 +Coalesced (already) [202] myprintf::bLeadZero#86 ← myprintf::bLeadZero#10 +Coalesced (already) [203] myprintf::str#98 ← myprintf::str#0 +Coalesced (already) [204] myprintf::str#95 ← myprintf::str#0 +Coalesced [205] myprintf::bFormat#33 ← myprintf::bFormat#10 +Coalesced [206] myprintf::bArg#92 ← myprintf::bArg#10 +Coalesced (already) [207] myprintf::bLen#86 ← myprintf::bLen#14 +Coalesced [208] myprintf::w#83 ← myprintf::w#10 +Coalesced [209] myprintf::bTrailing#84 ← myprintf::bTrailing#10 +Coalesced [210] myprintf::bDigits#76 ← myprintf::bDigits#14 +Coalesced [211] myprintf::bLeadZero#84 ← myprintf::bLeadZero#10 +Coalesced [212] myprintf::b#48 ← myprintf::b#1 +Not coalescing [213] myprintf::w#91 ← myprintf::w2#7 +Not coalescing [214] myprintf::w#90 ← myprintf::w1#6 +Coalesced [218] myprintf::b#52 ← myprintf::b#6 +Coalesced (already) [222] myprintf::bFormat#36 ← myprintf::bFormat#22 +Coalesced [223] myprintf::bLen#91 ← myprintf::bLen#7 +Coalesced (already) [224] myprintf::bArg#97 ← myprintf::bArg#48 +Coalesced (already) [225] myprintf::w#88 ← myprintf::w#45 +Coalesced (already) [226] myprintf::bTrailing#87 ← myprintf::bTrailing#46 +Coalesced (already) [227] myprintf::bDigits#80 ← myprintf::bDigits#47 +Coalesced (already) [228] myprintf::bLeadZero#88 ← myprintf::bLeadZero#47 +Coalesced (already) [229] myprintf::str#101 ← myprintf::str#51 +Coalesced [230] myprintf::b#51 ← myprintf::b#35 +Coalesced [233] utoa::value#14 ← utoa::value#4 +Coalesced [237] utoa::bStarted#8 ← utoa::bStarted#5 +Coalesced [238] utoa::value#16 ← utoa::value#6 +Coalesced [239] utoa::dst#19 ← utoa::dst#16 +Coalesced [243] utoa::bStarted#9 ← utoa::bStarted#6 +Coalesced [244] utoa::value#19 ← utoa::value#11 +Coalesced [245] utoa::dst#22 ← utoa::dst#10 +Coalesced [249] utoa::value#21 ← utoa::value#10 +Coalesced [250] utoa::dst#24 ← utoa::dst#13 +Coalesced [260] append::dst#9 ← append::dst#3 +Coalesced [261] append::value#12 ← append::value#4 +Coalesced [266] utoa::value#20 ← utoa::value#3 +Coalesced [267] utoa::dst#23 ← utoa::dst#4 +Coalesced [270] append::dst#8 ← append::dst#2 +Coalesced [271] append::value#11 ← append::value#3 +Coalesced [276] utoa::value#18 ← utoa::value#2 +Coalesced [277] utoa::dst#21 ← utoa::dst#2 +Coalesced [280] append::dst#7 ← append::dst#1 +Coalesced [281] append::value#10 ← append::value#2 +Coalesced [286] utoa::value#17 ← utoa::value#1 +Coalesced [287] utoa::dst#20 ← utoa::dst#1 +Coalesced [289] append::value#9 ← append::value#1 +Coalesced [293] utoa::value#15 ← utoa::value#0 +Coalesced [296] append::value#13 ← append::value#8 +Coalesced [303] append::value#14 ← append::value#0 +Coalesced [319] divr16u::dividend#8 ← divr16u::dividend#1 +Coalesced [326] divr16u::rem#12 ← divr16u::rem#1 +Coalesced [333] divr16u::rem#14 ← divr16u::rem#2 +Coalesced [334] divr16u::return#6 ← divr16u::quotient#2 +Coalesced [340] divr16u::rem#10 ← divr16u::rem#9 +Coalesced [341] divr16u::dividend#9 ← divr16u::dividend#0 +Coalesced [342] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [343] divr16u::i#7 ← divr16u::i#1 +Coalesced [344] divr16u::rem#13 ← divr16u::rem#5 +Coalesced [345] divr16u::return#5 ← divr16u::quotient#1 +Coalesced [346] divr16u::rem#11 ← divr16u::rem#0 Coalesced down to 29 phi equivalence classes Culled Empty Block (label) @8 Culled Empty Block (label) @15 @@ -3276,7 +9066,6 @@ Culled Empty Block (label) main::@8 Culled Empty Block (label) main::@17 Culled Empty Block (label) main::@16 Culled Empty Block (label) myprintf::@62 -Culled Empty Block (label) myprintf::@77 Culled Empty Block (label) myprintf::@43 Culled Empty Block (label) myprintf::@87 Culled Empty Block (label) myprintf::@10 @@ -3292,6 +9081,7 @@ Culled Empty Block (label) myprintf::@29 Culled Empty Block (label) myprintf::@79 Culled Empty Block (label) myprintf::@81 Culled Empty Block (label) myprintf::@78 +Culled Empty Block (label) myprintf::@77 Culled Empty Block (label) myprintf::@88 Culled Empty Block (label) utoa::@17 Culled Empty Block (label) utoa::@18 @@ -3456,352 +9246,357 @@ myprintf: scope:[myprintf] from main::@3 main::@7 [54] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) [54] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) [54] (byte*) myprintf::str#5 ← phi( main::@3/(const string) main::str main::@7/(const string) main::str1 ) - to:myprintf::@1 -myprintf::@1: scope:[myprintf] from myprintf myprintf::@27 - [55] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bLeadZero#18 ) - [55] (byte) myprintf::bDigits#14 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bDigits#24 ) - [55] (byte) myprintf::bTrailing#10 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bTrailing#21 ) - [55] (word) myprintf::w#10 ← phi( myprintf/(word) 0 myprintf::@27/(word) myprintf::w#17 ) - [55] (byte) myprintf::bLen#14 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::return#0 ) - [55] (byte) myprintf::bArg#12 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bArg#10 ) - [55] (byte) myprintf::bFormat#10 ← phi( myprintf/(byte) 0 myprintf::@27/(byte) myprintf::bFormat#4 ) - [55] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@27/(byte*) myprintf::str#0 ) - [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) - [57] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 - to:myprintf::@33 -myprintf::@33: scope:[myprintf] from myprintf::@1 - [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 - to:myprintf::@27 -myprintf::@27: scope:[myprintf] from myprintf::@22 myprintf::@23 myprintf::@31 myprintf::@32 myprintf::@33 myprintf::@4 - [59] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@22/(byte) myprintf::bLeadZero#10 myprintf::@23/(byte) myprintf::bLeadZero#10 myprintf::@4/(byte) myprintf::bLeadZero#10 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bLeadZero#10 myprintf::@33/(byte) 1 ) - [59] (byte) myprintf::bDigits#24 ← phi( myprintf::@22/(byte) myprintf::bDigits#25 myprintf::@23/(byte) myprintf::bDigits#1 myprintf::@4/(byte) myprintf::bDigits#14 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bDigits#14 myprintf::@33/(byte) myprintf::bDigits#14 ) - [59] (byte) myprintf::bTrailing#21 ← phi( myprintf::@22/(byte) myprintf::bTrailing#10 myprintf::@23/(byte) myprintf::bTrailing#10 myprintf::@4/(byte) 1 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bTrailing#10 myprintf::@33/(byte) myprintf::bTrailing#10 ) - [59] (word) myprintf::w#17 ← phi( myprintf::@22/(word) myprintf::w#10 myprintf::@23/(word) myprintf::w#10 myprintf::@4/(word) myprintf::w#10 myprintf::@31/(word) myprintf::w#21 myprintf::@32/(word) myprintf::w#10 myprintf::@33/(word) myprintf::w#10 ) - [59] (byte) myprintf::bArg#10 ← phi( myprintf::@22/(byte) myprintf::bArg#12 myprintf::@23/(byte) myprintf::bArg#12 myprintf::@4/(byte) myprintf::bArg#12 myprintf::@31/(byte) myprintf::bArg#1 myprintf::@32/(byte) myprintf::bArg#12 myprintf::@33/(byte) myprintf::bArg#12 ) - [59] (byte) myprintf::return#0 ← phi( myprintf::@22/(byte) myprintf::bLen#28 myprintf::@23/(byte) myprintf::bLen#14 myprintf::@4/(byte) myprintf::bLen#14 myprintf::@31/(byte) myprintf::bLen#14 myprintf::@32/(byte) myprintf::bLen#7 myprintf::@33/(byte) myprintf::bLen#14 ) - [59] (byte) myprintf::bFormat#4 ← phi( myprintf::@22/(byte) 0 myprintf::@23/(byte) myprintf::bFormat#10 myprintf::@4/(byte) myprintf::bFormat#10 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bFormat#10 myprintf::@33/(byte) myprintf::bFormat#10 ) - [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 - [61] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 - to:myprintf::@38 -myprintf::@38: scope:[myprintf] from myprintf::@27 - [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte) 0 - to:myprintf::@return -myprintf::@return: scope:[myprintf] from myprintf::@38 - [63] return - to:@return -myprintf::@3: scope:[myprintf] from myprintf::@33 - [64] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 - to:myprintf::@39 -myprintf::@39: scope:[myprintf] from myprintf::@3 - [65] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 - to:myprintf::@4 -myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@39 - [66] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 - to:myprintf::@27 -myprintf::@5: scope:[myprintf] from myprintf::@4 - [67] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 - to:myprintf::@24 -myprintf::@24: scope:[myprintf] from myprintf::@5 - [68] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 - to:myprintf::@25 -myprintf::@25: scope:[myprintf] from myprintf::@24 - [69] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 - to:myprintf::@40 -myprintf::@40: scope:[myprintf] from myprintf::@25 - [70] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 - to:myprintf::@22 -myprintf::@22: scope:[myprintf] from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@42 myprintf::@6 - [71] (byte) myprintf::bDigits#25 ← phi( myprintf::@11/(byte) myprintf::bDigits#14 myprintf::@20/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 myprintf::@40/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) - [71] (byte) myprintf::bLen#28 ← phi( myprintf::@11/(byte) myprintf::bLen#3 myprintf::@20/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 myprintf::@40/(byte) myprintf::bLen#14 myprintf::@6/(byte) myprintf::bLen#1 ) - to:myprintf::@27 -myprintf::@26: scope:[myprintf] from myprintf::@25 myprintf::@40 - [72] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 - [73] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 - [74] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f - [75] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 - to:myprintf::@9 -myprintf::@8: scope:[myprintf] from myprintf::@26 - [76] phi() - to:myprintf::@9 -myprintf::@9: scope:[myprintf] from myprintf::@26 myprintf::@8 - [77] (byte~) myprintf::$23 ← phi( myprintf::@8/(byte) '0' myprintf::@26/(byte) $57 ) - [78] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 - [79] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 - [80] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 - [81] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 - [82] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f - [83] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 - to:myprintf::@11 -myprintf::@10: scope:[myprintf] from myprintf::@9 - [84] phi() - to:myprintf::@11 -myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 - [85] (byte~) myprintf::$30 ← phi( myprintf::@10/(byte) '0' myprintf::@9/(byte) $57 ) - [86] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 - [87] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 - [88] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 - to:myprintf::@22 -myprintf::@7: scope:[myprintf] from myprintf::@24 - [89] (word) utoa::value#4 ← (word) myprintf::w#10 - [90] call utoa - to:myprintf::@12 -myprintf::@12: scope:[myprintf] from myprintf::@13 myprintf::@7 - [91] (byte) myprintf::b#17 ← phi( myprintf::@13/(byte) myprintf::b#5 myprintf::@7/(byte) 1 ) - [92] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 - to:myprintf::@14 -myprintf::@14: scope:[myprintf] from myprintf::@12 - [93] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 - to:myprintf::@41 -myprintf::@41: scope:[myprintf] from myprintf::@14 - [94] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 - to:myprintf::@15 -myprintf::@15: scope:[myprintf] from myprintf::@14 myprintf::@18 myprintf::@41 - [95] (byte) myprintf::bDigits#16 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) - [95] (byte) myprintf::bLen#23 ← phi( myprintf::@14/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) - to:myprintf::@19 -myprintf::@19: scope:[myprintf] from myprintf::@15 myprintf::@19 - [96] (byte) myprintf::bLen#12 ← phi( myprintf::@15/(byte) myprintf::bLen#23 myprintf::@19/(byte) myprintf::bLen#24 ) - [96] (byte) myprintf::digit#3 ← phi( myprintf::@15/(byte) 0 myprintf::@19/(byte) myprintf::digit#2 ) - [97] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) - [98] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 - [99] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 - [100] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 - to:myprintf::@20 -myprintf::@20: scope:[myprintf] from myprintf::@19 - [101] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 - to:myprintf::@42 -myprintf::@42: scope:[myprintf] from myprintf::@20 - [102] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 - to:myprintf::@21 -myprintf::@21: scope:[myprintf] from myprintf::@21 myprintf::@42 - [103] (byte) myprintf::bDigits#8 ← phi( myprintf::@42/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 ) - [103] (byte) myprintf::bLen#13 ← phi( myprintf::@42/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 ) - [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' - [105] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 - [106] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 - [107] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 - to:myprintf::@22 -myprintf::@16: scope:[myprintf] from myprintf::@18 myprintf::@41 - [108] (byte) myprintf::bDigits#10 ← phi( myprintf::@41/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) - [108] (byte) myprintf::bLen#11 ← phi( myprintf::@41/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) - [109] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 - to:myprintf::@18 -myprintf::@17: scope:[myprintf] from myprintf::@16 - [110] phi() - to:myprintf::@18 -myprintf::@18: scope:[myprintf] from myprintf::@16 myprintf::@17 - [111] (byte~) myprintf::$41 ← phi( myprintf::@17/(byte) ' ' myprintf::@16/(byte) '0' ) - [112] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 - [113] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 - [114] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 - [115] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 - to:myprintf::@15 -myprintf::@13: scope:[myprintf] from myprintf::@12 - [116] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 - to:myprintf::@12 -myprintf::@6: scope:[myprintf] from myprintf::@5 - [117] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 - [118] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 - [119] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 - to:myprintf::@22 -myprintf::@23: scope:[myprintf] from myprintf::@39 - [120] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' - to:myprintf::@27 -myprintf::@2: scope:[myprintf] from myprintf::@1 - [121] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 + to:myprintf::@1_1 +myprintf::@1_1: scope:[myprintf] from myprintf + [55] (byte) myprintf::b#47 ← *((byte*) myprintf::str#5) + to:myprintf::@2 +myprintf::@2: scope:[myprintf] from myprintf::@1 myprintf::@1_1 + [56] (byte) myprintf::b#35 ← phi( myprintf::@1/(byte) myprintf::b#1 myprintf::@1_1/(byte) myprintf::b#47 ) + [56] (byte) myprintf::bLeadZero#47 ← phi( myprintf::@1/(byte) myprintf::bLeadZero#10 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bDigits#47 ← phi( myprintf::@1/(byte) myprintf::bDigits#14 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bTrailing#46 ← phi( myprintf::@1/(byte) myprintf::bTrailing#10 myprintf::@1_1/(byte) 0 ) + [56] (word) myprintf::w#45 ← phi( myprintf::@1/(word) myprintf::w#10 myprintf::@1_1/(word) 0 ) + [56] (byte) myprintf::bLen#54 ← phi( myprintf::@1/(byte) myprintf::bLen#14 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bArg#48 ← phi( myprintf::@1/(byte) myprintf::bArg#10 myprintf::@1_1/(byte) 0 ) + [56] (byte) myprintf::bFormat#22 ← phi( myprintf::@1/(byte) myprintf::bFormat#10 myprintf::@1_1/(byte) 0 ) + [56] (byte*) myprintf::str#51 ← phi( myprintf::@1/(byte*) myprintf::str#0 myprintf::@1_1/(byte*) myprintf::str#5 ) + [57] if((byte) myprintf::b#35!=(byte) '%') goto myprintf::@28 to:myprintf::@34 myprintf::@34: scope:[myprintf] from myprintf::@2 - [122] if((byte) myprintf::bArg#12==(byte) 0) goto myprintf::@29 + [58] if((byte) myprintf::bArg#48==(byte) 0) goto myprintf::@29 to:myprintf::@35 myprintf::@35: scope:[myprintf] from myprintf::@34 - [123] if((byte) myprintf::bArg#12==(byte) 1) goto myprintf::@30 + [59] if((byte) myprintf::bArg#48==(byte) 1) goto myprintf::@30 to:myprintf::@36 myprintf::@36: scope:[myprintf] from myprintf::@35 - [124] (word~) myprintf::w#51 ← (word) myprintf::w3#7 + [60] (word~) myprintf::w#92 ← (word) myprintf::w3#7 to:myprintf::@31 myprintf::@31: scope:[myprintf] from myprintf::@29 myprintf::@30 myprintf::@36 - [125] (word) myprintf::w#21 ← phi( myprintf::@29/(word~) myprintf::w#49 myprintf::@30/(word~) myprintf::w#50 myprintf::@36/(word~) myprintf::w#51 ) - [126] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 + [61] (word) myprintf::w#21 ← phi( myprintf::@29/(word~) myprintf::w#90 myprintf::@30/(word~) myprintf::w#91 myprintf::@36/(word~) myprintf::w#92 ) + [62] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#48 + to:myprintf::@27 +myprintf::@27: scope:[myprintf] from myprintf::@22 myprintf::@23 myprintf::@31 myprintf::@32 myprintf::@33 myprintf::@4 + [63] (byte*) myprintf::str#47 ← phi( myprintf::@22/(byte*) myprintf::str#0 myprintf::@23/(byte*) myprintf::str#0 myprintf::@4/(byte*) myprintf::str#0 myprintf::@31/(byte*) myprintf::str#51 myprintf::@32/(byte*) myprintf::str#51 myprintf::@33/(byte*) myprintf::str#0 ) + [63] (byte) myprintf::bLeadZero#10 ← phi( myprintf::@22/(byte) myprintf::bLeadZero#10 myprintf::@23/(byte) myprintf::bLeadZero#10 myprintf::@4/(byte) myprintf::bLeadZero#10 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bLeadZero#47 myprintf::@33/(byte) 1 ) + [63] (byte) myprintf::bDigits#14 ← phi( myprintf::@22/(byte) myprintf::bDigits#25 myprintf::@23/(byte) myprintf::bDigits#1 myprintf::@4/(byte) myprintf::bDigits#14 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bDigits#47 myprintf::@33/(byte) myprintf::bDigits#14 ) + [63] (byte) myprintf::bTrailing#10 ← phi( myprintf::@22/(byte) myprintf::bTrailing#10 myprintf::@23/(byte) myprintf::bTrailing#10 myprintf::@4/(byte) 1 myprintf::@31/(byte) 0 myprintf::@32/(byte) myprintf::bTrailing#46 myprintf::@33/(byte) myprintf::bTrailing#10 ) + [63] (word) myprintf::w#10 ← phi( myprintf::@22/(word) myprintf::w#10 myprintf::@23/(word) myprintf::w#10 myprintf::@4/(word) myprintf::w#10 myprintf::@31/(word) myprintf::w#21 myprintf::@32/(word) myprintf::w#45 myprintf::@33/(word) myprintf::w#10 ) + [63] (byte) myprintf::bArg#10 ← phi( myprintf::@22/(byte) myprintf::bArg#10 myprintf::@23/(byte) myprintf::bArg#10 myprintf::@4/(byte) myprintf::bArg#10 myprintf::@31/(byte) myprintf::bArg#1 myprintf::@32/(byte) myprintf::bArg#48 myprintf::@33/(byte) myprintf::bArg#10 ) + [63] (byte) myprintf::bLen#14 ← phi( myprintf::@22/(byte) myprintf::bLen#28 myprintf::@23/(byte) myprintf::bLen#14 myprintf::@4/(byte) myprintf::bLen#14 myprintf::@31/(byte) myprintf::bLen#54 myprintf::@32/(byte) myprintf::bLen#7 myprintf::@33/(byte) myprintf::bLen#14 ) + [63] (byte) myprintf::bFormat#10 ← phi( myprintf::@22/(byte) 0 myprintf::@23/(byte) myprintf::bFormat#10 myprintf::@4/(byte) myprintf::bFormat#10 myprintf::@31/(byte) 1 myprintf::@32/(byte) myprintf::bFormat#22 myprintf::@33/(byte) myprintf::bFormat#10 ) + [64] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 + [65] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 + to:myprintf::@38 +myprintf::@38: scope:[myprintf] from myprintf::@27 + [66] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@38 + [67] return + to:@return +myprintf::@1: scope:[myprintf] from myprintf::@27 + [68] (byte) myprintf::b#1 ← *((byte*) myprintf::str#0) + [69] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 + to:myprintf::@33 +myprintf::@33: scope:[myprintf] from myprintf::@1 + [70] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@27 +myprintf::@3: scope:[myprintf] from myprintf::@33 + [71] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 + to:myprintf::@39 +myprintf::@39: scope:[myprintf] from myprintf::@3 + [72] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 + to:myprintf::@4 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@39 + [73] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@27 +myprintf::@5: scope:[myprintf] from myprintf::@4 + [74] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@24 +myprintf::@24: scope:[myprintf] from myprintf::@5 + [75] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@25 +myprintf::@25: scope:[myprintf] from myprintf::@24 + [76] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@25 + [77] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 + to:myprintf::@22 +myprintf::@22: scope:[myprintf] from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@42 myprintf::@6 + [78] (byte) myprintf::bDigits#25 ← phi( myprintf::@11/(byte) myprintf::bDigits#14 myprintf::@20/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 myprintf::@40/(byte) myprintf::bDigits#14 myprintf::@6/(byte) myprintf::bDigits#14 ) + [78] (byte) myprintf::bLen#28 ← phi( myprintf::@11/(byte) myprintf::bLen#3 myprintf::@20/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 myprintf::@40/(byte) myprintf::bLen#14 myprintf::@6/(byte) myprintf::bLen#1 ) + to:myprintf::@27 +myprintf::@26: scope:[myprintf] from myprintf::@25 myprintf::@40 + [79] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 + [80] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 + [81] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f + [82] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 + to:myprintf::@9 +myprintf::@8: scope:[myprintf] from myprintf::@26 + [83] phi() + to:myprintf::@9 +myprintf::@9: scope:[myprintf] from myprintf::@26 myprintf::@8 + [84] (byte~) myprintf::$23 ← phi( myprintf::@8/(byte) '0' myprintf::@26/(byte) $57 ) + [85] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 + [86] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 + [87] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 + [88] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 + [89] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f + [90] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@9 + [91] phi() + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [92] (byte~) myprintf::$30 ← phi( myprintf::@10/(byte) '0' myprintf::@9/(byte) $57 ) + [93] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 + [94] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 + [95] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@22 +myprintf::@7: scope:[myprintf] from myprintf::@24 + [96] (word) utoa::value#4 ← (word) myprintf::w#10 + [97] call utoa + to:myprintf::@12 +myprintf::@12: scope:[myprintf] from myprintf::@13 myprintf::@7 + [98] (byte) myprintf::b#17 ← phi( myprintf::@13/(byte) myprintf::b#5 myprintf::@7/(byte) 1 ) + [99] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 + [100] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 + to:myprintf::@41 +myprintf::@41: scope:[myprintf] from myprintf::@14 + [101] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@15: scope:[myprintf] from myprintf::@14 myprintf::@18 myprintf::@41 + [102] (byte) myprintf::bDigits#16 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [102] (byte) myprintf::bLen#23 ← phi( myprintf::@14/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + to:myprintf::@19 +myprintf::@19: scope:[myprintf] from myprintf::@15 myprintf::@19 + [103] (byte) myprintf::bLen#12 ← phi( myprintf::@15/(byte) myprintf::bLen#23 myprintf::@19/(byte) myprintf::bLen#24 ) + [103] (byte) myprintf::digit#3 ← phi( myprintf::@15/(byte) 0 myprintf::@19/(byte) myprintf::digit#2 ) + [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [105] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [106] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [107] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 + to:myprintf::@20 +myprintf::@20: scope:[myprintf] from myprintf::@19 + [108] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 + to:myprintf::@42 +myprintf::@42: scope:[myprintf] from myprintf::@20 + [109] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 + to:myprintf::@21 +myprintf::@21: scope:[myprintf] from myprintf::@21 myprintf::@42 + [110] (byte) myprintf::bDigits#8 ← phi( myprintf::@42/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 ) + [110] (byte) myprintf::bLen#13 ← phi( myprintf::@42/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 ) + [111] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' + [112] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [113] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [114] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 + to:myprintf::@22 +myprintf::@16: scope:[myprintf] from myprintf::@18 myprintf::@41 + [115] (byte) myprintf::bDigits#10 ← phi( myprintf::@41/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [115] (byte) myprintf::bLen#11 ← phi( myprintf::@41/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + [116] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 + to:myprintf::@18 +myprintf::@17: scope:[myprintf] from myprintf::@16 + [117] phi() + to:myprintf::@18 +myprintf::@18: scope:[myprintf] from myprintf::@16 myprintf::@17 + [118] (byte~) myprintf::$41 ← phi( myprintf::@17/(byte) ' ' myprintf::@16/(byte) '0' ) + [119] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 + [120] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [121] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [122] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@13: scope:[myprintf] from myprintf::@12 + [123] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@12 +myprintf::@6: scope:[myprintf] from myprintf::@5 + [124] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 + [125] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 + [126] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@22 +myprintf::@23: scope:[myprintf] from myprintf::@39 + [127] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' to:myprintf::@27 myprintf::@30: scope:[myprintf] from myprintf::@35 - [127] (word~) myprintf::w#50 ← (word) myprintf::w2#7 + [128] (word~) myprintf::w#91 ← (word) myprintf::w2#7 to:myprintf::@31 myprintf::@29: scope:[myprintf] from myprintf::@34 - [128] (word~) myprintf::w#49 ← (word) myprintf::w1#6 + [129] (word~) myprintf::w#90 ← (word) myprintf::w1#6 to:myprintf::@31 myprintf::@28: scope:[myprintf] from myprintf::@2 - [129] if((byte) myprintf::b#1<(byte) $41) goto myprintf::@32 + [130] if((byte) myprintf::b#35<(byte) $41) goto myprintf::@32 to:myprintf::@43 myprintf::@43: scope:[myprintf] from myprintf::@28 - [130] if((byte) myprintf::b#1>=(byte) $5a+(byte) 1) goto myprintf::@32 + [131] if((byte) myprintf::b#35>=(byte) $5a+(byte) 1) goto myprintf::@32 to:myprintf::@37 myprintf::@37: scope:[myprintf] from myprintf::@43 - [131] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 + [132] (byte) myprintf::b#6 ← (byte) myprintf::b#35 + (byte) $20 to:myprintf::@32 myprintf::@32: scope:[myprintf] from myprintf::@28 myprintf::@37 myprintf::@43 - [132] (byte) myprintf::b#25 ← phi( myprintf::@28/(byte) myprintf::b#1 myprintf::@37/(byte) myprintf::b#6 ) - [133] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 - [134] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + [133] (byte) myprintf::b#25 ← phi( myprintf::@28/(byte) myprintf::b#35 myprintf::@37/(byte) myprintf::b#6 ) + [134] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#54) ← (byte) myprintf::b#25 + [135] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#54 to:myprintf::@27 utoa: scope:[utoa] from myprintf::@7 - [135] phi() + [136] phi() to:utoa::@13 utoa::@13: scope:[utoa] from utoa - [136] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 + [137] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 to:utoa::@1 utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 - [137] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte[6]) myprintf::buf6#0 utoa::@9/++(const byte[6]) myprintf::buf6#0 ) - [137] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) - [137] (byte) utoa::bStarted#5 ← phi( utoa::@13/(byte) 0 utoa::@9/(byte) 1 ) - [138] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 + [138] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte[6]) myprintf::buf6#0 utoa::@9/++(const byte[6]) myprintf::buf6#0 ) + [138] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [138] (byte) utoa::bStarted#5 ← phi( utoa::@13/(byte) 0 utoa::@9/(byte) 1 ) + [139] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 to:utoa::@14 utoa::@14: scope:[utoa] from utoa::@1 - [139] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 + [140] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 to:utoa::@2 utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 - [140] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) - [140] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) - [140] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(byte) 1 ) - [141] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 + [141] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [141] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [141] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(byte) 1 ) + [142] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 to:utoa::@15 utoa::@15: scope:[utoa] from utoa::@2 - [142] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 + [143] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 to:utoa::@3 utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 - [143] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) - [143] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) - [143] (byte) utoa::bStarted#7 ← phi( utoa::@11/(byte) 1 utoa::@15/(byte) utoa::bStarted#6 ) - [144] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 + [144] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [144] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [144] (byte) utoa::bStarted#7 ← phi( utoa::@11/(byte) 1 utoa::@15/(byte) utoa::bStarted#6 ) + [145] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 to:utoa::@16 utoa::@16: scope:[utoa] from utoa::@3 - [145] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 + [146] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 to:utoa::@4 utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 - [146] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) - [146] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) - [147] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 - [148] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 - [149] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 - [150] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 - [151] *((byte*) utoa::dst#3) ← (byte) 0 + [147] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [147] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [148] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 + [149] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [150] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [151] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [152] *((byte*) utoa::dst#3) ← (byte) 0 to:utoa::@return utoa::@return: scope:[utoa] from utoa::@4 - [152] return + [153] return to:@return utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 - [153] (byte*) append::dst#3 ← (byte*) utoa::dst#13 - [154] (word) append::value#4 ← (word) utoa::value#10 - [155] call append - [156] (word) append::return#10 ← (word) append::value#5 + [154] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [155] (word) append::value#4 ← (word) utoa::value#10 + [156] call append + [157] (word) append::return#10 ← (word) append::value#5 to:utoa::@12 utoa::@12: scope:[utoa] from utoa::@8 - [157] (word) utoa::value#3 ← (word) append::return#10 - [158] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + [158] (word) utoa::value#3 ← (word) append::return#10 + [159] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 to:utoa::@4 utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 - [159] (byte*) append::dst#2 ← (byte*) utoa::dst#10 - [160] (word) append::value#3 ← (word) utoa::value#11 - [161] call append - [162] (word) append::return#4 ← (word) append::value#5 + [160] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [161] (word) append::value#3 ← (word) utoa::value#11 + [162] call append + [163] (word) append::return#4 ← (word) append::value#5 to:utoa::@11 utoa::@11: scope:[utoa] from utoa::@7 - [163] (word) utoa::value#2 ← (word) append::return#4 - [164] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + [164] (word) utoa::value#2 ← (word) append::return#4 + [165] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 to:utoa::@3 utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 - [165] (byte*) append::dst#1 ← (byte*) utoa::dst#16 - [166] (word) append::value#2 ← (word) utoa::value#6 - [167] call append - [168] (word) append::return#3 ← (word) append::value#5 + [166] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [167] (word) append::value#2 ← (word) utoa::value#6 + [168] call append + [169] (word) append::return#3 ← (word) append::value#5 to:utoa::@10 utoa::@10: scope:[utoa] from utoa::@6 - [169] (word) utoa::value#1 ← (word) append::return#3 - [170] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + [170] (word) utoa::value#1 ← (word) append::return#3 + [171] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 to:utoa::@2 utoa::@5: scope:[utoa] from utoa::@13 - [171] (word) append::value#1 ← (word) utoa::value#4 - [172] call append - [173] (word) append::return#2 ← (word) append::value#5 + [172] (word) append::value#1 ← (word) utoa::value#4 + [173] call append + [174] (word) append::return#2 ← (word) append::value#5 to:utoa::@9 utoa::@9: scope:[utoa] from utoa::@5 - [174] (word) utoa::value#0 ← (word) append::return#2 + [175] (word) utoa::value#0 ← (word) append::return#2 to:utoa::@1 append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 - [175] (word) append::sub#6 ← phi( utoa::@5/(word) $2710 utoa::@6/(word) $3e8 utoa::@7/(byte) $64 utoa::@8/(byte) $a ) - [175] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) - [175] (byte*) append::dst#4 ← phi( utoa::@5/(const byte[6]) myprintf::buf6#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) - [176] *((byte*) append::dst#4) ← (byte) '0' + [176] (word) append::sub#6 ← phi( utoa::@5/(word) $2710 utoa::@6/(word) $3e8 utoa::@7/(byte) $64 utoa::@8/(byte) $a ) + [176] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [176] (byte*) append::dst#4 ← phi( utoa::@5/(const byte[6]) myprintf::buf6#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [177] *((byte*) append::dst#4) ← (byte) '0' to:append::@1 append::@1: scope:[append] from append append::@2 - [177] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) - [178] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + [178] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [179] if((word) append::value#5>=(word) append::sub#6) goto append::@2 to:append::@return append::@return: scope:[append] from append::@1 - [179] return + [180] return to:@return append::@2: scope:[append] from append::@1 - [180] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) - [181] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + [181] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [182] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 to:append::@1 div10: scope:[div10] from main::@6 - [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 - [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 - [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 - [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 - [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 - [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 - [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 - [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 - [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 + [183] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 + [184] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 + [185] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 + [186] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [187] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 + [188] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [189] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 + [190] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 + [191] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 to:div10::@return div10::@return: scope:[div10] from div10 - [191] return + [192] return to:@return div16u: scope:[div16u] from main::@2 - [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 - [193] call divr16u - [194] (word) divr16u::return#2 ← (word) divr16u::return#0 + [193] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [194] call divr16u + [195] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div16u::@1 div16u::@1: scope:[div16u] from div16u - [195] (word) div16u::return#0 ← (word) divr16u::return#2 + [196] (word) div16u::return#0 ← (word) divr16u::return#2 to:div16u::@return div16u::@return: scope:[div16u] from div16u::@1 - [196] return + [197] return to:@return divr16u: scope:[divr16u] from div16u - [197] phi() + [198] phi() to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [198] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [198] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [198] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) - [198] (word) divr16u::rem#4 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::rem#9 ) - [199] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 - [200] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 - [201] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [202] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [199] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [199] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [199] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [199] (word) divr16u::rem#4 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::rem#9 ) + [200] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 + [201] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [202] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [203] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [203] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [204] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [204] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [205] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 - [206] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [207] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 + [205] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [206] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 + [207] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [208] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [208] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [209] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 + [209] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [210] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [210] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [210] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) - [211] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [212] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [211] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [211] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [212] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [213] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@3 - [213] return + [214] return to:@return @@ -3815,21 +9610,21 @@ VARIABLE REGISTER WEIGHTS (byte*) append::dst#1 2.0 (byte*) append::dst#2 2.0 (byte*) append::dst#3 2.0 -(byte*) append::dst#4 335.0 +(byte*) append::dst#4 3335.0 (word) append::return (word) append::return#10 4.0 (word) append::return#2 4.0 (word) append::return#3 4.0 (word) append::return#4 4.0 (word) append::sub -(word) append::sub#6 333.6666666666667 +(word) append::sub#6 3333.6666666666665 (word) append::value -(word) append::value#0 2002.0 +(word) append::value#0 20002.0 (word) append::value#1 4.0 (word) append::value#2 4.0 (word) append::value#3 4.0 (word) append::value#4 4.0 -(word) append::value#5 376.625 +(word) append::value#5 3751.625 (word) append::value#8 5.0 (word()) div10((word) div10::val) (word~) div10::$0 4.0 @@ -3894,90 +9689,93 @@ VARIABLE REGISTER WEIGHTS (word) main::v#1 14.0 (word) main::v#2 14.0 (byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) -(byte~) myprintf::$17 202.0 -(byte~) myprintf::$18 202.0 -(byte~) myprintf::$23 101.0 -(byte~) myprintf::$24 202.0 -(byte~) myprintf::$25 202.0 -(byte~) myprintf::$30 101.0 -(byte~) myprintf::$31 202.0 -(byte~) myprintf::$41 1001.0 -(byte~) myprintf::$49 202.0 +(byte~) myprintf::$17 2002.0 +(byte~) myprintf::$18 2002.0 +(byte~) myprintf::$23 1001.0 +(byte~) myprintf::$24 2002.0 +(byte~) myprintf::$25 2002.0 +(byte~) myprintf::$30 1001.0 +(byte~) myprintf::$31 2002.0 +(byte~) myprintf::$41 10001.0 +(byte~) myprintf::$49 2002.0 (byte) myprintf::b -(byte) myprintf::b#1 126.25000000000003 -(byte) myprintf::b#15 75.75 -(byte) myprintf::b#16 75.75 -(byte) myprintf::b#17 248.31999999999996 +(byte) myprintf::b#1 4223.444444444444 +(byte) myprintf::b#15 750.75 +(byte) myprintf::b#16 750.75 +(byte) myprintf::b#17 2480.32 (byte) myprintf::b#25 303.0 -(byte) myprintf::b#5 2002.0 +(byte) myprintf::b#35 2627.0 +(byte) myprintf::b#47 4.0 +(byte) myprintf::b#5 20002.0 (byte) myprintf::b#6 202.0 (byte) myprintf::bArg (byte) myprintf::bArg#1 202.0 -(byte) myprintf::bArg#10 235.66666666666663 -(byte) myprintf::bArg#12 12.283783783783784 +(byte) myprintf::bArg#10 574.7777777777778 +(byte) myprintf::bArg#48 743.2142857142856 (byte) myprintf::bDigits -(byte) myprintf::bDigits#1 202.0 -(byte) myprintf::bDigits#10 350.5 -(byte) myprintf::bDigits#14 22.44444444444444 -(byte) myprintf::bDigits#16 175.625 -(byte) myprintf::bDigits#2 2002.0 -(byte) myprintf::bDigits#24 201.99999999999997 -(byte) myprintf::bDigits#25 1506.0 -(byte) myprintf::bDigits#3 2002.0 -(byte) myprintf::bDigits#8 701.0 +(byte) myprintf::bDigits#1 2002.0 +(byte) myprintf::bDigits#10 3500.5 +(byte) myprintf::bDigits#14 1002.8499999999998 +(byte) myprintf::bDigits#16 1750.625 +(byte) myprintf::bDigits#2 20002.0 +(byte) myprintf::bDigits#25 15006.0 +(byte) myprintf::bDigits#3 20002.0 +(byte) myprintf::bDigits#47 1262.75 +(byte) myprintf::bDigits#8 7001.0 (byte) myprintf::bFormat -(byte) myprintf::bFormat#10 40.4 -(byte) myprintf::bFormat#4 168.33333333333331 +(byte) myprintf::bFormat#10 4410.9 +(byte) myprintf::bFormat#22 1262.75 (byte) myprintf::bLeadZero -(byte) myprintf::bLeadZero#10 22.147058823529413 -(byte) myprintf::bLeadZero#18 168.33333333333331 +(byte) myprintf::bLeadZero#10 414.42857142857144 +(byte) myprintf::bLeadZero#47 1262.75 (byte) myprintf::bLen -(byte) myprintf::bLen#1 202.0 -(byte) myprintf::bLen#10 37.875 -(byte) myprintf::bLen#11 620.8 -(byte) myprintf::bLen#12 1552.0 -(byte) myprintf::bLen#13 1552.0 -(byte) myprintf::bLen#14 33.666666666666664 -(byte) myprintf::bLen#23 1203.0 -(byte) myprintf::bLen#24 440.79999999999995 -(byte) myprintf::bLen#28 1506.0 -(byte) myprintf::bLen#3 202.0 -(byte) myprintf::bLen#4 1001.0 -(byte) myprintf::bLen#6 1001.0 +(byte) myprintf::bLen#1 2002.0 +(byte) myprintf::bLen#10 375.375 +(byte) myprintf::bLen#11 6200.8 +(byte) myprintf::bLen#12 15502.0 +(byte) myprintf::bLen#13 15502.0 +(byte) myprintf::bLen#14 1361.9032258064515 +(byte) myprintf::bLen#23 12003.0 +(byte) myprintf::bLen#24 4400.8 +(byte) myprintf::bLen#28 15006.0 +(byte) myprintf::bLen#3 2002.0 +(byte) myprintf::bLen#4 10001.0 +(byte) myprintf::bLen#54 735.9999999999999 +(byte) myprintf::bLen#6 10001.0 (byte) myprintf::bLen#7 202.0 (byte) myprintf::bTrailing -(byte) myprintf::bTrailing#10 10.397058823529413 -(byte) myprintf::bTrailing#21 168.33333333333331 +(byte) myprintf::bTrailing#10 573.1746031746034 +(byte) myprintf::bTrailing#46 1262.75 (byte[6]) myprintf::buf6 (byte) myprintf::digit -(byte) myprintf::digit#2 1501.5 -(byte) myprintf::digit#3 1001.0 +(byte) myprintf::digit#2 15001.5 +(byte) myprintf::digit#3 10001.0 (byte*) myprintf::dst (byte) myprintf::return -(byte) myprintf::return#0 236.3333333333333 (byte*) myprintf::str -(byte*) myprintf::str#0 151.5 -(byte*) myprintf::str#10 4.0131578947368425 +(byte*) myprintf::str#0 854.9677419354839 +(byte*) myprintf::str#47 23207.0 (byte*) myprintf::str#5 2.0 +(byte*) myprintf::str#51 680.3333333333334 (word) myprintf::w -(word) myprintf::w#10 10.397058823529413 -(word) myprintf::w#17 235.66666666666663 +(word) myprintf::w#10 590.6666666666667 (word) myprintf::w#21 202.0 -(word~) myprintf::w#49 202.0 -(word~) myprintf::w#50 202.0 -(word~) myprintf::w#51 202.0 +(word) myprintf::w#45 1262.75 +(word~) myprintf::w#90 202.0 +(word~) myprintf::w#91 202.0 +(word~) myprintf::w#92 202.0 (word) myprintf::w1 (word) myprintf::w1#0 11.0 (word) myprintf::w1#1 11.0 -(word) myprintf::w1#6 1.5569620253164556 +(word) myprintf::w1#6 1.5375 (word) myprintf::w2 (word) myprintf::w2#0 22.0 (word) myprintf::w2#1 22.0 -(word) myprintf::w2#7 1.5569620253164556 +(word) myprintf::w2#7 1.5375 (word) myprintf::w3 (word) myprintf::w3#0 7.333333333333333 (word) myprintf::w3#1 7.333333333333333 -(word) myprintf::w3#7 1.5569620253164556 +(word) myprintf::w3#7 1.5375 (byte[$64]) strTemp (void()) utoa((word) utoa::value , (byte*) utoa::dst) (byte~) utoa::$16 4.0 @@ -4003,7 +9801,7 @@ VARIABLE REGISTER WEIGHTS (word) utoa::value#12 4.0 (word) utoa::value#2 2.0 (word) utoa::value#3 2.0 -(word) utoa::value#4 35.66666666666666 +(word) utoa::value#4 335.66666666666674 (word) utoa::value#6 2.5 (byte*) zp1 (byte*) zp2 @@ -4014,20 +9812,20 @@ Initial phi equivalence classes [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] -[ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] -[ myprintf::bFormat#10 myprintf::bFormat#4 ] -[ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -[ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] -[ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -[ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +[ myprintf::bFormat#22 myprintf::bFormat#10 ] +[ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +[ myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] +[ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +[ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] +[ myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] [ myprintf::$23 ] [ myprintf::$30 ] [ myprintf::b#17 myprintf::b#5 ] [ myprintf::digit#3 myprintf::digit#2 ] -[ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -[ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +[ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +[ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] [ myprintf::$41 ] -[ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +[ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] @@ -4085,20 +9883,20 @@ Complete equivalence classes [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] -[ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] -[ myprintf::bFormat#10 myprintf::bFormat#4 ] -[ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -[ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] -[ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -[ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +[ myprintf::bFormat#22 myprintf::bFormat#10 ] +[ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +[ myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] +[ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +[ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] +[ myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] [ myprintf::$23 ] [ myprintf::$30 ] [ myprintf::b#17 myprintf::b#5 ] [ myprintf::digit#3 myprintf::digit#2 ] -[ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -[ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +[ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +[ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] [ myprintf::$41 ] -[ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +[ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] @@ -4155,20 +9953,20 @@ Allocated zp ZP_WORD:4 [ main::u#15 main::u#4 ] Allocated zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] Allocated zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] Allocated zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] -Allocated zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] -Allocated zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -Allocated zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -Allocated zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] -Allocated zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -Allocated zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Allocated zp ZP_BYTE:12 [ myprintf::bFormat#22 myprintf::bFormat#10 ] +Allocated zp ZP_BYTE:13 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +Allocated zp ZP_WORD:14 [ myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] +Allocated zp ZP_BYTE:16 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +Allocated zp ZP_BYTE:17 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] +Allocated zp ZP_WORD:18 [ myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] Allocated zp ZP_BYTE:20 [ myprintf::$23 ] Allocated zp ZP_BYTE:21 [ myprintf::$30 ] Allocated zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] Allocated zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] -Allocated zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -Allocated zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Allocated zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Allocated zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] Allocated zp ZP_BYTE:26 [ myprintf::$41 ] -Allocated zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +Allocated zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] Allocated zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] Allocated zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] Allocated zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] @@ -4549,7 +10347,7 @@ Print: { rts } // myprintf -// myprintf(byte* zeropage($c) str, word zeropage(6) w1, word zeropage(8) w2, word zeropage($a) w3) +// myprintf(byte* zeropage($12) str, word zeropage(6) w1, word zeropage(8) w2, word zeropage($a) w3) myprintf: { .label _17 = $46 .label _18 = $47 @@ -4561,13 +10359,12 @@ myprintf: { .label _41 = $1a .label _49 = $4e .label b = $1b - .label str = $c + .label str = $12 .label bDigits = $19 .label bLen = $18 .label b_5 = $16 .label digit = $17 - .label bArg = $f - .label return = $18 + .label bArg = $d .label w1 = 6 .label w2 = 8 .label w3 = $a @@ -4575,485 +10372,67 @@ myprintf: { .label b_16 = $4c .label bLen_10 = $4a .label b_17 = $16 - .label bFormat = $e - .label w = $10 - .label bTrailing = $12 - .label bLeadZero = $13 - // [55] phi from myprintf to myprintf::@1 [phi:myprintf->myprintf::@1] - b1_from_myprintf: - // [55] phi (byte) myprintf::bLeadZero#10 = (byte) 0 [phi:myprintf->myprintf::@1#0] -- vbuz1=vbuc1 + .label w = $e + .label bFormat = $c + .label bTrailing = $10 + .label bLeadZero = $11 + jmp b1_1 + // myprintf::@1_1 + b1_1: + // [55] (byte) myprintf::b#47 ← *((byte*) myprintf::str#5) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (str),y + sta b + // [56] phi from myprintf::@1_1 to myprintf::@2 [phi:myprintf::@1_1->myprintf::@2] + b2_from_b1_1: + // [56] phi (byte) myprintf::b#35 = (byte) myprintf::b#47 [phi:myprintf::@1_1->myprintf::@2#0] -- register_copy + // [56] phi (byte) myprintf::bLeadZero#47 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#1] -- vbuz1=vbuc1 lda #0 sta bLeadZero - // [55] phi (byte) myprintf::bDigits#14 = (byte) 0 [phi:myprintf->myprintf::@1#1] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bDigits#47 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#2] -- vbuz1=vbuc1 lda #0 sta bDigits - // [55] phi (byte) myprintf::bTrailing#10 = (byte) 0 [phi:myprintf->myprintf::@1#2] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bTrailing#46 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#3] -- vbuz1=vbuc1 lda #0 sta bTrailing - // [55] phi (word) myprintf::w#10 = (word) 0 [phi:myprintf->myprintf::@1#3] -- vwuz1=vwuc1 + // [56] phi (word) myprintf::w#45 = (word) 0 [phi:myprintf::@1_1->myprintf::@2#4] -- vwuz1=vwuc1 lda #<0 sta w lda #>0 sta w+1 - // [55] phi (byte) myprintf::bLen#14 = (byte) 0 [phi:myprintf->myprintf::@1#4] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bLen#54 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#5] -- vbuz1=vbuc1 lda #0 sta bLen - // [55] phi (byte) myprintf::bArg#12 = (byte) 0 [phi:myprintf->myprintf::@1#5] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bArg#48 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#6] -- vbuz1=vbuc1 lda #0 sta bArg - // [55] phi (byte) myprintf::bFormat#10 = (byte) 0 [phi:myprintf->myprintf::@1#6] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bFormat#22 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#7] -- vbuz1=vbuc1 lda #0 sta bFormat - // [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#5 [phi:myprintf->myprintf::@1#7] -- register_copy - jmp b1 - // [55] phi from myprintf::@27 to myprintf::@1 [phi:myprintf::@27->myprintf::@1] - b1_from_b27: - // [55] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#18 [phi:myprintf::@27->myprintf::@1#0] -- register_copy - // [55] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#24 [phi:myprintf::@27->myprintf::@1#1] -- register_copy - // [55] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#21 [phi:myprintf::@27->myprintf::@1#2] -- register_copy - // [55] phi (word) myprintf::w#10 = (word) myprintf::w#17 [phi:myprintf::@27->myprintf::@1#3] -- register_copy - // [55] phi (byte) myprintf::bLen#14 = (byte) myprintf::return#0 [phi:myprintf::@27->myprintf::@1#4] -- register_copy - // [55] phi (byte) myprintf::bArg#12 = (byte) myprintf::bArg#10 [phi:myprintf::@27->myprintf::@1#5] -- register_copy - // [55] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#4 [phi:myprintf::@27->myprintf::@1#6] -- register_copy - // [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#0 [phi:myprintf::@27->myprintf::@1#7] -- register_copy - jmp b1 - // myprintf::@1 - b1: - // [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) -- vbuz1=_deref_pbuz2 - ldy #0 - lda (str),y - sta b - // [57] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 - lda bFormat - cmp #0 - beq b2 - jmp b33 - // myprintf::@33 - b33: - // [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuz1_neq_vbuc1_then_la1 - lda #'0' - cmp b - bne b3 - // [59] phi from myprintf::@33 to myprintf::@27 [phi:myprintf::@33->myprintf::@27] - b27_from_b33: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) 1 [phi:myprintf::@33->myprintf::@27#0] -- vbuz1=vbuc1 - lda #1 - sta bLeadZero - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@33->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@33->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@33->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@33->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@33->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@33->myprintf::@27#6] -- register_copy - jmp b27 - // myprintf::@27 - b27: - // [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 -- pbuz1=_inc_pbuz1 - inc str - bne !+ - inc str+1 - !: - // [61] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 - ldy #0 - lda (str),y - cmp #0 - bne b1_from_b27 - jmp b38 - // myprintf::@38 - b38: - // [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 - lda #0 - ldy return - sta strTemp,y - jmp breturn - // myprintf::@return - breturn: - // [63] return - rts - // myprintf::@3 - b3: - // [64] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 -- vbuz1_lt_vbuc1_then_la1 - lda b - cmp #'1' - bcc b4 - jmp b39 - // myprintf::@39 - b39: - // [65] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuz1_le_vbuc1_then_la1 - lda #'9' - cmp b - bcs b23 - jmp b4 - // myprintf::@4 - b4: - // [66] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuz1_neq_vbuc1_then_la1 - lda #'-' - cmp b - bne b5 - // [59] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] - b27_from_b4: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) 1 [phi:myprintf::@4->myprintf::@27#2] -- vbuz1=vbuc1 - lda #1 - sta bTrailing - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@4->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#6] -- register_copy - jmp b27 - // myprintf::@5 - b5: - // [67] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuz1_eq_vbuc1_then_la1 - lda #'c' - cmp b - beq b6 - jmp b24 - // myprintf::@24 - b24: - // [68] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuz1_eq_vbuc1_then_la1 - lda #'d' - cmp b - beq b7 - jmp b25 - // myprintf::@25 - b25: - // [69] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuz1_eq_vbuc1_then_la1 - lda #'x' - cmp b - beq b26 - jmp b40 - // myprintf::@40 - b40: - // [70] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuz1_eq_vbuc1_then_la1 - lda #'X' - cmp b - beq b26 - // [71] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22] - b22_from_b11: - b22_from_b20: - b22_from_b21: - b22_from_b40: - b22_from_b6: - // [71] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy - // [71] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy - jmp b22 - // [71] phi from myprintf::@42 to myprintf::@22 [phi:myprintf::@42->myprintf::@22] - b22_from_b42: - jmp b22 - // myprintf::@22 - b22: - // [59] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] - b27_from_b22: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@22->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) 0 [phi:myprintf::@22->myprintf::@27#6] -- vbuz1=vbuc1 - lda #0 - sta bFormat - jmp b27 - // myprintf::@26 - b26: - // [72] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 -- vbuz1=_byte_vwuz2 - lda w - sta _17 - // [73] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 -- vbuz1=vbuz2_ror_4 - lda _17 - lsr - lsr - lsr - lsr - sta _18 - // [74] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 - lda #$f - and _18 - sta b_15 - // [75] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 -- vbuz1_lt_vbuc1_then_la1 - lda b_15 - cmp #$a - bcc b8_from_b26 - // [77] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] - b9_from_b26: - // [77] phi (byte~) myprintf::$23 = (byte) $57 [phi:myprintf::@26->myprintf::@9#0] -- vbuz1=vbuc1 - lda #$57 - sta _23 - jmp b9 - // [76] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] - b8_from_b26: - jmp b8 - // myprintf::@8 - b8: - // [77] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] - b9_from_b8: - // [77] phi (byte~) myprintf::$23 = (byte) '0' [phi:myprintf::@8->myprintf::@9#0] -- vbuz1=vbuc1 - lda #'0' - sta _23 - jmp b9 - // myprintf::@9 - b9: - // [78] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 -- vbuz1=vbuz2_plus_vbuz3 - lda _23 - clc - adc b_15 - sta _24 - // [79] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 -- pbuc1_derefidx_vbuz1=vbuz2 - lda _24 - ldy bLen - sta strTemp,y - // [80] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz2 - ldy bLen - iny - sty bLen_10 - // [81] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 -- vbuz1=_byte_vwuz2 - lda w - sta _25 - // [82] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 - lda #$f - and _25 - sta b_16 - // [83] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 -- vbuz1_lt_vbuc1_then_la1 - lda b_16 - cmp #$a - bcc b10_from_b9 - // [85] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] - b11_from_b9: - // [85] phi (byte~) myprintf::$30 = (byte) $57 [phi:myprintf::@9->myprintf::@11#0] -- vbuz1=vbuc1 - lda #$57 - sta _30 - jmp b11 - // [84] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] - b10_from_b9: - jmp b10 - // myprintf::@10 - b10: - // [85] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] - b11_from_b10: - // [85] phi (byte~) myprintf::$30 = (byte) '0' [phi:myprintf::@10->myprintf::@11#0] -- vbuz1=vbuc1 - lda #'0' - sta _30 - jmp b11 - // myprintf::@11 - b11: - // [86] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 -- vbuz1=vbuz2_plus_vbuz3 - lda _30 - clc - adc b_16 - sta _31 - // [87] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 -- pbuc1_derefidx_vbuz1=vbuz2 - lda _31 - ldy bLen_10 - sta strTemp,y - // [88] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuz2 - ldy bLen_10 - iny - sty bLen - jmp b22_from_b11 - // myprintf::@7 - b7: - // [89] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 - lda w - sta utoa.value - lda w+1 - sta utoa.value+1 - // [90] call utoa - // [135] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] - utoa_from_b7: - jsr utoa - // [91] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] - b12_from_b7: - // [91] phi (byte) myprintf::b#17 = (byte) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuz1=vbuc1 - lda #1 - sta b_17 - jmp b12 - // myprintf::@12 - b12: - // [92] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 - ldy b_17 - lda buf6,y - cmp #0 - bne b13 - jmp b14 - // myprintf::@14 - b14: - // [93] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 -- vbuz1_neq_0_then_la1 - lda bTrailing - cmp #0 - bne b15_from_b14 - jmp b41 - // myprintf::@41 - b41: - // [94] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 - lda b_17 - cmp bDigits - bcc b16_from_b41 - // [95] phi from myprintf::@41 to myprintf::@15 [phi:myprintf::@41->myprintf::@15] - b15_from_b41: - jmp b15 - // [95] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] - b15_from_b14: - b15_from_b18: - // [95] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy - // [95] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy - jmp b15 - // myprintf::@15 - b15: - // [96] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] - b19_from_b15: - // [96] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy - // [96] phi (byte) myprintf::digit#3 = (byte) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuz1=vbuc1 - lda #0 - sta digit - jmp b19 - // [96] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] - b19_from_b19: - // [96] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy - // [96] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy - jmp b19 - // myprintf::@19 - b19: - // [97] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 - ldy digit - lda buf6,y - ldy bLen - sta strTemp,y - // [98] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 - inc bLen - // [99] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuz1=_inc_vbuz1 - inc digit - // [100] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuz1_lt_vbuz2_then_la1 - lda digit - cmp b_17 - bcc b19_from_b19 - jmp b20 - // myprintf::@20 - b20: - // [101] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 -- vbuz1_eq_0_then_la1 - lda bTrailing - cmp #0 - beq b22_from_b20 - jmp b42 - // myprintf::@42 - b42: - // [102] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 -- vbuz1_le_vbuz2_then_la1 - lda b_17 - cmp bDigits - bcs b22_from_b42 - // [103] phi from myprintf::@21 myprintf::@42 to myprintf::@21 [phi:myprintf::@21/myprintf::@42->myprintf::@21] - b21_from_b21: - b21_from_b42: - // [103] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@42->myprintf::@21#0] -- register_copy - // [103] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@42->myprintf::@21#1] -- register_copy - jmp b21 - // myprintf::@21 - b21: - // [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 - lda #' ' - ldy bLen - sta strTemp,y - // [105] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 - inc bLen - // [106] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 - dec bDigits - // [107] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 - lda b_17 - cmp bDigits - bcc b21_from_b21 - jmp b22_from_b21 - // [108] phi from myprintf::@18 myprintf::@41 to myprintf::@16 [phi:myprintf::@18/myprintf::@41->myprintf::@16] - b16_from_b18: - b16_from_b41: - // [108] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@41->myprintf::@16#0] -- register_copy - // [108] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@41->myprintf::@16#1] -- register_copy - jmp b16 - // myprintf::@16 - b16: - // [109] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 -- vbuz1_eq_0_then_la1 - lda bLeadZero - cmp #0 - beq b17_from_b16 - // [111] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] - b18_from_b16: - // [111] phi (byte~) myprintf::$41 = (byte) '0' [phi:myprintf::@16->myprintf::@18#0] -- vbuz1=vbuc1 - lda #'0' - sta _41 - jmp b18 - // [110] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] - b17_from_b16: - jmp b17 - // myprintf::@17 - b17: - // [111] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] - b18_from_b17: - // [111] phi (byte~) myprintf::$41 = (byte) ' ' [phi:myprintf::@17->myprintf::@18#0] -- vbuz1=vbuc1 - lda #' ' - sta _41 - jmp b18 - // myprintf::@18 - b18: - // [112] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 -- pbuc1_derefidx_vbuz1=vbuz2 - lda _41 - ldy bLen - sta strTemp,y - // [113] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 - inc bLen - // [114] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 - dec bDigits - // [115] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 - lda b_17 - cmp bDigits - bcc b16_from_b18 - jmp b15_from_b18 - // myprintf::@13 - b13: - // [116] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuz1=_inc_vbuz1 - inc b_5 - // [91] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] - b12_from_b13: - // [91] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy - jmp b12 - // myprintf::@6 - b6: - // [117] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 -- vbuz1=_byte_vwuz2 - lda w - sta _49 - // [118] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 -- pbuc1_derefidx_vbuz1=vbuz2 - // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 - lda _49 - ldy bLen - sta strTemp,y - // [119] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 - inc bLen - jmp b22_from_b6 - // myprintf::@23 - b23: - // [120] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuz2_minus_vbuc1 - lax b - axs #'0' - stx bDigits - // [59] phi from myprintf::@23 myprintf::@32 to myprintf::@27 [phi:myprintf::@23/myprintf::@32->myprintf::@27] - b27_from_b23: - b27_from_b32: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@32->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@23/myprintf::@32->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@32->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#6] -- register_copy - jmp b27 + // [56] phi (byte*) myprintf::str#51 = (byte*) myprintf::str#5 [phi:myprintf::@1_1->myprintf::@2#8] -- register_copy + jmp b2 + // [56] phi from myprintf::@1 to myprintf::@2 [phi:myprintf::@1->myprintf::@2] + b2_from_b1: + // [56] phi (byte) myprintf::b#35 = (byte) myprintf::b#1 [phi:myprintf::@1->myprintf::@2#0] -- register_copy + // [56] phi (byte) myprintf::bLeadZero#47 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@1->myprintf::@2#1] -- register_copy + // [56] phi (byte) myprintf::bDigits#47 = (byte) myprintf::bDigits#14 [phi:myprintf::@1->myprintf::@2#2] -- register_copy + // [56] phi (byte) myprintf::bTrailing#46 = (byte) myprintf::bTrailing#10 [phi:myprintf::@1->myprintf::@2#3] -- register_copy + // [56] phi (word) myprintf::w#45 = (word) myprintf::w#10 [phi:myprintf::@1->myprintf::@2#4] -- register_copy + // [56] phi (byte) myprintf::bLen#54 = (byte) myprintf::bLen#14 [phi:myprintf::@1->myprintf::@2#5] -- register_copy + // [56] phi (byte) myprintf::bArg#48 = (byte) myprintf::bArg#10 [phi:myprintf::@1->myprintf::@2#6] -- register_copy + // [56] phi (byte) myprintf::bFormat#22 = (byte) myprintf::bFormat#10 [phi:myprintf::@1->myprintf::@2#7] -- register_copy + // [56] phi (byte*) myprintf::str#51 = (byte*) myprintf::str#0 [phi:myprintf::@1->myprintf::@2#8] -- register_copy + jmp b2 // myprintf::@2 b2: - // [121] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 -- vbuz1_neq_vbuc1_then_la1 + // [57] if((byte) myprintf::b#35!=(byte) '%') goto myprintf::@28 -- vbuz1_neq_vbuc1_then_la1 lda #'%' cmp b bne b28 jmp b34 // myprintf::@34 b34: - // [122] if((byte) myprintf::bArg#12==(byte) 0) goto myprintf::@29 -- vbuz1_eq_0_then_la1 + // [58] if((byte) myprintf::bArg#48==(byte) 0) goto myprintf::@29 -- vbuz1_eq_0_then_la1 // default format //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] lda bArg @@ -5062,49 +10441,481 @@ myprintf: { jmp b35 // myprintf::@35 b35: - // [123] if((byte) myprintf::bArg#12==(byte) 1) goto myprintf::@30 -- vbuz1_eq_vbuc1_then_la1 + // [59] if((byte) myprintf::bArg#48==(byte) 1) goto myprintf::@30 -- vbuz1_eq_vbuc1_then_la1 lda #1 cmp bArg beq b30 jmp b36 // myprintf::@36 b36: - // [124] (word~) myprintf::w#51 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 + // [60] (word~) myprintf::w#92 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 lda w3 sta w lda w3+1 sta w+1 - // [125] phi from myprintf::@29 myprintf::@30 myprintf::@36 to myprintf::@31 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31] + // [61] phi from myprintf::@29 myprintf::@30 myprintf::@36 to myprintf::@31 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31] b31_from_b29: b31_from_b30: b31_from_b36: - // [125] phi (word) myprintf::w#21 = (word~) myprintf::w#49 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31#0] -- register_copy + // [61] phi (word) myprintf::w#21 = (word~) myprintf::w#90 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31#0] -- register_copy jmp b31 // myprintf::@31 b31: - // [126] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 -- vbuz1=_inc_vbuz1 + // [62] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#48 -- vbuz1=_inc_vbuz1 inc bArg - // [59] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] + // [63] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] b27_from_b31: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) 0 [phi:myprintf::@31->myprintf::@27#0] -- vbuz1=vbuc1 + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#51 [phi:myprintf::@31->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) 0 [phi:myprintf::@31->myprintf::@27#1] -- vbuz1=vbuc1 lda #0 sta bLeadZero - // [59] phi (byte) myprintf::bDigits#24 = (byte) 1 [phi:myprintf::@31->myprintf::@27#1] -- vbuz1=vbuc1 + // [63] phi (byte) myprintf::bDigits#14 = (byte) 1 [phi:myprintf::@31->myprintf::@27#2] -- vbuz1=vbuc1 lda #1 sta bDigits - // [59] phi (byte) myprintf::bTrailing#21 = (byte) 0 [phi:myprintf::@31->myprintf::@27#2] -- vbuz1=vbuc1 + // [63] phi (byte) myprintf::bTrailing#10 = (byte) 0 [phi:myprintf::@31->myprintf::@27#3] -- vbuz1=vbuc1 lda #0 sta bTrailing - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#21 [phi:myprintf::@31->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@31->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@31->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) 1 [phi:myprintf::@31->myprintf::@27#6] -- vbuz1=vbuc1 + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#21 [phi:myprintf::@31->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@31->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#54 [phi:myprintf::@31->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) 1 [phi:myprintf::@31->myprintf::@27#7] -- vbuz1=vbuc1 lda #1 sta bFormat jmp b27 + // myprintf::@27 + b27: + // [64] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + // [65] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 + ldy #0 + lda (str),y + cmp #0 + bne b1 + jmp b38 + // myprintf::@38 + b38: + // [66] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy bLen + sta strTemp,y + jmp breturn + // myprintf::@return + breturn: + // [67] return + rts + // myprintf::@1 + b1: + // [68] (byte) myprintf::b#1 ← *((byte*) myprintf::str#0) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (str),y + sta b + // [69] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 + lda bFormat + cmp #0 + beq b2_from_b1 + jmp b33 + // myprintf::@33 + b33: + // [70] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuz1_neq_vbuc1_then_la1 + lda #'0' + cmp b + bne b3 + // [63] phi from myprintf::@33 to myprintf::@27 [phi:myprintf::@33->myprintf::@27] + b27_from_b33: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@33->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) 1 [phi:myprintf::@33->myprintf::@27#1] -- vbuz1=vbuc1 + lda #1 + sta bLeadZero + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#14 [phi:myprintf::@33->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@33->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@33->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@33->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@33->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@33->myprintf::@27#7] -- register_copy + jmp b27 + // myprintf::@3 + b3: + // [71] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 -- vbuz1_lt_vbuc1_then_la1 + lda b + cmp #'1' + bcc b4 + jmp b39 + // myprintf::@39 + b39: + // [72] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuz1_le_vbuc1_then_la1 + lda #'9' + cmp b + bcs b23 + jmp b4 + // myprintf::@4 + b4: + // [73] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuz1_neq_vbuc1_then_la1 + lda #'-' + cmp b + bne b5 + // [63] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] + b27_from_b4: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@4->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) 1 [phi:myprintf::@4->myprintf::@27#3] -- vbuz1=vbuc1 + lda #1 + sta bTrailing + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@4->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#7] -- register_copy + jmp b27 + // myprintf::@5 + b5: + // [74] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuz1_eq_vbuc1_then_la1 + lda #'c' + cmp b + beq b6 + jmp b24 + // myprintf::@24 + b24: + // [75] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuz1_eq_vbuc1_then_la1 + lda #'d' + cmp b + beq b7 + jmp b25 + // myprintf::@25 + b25: + // [76] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuz1_eq_vbuc1_then_la1 + lda #'x' + cmp b + beq b26 + jmp b40 + // myprintf::@40 + b40: + // [77] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuz1_eq_vbuc1_then_la1 + lda #'X' + cmp b + beq b26 + // [78] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22] + b22_from_b11: + b22_from_b20: + b22_from_b21: + b22_from_b40: + b22_from_b6: + // [78] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy + // [78] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy + jmp b22 + // [78] phi from myprintf::@42 to myprintf::@22 [phi:myprintf::@42->myprintf::@22] + b22_from_b42: + jmp b22 + // myprintf::@22 + b22: + // [63] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] + b27_from_b22: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@22->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@22->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) 0 [phi:myprintf::@22->myprintf::@27#7] -- vbuz1=vbuc1 + lda #0 + sta bFormat + jmp b27 + // myprintf::@26 + b26: + // [79] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 -- vbuz1=_byte_vwuz2 + lda w + sta _17 + // [80] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 -- vbuz1=vbuz2_ror_4 + lda _17 + lsr + lsr + lsr + lsr + sta _18 + // [81] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + lda #$f + and _18 + sta b_15 + // [82] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 -- vbuz1_lt_vbuc1_then_la1 + lda b_15 + cmp #$a + bcc b8_from_b26 + // [84] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] + b9_from_b26: + // [84] phi (byte~) myprintf::$23 = (byte) $57 [phi:myprintf::@26->myprintf::@9#0] -- vbuz1=vbuc1 + lda #$57 + sta _23 + jmp b9 + // [83] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] + b8_from_b26: + jmp b8 + // myprintf::@8 + b8: + // [84] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] + b9_from_b8: + // [84] phi (byte~) myprintf::$23 = (byte) '0' [phi:myprintf::@8->myprintf::@9#0] -- vbuz1=vbuc1 + lda #'0' + sta _23 + jmp b9 + // myprintf::@9 + b9: + // [85] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 -- vbuz1=vbuz2_plus_vbuz3 + lda _23 + clc + adc b_15 + sta _24 + // [86] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _24 + ldy bLen + sta strTemp,y + // [87] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz2 + ldy bLen + iny + sty bLen_10 + // [88] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 -- vbuz1=_byte_vwuz2 + lda w + sta _25 + // [89] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + lda #$f + and _25 + sta b_16 + // [90] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 -- vbuz1_lt_vbuc1_then_la1 + lda b_16 + cmp #$a + bcc b10_from_b9 + // [92] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] + b11_from_b9: + // [92] phi (byte~) myprintf::$30 = (byte) $57 [phi:myprintf::@9->myprintf::@11#0] -- vbuz1=vbuc1 + lda #$57 + sta _30 + jmp b11 + // [91] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] + b10_from_b9: + jmp b10 + // myprintf::@10 + b10: + // [92] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] + b11_from_b10: + // [92] phi (byte~) myprintf::$30 = (byte) '0' [phi:myprintf::@10->myprintf::@11#0] -- vbuz1=vbuc1 + lda #'0' + sta _30 + jmp b11 + // myprintf::@11 + b11: + // [93] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 -- vbuz1=vbuz2_plus_vbuz3 + lda _30 + clc + adc b_16 + sta _31 + // [94] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _31 + ldy bLen_10 + sta strTemp,y + // [95] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuz2 + ldy bLen_10 + iny + sty bLen + jmp b22_from_b11 + // myprintf::@7 + b7: + // [96] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 + lda w + sta utoa.value + lda w+1 + sta utoa.value+1 + // [97] call utoa + // [136] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] + utoa_from_b7: + jsr utoa + // [98] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] + b12_from_b7: + // [98] phi (byte) myprintf::b#17 = (byte) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuz1=vbuc1 + lda #1 + sta b_17 + jmp b12 + // myprintf::@12 + b12: + // [99] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 + ldy b_17 + lda buf6,y + cmp #0 + bne b13 + jmp b14 + // myprintf::@14 + b14: + // [100] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 -- vbuz1_neq_0_then_la1 + lda bTrailing + cmp #0 + bne b15_from_b14 + jmp b41 + // myprintf::@41 + b41: + // [101] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcc b16_from_b41 + // [102] phi from myprintf::@41 to myprintf::@15 [phi:myprintf::@41->myprintf::@15] + b15_from_b41: + jmp b15 + // [102] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] + b15_from_b14: + b15_from_b18: + // [102] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy + // [102] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy + jmp b15 + // myprintf::@15 + b15: + // [103] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] + b19_from_b15: + // [103] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy + // [103] phi (byte) myprintf::digit#3 = (byte) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuz1=vbuc1 + lda #0 + sta digit + jmp b19 + // [103] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] + b19_from_b19: + // [103] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy + // [103] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy + jmp b19 + // myprintf::@19 + b19: + // [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 + ldy digit + lda buf6,y + ldy bLen + sta strTemp,y + // [105] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 + inc bLen + // [106] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuz1=_inc_vbuz1 + inc digit + // [107] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuz1_lt_vbuz2_then_la1 + lda digit + cmp b_17 + bcc b19_from_b19 + jmp b20 + // myprintf::@20 + b20: + // [108] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 -- vbuz1_eq_0_then_la1 + lda bTrailing + cmp #0 + beq b22_from_b20 + jmp b42 + // myprintf::@42 + b42: + // [109] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 -- vbuz1_le_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcs b22_from_b42 + // [110] phi from myprintf::@21 myprintf::@42 to myprintf::@21 [phi:myprintf::@21/myprintf::@42->myprintf::@21] + b21_from_b21: + b21_from_b42: + // [110] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@42->myprintf::@21#0] -- register_copy + // [110] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@42->myprintf::@21#1] -- register_copy + jmp b21 + // myprintf::@21 + b21: + // [111] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #' ' + ldy bLen + sta strTemp,y + // [112] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 + inc bLen + // [113] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 + dec bDigits + // [114] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcc b21_from_b21 + jmp b22_from_b21 + // [115] phi from myprintf::@18 myprintf::@41 to myprintf::@16 [phi:myprintf::@18/myprintf::@41->myprintf::@16] + b16_from_b18: + b16_from_b41: + // [115] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@41->myprintf::@16#0] -- register_copy + // [115] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@41->myprintf::@16#1] -- register_copy + jmp b16 + // myprintf::@16 + b16: + // [116] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 -- vbuz1_eq_0_then_la1 + lda bLeadZero + cmp #0 + beq b17_from_b16 + // [118] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] + b18_from_b16: + // [118] phi (byte~) myprintf::$41 = (byte) '0' [phi:myprintf::@16->myprintf::@18#0] -- vbuz1=vbuc1 + lda #'0' + sta _41 + jmp b18 + // [117] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] + b17_from_b16: + jmp b17 + // myprintf::@17 + b17: + // [118] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] + b18_from_b17: + // [118] phi (byte~) myprintf::$41 = (byte) ' ' [phi:myprintf::@17->myprintf::@18#0] -- vbuz1=vbuc1 + lda #' ' + sta _41 + jmp b18 + // myprintf::@18 + b18: + // [119] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _41 + ldy bLen + sta strTemp,y + // [120] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 + inc bLen + // [121] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 + dec bDigits + // [122] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcc b16_from_b18 + jmp b15_from_b18 + // myprintf::@13 + b13: + // [123] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuz1=_inc_vbuz1 + inc b_5 + // [98] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] + b12_from_b13: + // [98] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy + jmp b12 + // myprintf::@6 + b6: + // [124] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 -- vbuz1=_byte_vwuz2 + lda w + sta _49 + // [125] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 -- pbuc1_derefidx_vbuz1=vbuz2 + // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 + lda _49 + ldy bLen + sta strTemp,y + // [126] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b22_from_b6 + // myprintf::@23 + b23: + // [127] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuz2_minus_vbuc1 + lax b + axs #'0' + stx bDigits + // [63] phi from myprintf::@23 myprintf::@32 to myprintf::@27 [phi:myprintf::@23/myprintf::@32->myprintf::@27] + b27_from_b23: + b27_from_b32: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@23/myprintf::@32->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@32->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@32->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#7] -- register_copy + jmp b27 // myprintf::@30 b30: - // [127] (word~) myprintf::w#50 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 + // [128] (word~) myprintf::w#91 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 lda w2 sta w lda w2+1 @@ -5112,7 +10923,7 @@ myprintf: { jmp b31_from_b30 // myprintf::@29 b29: - // [128] (word~) myprintf::w#49 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 + // [129] (word~) myprintf::w#90 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 lda w1 sta w lda w1+1 @@ -5120,40 +10931,40 @@ myprintf: { jmp b31_from_b29 // myprintf::@28 b28: - // [129] if((byte) myprintf::b#1<(byte) $41) goto myprintf::@32 -- vbuz1_lt_vbuc1_then_la1 + // [130] if((byte) myprintf::b#35<(byte) $41) goto myprintf::@32 -- vbuz1_lt_vbuc1_then_la1 lda b cmp #$41 bcc b32_from_b28 jmp b43 // myprintf::@43 b43: - // [130] if((byte) myprintf::b#1>=(byte) $5a+(byte) 1) goto myprintf::@32 -- vbuz1_ge_vbuc1_then_la1 + // [131] if((byte) myprintf::b#35>=(byte) $5a+(byte) 1) goto myprintf::@32 -- vbuz1_ge_vbuc1_then_la1 lda b cmp #$5a+1 bcs b32_from_b43 jmp b37 // myprintf::@37 b37: - // [131] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 -- vbuz1=vbuz1_plus_vbuc1 + // [132] (byte) myprintf::b#6 ← (byte) myprintf::b#35 + (byte) $20 -- vbuz1=vbuz1_plus_vbuc1 lax b axs #-[$20] stx b - // [132] phi from myprintf::@28 myprintf::@37 to myprintf::@32 [phi:myprintf::@28/myprintf::@37->myprintf::@32] + // [133] phi from myprintf::@28 myprintf::@37 to myprintf::@32 [phi:myprintf::@28/myprintf::@37->myprintf::@32] b32_from_b28: b32_from_b37: - // [132] phi (byte) myprintf::b#25 = (byte) myprintf::b#1 [phi:myprintf::@28/myprintf::@37->myprintf::@32#0] -- register_copy + // [133] phi (byte) myprintf::b#25 = (byte) myprintf::b#35 [phi:myprintf::@28/myprintf::@37->myprintf::@32#0] -- register_copy jmp b32 - // [132] phi from myprintf::@43 to myprintf::@32 [phi:myprintf::@43->myprintf::@32] + // [133] phi from myprintf::@43 to myprintf::@32 [phi:myprintf::@43->myprintf::@32] b32_from_b43: jmp b32 // myprintf::@32 b32: - // [133] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuz2 + // [134] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#54) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuz2 // swap 0x41 / 0x61 when in lower case mode lda b ldy bLen sta strTemp,y - // [134] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + // [135] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#54 -- vbuz1=_inc_vbuz1 inc bLen jmp b27_from_b32 buf6: .fill 6, 0 @@ -5170,7 +10981,7 @@ utoa: { jmp b13 // utoa::@13 b13: - // [136] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 + // [137] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$2710 bcc !+ @@ -5179,28 +10990,28 @@ utoa: { cmp #<$2710 bcs b5 !: - // [137] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] + // [138] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] b1_from_b13: - // [137] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 + // [138] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 lda #<myprintf.buf6 sta dst lda #>myprintf.buf6 sta dst+1 - // [137] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy - // [137] phi (byte) utoa::bStarted#5 = (byte) 0 [phi:utoa::@13->utoa::@1#2] -- vbuz1=vbuc1 + // [138] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy + // [138] phi (byte) utoa::bStarted#5 = (byte) 0 [phi:utoa::@13->utoa::@1#2] -- vbuz1=vbuc1 lda #0 sta bStarted jmp b1 // utoa::@1 b1: - // [138] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 -- vbuz1_eq_vbuc1_then_la1 + // [139] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 -- vbuz1_eq_vbuc1_then_la1 lda #1 cmp bStarted beq b6 jmp b14 // utoa::@14 b14: - // [139] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 + // [140] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$3e8 bcc !+ @@ -5209,22 +11020,22 @@ utoa: { cmp #<$3e8 bcs b6 !: - // [140] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] + // [141] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] b2_from_b14: - // [140] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy - // [140] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy - // [140] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy + // [141] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy + // [141] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy + // [141] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy jmp b2 // utoa::@2 b2: - // [141] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 -- vbuz1_eq_vbuc1_then_la1 + // [142] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 -- vbuz1_eq_vbuc1_then_la1 lda #1 cmp bStarted beq b7 jmp b15 // utoa::@15 b15: - // [142] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 + // [143] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$64 bcc !+ @@ -5233,22 +11044,22 @@ utoa: { cmp #<$64 bcs b7 !: - // [143] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] + // [144] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] b3_from_b15: - // [143] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy - // [143] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy - // [143] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy + // [144] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy + // [144] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy + // [144] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy jmp b3 // utoa::@3 b3: - // [144] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 -- vbuz1_eq_vbuc1_then_la1 + // [145] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 -- vbuz1_eq_vbuc1_then_la1 lda #1 cmp bStarted beq b8 jmp b16 // utoa::@16 b16: - // [145] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 + // [146] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$a bcc !+ @@ -5257,26 +11068,26 @@ utoa: { cmp #<$a bcs b8 !: - // [146] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] + // [147] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] b4_from_b12: b4_from_b16: - // [146] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy - // [146] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy + // [147] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy + // [147] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy jmp b4 // utoa::@4 b4: - // [147] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 -- vbuz1=_byte_vwuz2 + // [148] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 -- vbuz1=_byte_vwuz2 lda value sta _16 - // [148] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuz1=vbuc1_plus_vbuz2 + // [149] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuz1=vbuc1_plus_vbuz2 lax _16 axs #-['0'] stx _17 - // [149] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuz2 + // [150] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuz2 lda _17 ldy #0 sta (dst),y - // [150] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz2 + // [151] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz2 lda dst clc adc #1 @@ -5284,39 +11095,39 @@ utoa: { lda dst+1 adc #0 sta dst_3+1 - // [151] *((byte*) utoa::dst#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [152] *((byte*) utoa::dst#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (dst_3),y jmp breturn // utoa::@return breturn: - // [152] return + // [153] return rts // utoa::@8 b8: - // [153] (byte*) append::dst#3 ← (byte*) utoa::dst#13 -- pbuz1=pbuz2 + // [154] (byte*) append::dst#3 ← (byte*) utoa::dst#13 -- pbuz1=pbuz2 lda dst sta append.dst lda dst+1 sta append.dst+1 - // [154] (word) append::value#4 ← (word) utoa::value#10 -- vwuz1=vwuz2 + // [155] (word) append::value#4 ← (word) utoa::value#10 -- vwuz1=vwuz2 lda value sta append.value lda value+1 sta append.value+1 - // [155] call append - // [175] phi from utoa::@8 to append [phi:utoa::@8->append] + // [156] call append + // [176] phi from utoa::@8 to append [phi:utoa::@8->append] append_from_b8: - // [175] phi (word) append::sub#6 = (byte) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 + // [176] phi (word) append::sub#6 = (byte) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 lda #<$a sta append.sub lda #>$a sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy jsr append - // [156] (word) append::return#10 ← (word) append::value#5 -- vwuz1=vwuz2 + // [157] (word) append::return#10 ← (word) append::value#5 -- vwuz1=vwuz2 lda append.value sta append.return_10 lda append.value+1 @@ -5324,12 +11135,12 @@ utoa: { jmp b12 // utoa::@12 b12: - // [157] (word) utoa::value#3 ← (word) append::return#10 -- vwuz1=vwuz2 + // [158] (word) utoa::value#3 ← (word) append::return#10 -- vwuz1=vwuz2 lda append.return_10 sta value lda append.return_10+1 sta value+1 - // [158] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 + // [159] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 @@ -5337,28 +11148,28 @@ utoa: { jmp b4_from_b12 // utoa::@7 b7: - // [159] (byte*) append::dst#2 ← (byte*) utoa::dst#10 -- pbuz1=pbuz2 + // [160] (byte*) append::dst#2 ← (byte*) utoa::dst#10 -- pbuz1=pbuz2 lda dst sta append.dst lda dst+1 sta append.dst+1 - // [160] (word) append::value#3 ← (word) utoa::value#11 -- vwuz1=vwuz2 + // [161] (word) append::value#3 ← (word) utoa::value#11 -- vwuz1=vwuz2 lda value sta append.value lda value+1 sta append.value+1 - // [161] call append - // [175] phi from utoa::@7 to append [phi:utoa::@7->append] + // [162] call append + // [176] phi from utoa::@7 to append [phi:utoa::@7->append] append_from_b7: - // [175] phi (word) append::sub#6 = (byte) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 + // [176] phi (word) append::sub#6 = (byte) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 lda #<$64 sta append.sub lda #>$64 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy jsr append - // [162] (word) append::return#4 ← (word) append::value#5 -- vwuz1=vwuz2 + // [163] (word) append::return#4 ← (word) append::value#5 -- vwuz1=vwuz2 lda append.value sta append.return_4 lda append.value+1 @@ -5366,48 +11177,48 @@ utoa: { jmp b11 // utoa::@11 b11: - // [163] (word) utoa::value#2 ← (word) append::return#4 -- vwuz1=vwuz2 + // [164] (word) utoa::value#2 ← (word) append::return#4 -- vwuz1=vwuz2 lda append.return_4 sta value lda append.return_4+1 sta value+1 - // [164] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 + // [165] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [143] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] + // [144] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] b3_from_b11: - // [143] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy - // [143] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy - // [143] phi (byte) utoa::bStarted#7 = (byte) 1 [phi:utoa::@11->utoa::@3#2] -- vbuz1=vbuc1 + // [144] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy + // [144] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy + // [144] phi (byte) utoa::bStarted#7 = (byte) 1 [phi:utoa::@11->utoa::@3#2] -- vbuz1=vbuc1 lda #1 sta bStarted jmp b3 // utoa::@6 b6: - // [165] (byte*) append::dst#1 ← (byte*) utoa::dst#16 -- pbuz1=pbuz2 + // [166] (byte*) append::dst#1 ← (byte*) utoa::dst#16 -- pbuz1=pbuz2 lda dst sta append.dst lda dst+1 sta append.dst+1 - // [166] (word) append::value#2 ← (word) utoa::value#6 -- vwuz1=vwuz2 + // [167] (word) append::value#2 ← (word) utoa::value#6 -- vwuz1=vwuz2 lda value sta append.value lda value+1 sta append.value+1 - // [167] call append - // [175] phi from utoa::@6 to append [phi:utoa::@6->append] + // [168] call append + // [176] phi from utoa::@6 to append [phi:utoa::@6->append] append_from_b6: - // [175] phi (word) append::sub#6 = (word) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 + // [176] phi (word) append::sub#6 = (word) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 lda #<$3e8 sta append.sub lda #>$3e8 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy jsr append - // [168] (word) append::return#3 ← (word) append::value#5 -- vwuz1=vwuz2 + // [169] (word) append::return#3 ← (word) append::value#5 -- vwuz1=vwuz2 lda append.value sta append.return_3 lda append.value+1 @@ -5415,47 +11226,47 @@ utoa: { jmp b10 // utoa::@10 b10: - // [169] (word) utoa::value#1 ← (word) append::return#3 -- vwuz1=vwuz2 + // [170] (word) utoa::value#1 ← (word) append::return#3 -- vwuz1=vwuz2 lda append.return_3 sta value lda append.return_3+1 sta value+1 - // [170] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 + // [171] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [140] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] + // [141] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] b2_from_b10: - // [140] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy - // [140] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy - // [140] phi (byte) utoa::bStarted#6 = (byte) 1 [phi:utoa::@10->utoa::@2#2] -- vbuz1=vbuc1 + // [141] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy + // [141] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy + // [141] phi (byte) utoa::bStarted#6 = (byte) 1 [phi:utoa::@10->utoa::@2#2] -- vbuz1=vbuc1 lda #1 sta bStarted jmp b2 // utoa::@5 b5: - // [171] (word) append::value#1 ← (word) utoa::value#4 -- vwuz1=vwuz2 + // [172] (word) append::value#1 ← (word) utoa::value#4 -- vwuz1=vwuz2 lda value sta append.value lda value+1 sta append.value+1 - // [172] call append - // [175] phi from utoa::@5 to append [phi:utoa::@5->append] + // [173] call append + // [176] phi from utoa::@5 to append [phi:utoa::@5->append] append_from_b5: - // [175] phi (word) append::sub#6 = (word) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 + // [176] phi (word) append::sub#6 = (word) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 lda #<$2710 sta append.sub lda #>$2710 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 + // [176] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 lda #<myprintf.buf6 sta append.dst lda #>myprintf.buf6 sta append.dst+1 jsr append - // [173] (word) append::return#2 ← (word) append::value#5 -- vwuz1=vwuz2 + // [174] (word) append::return#2 ← (word) append::value#5 -- vwuz1=vwuz2 lda append.value sta append.return lda append.value+1 @@ -5463,20 +11274,20 @@ utoa: { jmp b9 // utoa::@9 b9: - // [174] (word) utoa::value#0 ← (word) append::return#2 -- vwuz1=vwuz2 + // [175] (word) utoa::value#0 ← (word) append::return#2 -- vwuz1=vwuz2 lda append.return sta value lda append.return+1 sta value+1 - // [137] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] + // [138] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] b1_from_b9: - // [137] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 + // [138] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 lda #<myprintf.buf6+1 sta dst lda #>myprintf.buf6+1 sta dst+1 - // [137] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy - // [137] phi (byte) utoa::bStarted#5 = (byte) 1 [phi:utoa::@9->utoa::@1#2] -- vbuz1=vbuc1 + // [138] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy + // [138] phi (byte) utoa::bStarted#5 = (byte) 1 [phi:utoa::@9->utoa::@1#2] -- vbuz1=vbuc1 lda #1 sta bStarted jmp b1 @@ -5492,18 +11303,18 @@ append: { .label return_4 = $55 .label return_10 = $53 .label sub = $23 - // [176] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 + // [177] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 lda #'0' ldy #0 sta (dst),y - // [177] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] + // [178] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] b1_from_append: b1_from_b2: - // [177] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy + // [178] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy jmp b1 // append::@1 b1: - // [178] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 + // [179] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 lda sub+1 cmp value+1 bne !+ @@ -5515,18 +11326,18 @@ append: { jmp breturn // append::@return breturn: - // [179] return + // [180] return rts // append::@2 b2: - // [180] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 + // [181] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 ldy #0 lda (dst),y clc adc #1 ldy #0 sta (dst),y - // [181] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 + // [182] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 lda value sec sbc sub @@ -5550,14 +11361,14 @@ div10: { .label return = $6b .label val_4 = $3a .label return_2 = $3c - // [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + // [183] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 -- vwuz1=vwuz2_ror_1 lda val_4+1 lsr sta _0+1 lda val_4 ror sta _0 - // [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 -- vwuz1=vwuz2_plus_1 + // [184] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 -- vwuz1=vwuz2_plus_1 lda _0 clc adc #1 @@ -5565,14 +11376,14 @@ div10: { lda _0+1 adc #0 sta val+1 - // [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 -- vwuz1=vwuz2_rol_1 + // [185] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda val asl sta _2 lda val+1 rol sta _2+1 - // [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz3 + // [186] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz3 lda val clc adc _2 @@ -5580,7 +11391,7 @@ div10: { lda val+1 adc _2+1 sta val_1+1 - // [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + // [187] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda val_1+1 lsr sta _3+1 @@ -5593,7 +11404,7 @@ div10: { ror _3 lsr _3+1 ror _3 - // [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz3 + // [188] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz3 lda val_1 clc adc _3 @@ -5601,12 +11412,12 @@ div10: { lda val_1+1 adc _3+1 sta val_2+1 - // [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8 + // [189] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8 lda val_2+1 sta _4 lda #0 sta _4+1 - // [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz3 + // [190] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz3 lda val_2 clc adc _4 @@ -5614,7 +11425,7 @@ div10: { lda val_2+1 adc _4+1 sta val_3+1 - // [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + // [191] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda val_3+1 lsr sta return+1 @@ -5630,7 +11441,7 @@ div10: { jmp breturn // div10::@return breturn: - // [191] return + // [192] return rts } // div16u @@ -5644,16 +11455,16 @@ div16u: { .label return = $6f .label dividend = $2e .label return_2 = $30 - // [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 + // [193] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 lda dividend sta divr16u.dividend lda dividend+1 sta divr16u.dividend+1 - // [193] call divr16u - // [197] phi from div16u to divr16u [phi:div16u->divr16u] + // [194] call divr16u + // [198] phi from div16u to divr16u [phi:div16u->divr16u] divr16u_from_div16u: jsr divr16u - // [194] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + // [195] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_2 lda divr16u.return+1 @@ -5661,7 +11472,7 @@ div16u: { jmp b1 // div16u::@1 b1: - // [195] (word) div16u::return#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [196] (word) div16u::return#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return_2 sta return lda divr16u.return_2+1 @@ -5669,7 +11480,7 @@ div16u: { jmp breturn // div16u::@return breturn: - // [196] return + // [197] return rts } // divr16u @@ -5687,67 +11498,67 @@ divr16u: { .label i = $2d .label return = $2b .label return_2 = $6d - // [198] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [199] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [198] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + // [199] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [198] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [199] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [198] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy - // [198] phi (word) divr16u::rem#4 = (byte) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 + // [199] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy + // [199] phi (word) divr16u::rem#4 = (byte) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 lda #<0 sta rem lda #>0 sta rem+1 jmp b1 - // [198] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [199] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [198] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [198] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [198] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [198] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [199] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [199] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [199] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [199] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [199] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [200] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [200] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuz1=_hi_vwuz2 + // [201] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuz1=_hi_vwuz2 lda dividend+1 sta _1 - // [201] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + // [202] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and _1 sta _2 - // [202] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + // [203] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 lda _2 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [203] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [204] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [204] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [205] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [204] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [205] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [205] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [206] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [206] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [207] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [207] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [208] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>div16u.divisor bcc b3_from_b2 @@ -5759,12 +11570,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [208] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [209] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [209] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 + // [210] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<div16u.divisor @@ -5772,24 +11583,24 @@ divr16u: { lda rem+1 sbc #>div16u.divisor sta rem+1 - // [210] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [211] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [210] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [210] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [211] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [211] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [211] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + // [212] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 inc i - // [212] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + // [213] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp i bne b1_from_b3 jmp breturn // divr16u::@return breturn: - // [213] return + // [214] return rts } // File Data @@ -5831,83 +11642,84 @@ Statement [44] (word) myprintf::w2#1 ← (word) main::v#2 [ main::u#15 myprintf: Statement [48] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a Statement [50] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a Statement asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } always clobbers reg byte a reg byte x reg byte y -Statement [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] -Statement [61] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ) always clobbers reg byte a reg byte y -Statement [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte) 0 [ ] ( main:2::myprintf:22 [ main::u#11 ] main:2::myprintf:45 [ main::u#15 ] ) always clobbers reg byte a -Statement [72] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ) always clobbers reg byte a -Statement [73] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ) always clobbers reg byte a -Statement [78] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ) always clobbers reg byte a -Statement [81] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ) always clobbers reg byte a +Statement [55] (byte) myprintf::b#47 ← *((byte*) myprintf::str#5) [ myprintf::str#5 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::b#47 ] ( main:2::myprintf:22 [ main::u#11 myprintf::str#5 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::b#47 ] main:2::myprintf:45 [ main::u#15 myprintf::str#5 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::b#47 ] ) always clobbers reg byte a reg byte y +Statement [60] (word~) myprintf::w#92 ← (word) myprintf::w3#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#92 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#92 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#92 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Statement [65] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ myprintf::bFormat#22 myprintf::bFormat#10 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:12 [ myprintf::bFormat#22 myprintf::bFormat#10 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:16 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:16 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:17 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] +Statement [66] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) 0 [ ] ( main:2::myprintf:22 [ main::u#11 ] main:2::myprintf:45 [ main::u#15 ] ) always clobbers reg byte a +Statement [68] (byte) myprintf::b#1 ← *((byte*) myprintf::str#0) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ) always clobbers reg byte a reg byte y +Statement [79] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ) always clobbers reg byte a +Statement [80] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ) always clobbers reg byte a +Statement [85] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ) always clobbers reg byte a +Statement [88] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:74 [ myprintf::bLen#10 ] -Statement [86] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ) always clobbers reg byte a -Statement [89] (word) utoa::value#4 ← (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a -Statement [92] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ) always clobbers reg byte a +Statement [93] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ) always clobbers reg byte a +Statement [96] (word) utoa::value#4 ← (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [99] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] -Statement [97] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ) always clobbers reg byte a +Statement [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] -Statement [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ) always clobbers reg byte a -Statement [117] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ) always clobbers reg byte a -Statement [124] (word~) myprintf::w#51 ← (word) myprintf::w3#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ) always clobbers reg byte a -Statement [127] (word~) myprintf::w#50 ← (word) myprintf::w2#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#50 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#50 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#50 ] ) always clobbers reg byte a -Statement [128] (word~) myprintf::w#49 ← (word) myprintf::w1#6 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#49 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#49 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#49 ] ) always clobbers reg byte a -Statement [131] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ) always clobbers reg byte a -Statement [136] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 [ utoa::value#4 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a -Statement [139] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 [ utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ) always clobbers reg byte a +Statement [111] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ) always clobbers reg byte a +Statement [124] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ) always clobbers reg byte a +Statement [128] (word~) myprintf::w#91 ← (word) myprintf::w2#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#91 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#91 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#91 ] ) always clobbers reg byte a +Statement [129] (word~) myprintf::w#90 ← (word) myprintf::w1#6 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#90 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#90 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#90 ] ) always clobbers reg byte a +Statement [132] (byte) myprintf::b#6 ← (byte) myprintf::b#35 + (byte) $20 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bFormat#22 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#45 myprintf::bTrailing#46 myprintf::bDigits#47 myprintf::bLeadZero#47 myprintf::b#6 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bFormat#22 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#45 myprintf::bTrailing#46 myprintf::bDigits#47 myprintf::bLeadZero#47 myprintf::b#6 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bFormat#22 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#45 myprintf::bTrailing#46 myprintf::bDigits#47 myprintf::bLeadZero#47 myprintf::b#6 ] ) always clobbers reg byte a +Statement [137] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 [ utoa::value#4 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [140] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 [ utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] -Statement [142] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 [ utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ) always clobbers reg byte a -Statement [145] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 [ utoa::value#10 utoa::dst#13 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] ) always clobbers reg byte a -Statement [147] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 [ utoa::dst#12 utoa::$16 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] ) always clobbers reg byte a -Statement [149] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 [ utoa::dst#12 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] ) always clobbers reg byte y -Statement [150] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 [ utoa::dst#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] ) always clobbers reg byte a -Statement [151] *((byte*) utoa::dst#3) ← (byte) 0 [ ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y -Statement [153] (byte*) append::dst#3 ← (byte*) utoa::dst#13 [ utoa::value#10 utoa::dst#13 append::dst#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] ) always clobbers reg byte a -Statement [154] (word) append::value#4 ← (word) utoa::value#10 [ utoa::dst#13 append::dst#3 append::value#4 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] ) always clobbers reg byte a -Statement [156] (word) append::return#10 ← (word) append::value#5 [ utoa::dst#13 append::return#10 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] ) always clobbers reg byte a -Statement [157] (word) utoa::value#3 ← (word) append::return#10 [ utoa::dst#13 utoa::value#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] ) always clobbers reg byte a -Statement [159] (byte*) append::dst#2 ← (byte*) utoa::dst#10 [ utoa::value#11 utoa::dst#10 append::dst#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] ) always clobbers reg byte a -Statement [160] (word) append::value#3 ← (word) utoa::value#11 [ utoa::dst#10 append::dst#2 append::value#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] ) always clobbers reg byte a -Statement [162] (word) append::return#4 ← (word) append::value#5 [ utoa::dst#10 append::return#4 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] ) always clobbers reg byte a -Statement [163] (word) utoa::value#2 ← (word) append::return#4 [ utoa::dst#10 utoa::value#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] ) always clobbers reg byte a -Statement [165] (byte*) append::dst#1 ← (byte*) utoa::dst#16 [ utoa::value#6 utoa::dst#16 append::dst#1 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] ) always clobbers reg byte a -Statement [166] (word) append::value#2 ← (word) utoa::value#6 [ utoa::dst#16 append::dst#1 append::value#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] ) always clobbers reg byte a -Statement [168] (word) append::return#3 ← (word) append::value#5 [ utoa::dst#16 append::return#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] ) always clobbers reg byte a -Statement [169] (word) utoa::value#1 ← (word) append::return#3 [ utoa::dst#16 utoa::value#1 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] ) always clobbers reg byte a -Statement [171] (word) append::value#1 ← (word) utoa::value#4 [ append::value#1 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] ) always clobbers reg byte a -Statement [173] (word) append::return#2 ← (word) append::value#5 [ append::return#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] ) always clobbers reg byte a -Statement [174] (word) utoa::value#0 ← (word) append::return#2 [ utoa::value#0 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] ) always clobbers reg byte a -Statement [176] *((byte*) append::dst#4) ← (byte) '0' [ append::dst#4 append::value#8 append::sub#6 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] ) always clobbers reg byte a reg byte y -Statement [178] if((word) append::value#5>=(word) append::sub#6) goto append::@2 [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a -Statement [180] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a reg byte y -Statement [181] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 [ append::dst#4 append::sub#6 append::value#0 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] ) always clobbers reg byte a -Statement [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [ div10::$0 ] ( main:2::div10:34 [ main::u#15 div10::$0 ] ) always clobbers reg byte a -Statement [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a -Statement [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a -Statement [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a -Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a -Statement [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a -Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a -Statement [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a -Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a -Statement [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a -Statement [194] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a -Statement [195] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a -Statement [200] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [143] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 [ utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ) always clobbers reg byte a +Statement [146] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 [ utoa::value#10 utoa::dst#13 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] ) always clobbers reg byte a +Statement [148] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 [ utoa::dst#12 utoa::$16 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] ) always clobbers reg byte a +Statement [150] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 [ utoa::dst#12 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] ) always clobbers reg byte y +Statement [151] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 [ utoa::dst#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] ) always clobbers reg byte a +Statement [152] *((byte*) utoa::dst#3) ← (byte) 0 [ ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y +Statement [154] (byte*) append::dst#3 ← (byte*) utoa::dst#13 [ utoa::value#10 utoa::dst#13 append::dst#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] ) always clobbers reg byte a +Statement [155] (word) append::value#4 ← (word) utoa::value#10 [ utoa::dst#13 append::dst#3 append::value#4 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] ) always clobbers reg byte a +Statement [157] (word) append::return#10 ← (word) append::value#5 [ utoa::dst#13 append::return#10 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] ) always clobbers reg byte a +Statement [158] (word) utoa::value#3 ← (word) append::return#10 [ utoa::dst#13 utoa::value#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] ) always clobbers reg byte a +Statement [160] (byte*) append::dst#2 ← (byte*) utoa::dst#10 [ utoa::value#11 utoa::dst#10 append::dst#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] ) always clobbers reg byte a +Statement [161] (word) append::value#3 ← (word) utoa::value#11 [ utoa::dst#10 append::dst#2 append::value#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] ) always clobbers reg byte a +Statement [163] (word) append::return#4 ← (word) append::value#5 [ utoa::dst#10 append::return#4 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] ) always clobbers reg byte a +Statement [164] (word) utoa::value#2 ← (word) append::return#4 [ utoa::dst#10 utoa::value#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] ) always clobbers reg byte a +Statement [166] (byte*) append::dst#1 ← (byte*) utoa::dst#16 [ utoa::value#6 utoa::dst#16 append::dst#1 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] ) always clobbers reg byte a +Statement [167] (word) append::value#2 ← (word) utoa::value#6 [ utoa::dst#16 append::dst#1 append::value#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] ) always clobbers reg byte a +Statement [169] (word) append::return#3 ← (word) append::value#5 [ utoa::dst#16 append::return#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] ) always clobbers reg byte a +Statement [170] (word) utoa::value#1 ← (word) append::return#3 [ utoa::dst#16 utoa::value#1 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] ) always clobbers reg byte a +Statement [172] (word) append::value#1 ← (word) utoa::value#4 [ append::value#1 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] ) always clobbers reg byte a +Statement [174] (word) append::return#2 ← (word) append::value#5 [ append::return#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] ) always clobbers reg byte a +Statement [175] (word) utoa::value#0 ← (word) append::return#2 [ utoa::value#0 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] ) always clobbers reg byte a +Statement [177] *((byte*) append::dst#4) ← (byte) '0' [ append::dst#4 append::value#8 append::sub#6 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [179] if((word) append::value#5>=(word) append::sub#6) goto append::@2 [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a +Statement [181] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [182] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 [ append::dst#4 append::sub#6 append::value#0 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] ) always clobbers reg byte a +Statement [183] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [ div10::$0 ] ( main:2::div10:34 [ main::u#15 div10::$0 ] ) always clobbers reg byte a +Statement [184] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a +Statement [185] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a +Statement [186] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a +Statement [187] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a +Statement [188] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a +Statement [189] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a +Statement [190] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a +Statement [191] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a +Statement [193] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a +Statement [195] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a +Statement [196] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a +Statement [201] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:45 [ divr16u::i#2 divr16u::i#1 ] -Statement [203] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [207] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [209] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [204] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [208] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [210] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a Statement [4] *((const byte*) VICBANK#0) ← (byte) $17 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [5] *((const byte*) zp1#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [7] *((const byte*) TIMEHI#0) ← (byte) 0 [ main::u#11 ] ( main:2 [ main::u#11 ] ) always clobbers reg byte a @@ -5942,85 +11754,86 @@ Statement [44] (word) myprintf::w2#1 ← (word) main::v#2 [ main::u#15 myprintf: Statement [48] (word) main::u#4 ← (word) main::u#15 - (word) $4d2 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a Statement [50] if(*((const byte*) zp1#0)<(byte) $a) goto main::@5 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a Statement asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } always clobbers reg byte a reg byte x reg byte y -Statement [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ) always clobbers reg byte a reg byte y -Statement [61] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ) always clobbers reg byte a reg byte y -Statement [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte) 0 [ ] ( main:2::myprintf:22 [ main::u#11 ] main:2::myprintf:45 [ main::u#15 ] ) always clobbers reg byte a -Statement [72] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ) always clobbers reg byte a -Statement [73] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ) always clobbers reg byte a -Statement [78] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ) always clobbers reg byte a -Statement [81] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ) always clobbers reg byte a -Statement [86] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ) always clobbers reg byte a -Statement [89] (word) utoa::value#4 ← (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a -Statement [92] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ) always clobbers reg byte a -Statement [97] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ) always clobbers reg byte a -Statement [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ) always clobbers reg byte a -Statement [117] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ) always clobbers reg byte a -Statement [124] (word~) myprintf::w#51 ← (word) myprintf::w3#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ) always clobbers reg byte a -Statement [127] (word~) myprintf::w#50 ← (word) myprintf::w2#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#50 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#50 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#50 ] ) always clobbers reg byte a -Statement [128] (word~) myprintf::w#49 ← (word) myprintf::w1#6 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#49 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#49 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#49 ] ) always clobbers reg byte a -Statement [131] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ) always clobbers reg byte a -Statement [136] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 [ utoa::value#4 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a -Statement [139] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 [ utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ) always clobbers reg byte a -Statement [142] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 [ utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ) always clobbers reg byte a -Statement [145] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 [ utoa::value#10 utoa::dst#13 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] ) always clobbers reg byte a -Statement [147] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 [ utoa::dst#12 utoa::$16 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] ) always clobbers reg byte a -Statement [149] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 [ utoa::dst#12 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] ) always clobbers reg byte y -Statement [150] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 [ utoa::dst#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] ) always clobbers reg byte a -Statement [151] *((byte*) utoa::dst#3) ← (byte) 0 [ ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y -Statement [153] (byte*) append::dst#3 ← (byte*) utoa::dst#13 [ utoa::value#10 utoa::dst#13 append::dst#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] ) always clobbers reg byte a -Statement [154] (word) append::value#4 ← (word) utoa::value#10 [ utoa::dst#13 append::dst#3 append::value#4 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] ) always clobbers reg byte a -Statement [156] (word) append::return#10 ← (word) append::value#5 [ utoa::dst#13 append::return#10 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] ) always clobbers reg byte a -Statement [157] (word) utoa::value#3 ← (word) append::return#10 [ utoa::dst#13 utoa::value#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] ) always clobbers reg byte a -Statement [159] (byte*) append::dst#2 ← (byte*) utoa::dst#10 [ utoa::value#11 utoa::dst#10 append::dst#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] ) always clobbers reg byte a -Statement [160] (word) append::value#3 ← (word) utoa::value#11 [ utoa::dst#10 append::dst#2 append::value#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] ) always clobbers reg byte a -Statement [162] (word) append::return#4 ← (word) append::value#5 [ utoa::dst#10 append::return#4 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] ) always clobbers reg byte a -Statement [163] (word) utoa::value#2 ← (word) append::return#4 [ utoa::dst#10 utoa::value#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] ) always clobbers reg byte a -Statement [165] (byte*) append::dst#1 ← (byte*) utoa::dst#16 [ utoa::value#6 utoa::dst#16 append::dst#1 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] ) always clobbers reg byte a -Statement [166] (word) append::value#2 ← (word) utoa::value#6 [ utoa::dst#16 append::dst#1 append::value#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] ) always clobbers reg byte a -Statement [168] (word) append::return#3 ← (word) append::value#5 [ utoa::dst#16 append::return#3 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] ) always clobbers reg byte a -Statement [169] (word) utoa::value#1 ← (word) append::return#3 [ utoa::dst#16 utoa::value#1 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] ) always clobbers reg byte a -Statement [171] (word) append::value#1 ← (word) utoa::value#4 [ append::value#1 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] ) always clobbers reg byte a -Statement [173] (word) append::return#2 ← (word) append::value#5 [ append::return#2 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] ) always clobbers reg byte a -Statement [174] (word) utoa::value#0 ← (word) append::return#2 [ utoa::value#0 ] ( main:2::myprintf:22::utoa:90 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] main:2::myprintf:45::utoa:90 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] ) always clobbers reg byte a -Statement [176] *((byte*) append::dst#4) ← (byte) '0' [ append::dst#4 append::value#8 append::sub#6 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] ) always clobbers reg byte a reg byte y -Statement [178] if((word) append::value#5>=(word) append::sub#6) goto append::@2 [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a -Statement [180] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a reg byte y -Statement [181] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 [ append::dst#4 append::sub#6 append::value#0 ] ( main:2::myprintf:22::utoa:90::append:155 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:155 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:90::append:161 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:161 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:90::append:167 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:167 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:90::append:172 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:90::append:172 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] ) always clobbers reg byte a -Statement [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [ div10::$0 ] ( main:2::div10:34 [ main::u#15 div10::$0 ] ) always clobbers reg byte a -Statement [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a -Statement [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a -Statement [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a -Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a -Statement [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a -Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a -Statement [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a -Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a -Statement [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a -Statement [194] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a -Statement [195] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a -Statement [200] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Statement [203] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [207] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [209] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div16u:11::divr16u:193 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [55] (byte) myprintf::b#47 ← *((byte*) myprintf::str#5) [ myprintf::str#5 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::b#47 ] ( main:2::myprintf:22 [ main::u#11 myprintf::str#5 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::b#47 ] main:2::myprintf:45 [ main::u#15 myprintf::str#5 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::b#47 ] ) always clobbers reg byte a reg byte y +Statement [60] (word~) myprintf::w#92 ← (word) myprintf::w3#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#92 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#92 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#92 ] ) always clobbers reg byte a +Statement [65] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y +Statement [66] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) 0 [ ] ( main:2::myprintf:22 [ main::u#11 ] main:2::myprintf:45 [ main::u#15 ] ) always clobbers reg byte a +Statement [68] (byte) myprintf::b#1 ← *((byte*) myprintf::str#0) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#10 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ) always clobbers reg byte a reg byte y +Statement [79] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ) always clobbers reg byte a +Statement [80] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$18 ] ) always clobbers reg byte a +Statement [85] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$24 ] ) always clobbers reg byte a +Statement [88] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$25 ] ) always clobbers reg byte a +Statement [93] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$31 ] ) always clobbers reg byte a +Statement [96] (word) utoa::value#4 ← (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [99] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ) always clobbers reg byte a +Statement [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ) always clobbers reg byte a +Statement [111] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ) always clobbers reg byte a +Statement [124] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$49 ] ) always clobbers reg byte a +Statement [128] (word~) myprintf::w#91 ← (word) myprintf::w2#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#91 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#91 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#91 ] ) always clobbers reg byte a +Statement [129] (word~) myprintf::w#90 ← (word) myprintf::w1#6 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#90 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#90 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#90 ] ) always clobbers reg byte a +Statement [132] (byte) myprintf::b#6 ← (byte) myprintf::b#35 + (byte) $20 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bFormat#22 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#45 myprintf::bTrailing#46 myprintf::bDigits#47 myprintf::bLeadZero#47 myprintf::b#6 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bFormat#22 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#45 myprintf::bTrailing#46 myprintf::bDigits#47 myprintf::bLeadZero#47 myprintf::b#6 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#51 myprintf::bFormat#22 myprintf::bArg#48 myprintf::bLen#54 myprintf::w#45 myprintf::bTrailing#46 myprintf::bDigits#47 myprintf::bLeadZero#47 myprintf::b#6 ] ) always clobbers reg byte a +Statement [137] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 [ utoa::value#4 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [140] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 [ utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ) always clobbers reg byte a +Statement [143] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 [ utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ) always clobbers reg byte a +Statement [146] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 [ utoa::value#10 utoa::dst#13 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] ) always clobbers reg byte a +Statement [148] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 [ utoa::dst#12 utoa::$16 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] ) always clobbers reg byte a +Statement [150] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 [ utoa::dst#12 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] ) always clobbers reg byte y +Statement [151] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 [ utoa::dst#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] ) always clobbers reg byte a +Statement [152] *((byte*) utoa::dst#3) ← (byte) 0 [ ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y +Statement [154] (byte*) append::dst#3 ← (byte*) utoa::dst#13 [ utoa::value#10 utoa::dst#13 append::dst#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] ) always clobbers reg byte a +Statement [155] (word) append::value#4 ← (word) utoa::value#10 [ utoa::dst#13 append::dst#3 append::value#4 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] ) always clobbers reg byte a +Statement [157] (word) append::return#10 ← (word) append::value#5 [ utoa::dst#13 append::return#10 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] ) always clobbers reg byte a +Statement [158] (word) utoa::value#3 ← (word) append::return#10 [ utoa::dst#13 utoa::value#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] ) always clobbers reg byte a +Statement [160] (byte*) append::dst#2 ← (byte*) utoa::dst#10 [ utoa::value#11 utoa::dst#10 append::dst#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] ) always clobbers reg byte a +Statement [161] (word) append::value#3 ← (word) utoa::value#11 [ utoa::dst#10 append::dst#2 append::value#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] ) always clobbers reg byte a +Statement [163] (word) append::return#4 ← (word) append::value#5 [ utoa::dst#10 append::return#4 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] ) always clobbers reg byte a +Statement [164] (word) utoa::value#2 ← (word) append::return#4 [ utoa::dst#10 utoa::value#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] ) always clobbers reg byte a +Statement [166] (byte*) append::dst#1 ← (byte*) utoa::dst#16 [ utoa::value#6 utoa::dst#16 append::dst#1 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] ) always clobbers reg byte a +Statement [167] (word) append::value#2 ← (word) utoa::value#6 [ utoa::dst#16 append::dst#1 append::value#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] ) always clobbers reg byte a +Statement [169] (word) append::return#3 ← (word) append::value#5 [ utoa::dst#16 append::return#3 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] ) always clobbers reg byte a +Statement [170] (word) utoa::value#1 ← (word) append::return#3 [ utoa::dst#16 utoa::value#1 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] ) always clobbers reg byte a +Statement [172] (word) append::value#1 ← (word) utoa::value#4 [ append::value#1 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] ) always clobbers reg byte a +Statement [174] (word) append::return#2 ← (word) append::value#5 [ append::return#2 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] ) always clobbers reg byte a +Statement [175] (word) utoa::value#0 ← (word) append::return#2 [ utoa::value#0 ] ( main:2::myprintf:22::utoa:97 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] main:2::myprintf:45::utoa:97 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] ) always clobbers reg byte a +Statement [177] *((byte*) append::dst#4) ← (byte) '0' [ append::dst#4 append::value#8 append::sub#6 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [179] if((word) append::value#5>=(word) append::sub#6) goto append::@2 [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a +Statement [181] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [182] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 [ append::dst#4 append::sub#6 append::value#0 ] ( main:2::myprintf:22::utoa:97::append:156 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:156 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:97::append:162 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:162 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:97::append:168 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:168 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:97::append:173 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:97::append:173 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bArg#10 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] ) always clobbers reg byte a +Statement [183] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [ div10::$0 ] ( main:2::div10:34 [ main::u#15 div10::$0 ] ) always clobbers reg byte a +Statement [184] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a +Statement [185] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a +Statement [186] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a +Statement [187] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a +Statement [188] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a +Statement [189] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a +Statement [190] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a +Statement [191] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a +Statement [193] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a +Statement [195] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a +Statement [196] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a +Statement [201] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [204] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [208] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [210] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div16u:11::divr16u:194 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a Potential registers zp ZP_WORD:2 [ main::u#11 main::u#2 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ main::u#15 main::u#4 ] : zp ZP_WORD:4 , Potential registers zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] : zp ZP_WORD:6 , Potential registers zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] : zp ZP_WORD:8 , Potential registers zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] : zp ZP_WORD:10 , -Potential registers zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] : zp ZP_WORD:12 , -Potential registers zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] : zp ZP_BYTE:14 , reg byte x , -Potential registers zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] : zp ZP_BYTE:15 , reg byte x , -Potential registers zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] : zp ZP_WORD:16 , -Potential registers zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] : zp ZP_BYTE:18 , reg byte x , -Potential registers zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] : zp ZP_BYTE:19 , reg byte x , +Potential registers zp ZP_BYTE:12 [ myprintf::bFormat#22 myprintf::bFormat#10 ] : zp ZP_BYTE:12 , reg byte x , +Potential registers zp ZP_BYTE:13 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] : zp ZP_BYTE:13 , reg byte x , +Potential registers zp ZP_WORD:14 [ myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] : zp ZP_WORD:14 , +Potential registers zp ZP_BYTE:16 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] : zp ZP_BYTE:16 , reg byte x , +Potential registers zp ZP_BYTE:17 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] : zp ZP_BYTE:17 , reg byte x , +Potential registers zp ZP_WORD:18 [ myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] : zp ZP_WORD:18 , Potential registers zp ZP_BYTE:20 [ myprintf::$23 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:21 [ myprintf::$30 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] : zp ZP_BYTE:22 , reg byte x , reg byte y , Potential registers zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] : zp ZP_BYTE:23 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] : zp ZP_BYTE:24 , reg byte x , -Potential registers zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] : zp ZP_BYTE:25 , reg byte x , +Potential registers zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] : zp ZP_BYTE:24 , reg byte x , +Potential registers zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] : zp ZP_BYTE:25 , reg byte x , Potential registers zp ZP_BYTE:26 [ myprintf::$41 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] : zp ZP_BYTE:28 , reg byte x , reg byte y , Potential registers zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] : zp ZP_WORD:29 , Potential registers zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] : zp ZP_WORD:31 , @@ -6074,66 +11887,66 @@ Potential registers zp ZP_BYTE:113 [ divr16u::$1 ] : zp ZP_BYTE:113 , reg byte a Potential registers zp ZP_BYTE:114 [ divr16u::$2 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [myprintf] 9,752.6: zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] 7,163.57: zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] 2,502.5: zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] 2,250.32: zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] 1,054.06: zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] 1,001: zp ZP_BYTE:26 [ myprintf::$41 ] 631.25: zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] 449.95: zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] 208.73: zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] 202: zp ZP_BYTE:70 [ myprintf::$17 ] 202: zp ZP_BYTE:71 [ myprintf::$18 ] 202: zp ZP_BYTE:73 [ myprintf::$24 ] 202: zp ZP_BYTE:75 [ myprintf::$25 ] 202: zp ZP_BYTE:77 [ myprintf::$31 ] 202: zp ZP_BYTE:78 [ myprintf::$49 ] 190.48: zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] 178.73: zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] 157.51: zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] 101: zp ZP_BYTE:20 [ myprintf::$23 ] 101: zp ZP_BYTE:21 [ myprintf::$30 ] 75.75: zp ZP_BYTE:72 [ myprintf::b#15 ] 75.75: zp ZP_BYTE:76 [ myprintf::b#16 ] 45.56: zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] 37.88: zp ZP_BYTE:74 [ myprintf::bLen#10 ] 23.56: zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] 16.22: zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] +Uplift Scope [myprintf] 94,920.5: zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] 71,529.73: zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] 25,002.5: zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] 24,744.3: zp ZP_WORD:18 [ myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] 22,482.32: zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] 10,001: zp ZP_BYTE:26 [ myprintf::$41 ] 7,359.44: zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] 5,673.65: zp ZP_BYTE:12 [ myprintf::bFormat#22 myprintf::bFormat#10 ] 2,661.42: zp ZP_WORD:14 [ myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] 2,002: zp ZP_BYTE:70 [ myprintf::$17 ] 2,002: zp ZP_BYTE:71 [ myprintf::$18 ] 2,002: zp ZP_BYTE:73 [ myprintf::$24 ] 2,002: zp ZP_BYTE:75 [ myprintf::$25 ] 2,002: zp ZP_BYTE:77 [ myprintf::$31 ] 2,002: zp ZP_BYTE:78 [ myprintf::$49 ] 1,835.92: zp ZP_BYTE:16 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] 1,677.18: zp ZP_BYTE:17 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] 1,519.99: zp ZP_BYTE:13 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] 1,001: zp ZP_BYTE:20 [ myprintf::$23 ] 1,001: zp ZP_BYTE:21 [ myprintf::$30 ] 750.75: zp ZP_BYTE:72 [ myprintf::b#15 ] 750.75: zp ZP_BYTE:76 [ myprintf::b#16 ] 375.38: zp ZP_BYTE:74 [ myprintf::bLen#10 ] 45.54: zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] 23.54: zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] 16.2: zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] +Uplift Scope [append] 23,774.62: zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] 3,341: zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] 3,333.67: zp ZP_WORD:35 [ append::sub#6 ] 4: zp ZP_WORD:83 [ append::return#10 ] 4: zp ZP_WORD:85 [ append::return#4 ] 4: zp ZP_WORD:87 [ append::return#3 ] 4: zp ZP_WORD:89 [ append::return#2 ] Uplift Scope [divr16u] 8,758.75: zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 3,353.75: zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 2,002: zp ZP_BYTE:113 [ divr16u::$1 ] 2,002: zp ZP_BYTE:114 [ divr16u::$2 ] 1,655.5: zp ZP_BYTE:45 [ divr16u::i#2 divr16u::i#1 ] 681.54: zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] 4: zp ZP_WORD:109 [ divr16u::return#2 ] -Uplift Scope [append] 2,399.62: zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] 341: zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] 333.67: zp ZP_WORD:35 [ append::sub#6 ] 4: zp ZP_WORD:83 [ append::return#10 ] 4: zp ZP_WORD:85 [ append::return#4 ] 4: zp ZP_WORD:87 [ append::return#3 ] 4: zp ZP_WORD:89 [ append::return#2 ] +Uplift Scope [utoa] 357.17: zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] 17.25: zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] 7.33: zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] 4: zp ZP_BYTE:79 [ utoa::$16 ] 4: zp ZP_BYTE:80 [ utoa::$17 ] 4: zp ZP_WORD:81 [ utoa::dst#3 ] Uplift Scope [div10] 202: zp ZP_WORD:60 [ div10::return#2 ] 103: zp ZP_WORD:58 [ div10::val#4 ] 34.33: zp ZP_WORD:107 [ div10::return#0 ] 4: zp ZP_WORD:91 [ div10::$0 ] 4: zp ZP_WORD:95 [ div10::$2 ] 4: zp ZP_WORD:99 [ div10::$3 ] 4: zp ZP_WORD:103 [ div10::$4 ] 4: zp ZP_WORD:105 [ div10::val#3 ] 3: zp ZP_WORD:93 [ div10::val#0 ] 3: zp ZP_WORD:97 [ div10::val#1 ] 3: zp ZP_WORD:101 [ div10::val#2 ] Uplift Scope [div16u] 202: zp ZP_WORD:48 [ div16u::return#2 ] 103: zp ZP_WORD:46 [ div16u::dividend#0 ] 34.33: zp ZP_WORD:111 [ div16u::return#0 ] Uplift Scope [main] 22: zp ZP_WORD:52 [ main::$2 ] 22: zp ZP_WORD:56 [ main::$4 ] 22: zp ZP_WORD:64 [ main::$11 ] 22: zp ZP_WORD:68 [ main::$13 ] 14.39: zp ZP_WORD:2 [ main::u#11 main::u#2 ] 14.39: zp ZP_WORD:4 [ main::u#15 main::u#4 ] 14: zp ZP_WORD:50 [ main::v#1 ] 14: zp ZP_WORD:62 [ main::v#2 ] 11: zp ZP_WORD:54 [ main::$3 ] 11: zp ZP_WORD:66 [ main::$12 ] -Uplift Scope [utoa] 57.17: zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] 17.25: zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] 7.33: zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] 4: zp ZP_BYTE:79 [ utoa::$16 ] 4: zp ZP_BYTE:80 [ utoa::$17 ] 4: zp ZP_WORD:81 [ utoa::dst#3 ] Uplift Scope [Print] Uplift Scope [] -Uplifting [divr16u] best 466046 combination zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:109 [ divr16u::return#2 ] -Uplifting [append] best 466046 combination zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] zp ZP_WORD:35 [ append::sub#6 ] zp ZP_WORD:83 [ append::return#10 ] zp ZP_WORD:85 [ append::return#4 ] zp ZP_WORD:87 [ append::return#3 ] zp ZP_WORD:89 [ append::return#2 ] -Uplifting [div10] best 466046 combination zp ZP_WORD:60 [ div10::return#2 ] zp ZP_WORD:58 [ div10::val#4 ] zp ZP_WORD:107 [ div10::return#0 ] zp ZP_WORD:91 [ div10::$0 ] zp ZP_WORD:95 [ div10::$2 ] zp ZP_WORD:99 [ div10::$3 ] zp ZP_WORD:103 [ div10::$4 ] zp ZP_WORD:105 [ div10::val#3 ] zp ZP_WORD:93 [ div10::val#0 ] zp ZP_WORD:97 [ div10::val#1 ] zp ZP_WORD:101 [ div10::val#2 ] -Uplifting [div16u] best 466046 combination zp ZP_WORD:48 [ div16u::return#2 ] zp ZP_WORD:46 [ div16u::dividend#0 ] zp ZP_WORD:111 [ div16u::return#0 ] -Uplifting [main] best 466046 combination zp ZP_WORD:52 [ main::$2 ] zp ZP_WORD:56 [ main::$4 ] zp ZP_WORD:64 [ main::$11 ] zp ZP_WORD:68 [ main::$13 ] zp ZP_WORD:2 [ main::u#11 main::u#2 ] zp ZP_WORD:4 [ main::u#15 main::u#4 ] zp ZP_WORD:50 [ main::v#1 ] zp ZP_WORD:62 [ main::v#2 ] zp ZP_WORD:54 [ main::$3 ] zp ZP_WORD:66 [ main::$12 ] -Uplifting [utoa] best 466015 combination zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp ZP_WORD:81 [ utoa::dst#3 ] -Uplifting [Print] best 466015 combination -Uplifting [] best 466015 combination -Attempting to uplift remaining variables inzp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -Uplifting [myprintf] best 466015 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -Attempting to uplift remaining variables inzp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] -Uplifting [myprintf] best 466015 combination zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Uplifting [append] best 4016436 combination zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] zp ZP_WORD:35 [ append::sub#6 ] zp ZP_WORD:83 [ append::return#10 ] zp ZP_WORD:85 [ append::return#4 ] zp ZP_WORD:87 [ append::return#3 ] zp ZP_WORD:89 [ append::return#2 ] +Uplifting [divr16u] best 3995436 combination zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:109 [ divr16u::return#2 ] +Uplifting [utoa] best 3995405 combination zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp ZP_WORD:81 [ utoa::dst#3 ] +Uplifting [div10] best 3995405 combination zp ZP_WORD:60 [ div10::return#2 ] zp ZP_WORD:58 [ div10::val#4 ] zp ZP_WORD:107 [ div10::return#0 ] zp ZP_WORD:91 [ div10::$0 ] zp ZP_WORD:95 [ div10::$2 ] zp ZP_WORD:99 [ div10::$3 ] zp ZP_WORD:103 [ div10::$4 ] zp ZP_WORD:105 [ div10::val#3 ] zp ZP_WORD:93 [ div10::val#0 ] zp ZP_WORD:97 [ div10::val#1 ] zp ZP_WORD:101 [ div10::val#2 ] +Uplifting [div16u] best 3995405 combination zp ZP_WORD:48 [ div16u::return#2 ] zp ZP_WORD:46 [ div16u::dividend#0 ] zp ZP_WORD:111 [ div16u::return#0 ] +Uplifting [main] best 3995405 combination zp ZP_WORD:52 [ main::$2 ] zp ZP_WORD:56 [ main::$4 ] zp ZP_WORD:64 [ main::$11 ] zp ZP_WORD:68 [ main::$13 ] zp ZP_WORD:2 [ main::u#11 main::u#2 ] zp ZP_WORD:4 [ main::u#15 main::u#4 ] zp ZP_WORD:50 [ main::v#1 ] zp ZP_WORD:62 [ main::v#2 ] zp ZP_WORD:54 [ main::$3 ] zp ZP_WORD:66 [ main::$12 ] +Uplifting [Print] best 3995405 combination +Uplifting [] best 3995405 combination +Attempting to uplift remaining variables inzp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Uplifting [myprintf] best 3995405 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Attempting to uplift remaining variables inzp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Uplifting [myprintf] best 3995405 combination zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] -Uplifting [myprintf] best 454015 combination reg byte x [ myprintf::digit#3 myprintf::digit#2 ] +Uplifting [myprintf] best 3875405 combination reg byte x [ myprintf::digit#3 myprintf::digit#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] -Uplifting [myprintf] best 454015 combination zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] +Uplifting [myprintf] best 3875405 combination zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:26 [ myprintf::$41 ] -Uplifting [myprintf] best 445015 combination reg byte a [ myprintf::$41 ] -Attempting to uplift remaining variables inzp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] -Uplifting [myprintf] best 441265 combination reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] -Attempting to uplift remaining variables inzp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -Uplifting [myprintf] best 441265 combination zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -Uplifting [myprintf] best 441265 combination zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] +Uplifting [myprintf] best 3785405 combination reg byte a [ myprintf::$41 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] +Uplifting [myprintf] best 3724504 combination reg byte x [ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:12 [ myprintf::bFormat#22 myprintf::bFormat#10 ] +Uplifting [myprintf] best 3724504 combination zp ZP_BYTE:12 [ myprintf::bFormat#22 myprintf::bFormat#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:70 [ myprintf::$17 ] -Uplifting [myprintf] best 440665 combination reg byte a [ myprintf::$17 ] +Uplifting [myprintf] best 3718504 combination reg byte a [ myprintf::$17 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ myprintf::$18 ] -Uplifting [myprintf] best 440065 combination reg byte a [ myprintf::$18 ] +Uplifting [myprintf] best 3712504 combination reg byte a [ myprintf::$18 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ myprintf::$24 ] -Uplifting [myprintf] best 439465 combination reg byte a [ myprintf::$24 ] +Uplifting [myprintf] best 3706504 combination reg byte a [ myprintf::$24 ] Attempting to uplift remaining variables inzp ZP_BYTE:75 [ myprintf::$25 ] -Uplifting [myprintf] best 438865 combination reg byte a [ myprintf::$25 ] +Uplifting [myprintf] best 3700504 combination reg byte a [ myprintf::$25 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ myprintf::$31 ] -Uplifting [myprintf] best 438265 combination reg byte a [ myprintf::$31 ] +Uplifting [myprintf] best 3694504 combination reg byte a [ myprintf::$31 ] Attempting to uplift remaining variables inzp ZP_BYTE:78 [ myprintf::$49 ] -Uplifting [myprintf] best 437665 combination reg byte a [ myprintf::$49 ] -Attempting to uplift remaining variables inzp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] -Uplifting [myprintf] best 437665 combination zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] -Attempting to uplift remaining variables inzp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -Uplifting [myprintf] best 437665 combination zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Uplifting [myprintf] best 3688504 combination reg byte a [ myprintf::$49 ] +Attempting to uplift remaining variables inzp ZP_BYTE:16 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +Uplifting [myprintf] best 3688504 combination zp ZP_BYTE:16 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +Attempting to uplift remaining variables inzp ZP_BYTE:17 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] +Uplifting [myprintf] best 3688504 combination zp ZP_BYTE:17 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] +Attempting to uplift remaining variables inzp ZP_BYTE:13 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +Uplifting [myprintf] best 3688504 combination zp ZP_BYTE:13 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ myprintf::$23 ] -Uplifting [myprintf] best 436765 combination reg byte a [ myprintf::$23 ] +Uplifting [myprintf] best 3679504 combination reg byte a [ myprintf::$23 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ myprintf::$30 ] -Uplifting [myprintf] best 435865 combination reg byte a [ myprintf::$30 ] +Uplifting [myprintf] best 3670504 combination reg byte a [ myprintf::$30 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ myprintf::b#15 ] -Uplifting [myprintf] best 435765 combination reg byte x [ myprintf::b#15 ] +Uplifting [myprintf] best 3669504 combination reg byte x [ myprintf::b#15 ] Attempting to uplift remaining variables inzp ZP_BYTE:76 [ myprintf::b#16 ] -Uplifting [myprintf] best 435665 combination reg byte x [ myprintf::b#16 ] +Uplifting [myprintf] best 3668504 combination reg byte x [ myprintf::b#16 ] Attempting to uplift remaining variables inzp ZP_BYTE:74 [ myprintf::bLen#10 ] -Uplifting [myprintf] best 434765 combination reg byte y [ myprintf::bLen#10 ] +Uplifting [myprintf] best 3659504 combination reg byte y [ myprintf::bLen#10 ] Coalescing zero page register [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] ] with [ zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] ] - score: 4 Coalescing zero page register [ zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] ] with [ zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] ] - score: 3 Coalescing zero page register [ zp ZP_WORD:2 [ main::u#11 main::u#2 ] ] with [ zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] ] - score: 1 @@ -6163,22 +11976,22 @@ Coalescing zero page register [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 my Coalescing zero page register [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 ] ] with [ zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:103 [ div10::$4 div10::val#3 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 ] ] -Coalescing zero page register [ zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] ] with [ zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] ] -Coalescing zero page register [ zp ZP_WORD:56 [ main::$4 ] ] with [ zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] ] +Coalescing zero page register [ zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] ] with [ zp ZP_WORD:14 [ myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] ] +Coalescing zero page register [ zp ZP_WORD:56 [ main::$4 ] ] with [ zp ZP_WORD:18 [ myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] ] Coalescing zero page register [ zp ZP_WORD:68 [ main::$13 ] ] with [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ] ] Coalescing zero page register [ zp ZP_WORD:91 [ div10::$0 div10::val#0 ] ] with [ zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 utoa::dst#3 ] ] Coalescing zero page register [ zp ZP_WORD:95 [ div10::$2 div10::val#1 ] ] with [ zp ZP_WORD:35 [ append::sub#6 ] ] Coalescing zero page register [ zp ZP_WORD:99 [ div10::$3 div10::val#2 ] ] with [ zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 ] ] Allocated (was zp ZP_WORD:8) zp ZP_WORD:4 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$4 div10::val#3 ] -Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:6 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:7 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:8 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -Allocated (was zp ZP_BYTE:19) zp ZP_BYTE:9 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Allocated (was zp ZP_BYTE:12) zp ZP_BYTE:6 [ myprintf::bFormat#22 myprintf::bFormat#10 ] +Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:7 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +Allocated (was zp ZP_BYTE:16) zp ZP_BYTE:8 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:9 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:10 [ myprintf::b#17 myprintf::b#5 ] -Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:11 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:12 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] -Allocated (was zp ZP_WORD:41) zp ZP_WORD:13 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 myprintf::str#10 myprintf::str#5 myprintf::str#0 ] -Allocated (was zp ZP_WORD:56) zp ZP_WORD:15 [ main::$4 myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] +Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:11 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:12 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Allocated (was zp ZP_WORD:41) zp ZP_WORD:13 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] +Allocated (was zp ZP_WORD:56) zp ZP_WORD:15 [ main::$4 myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] Allocated (was zp ZP_WORD:68) zp ZP_WORD:17 [ main::$13 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ] Allocated (was zp ZP_WORD:91) zp ZP_WORD:19 [ div10::$0 div10::val#0 utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 utoa::dst#3 ] Allocated (was zp ZP_WORD:95) zp ZP_WORD:21 [ div10::$2 div10::val#1 append::sub#6 ] @@ -6468,461 +12281,76 @@ Print: { rts } // myprintf -// myprintf(byte* zeropage($d) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage($17) w3) +// myprintf(byte* zeropage($f) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage($17) w3) myprintf: { - .label str = $d + .label str = $f .label bDigits = $c .label bLen = $b .label b = $a .label bArg = 7 - .label return = $b .label w1 = 2 .label w2 = 4 .label w3 = $17 + .label w = $d .label bFormat = 6 - .label w = $f .label bTrailing = 8 .label bLeadZero = 9 - // [55] phi from myprintf to myprintf::@1 [phi:myprintf->myprintf::@1] - b1_from_myprintf: - // [55] phi (byte) myprintf::bLeadZero#10 = (byte) 0 [phi:myprintf->myprintf::@1#0] -- vbuz1=vbuc1 + jmp b1_1 + // myprintf::@1_1 + b1_1: + // [55] (byte) myprintf::b#47 ← *((byte*) myprintf::str#5) -- vbuxx=_deref_pbuz1 + ldy #0 + lda (str),y + tax + // [56] phi from myprintf::@1_1 to myprintf::@2 [phi:myprintf::@1_1->myprintf::@2] + b2_from_b1_1: + // [56] phi (byte) myprintf::b#35 = (byte) myprintf::b#47 [phi:myprintf::@1_1->myprintf::@2#0] -- register_copy + // [56] phi (byte) myprintf::bLeadZero#47 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#1] -- vbuz1=vbuc1 lda #0 sta bLeadZero - // [55] phi (byte) myprintf::bDigits#14 = (byte) 0 [phi:myprintf->myprintf::@1#1] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bDigits#47 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#2] -- vbuz1=vbuc1 lda #0 sta bDigits - // [55] phi (byte) myprintf::bTrailing#10 = (byte) 0 [phi:myprintf->myprintf::@1#2] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bTrailing#46 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#3] -- vbuz1=vbuc1 lda #0 sta bTrailing - // [55] phi (word) myprintf::w#10 = (word) 0 [phi:myprintf->myprintf::@1#3] -- vwuz1=vwuc1 + // [56] phi (word) myprintf::w#45 = (word) 0 [phi:myprintf::@1_1->myprintf::@2#4] -- vwuz1=vwuc1 lda #<0 sta w lda #>0 sta w+1 - // [55] phi (byte) myprintf::bLen#14 = (byte) 0 [phi:myprintf->myprintf::@1#4] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bLen#54 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#5] -- vbuz1=vbuc1 lda #0 sta bLen - // [55] phi (byte) myprintf::bArg#12 = (byte) 0 [phi:myprintf->myprintf::@1#5] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bArg#48 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#6] -- vbuz1=vbuc1 lda #0 sta bArg - // [55] phi (byte) myprintf::bFormat#10 = (byte) 0 [phi:myprintf->myprintf::@1#6] -- vbuz1=vbuc1 + // [56] phi (byte) myprintf::bFormat#22 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#7] -- vbuz1=vbuc1 lda #0 sta bFormat - // [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#5 [phi:myprintf->myprintf::@1#7] -- register_copy - jmp b1 - // [55] phi from myprintf::@27 to myprintf::@1 [phi:myprintf::@27->myprintf::@1] - b1_from_b27: - // [55] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#18 [phi:myprintf::@27->myprintf::@1#0] -- register_copy - // [55] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#24 [phi:myprintf::@27->myprintf::@1#1] -- register_copy - // [55] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#21 [phi:myprintf::@27->myprintf::@1#2] -- register_copy - // [55] phi (word) myprintf::w#10 = (word) myprintf::w#17 [phi:myprintf::@27->myprintf::@1#3] -- register_copy - // [55] phi (byte) myprintf::bLen#14 = (byte) myprintf::return#0 [phi:myprintf::@27->myprintf::@1#4] -- register_copy - // [55] phi (byte) myprintf::bArg#12 = (byte) myprintf::bArg#10 [phi:myprintf::@27->myprintf::@1#5] -- register_copy - // [55] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#4 [phi:myprintf::@27->myprintf::@1#6] -- register_copy - // [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#0 [phi:myprintf::@27->myprintf::@1#7] -- register_copy - jmp b1 - // myprintf::@1 - b1: - // [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) -- vbuxx=_deref_pbuz1 - ldy #0 - lda (str),y - tax - // [57] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 - lda bFormat - cmp #0 - beq b2 - jmp b33 - // myprintf::@33 - b33: - // [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #'0' - bne b3 - // [59] phi from myprintf::@33 to myprintf::@27 [phi:myprintf::@33->myprintf::@27] - b27_from_b33: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) 1 [phi:myprintf::@33->myprintf::@27#0] -- vbuz1=vbuc1 - lda #1 - sta bLeadZero - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@33->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@33->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@33->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@33->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@33->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@33->myprintf::@27#6] -- register_copy - jmp b27 - // myprintf::@27 - b27: - // [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 -- pbuz1=_inc_pbuz1 - inc str - bne !+ - inc str+1 - !: - // [61] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 - ldy #0 - lda (str),y - cmp #0 - bne b1_from_b27 - jmp b38 - // myprintf::@38 - b38: - // [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 - lda #0 - ldy return - sta strTemp,y - jmp breturn - // myprintf::@return - breturn: - // [63] return - rts - // myprintf::@3 - b3: - // [64] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 -- vbuxx_lt_vbuc1_then_la1 - cpx #'1' - bcc b4 - jmp b39 - // myprintf::@39 - b39: - // [65] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuxx_le_vbuc1_then_la1 - cpx #'9' - bcc b23 - beq b23 - jmp b4 - // myprintf::@4 - b4: - // [66] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuxx_neq_vbuc1_then_la1 - cpx #'-' - bne b5 - // [59] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] - b27_from_b4: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) 1 [phi:myprintf::@4->myprintf::@27#2] -- vbuz1=vbuc1 - lda #1 - sta bTrailing - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@4->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#6] -- register_copy - jmp b27 - // myprintf::@5 - b5: - // [67] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuxx_eq_vbuc1_then_la1 - cpx #'c' - beq b6 - jmp b24 - // myprintf::@24 - b24: - // [68] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuxx_eq_vbuc1_then_la1 - cpx #'d' - beq b7 - jmp b25 - // myprintf::@25 - b25: - // [69] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 - cpx #'x' - beq b26 - jmp b40 - // myprintf::@40 - b40: - // [70] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 - cpx #'X' - beq b26 - // [71] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22] - b22_from_b11: - b22_from_b20: - b22_from_b21: - b22_from_b40: - b22_from_b6: - // [71] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy - // [71] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy - jmp b22 - // [71] phi from myprintf::@42 to myprintf::@22 [phi:myprintf::@42->myprintf::@22] - b22_from_b42: - jmp b22 - // myprintf::@22 - b22: - // [59] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] - b27_from_b22: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@22->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) 0 [phi:myprintf::@22->myprintf::@27#6] -- vbuz1=vbuc1 - lda #0 - sta bFormat - jmp b27 - // myprintf::@26 - b26: - // [72] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 - lda w - // [73] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 -- vbuaa=vbuaa_ror_4 - lsr - lsr - lsr - lsr - // [74] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 - ldx #$f - axs #0 - // [75] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b8_from_b26 - // [77] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] - b9_from_b26: - // [77] phi (byte~) myprintf::$23 = (byte) $57 [phi:myprintf::@26->myprintf::@9#0] -- vbuaa=vbuc1 - lda #$57 - jmp b9 - // [76] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] - b8_from_b26: - jmp b8 - // myprintf::@8 - b8: - // [77] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] - b9_from_b8: - // [77] phi (byte~) myprintf::$23 = (byte) '0' [phi:myprintf::@8->myprintf::@9#0] -- vbuaa=vbuc1 - lda #'0' - jmp b9 - // myprintf::@9 - b9: - // [78] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 -- vbuaa=vbuaa_plus_vbuxx - stx $ff - clc - adc $ff - // [79] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 -- pbuc1_derefidx_vbuz1=vbuaa - ldy bLen - sta strTemp,y - // [80] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuyy=_inc_vbuz1 - ldy bLen - iny - // [81] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 - lda w - // [82] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 - ldx #$f - axs #0 - // [83] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 -- vbuxx_lt_vbuc1_then_la1 - cpx #$a - bcc b10_from_b9 - // [85] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] - b11_from_b9: - // [85] phi (byte~) myprintf::$30 = (byte) $57 [phi:myprintf::@9->myprintf::@11#0] -- vbuaa=vbuc1 - lda #$57 - jmp b11 - // [84] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] - b10_from_b9: - jmp b10 - // myprintf::@10 - b10: - // [85] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] - b11_from_b10: - // [85] phi (byte~) myprintf::$30 = (byte) '0' [phi:myprintf::@10->myprintf::@11#0] -- vbuaa=vbuc1 - lda #'0' - jmp b11 - // myprintf::@11 - b11: - // [86] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 -- vbuaa=vbuaa_plus_vbuxx - stx $ff - clc - adc $ff - // [87] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 -- pbuc1_derefidx_vbuyy=vbuaa - sta strTemp,y - // [88] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuyy - iny - sty bLen - jmp b22_from_b11 - // myprintf::@7 - b7: - // [89] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 - lda w - sta utoa.value - lda w+1 - sta utoa.value+1 - // [90] call utoa - // [135] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] - utoa_from_b7: - jsr utoa - // [91] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] - b12_from_b7: - // [91] phi (byte) myprintf::b#17 = (byte) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuz1=vbuc1 - lda #1 - sta b - jmp b12 - // myprintf::@12 - b12: - // [92] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 - ldy b - lda buf6,y - cmp #0 - bne b13 - jmp b14 - // myprintf::@14 - b14: - // [93] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 -- vbuz1_neq_0_then_la1 - lda bTrailing - cmp #0 - bne b15_from_b14 - jmp b41 - // myprintf::@41 - b41: - // [94] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 - lda b - cmp bDigits - bcc b16_from_b41 - // [95] phi from myprintf::@41 to myprintf::@15 [phi:myprintf::@41->myprintf::@15] - b15_from_b41: - jmp b15 - // [95] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] - b15_from_b14: - b15_from_b18: - // [95] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy - // [95] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy - jmp b15 - // myprintf::@15 - b15: - // [96] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] - b19_from_b15: - // [96] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy - // [96] phi (byte) myprintf::digit#3 = (byte) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuxx=vbuc1 - ldx #0 - jmp b19 - // [96] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] - b19_from_b19: - // [96] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy - // [96] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy - jmp b19 - // myprintf::@19 - b19: - // [97] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuxx - lda buf6,x - ldy bLen - sta strTemp,y - // [98] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 - inc bLen - // [99] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuxx=_inc_vbuxx - inx - // [100] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuxx_lt_vbuz1_then_la1 - cpx b - bcc b19_from_b19 - jmp b20 - // myprintf::@20 - b20: - // [101] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 -- vbuz1_eq_0_then_la1 - lda bTrailing - cmp #0 - beq b22_from_b20 - jmp b42 - // myprintf::@42 - b42: - // [102] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 -- vbuz1_le_vbuz2_then_la1 - lda b - cmp bDigits - bcs b22_from_b42 - // [103] phi from myprintf::@21 myprintf::@42 to myprintf::@21 [phi:myprintf::@21/myprintf::@42->myprintf::@21] - b21_from_b21: - b21_from_b42: - // [103] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@42->myprintf::@21#0] -- register_copy - // [103] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@42->myprintf::@21#1] -- register_copy - jmp b21 - // myprintf::@21 - b21: - // [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 - lda #' ' - ldy bLen - sta strTemp,y - // [105] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 - inc bLen - // [106] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 - dec bDigits - // [107] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 - lda b - cmp bDigits - bcc b21_from_b21 - jmp b22_from_b21 - // [108] phi from myprintf::@18 myprintf::@41 to myprintf::@16 [phi:myprintf::@18/myprintf::@41->myprintf::@16] - b16_from_b18: - b16_from_b41: - // [108] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@41->myprintf::@16#0] -- register_copy - // [108] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@41->myprintf::@16#1] -- register_copy - jmp b16 - // myprintf::@16 - b16: - // [109] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 -- vbuz1_eq_0_then_la1 - lda bLeadZero - cmp #0 - beq b17_from_b16 - // [111] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] - b18_from_b16: - // [111] phi (byte~) myprintf::$41 = (byte) '0' [phi:myprintf::@16->myprintf::@18#0] -- vbuaa=vbuc1 - lda #'0' - jmp b18 - // [110] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] - b17_from_b16: - jmp b17 - // myprintf::@17 - b17: - // [111] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] - b18_from_b17: - // [111] phi (byte~) myprintf::$41 = (byte) ' ' [phi:myprintf::@17->myprintf::@18#0] -- vbuaa=vbuc1 - lda #' ' - jmp b18 - // myprintf::@18 - b18: - // [112] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 -- pbuc1_derefidx_vbuz1=vbuaa - ldy bLen - sta strTemp,y - // [113] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 - inc bLen - // [114] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 - dec bDigits - // [115] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 - lda b - cmp bDigits - bcc b16_from_b18 - jmp b15_from_b18 - // myprintf::@13 - b13: - // [116] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuz1=_inc_vbuz1 - inc b - // [91] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] - b12_from_b13: - // [91] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy - jmp b12 - // myprintf::@6 - b6: - // [117] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 - lda w - // [118] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 -- pbuc1_derefidx_vbuz1=vbuaa - // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 - ldy bLen - sta strTemp,y - // [119] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 - inc bLen - jmp b22_from_b6 - // myprintf::@23 - b23: - // [120] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuxx_minus_vbuc1 - txa - axs #'0' - stx bDigits - // [59] phi from myprintf::@23 myprintf::@32 to myprintf::@27 [phi:myprintf::@23/myprintf::@32->myprintf::@27] - b27_from_b23: - b27_from_b32: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@32->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@23/myprintf::@32->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@32->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#6] -- register_copy - jmp b27 + // [56] phi (byte*) myprintf::str#51 = (byte*) myprintf::str#5 [phi:myprintf::@1_1->myprintf::@2#8] -- register_copy + jmp b2 + // [56] phi from myprintf::@1 to myprintf::@2 [phi:myprintf::@1->myprintf::@2] + b2_from_b1: + // [56] phi (byte) myprintf::b#35 = (byte) myprintf::b#1 [phi:myprintf::@1->myprintf::@2#0] -- register_copy + // [56] phi (byte) myprintf::bLeadZero#47 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@1->myprintf::@2#1] -- register_copy + // [56] phi (byte) myprintf::bDigits#47 = (byte) myprintf::bDigits#14 [phi:myprintf::@1->myprintf::@2#2] -- register_copy + // [56] phi (byte) myprintf::bTrailing#46 = (byte) myprintf::bTrailing#10 [phi:myprintf::@1->myprintf::@2#3] -- register_copy + // [56] phi (word) myprintf::w#45 = (word) myprintf::w#10 [phi:myprintf::@1->myprintf::@2#4] -- register_copy + // [56] phi (byte) myprintf::bLen#54 = (byte) myprintf::bLen#14 [phi:myprintf::@1->myprintf::@2#5] -- register_copy + // [56] phi (byte) myprintf::bArg#48 = (byte) myprintf::bArg#10 [phi:myprintf::@1->myprintf::@2#6] -- register_copy + // [56] phi (byte) myprintf::bFormat#22 = (byte) myprintf::bFormat#10 [phi:myprintf::@1->myprintf::@2#7] -- register_copy + // [56] phi (byte*) myprintf::str#51 = (byte*) myprintf::str#0 [phi:myprintf::@1->myprintf::@2#8] -- register_copy + jmp b2 // myprintf::@2 b2: - // [121] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 -- vbuxx_neq_vbuc1_then_la1 + // [57] if((byte) myprintf::b#35!=(byte) '%') goto myprintf::@28 -- vbuxx_neq_vbuc1_then_la1 cpx #'%' bne b28 jmp b34 // myprintf::@34 b34: - // [122] if((byte) myprintf::bArg#12==(byte) 0) goto myprintf::@29 -- vbuz1_eq_0_then_la1 + // [58] if((byte) myprintf::bArg#48==(byte) 0) goto myprintf::@29 -- vbuz1_eq_0_then_la1 // default format //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] lda bArg @@ -6931,49 +12359,447 @@ myprintf: { jmp b35 // myprintf::@35 b35: - // [123] if((byte) myprintf::bArg#12==(byte) 1) goto myprintf::@30 -- vbuz1_eq_vbuc1_then_la1 + // [59] if((byte) myprintf::bArg#48==(byte) 1) goto myprintf::@30 -- vbuz1_eq_vbuc1_then_la1 lda #1 cmp bArg beq b30 jmp b36 // myprintf::@36 b36: - // [124] (word~) myprintf::w#51 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 + // [60] (word~) myprintf::w#92 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 lda w3 sta w lda w3+1 sta w+1 - // [125] phi from myprintf::@29 myprintf::@30 myprintf::@36 to myprintf::@31 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31] + // [61] phi from myprintf::@29 myprintf::@30 myprintf::@36 to myprintf::@31 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31] b31_from_b29: b31_from_b30: b31_from_b36: - // [125] phi (word) myprintf::w#21 = (word~) myprintf::w#49 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31#0] -- register_copy + // [61] phi (word) myprintf::w#21 = (word~) myprintf::w#90 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31#0] -- register_copy jmp b31 // myprintf::@31 b31: - // [126] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 -- vbuz1=_inc_vbuz1 + // [62] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#48 -- vbuz1=_inc_vbuz1 inc bArg - // [59] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] + // [63] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] b27_from_b31: - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) 0 [phi:myprintf::@31->myprintf::@27#0] -- vbuz1=vbuc1 + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#51 [phi:myprintf::@31->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) 0 [phi:myprintf::@31->myprintf::@27#1] -- vbuz1=vbuc1 lda #0 sta bLeadZero - // [59] phi (byte) myprintf::bDigits#24 = (byte) 1 [phi:myprintf::@31->myprintf::@27#1] -- vbuz1=vbuc1 + // [63] phi (byte) myprintf::bDigits#14 = (byte) 1 [phi:myprintf::@31->myprintf::@27#2] -- vbuz1=vbuc1 lda #1 sta bDigits - // [59] phi (byte) myprintf::bTrailing#21 = (byte) 0 [phi:myprintf::@31->myprintf::@27#2] -- vbuz1=vbuc1 + // [63] phi (byte) myprintf::bTrailing#10 = (byte) 0 [phi:myprintf::@31->myprintf::@27#3] -- vbuz1=vbuc1 lda #0 sta bTrailing - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#21 [phi:myprintf::@31->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@31->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@31->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) 1 [phi:myprintf::@31->myprintf::@27#6] -- vbuz1=vbuc1 + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#21 [phi:myprintf::@31->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@31->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#54 [phi:myprintf::@31->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) 1 [phi:myprintf::@31->myprintf::@27#7] -- vbuz1=vbuc1 lda #1 sta bFormat jmp b27 + // myprintf::@27 + b27: + // [64] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + // [65] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 + ldy #0 + lda (str),y + cmp #0 + bne b1 + jmp b38 + // myprintf::@38 + b38: + // [66] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy bLen + sta strTemp,y + jmp breturn + // myprintf::@return + breturn: + // [67] return + rts + // myprintf::@1 + b1: + // [68] (byte) myprintf::b#1 ← *((byte*) myprintf::str#0) -- vbuxx=_deref_pbuz1 + ldy #0 + lda (str),y + tax + // [69] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 + lda bFormat + cmp #0 + beq b2_from_b1 + jmp b33 + // myprintf::@33 + b33: + // [70] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuxx_neq_vbuc1_then_la1 + cpx #'0' + bne b3 + // [63] phi from myprintf::@33 to myprintf::@27 [phi:myprintf::@33->myprintf::@27] + b27_from_b33: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@33->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) 1 [phi:myprintf::@33->myprintf::@27#1] -- vbuz1=vbuc1 + lda #1 + sta bLeadZero + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#14 [phi:myprintf::@33->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@33->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@33->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@33->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@33->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@33->myprintf::@27#7] -- register_copy + jmp b27 + // myprintf::@3 + b3: + // [71] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 -- vbuxx_lt_vbuc1_then_la1 + cpx #'1' + bcc b4 + jmp b39 + // myprintf::@39 + b39: + // [72] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuxx_le_vbuc1_then_la1 + cpx #'9' + bcc b23 + beq b23 + jmp b4 + // myprintf::@4 + b4: + // [73] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuxx_neq_vbuc1_then_la1 + cpx #'-' + bne b5 + // [63] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] + b27_from_b4: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@4->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) 1 [phi:myprintf::@4->myprintf::@27#3] -- vbuz1=vbuc1 + lda #1 + sta bTrailing + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@4->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#7] -- register_copy + jmp b27 + // myprintf::@5 + b5: + // [74] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuxx_eq_vbuc1_then_la1 + cpx #'c' + beq b6 + jmp b24 + // myprintf::@24 + b24: + // [75] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuxx_eq_vbuc1_then_la1 + cpx #'d' + beq b7 + jmp b25 + // myprintf::@25 + b25: + // [76] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + cpx #'x' + beq b26 + jmp b40 + // myprintf::@40 + b40: + // [77] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + cpx #'X' + beq b26 + // [78] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22] + b22_from_b11: + b22_from_b20: + b22_from_b21: + b22_from_b40: + b22_from_b6: + // [78] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy + // [78] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy + jmp b22 + // [78] phi from myprintf::@42 to myprintf::@22 [phi:myprintf::@42->myprintf::@22] + b22_from_b42: + jmp b22 + // myprintf::@22 + b22: + // [63] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] + b27_from_b22: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@22->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@22->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) 0 [phi:myprintf::@22->myprintf::@27#7] -- vbuz1=vbuc1 + lda #0 + sta bFormat + jmp b27 + // myprintf::@26 + b26: + // [79] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + lda w + // [80] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 -- vbuaa=vbuaa_ror_4 + lsr + lsr + lsr + lsr + // [81] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 + ldx #$f + axs #0 + // [82] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b8_from_b26 + // [84] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] + b9_from_b26: + // [84] phi (byte~) myprintf::$23 = (byte) $57 [phi:myprintf::@26->myprintf::@9#0] -- vbuaa=vbuc1 + lda #$57 + jmp b9 + // [83] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] + b8_from_b26: + jmp b8 + // myprintf::@8 + b8: + // [84] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] + b9_from_b8: + // [84] phi (byte~) myprintf::$23 = (byte) '0' [phi:myprintf::@8->myprintf::@9#0] -- vbuaa=vbuc1 + lda #'0' + jmp b9 + // myprintf::@9 + b9: + // [85] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 -- vbuaa=vbuaa_plus_vbuxx + stx $ff + clc + adc $ff + // [86] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 -- pbuc1_derefidx_vbuz1=vbuaa + ldy bLen + sta strTemp,y + // [87] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuyy=_inc_vbuz1 + ldy bLen + iny + // [88] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + lda w + // [89] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 + ldx #$f + axs #0 + // [90] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b10_from_b9 + // [92] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] + b11_from_b9: + // [92] phi (byte~) myprintf::$30 = (byte) $57 [phi:myprintf::@9->myprintf::@11#0] -- vbuaa=vbuc1 + lda #$57 + jmp b11 + // [91] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] + b10_from_b9: + jmp b10 + // myprintf::@10 + b10: + // [92] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] + b11_from_b10: + // [92] phi (byte~) myprintf::$30 = (byte) '0' [phi:myprintf::@10->myprintf::@11#0] -- vbuaa=vbuc1 + lda #'0' + jmp b11 + // myprintf::@11 + b11: + // [93] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 -- vbuaa=vbuaa_plus_vbuxx + stx $ff + clc + adc $ff + // [94] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 -- pbuc1_derefidx_vbuyy=vbuaa + sta strTemp,y + // [95] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuyy + iny + sty bLen + jmp b22_from_b11 + // myprintf::@7 + b7: + // [96] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 + lda w + sta utoa.value + lda w+1 + sta utoa.value+1 + // [97] call utoa + // [136] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] + utoa_from_b7: + jsr utoa + // [98] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] + b12_from_b7: + // [98] phi (byte) myprintf::b#17 = (byte) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuz1=vbuc1 + lda #1 + sta b + jmp b12 + // myprintf::@12 + b12: + // [99] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 + ldy b + lda buf6,y + cmp #0 + bne b13 + jmp b14 + // myprintf::@14 + b14: + // [100] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 -- vbuz1_neq_0_then_la1 + lda bTrailing + cmp #0 + bne b15_from_b14 + jmp b41 + // myprintf::@41 + b41: + // [101] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + lda b + cmp bDigits + bcc b16_from_b41 + // [102] phi from myprintf::@41 to myprintf::@15 [phi:myprintf::@41->myprintf::@15] + b15_from_b41: + jmp b15 + // [102] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] + b15_from_b14: + b15_from_b18: + // [102] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy + // [102] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy + jmp b15 + // myprintf::@15 + b15: + // [103] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] + b19_from_b15: + // [103] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy + // [103] phi (byte) myprintf::digit#3 = (byte) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuxx=vbuc1 + ldx #0 + jmp b19 + // [103] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] + b19_from_b19: + // [103] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy + // [103] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy + jmp b19 + // myprintf::@19 + b19: + // [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuxx + lda buf6,x + ldy bLen + sta strTemp,y + // [105] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 + inc bLen + // [106] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuxx=_inc_vbuxx + inx + // [107] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuxx_lt_vbuz1_then_la1 + cpx b + bcc b19_from_b19 + jmp b20 + // myprintf::@20 + b20: + // [108] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 -- vbuz1_eq_0_then_la1 + lda bTrailing + cmp #0 + beq b22_from_b20 + jmp b42 + // myprintf::@42 + b42: + // [109] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 -- vbuz1_le_vbuz2_then_la1 + lda b + cmp bDigits + bcs b22_from_b42 + // [110] phi from myprintf::@21 myprintf::@42 to myprintf::@21 [phi:myprintf::@21/myprintf::@42->myprintf::@21] + b21_from_b21: + b21_from_b42: + // [110] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@42->myprintf::@21#0] -- register_copy + // [110] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@42->myprintf::@21#1] -- register_copy + jmp b21 + // myprintf::@21 + b21: + // [111] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #' ' + ldy bLen + sta strTemp,y + // [112] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 + inc bLen + // [113] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 + dec bDigits + // [114] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 + lda b + cmp bDigits + bcc b21_from_b21 + jmp b22_from_b21 + // [115] phi from myprintf::@18 myprintf::@41 to myprintf::@16 [phi:myprintf::@18/myprintf::@41->myprintf::@16] + b16_from_b18: + b16_from_b41: + // [115] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@41->myprintf::@16#0] -- register_copy + // [115] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@41->myprintf::@16#1] -- register_copy + jmp b16 + // myprintf::@16 + b16: + // [116] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 -- vbuz1_eq_0_then_la1 + lda bLeadZero + cmp #0 + beq b17_from_b16 + // [118] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] + b18_from_b16: + // [118] phi (byte~) myprintf::$41 = (byte) '0' [phi:myprintf::@16->myprintf::@18#0] -- vbuaa=vbuc1 + lda #'0' + jmp b18 + // [117] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] + b17_from_b16: + jmp b17 + // myprintf::@17 + b17: + // [118] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] + b18_from_b17: + // [118] phi (byte~) myprintf::$41 = (byte) ' ' [phi:myprintf::@17->myprintf::@18#0] -- vbuaa=vbuc1 + lda #' ' + jmp b18 + // myprintf::@18 + b18: + // [119] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 -- pbuc1_derefidx_vbuz1=vbuaa + ldy bLen + sta strTemp,y + // [120] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 + inc bLen + // [121] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 + dec bDigits + // [122] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + lda b + cmp bDigits + bcc b16_from_b18 + jmp b15_from_b18 + // myprintf::@13 + b13: + // [123] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuz1=_inc_vbuz1 + inc b + // [98] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] + b12_from_b13: + // [98] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy + jmp b12 + // myprintf::@6 + b6: + // [124] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + lda w + // [125] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 -- pbuc1_derefidx_vbuz1=vbuaa + // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 + ldy bLen + sta strTemp,y + // [126] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b22_from_b6 + // myprintf::@23 + b23: + // [127] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuxx_minus_vbuc1 + txa + axs #'0' + stx bDigits + // [63] phi from myprintf::@23 myprintf::@32 to myprintf::@27 [phi:myprintf::@23/myprintf::@32->myprintf::@27] + b27_from_b23: + b27_from_b32: + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@23/myprintf::@32->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@32->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@32->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#7] -- register_copy + jmp b27 // myprintf::@30 b30: - // [127] (word~) myprintf::w#50 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 + // [128] (word~) myprintf::w#91 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 lda w2 sta w lda w2+1 @@ -6981,7 +12807,7 @@ myprintf: { jmp b31_from_b30 // myprintf::@29 b29: - // [128] (word~) myprintf::w#49 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 + // [129] (word~) myprintf::w#90 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 lda w1 sta w lda w1+1 @@ -6989,37 +12815,37 @@ myprintf: { jmp b31_from_b29 // myprintf::@28 b28: - // [129] if((byte) myprintf::b#1<(byte) $41) goto myprintf::@32 -- vbuxx_lt_vbuc1_then_la1 + // [130] if((byte) myprintf::b#35<(byte) $41) goto myprintf::@32 -- vbuxx_lt_vbuc1_then_la1 cpx #$41 bcc b32_from_b28 jmp b43 // myprintf::@43 b43: - // [130] if((byte) myprintf::b#1>=(byte) $5a+(byte) 1) goto myprintf::@32 -- vbuxx_ge_vbuc1_then_la1 + // [131] if((byte) myprintf::b#35>=(byte) $5a+(byte) 1) goto myprintf::@32 -- vbuxx_ge_vbuc1_then_la1 cpx #$5a+1 bcs b32_from_b43 jmp b37 // myprintf::@37 b37: - // [131] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 -- vbuxx=vbuxx_plus_vbuc1 + // [132] (byte) myprintf::b#6 ← (byte) myprintf::b#35 + (byte) $20 -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[$20] - // [132] phi from myprintf::@28 myprintf::@37 to myprintf::@32 [phi:myprintf::@28/myprintf::@37->myprintf::@32] + // [133] phi from myprintf::@28 myprintf::@37 to myprintf::@32 [phi:myprintf::@28/myprintf::@37->myprintf::@32] b32_from_b28: b32_from_b37: - // [132] phi (byte) myprintf::b#25 = (byte) myprintf::b#1 [phi:myprintf::@28/myprintf::@37->myprintf::@32#0] -- register_copy + // [133] phi (byte) myprintf::b#25 = (byte) myprintf::b#35 [phi:myprintf::@28/myprintf::@37->myprintf::@32#0] -- register_copy jmp b32 - // [132] phi from myprintf::@43 to myprintf::@32 [phi:myprintf::@43->myprintf::@32] + // [133] phi from myprintf::@43 to myprintf::@32 [phi:myprintf::@43->myprintf::@32] b32_from_b43: jmp b32 // myprintf::@32 b32: - // [133] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuxx + // [134] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#54) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuxx // swap 0x41 / 0x61 when in lower case mode ldy bLen txa sta strTemp,y - // [134] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + // [135] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#54 -- vbuz1=_inc_vbuz1 inc bLen jmp b27_from_b32 buf6: .fill 6, 0 @@ -7032,7 +12858,7 @@ utoa: { jmp b13 // utoa::@13 b13: - // [136] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 + // [137] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$2710 bcc !+ @@ -7041,26 +12867,26 @@ utoa: { cmp #<$2710 bcs b5 !: - // [137] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] + // [138] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] b1_from_b13: - // [137] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 + // [138] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 lda #<myprintf.buf6 sta dst lda #>myprintf.buf6 sta dst+1 - // [137] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy - // [137] phi (byte) utoa::bStarted#5 = (byte) 0 [phi:utoa::@13->utoa::@1#2] -- vbuxx=vbuc1 + // [138] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy + // [138] phi (byte) utoa::bStarted#5 = (byte) 0 [phi:utoa::@13->utoa::@1#2] -- vbuxx=vbuc1 ldx #0 jmp b1 // utoa::@1 b1: - // [138] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 -- vbuxx_eq_vbuc1_then_la1 + // [139] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 -- vbuxx_eq_vbuc1_then_la1 cpx #1 beq b6 jmp b14 // utoa::@14 b14: - // [139] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 + // [140] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$3e8 bcc !+ @@ -7069,21 +12895,21 @@ utoa: { cmp #<$3e8 bcs b6 !: - // [140] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] + // [141] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] b2_from_b14: - // [140] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy - // [140] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy - // [140] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy + // [141] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy + // [141] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy + // [141] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy jmp b2 // utoa::@2 b2: - // [141] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 -- vbuxx_eq_vbuc1_then_la1 + // [142] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 -- vbuxx_eq_vbuc1_then_la1 cpx #1 beq b7 jmp b15 // utoa::@15 b15: - // [142] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 + // [143] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$64 bcc !+ @@ -7092,21 +12918,21 @@ utoa: { cmp #<$64 bcs b7 !: - // [143] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] + // [144] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] b3_from_b15: - // [143] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy - // [143] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy - // [143] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy + // [144] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy + // [144] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy + // [144] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy jmp b3 // utoa::@3 b3: - // [144] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 -- vbuxx_eq_vbuc1_then_la1 + // [145] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 -- vbuxx_eq_vbuc1_then_la1 cpx #1 beq b8 jmp b16 // utoa::@16 b16: - // [145] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 + // [146] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$a bcc !+ @@ -7115,57 +12941,57 @@ utoa: { cmp #<$a bcs b8 !: - // [146] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] + // [147] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] b4_from_b12: b4_from_b16: - // [146] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy - // [146] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy + // [147] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy + // [147] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy jmp b4 // utoa::@4 b4: - // [147] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 -- vbuaa=_byte_vwuz1 + // [148] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 -- vbuaa=_byte_vwuz1 lda value - // [148] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuaa=vbuc1_plus_vbuaa + // [149] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuaa=vbuc1_plus_vbuaa clc adc #'0' - // [149] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuaa + // [150] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuaa ldy #0 sta (dst),y - // [150] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz1 + // [151] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [151] *((byte*) utoa::dst#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [152] *((byte*) utoa::dst#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (dst),y jmp breturn // utoa::@return breturn: - // [152] return + // [153] return rts // utoa::@8 b8: - // [153] (byte*) append::dst#3 ← (byte*) utoa::dst#13 - // [154] (word) append::value#4 ← (word) utoa::value#10 - // [155] call append - // [175] phi from utoa::@8 to append [phi:utoa::@8->append] + // [154] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + // [155] (word) append::value#4 ← (word) utoa::value#10 + // [156] call append + // [176] phi from utoa::@8 to append [phi:utoa::@8->append] append_from_b8: - // [175] phi (word) append::sub#6 = (byte) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 + // [176] phi (word) append::sub#6 = (byte) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 lda #<$a sta append.sub lda #>$a sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy jsr append - // [156] (word) append::return#10 ← (word) append::value#5 + // [157] (word) append::return#10 ← (word) append::value#5 jmp b12 // utoa::@12 b12: - // [157] (word) utoa::value#3 ← (word) append::return#10 - // [158] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 + // [158] (word) utoa::value#3 ← (word) append::return#10 + // [159] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 @@ -7173,100 +12999,100 @@ utoa: { jmp b4_from_b12 // utoa::@7 b7: - // [159] (byte*) append::dst#2 ← (byte*) utoa::dst#10 - // [160] (word) append::value#3 ← (word) utoa::value#11 - // [161] call append - // [175] phi from utoa::@7 to append [phi:utoa::@7->append] + // [160] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + // [161] (word) append::value#3 ← (word) utoa::value#11 + // [162] call append + // [176] phi from utoa::@7 to append [phi:utoa::@7->append] append_from_b7: - // [175] phi (word) append::sub#6 = (byte) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 + // [176] phi (word) append::sub#6 = (byte) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 lda #<$64 sta append.sub lda #>$64 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy jsr append - // [162] (word) append::return#4 ← (word) append::value#5 + // [163] (word) append::return#4 ← (word) append::value#5 jmp b11 // utoa::@11 b11: - // [163] (word) utoa::value#2 ← (word) append::return#4 - // [164] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 + // [164] (word) utoa::value#2 ← (word) append::return#4 + // [165] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [143] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] + // [144] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] b3_from_b11: - // [143] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy - // [143] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy - // [143] phi (byte) utoa::bStarted#7 = (byte) 1 [phi:utoa::@11->utoa::@3#2] -- vbuxx=vbuc1 + // [144] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy + // [144] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy + // [144] phi (byte) utoa::bStarted#7 = (byte) 1 [phi:utoa::@11->utoa::@3#2] -- vbuxx=vbuc1 ldx #1 jmp b3 // utoa::@6 b6: - // [165] (byte*) append::dst#1 ← (byte*) utoa::dst#16 - // [166] (word) append::value#2 ← (word) utoa::value#6 - // [167] call append - // [175] phi from utoa::@6 to append [phi:utoa::@6->append] + // [166] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + // [167] (word) append::value#2 ← (word) utoa::value#6 + // [168] call append + // [176] phi from utoa::@6 to append [phi:utoa::@6->append] append_from_b6: - // [175] phi (word) append::sub#6 = (word) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 + // [176] phi (word) append::sub#6 = (word) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 lda #<$3e8 sta append.sub lda #>$3e8 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy jsr append - // [168] (word) append::return#3 ← (word) append::value#5 + // [169] (word) append::return#3 ← (word) append::value#5 jmp b10 // utoa::@10 b10: - // [169] (word) utoa::value#1 ← (word) append::return#3 - // [170] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 + // [170] (word) utoa::value#1 ← (word) append::return#3 + // [171] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [140] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] + // [141] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] b2_from_b10: - // [140] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy - // [140] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy - // [140] phi (byte) utoa::bStarted#6 = (byte) 1 [phi:utoa::@10->utoa::@2#2] -- vbuxx=vbuc1 + // [141] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy + // [141] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy + // [141] phi (byte) utoa::bStarted#6 = (byte) 1 [phi:utoa::@10->utoa::@2#2] -- vbuxx=vbuc1 ldx #1 jmp b2 // utoa::@5 b5: - // [171] (word) append::value#1 ← (word) utoa::value#4 - // [172] call append - // [175] phi from utoa::@5 to append [phi:utoa::@5->append] + // [172] (word) append::value#1 ← (word) utoa::value#4 + // [173] call append + // [176] phi from utoa::@5 to append [phi:utoa::@5->append] append_from_b5: - // [175] phi (word) append::sub#6 = (word) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 + // [176] phi (word) append::sub#6 = (word) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 lda #<$2710 sta append.sub lda #>$2710 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 + // [176] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 lda #<myprintf.buf6 sta append.dst lda #>myprintf.buf6 sta append.dst+1 jsr append - // [173] (word) append::return#2 ← (word) append::value#5 + // [174] (word) append::return#2 ← (word) append::value#5 jmp b9 // utoa::@9 b9: - // [174] (word) utoa::value#0 ← (word) append::return#2 - // [137] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] + // [175] (word) utoa::value#0 ← (word) append::return#2 + // [138] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] b1_from_b9: - // [137] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 + // [138] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 lda #<myprintf.buf6+1 sta dst lda #>myprintf.buf6+1 sta dst+1 - // [137] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy - // [137] phi (byte) utoa::bStarted#5 = (byte) 1 [phi:utoa::@9->utoa::@1#2] -- vbuxx=vbuc1 + // [138] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy + // [138] phi (byte) utoa::bStarted#5 = (byte) 1 [phi:utoa::@9->utoa::@1#2] -- vbuxx=vbuc1 ldx #1 jmp b1 } @@ -7278,18 +13104,18 @@ append: { .label return = $11 .label dst = $13 .label sub = $15 - // [176] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 + // [177] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 lda #'0' ldy #0 sta (dst),y - // [177] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] + // [178] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] b1_from_append: b1_from_b2: - // [177] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy + // [178] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy jmp b1 // append::@1 b1: - // [178] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 + // [179] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 lda sub+1 cmp value+1 bne !+ @@ -7301,18 +13127,18 @@ append: { jmp breturn // append::@return breturn: - // [179] return + // [180] return rts // append::@2 b2: - // [180] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 + // [181] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 ldy #0 lda (dst),y clc adc #1 ldy #0 sta (dst),y - // [181] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 + // [182] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 lda value sec sbc sub @@ -7335,26 +13161,26 @@ div10: { .label val_3 = 4 .label return = 4 .label val_4 = 2 - // [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + // [183] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 -- vwuz1=vwuz2_ror_1 lda val_4+1 lsr sta _0+1 lda val_4 ror sta _0 - // [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 -- vwuz1=vwuz1_plus_1 + // [184] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 -- vwuz1=vwuz1_plus_1 inc val bne !+ inc val+1 !: - // [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 -- vwuz1=vwuz2_rol_1 + // [185] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda val asl sta _2 lda val+1 rol sta _2+1 - // [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz1 + // [186] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz1 lda val_1 clc adc val @@ -7362,7 +13188,7 @@ div10: { lda val_1+1 adc val+1 sta val_1+1 - // [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + // [187] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda val_1+1 lsr sta _3+1 @@ -7375,7 +13201,7 @@ div10: { ror _3 lsr _3+1 ror _3 - // [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 + // [188] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 lda val_2 clc adc val_1 @@ -7383,12 +13209,12 @@ div10: { lda val_2+1 adc val_1+1 sta val_2+1 - // [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8 + // [189] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8 lda val_2+1 sta _4 lda #0 sta _4+1 - // [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz1 + // [190] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz1 lda val_3 clc adc val_2 @@ -7396,7 +13222,7 @@ div10: { lda val_3+1 adc val_2+1 sta val_3+1 - // [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + // [191] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr return+1 ror return lsr return+1 @@ -7408,7 +13234,7 @@ div10: { jmp breturn // div10::@return breturn: - // [191] return + // [192] return rts } // div16u @@ -7421,24 +13247,24 @@ div16u: { .label divisor = $a .label return = 4 .label dividend = 2 - // [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 + // [193] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 lda dividend sta divr16u.dividend lda dividend+1 sta divr16u.dividend+1 - // [193] call divr16u - // [197] phi from div16u to divr16u [phi:div16u->divr16u] + // [194] call divr16u + // [198] phi from div16u to divr16u [phi:div16u->divr16u] divr16u_from_div16u: jsr divr16u - // [194] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [195] (word) divr16u::return#2 ← (word) divr16u::return#0 jmp b1 // div16u::@1 b1: - // [195] (word) div16u::return#0 ← (word) divr16u::return#2 + // [196] (word) div16u::return#0 ← (word) divr16u::return#2 jmp breturn // div16u::@return breturn: - // [196] return + // [197] return rts } // divr16u @@ -7452,62 +13278,62 @@ divr16u: { .label dividend = $d .label quotient = 4 .label return = 4 - // [198] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [199] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [198] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + // [199] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [198] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [199] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [198] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy - // [198] phi (word) divr16u::rem#4 = (byte) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 + // [199] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy + // [199] phi (word) divr16u::rem#4 = (byte) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 lda #<0 sta rem lda #>0 sta rem+1 jmp b1 - // [198] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [199] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [198] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [198] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [198] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [198] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [199] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [199] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [199] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [199] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [199] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [200] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [200] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuaa=_hi_vwuz1 + // [201] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuaa=_hi_vwuz1 lda dividend+1 - // [201] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [202] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - // [202] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [203] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [203] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [204] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [204] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [205] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [204] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [205] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [205] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [206] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [206] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [207] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [207] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [208] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>div16u.divisor bcc b3_from_b2 @@ -7519,12 +13345,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [208] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [209] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [209] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 + // [210] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<div16u.divisor @@ -7532,23 +13358,23 @@ divr16u: { lda rem+1 sbc #>div16u.divisor sta rem+1 - // [210] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [211] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [210] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [210] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [211] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [211] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [211] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [212] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [212] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [213] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1_from_b3 jmp breturn // divr16u::@return breturn: - // [213] return + // [214] return rts } // File Data @@ -7573,11 +13399,16 @@ Removing instruction jmp b12 Removing instruction jmp b13 Removing instruction jmp breturn Removing instruction jmp breturn -Removing instruction jmp b1 -Removing instruction jmp b33 +Removing instruction jmp b1_1 +Removing instruction jmp b2 +Removing instruction jmp b34 +Removing instruction jmp b35 +Removing instruction jmp b36 +Removing instruction jmp b31 Removing instruction jmp b27 Removing instruction jmp b38 Removing instruction jmp breturn +Removing instruction jmp b33 Removing instruction jmp b39 Removing instruction jmp b4 Removing instruction jmp b24 @@ -7599,10 +13430,6 @@ Removing instruction jmp b21 Removing instruction jmp b16 Removing instruction jmp b17 Removing instruction jmp b18 -Removing instruction jmp b34 -Removing instruction jmp b35 -Removing instruction jmp b36 -Removing instruction jmp b31 Removing instruction jmp b43 Removing instruction jmp b37 Removing instruction jmp b32 @@ -7654,7 +13481,7 @@ Removing instruction lda #>0 Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label b1_from_b10 with b1 Replacing label b5_from_b13 with b5 -Replacing label b1_from_b27 with b1 +Replacing label b2_from_b1 with b2 Replacing label b8_from_b26 with b8 Replacing label b10_from_b9 with b10 Replacing label b22_from_b11 with b22_from_b6 @@ -7686,7 +13513,10 @@ Removing instruction b9_from_b3: Removing instruction b5_from_b13: Removing instruction b12_from_b7: Removing instruction breturn: -Removing instruction b1_from_b27: +Removing instruction b2_from_b1: +Removing instruction b31_from_b29: +Removing instruction b31_from_b30: +Removing instruction b31_from_b36: Removing instruction b22_from_b11: Removing instruction b22_from_b20: Removing instruction b22_from_b21: @@ -7708,9 +13538,6 @@ Removing instruction b16_from_b41: Removing instruction b17_from_b16: Removing instruction b18_from_b17: Removing instruction b27_from_b23: -Removing instruction b31_from_b29: -Removing instruction b31_from_b30: -Removing instruction b31_from_b36: Removing instruction b32_from_b28: Removing instruction b32_from_b43: Removing instruction b2_from_b14: @@ -7746,11 +13573,16 @@ Removing instruction myprintf_from_b7: Removing instruction b12: Removing instruction b13: Removing instruction breturn: -Removing instruction b1_from_myprintf: -Removing instruction b33: -Removing instruction b27_from_b33: +Removing instruction b1_1: +Removing instruction b2_from_b1_1: +Removing instruction b34: +Removing instruction b35: +Removing instruction b36: +Removing instruction b27_from_b31: Removing instruction b38: Removing instruction breturn: +Removing instruction b33: +Removing instruction b27_from_b33: Removing instruction b39: Removing instruction b27_from_b4: Removing instruction b24: @@ -7767,10 +13599,6 @@ Removing instruction b20: Removing instruction b42: Removing instruction b18_from_b16: Removing instruction b12_from_b13: -Removing instruction b34: -Removing instruction b35: -Removing instruction b36: -Removing instruction b27_from_b31: Removing instruction b43: Removing instruction b37: Removing instruction b13: @@ -7810,7 +13638,7 @@ Relabelling long label b32_from_b37 to b24 Succesful ASM optimization Pass5RelabelLongLabels Removing instruction jmp b1 Removing instruction jmp b5 -Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp b22 Removing instruction jmp b15 Removing instruction jmp b19 @@ -7818,6 +13646,7 @@ Removing instruction jmp b32 Removing instruction jmp b1 Succesful ASM optimization Pass5NextJumpElimination Replacing instruction lda #0 with TYA +Replacing instruction lda #0 with TYA Replacing instruction lda b with TYA Removing instruction b14: Removing instruction b24: @@ -7825,14 +13654,16 @@ Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bbegin: Removing instruction b20: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [284] beq b22 to bne -Fixing long branch [289] bcs b22 to bcc -Fixing long branch [172] beq b2 to bne -Fixing long branch [196] bcc b23 to bcs -Fixing long branch [199] beq b23 to bne -Fixing long branch [210] beq b6 to bne -Fixing long branch [403] bne b5 to beq -Fixing long branch [408] bcs b5 to bcc +Fixing long branch [312] beq b22 to bne +Fixing long branch [317] bcs b22 to bcc +Fixing long branch [170] bne b28 to beq +Fixing long branch [177] beq b29 to bne +Fixing long branch [182] beq b30 to bne +Fixing long branch [228] bcc b23 to bcs +Fixing long branch [231] beq b23 to bne +Fixing long branch [242] beq b6 to bne +Fixing long branch [409] bne b5 to beq +Fixing long branch [414] bcs b5 to bcc FINAL SYMBOL TABLE (label) @1 @@ -7854,21 +13685,21 @@ FINAL SYMBOL TABLE (byte*) append::dst#1 dst zp ZP_WORD:19 2.0 (byte*) append::dst#2 dst zp ZP_WORD:19 2.0 (byte*) append::dst#3 dst zp ZP_WORD:19 2.0 -(byte*) append::dst#4 dst zp ZP_WORD:19 335.0 +(byte*) append::dst#4 dst zp ZP_WORD:19 3335.0 (word) append::return (word) append::return#10 return zp ZP_WORD:17 4.0 (word) append::return#2 return zp ZP_WORD:17 4.0 (word) append::return#3 return zp ZP_WORD:17 4.0 (word) append::return#4 return zp ZP_WORD:17 4.0 (word) append::sub -(word) append::sub#6 sub zp ZP_WORD:21 333.6666666666667 +(word) append::sub#6 sub zp ZP_WORD:21 3333.6666666666665 (word) append::value -(word) append::value#0 value zp ZP_WORD:17 2002.0 +(word) append::value#0 value zp ZP_WORD:17 20002.0 (word) append::value#1 value zp ZP_WORD:17 4.0 (word) append::value#2 value zp ZP_WORD:17 4.0 (word) append::value#3 value zp ZP_WORD:17 4.0 (word) append::value#4 value zp ZP_WORD:17 4.0 -(word) append::value#5 value zp ZP_WORD:17 376.625 +(word) append::value#5 value zp ZP_WORD:17 3751.625 (word) append::value#8 value zp ZP_WORD:17 5.0 (word()) div10((word) div10::val) (word~) div10::$0 $0 zp ZP_WORD:19 4.0 @@ -7959,15 +13790,15 @@ FINAL SYMBOL TABLE (word) main::v#1 v zp ZP_WORD:4 14.0 (word) main::v#2 v zp ZP_WORD:4 14.0 (byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) -(byte~) myprintf::$17 reg byte a 202.0 -(byte~) myprintf::$18 reg byte a 202.0 -(byte~) myprintf::$23 reg byte a 101.0 -(byte~) myprintf::$24 reg byte a 202.0 -(byte~) myprintf::$25 reg byte a 202.0 -(byte~) myprintf::$30 reg byte a 101.0 -(byte~) myprintf::$31 reg byte a 202.0 -(byte~) myprintf::$41 reg byte a 1001.0 -(byte~) myprintf::$49 reg byte a 202.0 +(byte~) myprintf::$17 reg byte a 2002.0 +(byte~) myprintf::$18 reg byte a 2002.0 +(byte~) myprintf::$23 reg byte a 1001.0 +(byte~) myprintf::$24 reg byte a 2002.0 +(byte~) myprintf::$25 reg byte a 2002.0 +(byte~) myprintf::$30 reg byte a 1001.0 +(byte~) myprintf::$31 reg byte a 2002.0 +(byte~) myprintf::$41 reg byte a 10001.0 +(byte~) myprintf::$49 reg byte a 2002.0 (label) myprintf::@1 (label) myprintf::@10 (label) myprintf::@11 @@ -7979,6 +13810,7 @@ FINAL SYMBOL TABLE (label) myprintf::@17 (label) myprintf::@18 (label) myprintf::@19 +(label) myprintf::@1_1 (label) myprintf::@2 (label) myprintf::@20 (label) myprintf::@21 @@ -8013,81 +13845,84 @@ FINAL SYMBOL TABLE (label) myprintf::@9 (label) myprintf::@return (byte) myprintf::b -(byte) myprintf::b#1 reg byte x 126.25000000000003 -(byte) myprintf::b#15 reg byte x 75.75 -(byte) myprintf::b#16 reg byte x 75.75 -(byte) myprintf::b#17 b zp ZP_BYTE:10 248.31999999999996 +(byte) myprintf::b#1 reg byte x 4223.444444444444 +(byte) myprintf::b#15 reg byte x 750.75 +(byte) myprintf::b#16 reg byte x 750.75 +(byte) myprintf::b#17 b zp ZP_BYTE:10 2480.32 (byte) myprintf::b#25 reg byte x 303.0 -(byte) myprintf::b#5 b zp ZP_BYTE:10 2002.0 +(byte) myprintf::b#35 reg byte x 2627.0 +(byte) myprintf::b#47 reg byte x 4.0 +(byte) myprintf::b#5 b zp ZP_BYTE:10 20002.0 (byte) myprintf::b#6 reg byte x 202.0 (byte) myprintf::bArg (byte) myprintf::bArg#1 bArg zp ZP_BYTE:7 202.0 -(byte) myprintf::bArg#10 bArg zp ZP_BYTE:7 235.66666666666663 -(byte) myprintf::bArg#12 bArg zp ZP_BYTE:7 12.283783783783784 +(byte) myprintf::bArg#10 bArg zp ZP_BYTE:7 574.7777777777778 +(byte) myprintf::bArg#48 bArg zp ZP_BYTE:7 743.2142857142856 (byte) myprintf::bDigits -(byte) myprintf::bDigits#1 bDigits zp ZP_BYTE:12 202.0 -(byte) myprintf::bDigits#10 bDigits zp ZP_BYTE:12 350.5 -(byte) myprintf::bDigits#14 bDigits zp ZP_BYTE:12 22.44444444444444 -(byte) myprintf::bDigits#16 bDigits zp ZP_BYTE:12 175.625 -(byte) myprintf::bDigits#2 bDigits zp ZP_BYTE:12 2002.0 -(byte) myprintf::bDigits#24 bDigits zp ZP_BYTE:12 201.99999999999997 -(byte) myprintf::bDigits#25 bDigits zp ZP_BYTE:12 1506.0 -(byte) myprintf::bDigits#3 bDigits zp ZP_BYTE:12 2002.0 -(byte) myprintf::bDigits#8 bDigits zp ZP_BYTE:12 701.0 +(byte) myprintf::bDigits#1 bDigits zp ZP_BYTE:12 2002.0 +(byte) myprintf::bDigits#10 bDigits zp ZP_BYTE:12 3500.5 +(byte) myprintf::bDigits#14 bDigits zp ZP_BYTE:12 1002.8499999999998 +(byte) myprintf::bDigits#16 bDigits zp ZP_BYTE:12 1750.625 +(byte) myprintf::bDigits#2 bDigits zp ZP_BYTE:12 20002.0 +(byte) myprintf::bDigits#25 bDigits zp ZP_BYTE:12 15006.0 +(byte) myprintf::bDigits#3 bDigits zp ZP_BYTE:12 20002.0 +(byte) myprintf::bDigits#47 bDigits zp ZP_BYTE:12 1262.75 +(byte) myprintf::bDigits#8 bDigits zp ZP_BYTE:12 7001.0 (byte) myprintf::bFormat -(byte) myprintf::bFormat#10 bFormat zp ZP_BYTE:6 40.4 -(byte) myprintf::bFormat#4 bFormat zp ZP_BYTE:6 168.33333333333331 +(byte) myprintf::bFormat#10 bFormat zp ZP_BYTE:6 4410.9 +(byte) myprintf::bFormat#22 bFormat zp ZP_BYTE:6 1262.75 (byte) myprintf::bLeadZero -(byte) myprintf::bLeadZero#10 bLeadZero zp ZP_BYTE:9 22.147058823529413 -(byte) myprintf::bLeadZero#18 bLeadZero zp ZP_BYTE:9 168.33333333333331 +(byte) myprintf::bLeadZero#10 bLeadZero zp ZP_BYTE:9 414.42857142857144 +(byte) myprintf::bLeadZero#47 bLeadZero zp ZP_BYTE:9 1262.75 (byte) myprintf::bLen -(byte) myprintf::bLen#1 bLen zp ZP_BYTE:11 202.0 -(byte) myprintf::bLen#10 reg byte y 37.875 -(byte) myprintf::bLen#11 bLen zp ZP_BYTE:11 620.8 -(byte) myprintf::bLen#12 bLen zp ZP_BYTE:11 1552.0 -(byte) myprintf::bLen#13 bLen zp ZP_BYTE:11 1552.0 -(byte) myprintf::bLen#14 bLen zp ZP_BYTE:11 33.666666666666664 -(byte) myprintf::bLen#23 bLen zp ZP_BYTE:11 1203.0 -(byte) myprintf::bLen#24 bLen zp ZP_BYTE:11 440.79999999999995 -(byte) myprintf::bLen#28 bLen zp ZP_BYTE:11 1506.0 -(byte) myprintf::bLen#3 bLen zp ZP_BYTE:11 202.0 -(byte) myprintf::bLen#4 bLen zp ZP_BYTE:11 1001.0 -(byte) myprintf::bLen#6 bLen zp ZP_BYTE:11 1001.0 +(byte) myprintf::bLen#1 bLen zp ZP_BYTE:11 2002.0 +(byte) myprintf::bLen#10 reg byte y 375.375 +(byte) myprintf::bLen#11 bLen zp ZP_BYTE:11 6200.8 +(byte) myprintf::bLen#12 bLen zp ZP_BYTE:11 15502.0 +(byte) myprintf::bLen#13 bLen zp ZP_BYTE:11 15502.0 +(byte) myprintf::bLen#14 bLen zp ZP_BYTE:11 1361.9032258064515 +(byte) myprintf::bLen#23 bLen zp ZP_BYTE:11 12003.0 +(byte) myprintf::bLen#24 bLen zp ZP_BYTE:11 4400.8 +(byte) myprintf::bLen#28 bLen zp ZP_BYTE:11 15006.0 +(byte) myprintf::bLen#3 bLen zp ZP_BYTE:11 2002.0 +(byte) myprintf::bLen#4 bLen zp ZP_BYTE:11 10001.0 +(byte) myprintf::bLen#54 bLen zp ZP_BYTE:11 735.9999999999999 +(byte) myprintf::bLen#6 bLen zp ZP_BYTE:11 10001.0 (byte) myprintf::bLen#7 bLen zp ZP_BYTE:11 202.0 (byte) myprintf::bTrailing -(byte) myprintf::bTrailing#10 bTrailing zp ZP_BYTE:8 10.397058823529413 -(byte) myprintf::bTrailing#21 bTrailing zp ZP_BYTE:8 168.33333333333331 +(byte) myprintf::bTrailing#10 bTrailing zp ZP_BYTE:8 573.1746031746034 +(byte) myprintf::bTrailing#46 bTrailing zp ZP_BYTE:8 1262.75 (byte[6]) myprintf::buf6 (const byte[6]) myprintf::buf6#0 buf6 = { fill( 6, 0) } (byte) myprintf::digit -(byte) myprintf::digit#2 reg byte x 1501.5 -(byte) myprintf::digit#3 reg byte x 1001.0 +(byte) myprintf::digit#2 reg byte x 15001.5 +(byte) myprintf::digit#3 reg byte x 10001.0 (byte*) myprintf::dst (byte) myprintf::return -(byte) myprintf::return#0 return zp ZP_BYTE:11 236.3333333333333 (byte*) myprintf::str -(byte*) myprintf::str#0 str zp ZP_WORD:13 151.5 -(byte*) myprintf::str#10 str zp ZP_WORD:13 4.0131578947368425 -(byte*) myprintf::str#5 str zp ZP_WORD:13 2.0 +(byte*) myprintf::str#0 str zp ZP_WORD:15 854.9677419354839 +(byte*) myprintf::str#47 str zp ZP_WORD:15 23207.0 +(byte*) myprintf::str#5 str zp ZP_WORD:15 2.0 +(byte*) myprintf::str#51 str zp ZP_WORD:15 680.3333333333334 (word) myprintf::w -(word) myprintf::w#10 w zp ZP_WORD:15 10.397058823529413 -(word) myprintf::w#17 w zp ZP_WORD:15 235.66666666666663 -(word) myprintf::w#21 w zp ZP_WORD:15 202.0 -(word~) myprintf::w#49 w zp ZP_WORD:15 202.0 -(word~) myprintf::w#50 w zp ZP_WORD:15 202.0 -(word~) myprintf::w#51 w zp ZP_WORD:15 202.0 +(word) myprintf::w#10 w zp ZP_WORD:13 590.6666666666667 +(word) myprintf::w#21 w zp ZP_WORD:13 202.0 +(word) myprintf::w#45 w zp ZP_WORD:13 1262.75 +(word~) myprintf::w#90 w zp ZP_WORD:13 202.0 +(word~) myprintf::w#91 w zp ZP_WORD:13 202.0 +(word~) myprintf::w#92 w zp ZP_WORD:13 202.0 (word) myprintf::w1 (word) myprintf::w1#0 w1 zp ZP_WORD:2 11.0 (word) myprintf::w1#1 w1 zp ZP_WORD:2 11.0 -(word) myprintf::w1#6 w1 zp ZP_WORD:2 1.5569620253164556 +(word) myprintf::w1#6 w1 zp ZP_WORD:2 1.5375 (word) myprintf::w2 (word) myprintf::w2#0 w2 zp ZP_WORD:4 22.0 (word) myprintf::w2#1 w2 zp ZP_WORD:4 22.0 -(word) myprintf::w2#7 w2 zp ZP_WORD:4 1.5569620253164556 +(word) myprintf::w2#7 w2 zp ZP_WORD:4 1.5375 (word) myprintf::w3 (word) myprintf::w3#0 w3 zp ZP_WORD:23 7.333333333333333 (word) myprintf::w3#1 w3 zp ZP_WORD:23 7.333333333333333 -(word) myprintf::w3#7 w3 zp ZP_WORD:23 1.5569620253164556 +(word) myprintf::w3#7 w3 zp ZP_WORD:23 1.5375 (byte[$64]) strTemp (const byte[$64]) strTemp#0 strTemp = { fill( $64, 0) } (void()) utoa((word) utoa::value , (byte*) utoa::dst) @@ -8131,7 +13966,7 @@ FINAL SYMBOL TABLE (word) utoa::value#12 value zp ZP_WORD:17 4.0 (word) utoa::value#2 value zp ZP_WORD:17 2.0 (word) utoa::value#3 value zp ZP_WORD:17 2.0 -(word) utoa::value#4 value zp ZP_WORD:17 35.66666666666666 +(word) utoa::value#4 value zp ZP_WORD:17 335.66666666666674 (word) utoa::value#6 value zp ZP_WORD:17 2.5 (byte*) zp1 (const byte*) zp1#0 zp1 = (byte*) 97 @@ -8140,22 +13975,22 @@ FINAL SYMBOL TABLE zp ZP_WORD:2 [ main::u#11 main::u#2 myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 div16u::dividend#0 main::u#15 main::u#4 div10::val#4 ] zp ZP_WORD:4 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$4 div10::val#3 ] -zp ZP_BYTE:6 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -zp ZP_BYTE:7 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -zp ZP_BYTE:8 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -zp ZP_BYTE:9 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +zp ZP_BYTE:6 [ myprintf::bFormat#22 myprintf::bFormat#10 ] +zp ZP_BYTE:7 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +zp ZP_BYTE:8 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +zp ZP_BYTE:9 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] reg byte a [ myprintf::$23 ] reg byte a [ myprintf::$30 ] zp ZP_BYTE:10 [ myprintf::b#17 myprintf::b#5 ] reg byte x [ myprintf::digit#3 myprintf::digit#2 ] -zp ZP_BYTE:11 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -zp ZP_BYTE:12 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +zp ZP_BYTE:11 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +zp ZP_BYTE:12 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] reg byte a [ myprintf::$41 ] -reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +reg byte x [ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] -zp ZP_WORD:13 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 myprintf::str#10 myprintf::str#5 myprintf::str#0 ] +zp ZP_WORD:13 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:15 [ main::$4 myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] +zp ZP_WORD:15 [ main::$4 myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] zp ZP_WORD:17 [ main::$13 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ] reg byte a [ myprintf::$17 ] reg byte a [ myprintf::$18 ] @@ -8176,7 +14011,7 @@ reg byte a [ divr16u::$2 ] FINAL ASSEMBLER -Score: 354730 +Score: 3145339 // File Comments // Upstart @@ -8445,108 +14280,171 @@ Print: { rts } // myprintf -// myprintf(byte* zeropage($d) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage($17) w3) +// myprintf(byte* zeropage($f) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage($17) w3) myprintf: { - .label str = $d + .label str = $f .label bDigits = $c .label bLen = $b .label b = $a .label bArg = 7 - .label return = $b .label w1 = 2 .label w2 = 4 .label w3 = $17 + .label w = $d .label bFormat = 6 - .label w = $f .label bTrailing = 8 .label bLeadZero = 9 - // [55] phi from myprintf to myprintf::@1 [phi:myprintf->myprintf::@1] - // [55] phi (byte) myprintf::bLeadZero#10 = (byte) 0 [phi:myprintf->myprintf::@1#0] -- vbuz1=vbuc1 - lda #0 - sta bLeadZero - // [55] phi (byte) myprintf::bDigits#14 = (byte) 0 [phi:myprintf->myprintf::@1#1] -- vbuz1=vbuc1 - sta bDigits - // [55] phi (byte) myprintf::bTrailing#10 = (byte) 0 [phi:myprintf->myprintf::@1#2] -- vbuz1=vbuc1 - sta bTrailing - // [55] phi (word) myprintf::w#10 = (word) 0 [phi:myprintf->myprintf::@1#3] -- vwuz1=vwuc1 - sta w - sta w+1 - // [55] phi (byte) myprintf::bLen#14 = (byte) 0 [phi:myprintf->myprintf::@1#4] -- vbuz1=vbuc1 - sta bLen - // [55] phi (byte) myprintf::bArg#12 = (byte) 0 [phi:myprintf->myprintf::@1#5] -- vbuz1=vbuc1 - sta bArg - // [55] phi (byte) myprintf::bFormat#10 = (byte) 0 [phi:myprintf->myprintf::@1#6] -- vbuz1=vbuc1 - sta bFormat - // [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#5 [phi:myprintf->myprintf::@1#7] -- register_copy - // [55] phi from myprintf::@27 to myprintf::@1 [phi:myprintf::@27->myprintf::@1] - // [55] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#18 [phi:myprintf::@27->myprintf::@1#0] -- register_copy - // [55] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#24 [phi:myprintf::@27->myprintf::@1#1] -- register_copy - // [55] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#21 [phi:myprintf::@27->myprintf::@1#2] -- register_copy - // [55] phi (word) myprintf::w#10 = (word) myprintf::w#17 [phi:myprintf::@27->myprintf::@1#3] -- register_copy - // [55] phi (byte) myprintf::bLen#14 = (byte) myprintf::return#0 [phi:myprintf::@27->myprintf::@1#4] -- register_copy - // [55] phi (byte) myprintf::bArg#12 = (byte) myprintf::bArg#10 [phi:myprintf::@27->myprintf::@1#5] -- register_copy - // [55] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#4 [phi:myprintf::@27->myprintf::@1#6] -- register_copy - // [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#0 [phi:myprintf::@27->myprintf::@1#7] -- register_copy - // myprintf::@1 - b1: + // myprintf::@1_1 // b = *str - // [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) -- vbuxx=_deref_pbuz1 + // [55] (byte) myprintf::b#47 ← *((byte*) myprintf::str#5) -- vbuxx=_deref_pbuz1 ldy #0 lda (str),y tax - // if (bFormat != 0) - // [57] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 - lda bFormat - cmp #0 - bne !b2+ - jmp b2 - !b2: - // myprintf::@33 - // if (b == '0') - // [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #'0' - bne b3 - // [59] phi from myprintf::@33 to myprintf::@27 [phi:myprintf::@33->myprintf::@27] - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) 1 [phi:myprintf::@33->myprintf::@27#0] -- vbuz1=vbuc1 - lda #1 + // [56] phi from myprintf::@1_1 to myprintf::@2 [phi:myprintf::@1_1->myprintf::@2] + // [56] phi (byte) myprintf::b#35 = (byte) myprintf::b#47 [phi:myprintf::@1_1->myprintf::@2#0] -- register_copy + // [56] phi (byte) myprintf::bLeadZero#47 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#1] -- vbuz1=vbuc1 + tya sta bLeadZero - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@33->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@33->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@33->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@33->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@33->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@33->myprintf::@27#6] -- register_copy + // [56] phi (byte) myprintf::bDigits#47 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#2] -- vbuz1=vbuc1 + sta bDigits + // [56] phi (byte) myprintf::bTrailing#46 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#3] -- vbuz1=vbuc1 + sta bTrailing + // [56] phi (word) myprintf::w#45 = (word) 0 [phi:myprintf::@1_1->myprintf::@2#4] -- vwuz1=vwuc1 + sta w + sta w+1 + // [56] phi (byte) myprintf::bLen#54 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#5] -- vbuz1=vbuc1 + sta bLen + // [56] phi (byte) myprintf::bArg#48 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#6] -- vbuz1=vbuc1 + sta bArg + // [56] phi (byte) myprintf::bFormat#22 = (byte) 0 [phi:myprintf::@1_1->myprintf::@2#7] -- vbuz1=vbuc1 + sta bFormat + // [56] phi (byte*) myprintf::str#51 = (byte*) myprintf::str#5 [phi:myprintf::@1_1->myprintf::@2#8] -- register_copy + // [56] phi from myprintf::@1 to myprintf::@2 [phi:myprintf::@1->myprintf::@2] + // [56] phi (byte) myprintf::b#35 = (byte) myprintf::b#1 [phi:myprintf::@1->myprintf::@2#0] -- register_copy + // [56] phi (byte) myprintf::bLeadZero#47 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@1->myprintf::@2#1] -- register_copy + // [56] phi (byte) myprintf::bDigits#47 = (byte) myprintf::bDigits#14 [phi:myprintf::@1->myprintf::@2#2] -- register_copy + // [56] phi (byte) myprintf::bTrailing#46 = (byte) myprintf::bTrailing#10 [phi:myprintf::@1->myprintf::@2#3] -- register_copy + // [56] phi (word) myprintf::w#45 = (word) myprintf::w#10 [phi:myprintf::@1->myprintf::@2#4] -- register_copy + // [56] phi (byte) myprintf::bLen#54 = (byte) myprintf::bLen#14 [phi:myprintf::@1->myprintf::@2#5] -- register_copy + // [56] phi (byte) myprintf::bArg#48 = (byte) myprintf::bArg#10 [phi:myprintf::@1->myprintf::@2#6] -- register_copy + // [56] phi (byte) myprintf::bFormat#22 = (byte) myprintf::bFormat#10 [phi:myprintf::@1->myprintf::@2#7] -- register_copy + // [56] phi (byte*) myprintf::str#51 = (byte*) myprintf::str#0 [phi:myprintf::@1->myprintf::@2#8] -- register_copy + // myprintf::@2 + b2: + // if (b == '%') + // [57] if((byte) myprintf::b#35!=(byte) '%') goto myprintf::@28 -- vbuxx_neq_vbuc1_then_la1 + cpx #'%' + beq !b28+ + jmp b28 + !b28: + // myprintf::@34 + // if (bArg == 0) + // [58] if((byte) myprintf::bArg#48==(byte) 0) goto myprintf::@29 -- vbuz1_eq_0_then_la1 + // default format + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] + lda bArg + cmp #0 + bne !b29+ + jmp b29 + !b29: + // myprintf::@35 + // if (bArg == 1) + // [59] if((byte) myprintf::bArg#48==(byte) 1) goto myprintf::@30 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp bArg + bne !b30+ + jmp b30 + !b30: + // myprintf::@36 + // [60] (word~) myprintf::w#92 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 + lda w3 + sta w + lda w3+1 + sta w+1 + // [61] phi from myprintf::@29 myprintf::@30 myprintf::@36 to myprintf::@31 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31] + // [61] phi (word) myprintf::w#21 = (word~) myprintf::w#90 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31#0] -- register_copy + // myprintf::@31 + b31: + // ++bArg; + // [62] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#48 -- vbuz1=_inc_vbuz1 + inc bArg + // [63] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#51 [phi:myprintf::@31->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) 0 [phi:myprintf::@31->myprintf::@27#1] -- vbuz1=vbuc1 + lda #0 + sta bLeadZero + // [63] phi (byte) myprintf::bDigits#14 = (byte) 1 [phi:myprintf::@31->myprintf::@27#2] -- vbuz1=vbuc1 + lda #1 + sta bDigits + // [63] phi (byte) myprintf::bTrailing#10 = (byte) 0 [phi:myprintf::@31->myprintf::@27#3] -- vbuz1=vbuc1 + lda #0 + sta bTrailing + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#21 [phi:myprintf::@31->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@31->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#54 [phi:myprintf::@31->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) 1 [phi:myprintf::@31->myprintf::@27#7] -- vbuz1=vbuc1 + lda #1 + sta bFormat // myprintf::@27 b27: // for (; *str != 0; ++str) - // [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 -- pbuz1=_inc_pbuz1 + // [64] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#47 -- pbuz1=_inc_pbuz1 inc str bne !+ inc str+1 !: - // [61] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 + // [65] if(*((byte*) myprintf::str#0)!=(byte) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 ldy #0 lda (str),y cmp #0 bne b1 // myprintf::@38 // dst[bLen] = 0 - // [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [66] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 tya - ldy return + ldy bLen sta strTemp,y // myprintf::@return // } - // [63] return + // [67] return rts + // myprintf::@1 + b1: + // b = *str + // [68] (byte) myprintf::b#1 ← *((byte*) myprintf::str#0) -- vbuxx=_deref_pbuz1 + ldy #0 + lda (str),y + tax + // if (bFormat != 0) + // [69] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 + lda bFormat + cmp #0 + beq b2 + // myprintf::@33 + // if (b == '0') + // [70] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuxx_neq_vbuc1_then_la1 + cpx #'0' + bne b3 + // [63] phi from myprintf::@33 to myprintf::@27 [phi:myprintf::@33->myprintf::@27] + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@33->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) 1 [phi:myprintf::@33->myprintf::@27#1] -- vbuz1=vbuc1 + lda #1 + sta bLeadZero + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#14 [phi:myprintf::@33->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@33->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@33->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@33->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@33->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@33->myprintf::@27#7] -- register_copy + jmp b27 // myprintf::@3 b3: // if (b >= '1' && b <= '9') - // [64] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 -- vbuxx_lt_vbuc1_then_la1 + // [71] if((byte) myprintf::b#1<(byte) '1') goto myprintf::@4 -- vbuxx_lt_vbuc1_then_la1 cpx #'1' bcc b4 // myprintf::@39 - // [65] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuxx_le_vbuc1_then_la1 + // [72] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuxx_le_vbuc1_then_la1 cpx #'9' bcs !b23+ jmp b23 @@ -8557,270 +14455,272 @@ myprintf: { // myprintf::@4 b4: // if (b == '-') - // [66] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuxx_neq_vbuc1_then_la1 + // [73] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuxx_neq_vbuc1_then_la1 cpx #'-' bne b5 - // [59] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) 1 [phi:myprintf::@4->myprintf::@27#2] -- vbuz1=vbuc1 + // [63] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@4->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) 1 [phi:myprintf::@4->myprintf::@27#3] -- vbuz1=vbuc1 lda #1 sta bTrailing - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@4->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#6] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@4->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#7] -- register_copy jmp b27 // myprintf::@5 b5: // if (b == 'c') - // [67] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuxx_eq_vbuc1_then_la1 + // [74] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuxx_eq_vbuc1_then_la1 cpx #'c' bne !b6+ jmp b6 !b6: // myprintf::@24 // if (b == 'd') - // [68] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuxx_eq_vbuc1_then_la1 + // [75] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuxx_eq_vbuc1_then_la1 cpx #'d' beq b7 // myprintf::@25 // if (b == 'x' || b == 'X') - // [69] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + // [76] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 cpx #'x' beq b26 // myprintf::@40 - // [70] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + // [77] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 cpx #'X' beq b26 - // [71] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22] - // [71] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy - // [71] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy - // [71] phi from myprintf::@42 to myprintf::@22 [phi:myprintf::@42->myprintf::@22] + // [78] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22] + // [78] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy + // [78] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy + // [78] phi from myprintf::@42 to myprintf::@22 [phi:myprintf::@42->myprintf::@22] // myprintf::@22 b22: - // [59] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@22->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) 0 [phi:myprintf::@22->myprintf::@27#6] -- vbuz1=vbuc1 + // [63] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@22->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@22->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) 0 [phi:myprintf::@22->myprintf::@27#7] -- vbuz1=vbuc1 lda #0 sta bFormat jmp b27 // myprintf::@26 b26: // (byte)w - // [72] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + // [79] (byte~) myprintf::$17 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 lda w // (byte)w >> 4 - // [73] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 -- vbuaa=vbuaa_ror_4 + // [80] (byte~) myprintf::$18 ← (byte~) myprintf::$17 >> (byte) 4 -- vbuaa=vbuaa_ror_4 lsr lsr lsr lsr // b = ((byte)w >> 4) & 0xF - // [74] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 + // [81] (byte) myprintf::b#15 ← (byte~) myprintf::$18 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 ldx #$f axs #0 // b < 10 ? '0' : 0x57 - // [75] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 -- vbuxx_lt_vbuc1_then_la1 + // [82] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@8 -- vbuxx_lt_vbuc1_then_la1 cpx #$a bcc b8 - // [77] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] - // [77] phi (byte~) myprintf::$23 = (byte) $57 [phi:myprintf::@26->myprintf::@9#0] -- vbuaa=vbuc1 + // [84] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] + // [84] phi (byte~) myprintf::$23 = (byte) $57 [phi:myprintf::@26->myprintf::@9#0] -- vbuaa=vbuc1 lda #$57 jmp b9 - // [76] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] + // [83] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] // myprintf::@8 b8: - // [77] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] - // [77] phi (byte~) myprintf::$23 = (byte) '0' [phi:myprintf::@8->myprintf::@9#0] -- vbuaa=vbuc1 + // [84] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] + // [84] phi (byte~) myprintf::$23 = (byte) '0' [phi:myprintf::@8->myprintf::@9#0] -- vbuaa=vbuc1 lda #'0' // myprintf::@9 b9: // (b < 10 ? '0' : 0x57) + b - // [78] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 -- vbuaa=vbuaa_plus_vbuxx + // [85] (byte~) myprintf::$24 ← (byte~) myprintf::$23 + (byte) myprintf::b#15 -- vbuaa=vbuaa_plus_vbuxx stx $ff clc adc $ff // dst[bLen++] = (b < 10 ? '0' : 0x57) + b - // [79] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 -- pbuc1_derefidx_vbuz1=vbuaa + // [86] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$24 -- pbuc1_derefidx_vbuz1=vbuaa ldy bLen sta strTemp,y // dst[bLen++] = (b < 10 ? '0' : 0x57) + b; - // [80] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuyy=_inc_vbuz1 + // [87] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuyy=_inc_vbuz1 iny // (byte)w - // [81] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + // [88] (byte~) myprintf::$25 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 lda w // b = (byte)w & 0xF - // [82] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 + // [89] (byte) myprintf::b#16 ← (byte~) myprintf::$25 & (byte) $f -- vbuxx=vbuaa_band_vbuc1 ldx #$f axs #0 // b < 10 ? '0' : 0x57 - // [83] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 -- vbuxx_lt_vbuc1_then_la1 + // [90] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@10 -- vbuxx_lt_vbuc1_then_la1 cpx #$a bcc b10 - // [85] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] - // [85] phi (byte~) myprintf::$30 = (byte) $57 [phi:myprintf::@9->myprintf::@11#0] -- vbuaa=vbuc1 + // [92] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] + // [92] phi (byte~) myprintf::$30 = (byte) $57 [phi:myprintf::@9->myprintf::@11#0] -- vbuaa=vbuc1 lda #$57 jmp b11 - // [84] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] + // [91] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] // myprintf::@10 b10: - // [85] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] - // [85] phi (byte~) myprintf::$30 = (byte) '0' [phi:myprintf::@10->myprintf::@11#0] -- vbuaa=vbuc1 + // [92] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] + // [92] phi (byte~) myprintf::$30 = (byte) '0' [phi:myprintf::@10->myprintf::@11#0] -- vbuaa=vbuc1 lda #'0' // myprintf::@11 b11: // (b < 10 ? '0' : 0x57) + b - // [86] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 -- vbuaa=vbuaa_plus_vbuxx + // [93] (byte~) myprintf::$31 ← (byte~) myprintf::$30 + (byte) myprintf::b#16 -- vbuaa=vbuaa_plus_vbuxx stx $ff clc adc $ff // dst[bLen++] = (b < 10 ? '0' : 0x57) + b - // [87] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 -- pbuc1_derefidx_vbuyy=vbuaa + // [94] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$31 -- pbuc1_derefidx_vbuyy=vbuaa sta strTemp,y // dst[bLen++] = (b < 10 ? '0' : 0x57) + b; - // [88] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuyy + // [95] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuyy iny sty bLen jmp b22 // myprintf::@7 b7: // utoa(w, buf6) - // [89] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 + // [96] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 lda w sta utoa.value lda w+1 sta utoa.value+1 - // [90] call utoa - // [135] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] + // [97] call utoa + // [136] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] jsr utoa - // [91] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] - // [91] phi (byte) myprintf::b#17 = (byte) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuz1=vbuc1 + // [98] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] + // [98] phi (byte) myprintf::b#17 = (byte) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuz1=vbuc1 lda #1 sta b // myprintf::@12 b12: // while(buf6[b] != 0) - // [92] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 + // [99] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 ldy b lda buf6,y cmp #0 bne b13 // myprintf::@14 // if (bTrailing == 0 && bDigits > b) - // [93] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 -- vbuz1_neq_0_then_la1 + // [100] if((byte) myprintf::bTrailing#10!=(byte) 0) goto myprintf::@15 -- vbuz1_neq_0_then_la1 lda bTrailing cmp #0 bne b15 // myprintf::@41 - // [94] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + // [101] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 tya cmp bDigits bcc b16 - // [95] phi from myprintf::@41 to myprintf::@15 [phi:myprintf::@41->myprintf::@15] - // [95] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] - // [95] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy - // [95] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy + // [102] phi from myprintf::@41 to myprintf::@15 [phi:myprintf::@41->myprintf::@15] + // [102] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] + // [102] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy + // [102] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy // myprintf::@15 b15: - // [96] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] - // [96] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy - // [96] phi (byte) myprintf::digit#3 = (byte) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuxx=vbuc1 + // [103] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] + // [103] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy + // [103] phi (byte) myprintf::digit#3 = (byte) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuxx=vbuc1 ldx #0 - // [96] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] - // [96] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy - // [96] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy + // [103] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] + // [103] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy + // [103] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy // myprintf::@19 b19: // dst[bLen++] = buf6[digit] - // [97] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuxx + // [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuxx lda buf6,x ldy bLen sta strTemp,y // dst[bLen++] = buf6[digit]; - // [98] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 + // [105] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 inc bLen // for (digit = 0; digit < b; ++digit) - // [99] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuxx=_inc_vbuxx + // [106] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuxx=_inc_vbuxx inx - // [100] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuxx_lt_vbuz1_then_la1 + // [107] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuxx_lt_vbuz1_then_la1 cpx b bcc b19 // myprintf::@20 // if (bTrailing != 0 && bDigits > b) - // [101] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 -- vbuz1_eq_0_then_la1 + // [108] if((byte) myprintf::bTrailing#10==(byte) 0) goto myprintf::@22 -- vbuz1_eq_0_then_la1 lda bTrailing cmp #0 bne !b22+ jmp b22 !b22: // myprintf::@42 - // [102] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 -- vbuz1_le_vbuz2_then_la1 + // [109] if((byte) myprintf::bDigits#16<=(byte) myprintf::b#17) goto myprintf::@22 -- vbuz1_le_vbuz2_then_la1 lda b cmp bDigits bcc !b22+ jmp b22 !b22: - // [103] phi from myprintf::@21 myprintf::@42 to myprintf::@21 [phi:myprintf::@21/myprintf::@42->myprintf::@21] - // [103] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@42->myprintf::@21#0] -- register_copy - // [103] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@42->myprintf::@21#1] -- register_copy + // [110] phi from myprintf::@21 myprintf::@42 to myprintf::@21 [phi:myprintf::@21/myprintf::@42->myprintf::@21] + // [110] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@42->myprintf::@21#0] -- register_copy + // [110] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@42->myprintf::@21#1] -- register_copy // myprintf::@21 b21: // dst[bLen++] = ' ' - // [104] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + // [111] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 lda #' ' ldy bLen sta strTemp,y // dst[bLen++] = ' '; - // [105] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 + // [112] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 inc bLen // for (; bDigits > b; --bDigits) - // [106] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 + // [113] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 dec bDigits - // [107] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 + // [114] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 lda b cmp bDigits bcc b21 jmp b22 - // [108] phi from myprintf::@18 myprintf::@41 to myprintf::@16 [phi:myprintf::@18/myprintf::@41->myprintf::@16] - // [108] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@41->myprintf::@16#0] -- register_copy - // [108] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@41->myprintf::@16#1] -- register_copy + // [115] phi from myprintf::@18 myprintf::@41 to myprintf::@16 [phi:myprintf::@18/myprintf::@41->myprintf::@16] + // [115] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@41->myprintf::@16#0] -- register_copy + // [115] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@41->myprintf::@16#1] -- register_copy // myprintf::@16 b16: // (bLeadZero == 0) ? ' ' : '0' - // [109] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 -- vbuz1_eq_0_then_la1 + // [116] if((byte) myprintf::bLeadZero#10==(byte) 0) goto myprintf::@17 -- vbuz1_eq_0_then_la1 lda bLeadZero cmp #0 beq b17 - // [111] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] - // [111] phi (byte~) myprintf::$41 = (byte) '0' [phi:myprintf::@16->myprintf::@18#0] -- vbuaa=vbuc1 + // [118] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] + // [118] phi (byte~) myprintf::$41 = (byte) '0' [phi:myprintf::@16->myprintf::@18#0] -- vbuaa=vbuc1 lda #'0' jmp b18 - // [110] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] + // [117] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] // myprintf::@17 b17: - // [111] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] - // [111] phi (byte~) myprintf::$41 = (byte) ' ' [phi:myprintf::@17->myprintf::@18#0] -- vbuaa=vbuc1 + // [118] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] + // [118] phi (byte~) myprintf::$41 = (byte) ' ' [phi:myprintf::@17->myprintf::@18#0] -- vbuaa=vbuc1 lda #' ' // myprintf::@18 b18: // dst[bLen++] = (bLeadZero == 0) ? ' ' : '0' - // [112] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 -- pbuc1_derefidx_vbuz1=vbuaa + // [119] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$41 -- pbuc1_derefidx_vbuz1=vbuaa ldy bLen sta strTemp,y // dst[bLen++] = (bLeadZero == 0) ? ' ' : '0'; - // [113] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 + // [120] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 inc bLen // for (; bDigits > b; --bDigits) - // [114] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 + // [121] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 dec bDigits - // [115] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + // [122] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 lda b cmp bDigits bcc b16 @@ -8828,94 +14728,45 @@ myprintf: { // myprintf::@13 b13: // ++b; - // [116] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuz1=_inc_vbuz1 + // [123] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuz1=_inc_vbuz1 inc b - // [91] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] - // [91] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy + // [98] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] + // [98] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy jmp b12 // myprintf::@6 b6: // (byte)w - // [117] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + // [124] (byte~) myprintf::$49 ← (byte)(word) myprintf::w#10 -- vbuaa=_byte_vwuz1 lda w // dst[bLen++] = (byte)w - // [118] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 -- pbuc1_derefidx_vbuz1=vbuaa + // [125] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$49 -- pbuc1_derefidx_vbuz1=vbuaa // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 ldy bLen sta strTemp,y // dst[bLen++] = (byte)w; - // [119] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + // [126] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 inc bLen jmp b22 // myprintf::@23 b23: // bDigits = b - '0' - // [120] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuxx_minus_vbuc1 + // [127] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuxx_minus_vbuc1 txa axs #'0' stx bDigits - // [59] phi from myprintf::@23 myprintf::@32 to myprintf::@27 [phi:myprintf::@23/myprintf::@32->myprintf::@27] - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#0] -- register_copy - // [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@32->myprintf::@27#1] -- register_copy - // [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#2] -- register_copy - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@23/myprintf::@32->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@32->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#6] -- register_copy - jmp b27 - // myprintf::@2 - b2: - // if (b == '%') - // [121] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 -- vbuxx_neq_vbuc1_then_la1 - cpx #'%' - bne b28 - // myprintf::@34 - // if (bArg == 0) - // [122] if((byte) myprintf::bArg#12==(byte) 0) goto myprintf::@29 -- vbuz1_eq_0_then_la1 - // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] - lda bArg - cmp #0 - beq b29 - // myprintf::@35 - // if (bArg == 1) - // [123] if((byte) myprintf::bArg#12==(byte) 1) goto myprintf::@30 -- vbuz1_eq_vbuc1_then_la1 - lda #1 - cmp bArg - beq b30 - // myprintf::@36 - // [124] (word~) myprintf::w#51 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 - lda w3 - sta w - lda w3+1 - sta w+1 - // [125] phi from myprintf::@29 myprintf::@30 myprintf::@36 to myprintf::@31 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31] - // [125] phi (word) myprintf::w#21 = (word~) myprintf::w#49 [phi:myprintf::@29/myprintf::@30/myprintf::@36->myprintf::@31#0] -- register_copy - // myprintf::@31 - b31: - // ++bArg; - // [126] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 -- vbuz1=_inc_vbuz1 - inc bArg - // [59] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] - // [59] phi (byte) myprintf::bLeadZero#18 = (byte) 0 [phi:myprintf::@31->myprintf::@27#0] -- vbuz1=vbuc1 - lda #0 - sta bLeadZero - // [59] phi (byte) myprintf::bDigits#24 = (byte) 1 [phi:myprintf::@31->myprintf::@27#1] -- vbuz1=vbuc1 - lda #1 - sta bDigits - // [59] phi (byte) myprintf::bTrailing#21 = (byte) 0 [phi:myprintf::@31->myprintf::@27#2] -- vbuz1=vbuc1 - lda #0 - sta bTrailing - // [59] phi (word) myprintf::w#17 = (word) myprintf::w#21 [phi:myprintf::@31->myprintf::@27#3] -- register_copy - // [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@31->myprintf::@27#4] -- register_copy - // [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@31->myprintf::@27#5] -- register_copy - // [59] phi (byte) myprintf::bFormat#4 = (byte) 1 [phi:myprintf::@31->myprintf::@27#6] -- vbuz1=vbuc1 - lda #1 - sta bFormat + // [63] phi from myprintf::@23 myprintf::@32 to myprintf::@27 [phi:myprintf::@23/myprintf::@32->myprintf::@27] + // [63] phi (byte*) myprintf::str#47 = (byte*) myprintf::str#0 [phi:myprintf::@23/myprintf::@32->myprintf::@27#0] -- register_copy + // [63] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#1] -- register_copy + // [63] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@32->myprintf::@27#2] -- register_copy + // [63] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#3] -- register_copy + // [63] phi (word) myprintf::w#10 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#4] -- register_copy + // [63] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#5] -- register_copy + // [63] phi (byte) myprintf::bLen#14 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@32->myprintf::@27#6] -- register_copy + // [63] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@32->myprintf::@27#7] -- register_copy jmp b27 // myprintf::@30 b30: - // [127] (word~) myprintf::w#50 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 + // [128] (word~) myprintf::w#91 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 lda w2 sta w lda w2+1 @@ -8923,7 +14774,7 @@ myprintf: { jmp b31 // myprintf::@29 b29: - // [128] (word~) myprintf::w#49 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 + // [129] (word~) myprintf::w#90 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 lda w1 sta w lda w1+1 @@ -8932,31 +14783,31 @@ myprintf: { // myprintf::@28 b28: // if (b >= 0x41 && b <= 0x5A) - // [129] if((byte) myprintf::b#1<(byte) $41) goto myprintf::@32 -- vbuxx_lt_vbuc1_then_la1 + // [130] if((byte) myprintf::b#35<(byte) $41) goto myprintf::@32 -- vbuxx_lt_vbuc1_then_la1 cpx #$41 bcc b32 // myprintf::@43 - // [130] if((byte) myprintf::b#1>=(byte) $5a+(byte) 1) goto myprintf::@32 -- vbuxx_ge_vbuc1_then_la1 + // [131] if((byte) myprintf::b#35>=(byte) $5a+(byte) 1) goto myprintf::@32 -- vbuxx_ge_vbuc1_then_la1 cpx #$5a+1 bcs b32 // myprintf::@37 // b += 0x20 - // [131] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte) $20 -- vbuxx=vbuxx_plus_vbuc1 + // [132] (byte) myprintf::b#6 ← (byte) myprintf::b#35 + (byte) $20 -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[$20] - // [132] phi from myprintf::@28 myprintf::@37 to myprintf::@32 [phi:myprintf::@28/myprintf::@37->myprintf::@32] - // [132] phi (byte) myprintf::b#25 = (byte) myprintf::b#1 [phi:myprintf::@28/myprintf::@37->myprintf::@32#0] -- register_copy - // [132] phi from myprintf::@43 to myprintf::@32 [phi:myprintf::@43->myprintf::@32] + // [133] phi from myprintf::@28 myprintf::@37 to myprintf::@32 [phi:myprintf::@28/myprintf::@37->myprintf::@32] + // [133] phi (byte) myprintf::b#25 = (byte) myprintf::b#35 [phi:myprintf::@28/myprintf::@37->myprintf::@32#0] -- register_copy + // [133] phi from myprintf::@43 to myprintf::@32 [phi:myprintf::@43->myprintf::@32] // myprintf::@32 b32: // dst[bLen++] = b - // [133] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuxx + // [134] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#54) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuxx // swap 0x41 / 0x61 when in lower case mode ldy bLen txa sta strTemp,y // dst[bLen++] = b; - // [134] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + // [135] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#54 -- vbuz1=_inc_vbuz1 inc bLen jmp b27 buf6: .fill 6, 0 @@ -8968,7 +14819,7 @@ utoa: { .label dst = $13 // utoa::@13 // if (bStarted == 1 || value >= 10000) - // [136] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 + // [137] if((word) utoa::value#4>=(word) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$2710 bcc !+ @@ -8981,23 +14832,23 @@ utoa: { jmp b5 !b5: !: - // [137] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] - // [137] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 + // [138] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] + // [138] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 lda #<myprintf.buf6 sta dst lda #>myprintf.buf6 sta dst+1 - // [137] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy - // [137] phi (byte) utoa::bStarted#5 = (byte) 0 [phi:utoa::@13->utoa::@1#2] -- vbuxx=vbuc1 + // [138] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy + // [138] phi (byte) utoa::bStarted#5 = (byte) 0 [phi:utoa::@13->utoa::@1#2] -- vbuxx=vbuc1 ldx #0 // utoa::@1 b1: // if (bStarted == 1 || value >= 1000) - // [138] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 -- vbuxx_eq_vbuc1_then_la1 + // [139] if((byte) utoa::bStarted#5==(byte) 1) goto utoa::@6 -- vbuxx_eq_vbuc1_then_la1 cpx #1 beq b6 // utoa::@14 - // [139] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 + // [140] if((word) utoa::value#6>=(word) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$3e8 bcc !+ @@ -9006,18 +14857,18 @@ utoa: { cmp #<$3e8 bcs b6 !: - // [140] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] - // [140] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy - // [140] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy - // [140] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy + // [141] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] + // [141] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy + // [141] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy + // [141] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy // utoa::@2 b2: // if (bStarted == 1 || value >= 100) - // [141] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 -- vbuxx_eq_vbuc1_then_la1 + // [142] if((byte) utoa::bStarted#6==(byte) 1) goto utoa::@7 -- vbuxx_eq_vbuc1_then_la1 cpx #1 beq b7 // utoa::@15 - // [142] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 + // [143] if((word) utoa::value#11>=(byte) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$64 bcc !+ @@ -9026,18 +14877,18 @@ utoa: { cmp #<$64 bcs b7 !: - // [143] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] - // [143] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy - // [143] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy - // [143] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy + // [144] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] + // [144] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy + // [144] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy + // [144] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy // utoa::@3 b3: // if (bStarted == 1 || value >= 10) - // [144] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 -- vbuxx_eq_vbuc1_then_la1 + // [145] if((byte) utoa::bStarted#7==(byte) 1) goto utoa::@8 -- vbuxx_eq_vbuc1_then_la1 cpx #1 beq b8 // utoa::@16 - // [145] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 + // [146] if((word) utoa::value#10>=(byte) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 lda value+1 cmp #>$a bcc !+ @@ -9046,59 +14897,59 @@ utoa: { cmp #<$a bcs b8 !: - // [146] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] - // [146] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy - // [146] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy + // [147] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] + // [147] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy + // [147] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy // utoa::@4 b4: // (byte)value - // [147] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 -- vbuaa=_byte_vwuz1 + // [148] (byte~) utoa::$16 ← (byte)(word) utoa::value#12 -- vbuaa=_byte_vwuz1 lda value // '0' + (byte)value - // [148] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuaa=vbuc1_plus_vbuaa + // [149] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuaa=vbuc1_plus_vbuaa clc adc #'0' // *dst++ = '0' + (byte)value - // [149] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuaa + // [150] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuaa ldy #0 sta (dst),y // *dst++ = '0' + (byte)value; - // [150] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz1 + // [151] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: // *dst = 0 - // [151] *((byte*) utoa::dst#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [152] *((byte*) utoa::dst#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (dst),y // utoa::@return // } - // [152] return + // [153] return rts // utoa::@8 b8: // append(dst++, value, 10) - // [153] (byte*) append::dst#3 ← (byte*) utoa::dst#13 - // [154] (word) append::value#4 ← (word) utoa::value#10 - // [155] call append - // [175] phi from utoa::@8 to append [phi:utoa::@8->append] - // [175] phi (word) append::sub#6 = (byte) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 + // [154] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + // [155] (word) append::value#4 ← (word) utoa::value#10 + // [156] call append + // [176] phi from utoa::@8 to append [phi:utoa::@8->append] + // [176] phi (word) append::sub#6 = (byte) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 lda #<$a sta append.sub lda #>$a sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy jsr append // append(dst++, value, 10) - // [156] (word) append::return#10 ← (word) append::value#5 + // [157] (word) append::return#10 ← (word) append::value#5 // utoa::@12 // value = append(dst++, value, 10) - // [157] (word) utoa::value#3 ← (word) append::return#10 + // [158] (word) utoa::value#3 ← (word) append::return#10 // value = append(dst++, value, 10); - // [158] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 + // [159] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 @@ -9107,98 +14958,98 @@ utoa: { // utoa::@7 b7: // append(dst++, value, 100) - // [159] (byte*) append::dst#2 ← (byte*) utoa::dst#10 - // [160] (word) append::value#3 ← (word) utoa::value#11 - // [161] call append - // [175] phi from utoa::@7 to append [phi:utoa::@7->append] - // [175] phi (word) append::sub#6 = (byte) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 + // [160] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + // [161] (word) append::value#3 ← (word) utoa::value#11 + // [162] call append + // [176] phi from utoa::@7 to append [phi:utoa::@7->append] + // [176] phi (word) append::sub#6 = (byte) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 lda #<$64 sta append.sub lda #>$64 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy jsr append // append(dst++, value, 100) - // [162] (word) append::return#4 ← (word) append::value#5 + // [163] (word) append::return#4 ← (word) append::value#5 // utoa::@11 // value = append(dst++, value, 100) - // [163] (word) utoa::value#2 ← (word) append::return#4 + // [164] (word) utoa::value#2 ← (word) append::return#4 // value = append(dst++, value, 100); - // [164] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 + // [165] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [143] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] - // [143] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy - // [143] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy - // [143] phi (byte) utoa::bStarted#7 = (byte) 1 [phi:utoa::@11->utoa::@3#2] -- vbuxx=vbuc1 + // [144] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] + // [144] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy + // [144] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy + // [144] phi (byte) utoa::bStarted#7 = (byte) 1 [phi:utoa::@11->utoa::@3#2] -- vbuxx=vbuc1 ldx #1 jmp b3 // utoa::@6 b6: // append(dst++, value, 1000) - // [165] (byte*) append::dst#1 ← (byte*) utoa::dst#16 - // [166] (word) append::value#2 ← (word) utoa::value#6 - // [167] call append - // [175] phi from utoa::@6 to append [phi:utoa::@6->append] - // [175] phi (word) append::sub#6 = (word) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 + // [166] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + // [167] (word) append::value#2 ← (word) utoa::value#6 + // [168] call append + // [176] phi from utoa::@6 to append [phi:utoa::@6->append] + // [176] phi (word) append::sub#6 = (word) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 lda #<$3e8 sta append.sub lda #>$3e8 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy + // [176] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy jsr append // append(dst++, value, 1000) - // [168] (word) append::return#3 ← (word) append::value#5 + // [169] (word) append::return#3 ← (word) append::value#5 // utoa::@10 // value = append(dst++, value, 1000) - // [169] (word) utoa::value#1 ← (word) append::return#3 + // [170] (word) utoa::value#1 ← (word) append::return#3 // value = append(dst++, value, 1000); - // [170] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 + // [171] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [140] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] - // [140] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy - // [140] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy - // [140] phi (byte) utoa::bStarted#6 = (byte) 1 [phi:utoa::@10->utoa::@2#2] -- vbuxx=vbuc1 + // [141] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] + // [141] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy + // [141] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy + // [141] phi (byte) utoa::bStarted#6 = (byte) 1 [phi:utoa::@10->utoa::@2#2] -- vbuxx=vbuc1 ldx #1 jmp b2 // utoa::@5 b5: // append(dst++, value, 10000) - // [171] (word) append::value#1 ← (word) utoa::value#4 - // [172] call append - // [175] phi from utoa::@5 to append [phi:utoa::@5->append] - // [175] phi (word) append::sub#6 = (word) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 + // [172] (word) append::value#1 ← (word) utoa::value#4 + // [173] call append + // [176] phi from utoa::@5 to append [phi:utoa::@5->append] + // [176] phi (word) append::sub#6 = (word) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 lda #<$2710 sta append.sub lda #>$2710 sta append.sub+1 - // [175] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy - // [175] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 + // [176] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy + // [176] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 lda #<myprintf.buf6 sta append.dst lda #>myprintf.buf6 sta append.dst+1 jsr append // append(dst++, value, 10000) - // [173] (word) append::return#2 ← (word) append::value#5 + // [174] (word) append::return#2 ← (word) append::value#5 // utoa::@9 // value = append(dst++, value, 10000) - // [174] (word) utoa::value#0 ← (word) append::return#2 - // [137] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] - // [137] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 + // [175] (word) utoa::value#0 ← (word) append::return#2 + // [138] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] + // [138] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 lda #<myprintf.buf6+1 sta dst lda #>myprintf.buf6+1 sta dst+1 - // [137] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy - // [137] phi (byte) utoa::bStarted#5 = (byte) 1 [phi:utoa::@9->utoa::@1#2] -- vbuxx=vbuc1 + // [138] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy + // [138] phi (byte) utoa::bStarted#5 = (byte) 1 [phi:utoa::@9->utoa::@1#2] -- vbuxx=vbuc1 ldx #1 jmp b1 } @@ -9211,16 +15062,16 @@ append: { .label dst = $13 .label sub = $15 // *dst = '0' - // [176] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 + // [177] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 lda #'0' ldy #0 sta (dst),y - // [177] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] - // [177] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy + // [178] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] + // [178] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy // append::@1 b1: // while (value >= sub) - // [178] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 + // [179] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 lda sub+1 cmp value+1 bne !+ @@ -9231,19 +15082,19 @@ append: { bcc b2 // append::@return // } - // [179] return + // [180] return rts // append::@2 b2: // ++*dst; - // [180] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 + // [181] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 ldy #0 lda (dst),y clc adc #1 sta (dst),y // value -= sub - // [181] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 + // [182] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 lda value sec sbc sub @@ -9267,7 +15118,7 @@ div10: { .label return = 4 .label val_4 = 2 // val >> 1 - // [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + // [183] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 -- vwuz1=vwuz2_ror_1 lda val_4+1 lsr sta _0+1 @@ -9275,13 +15126,13 @@ div10: { ror sta _0 // val = (val >> 1) + 1 - // [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 -- vwuz1=vwuz1_plus_1 + // [184] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 -- vwuz1=vwuz1_plus_1 inc val bne !+ inc val+1 !: // val << 1 - // [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 -- vwuz1=vwuz2_rol_1 + // [185] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda val asl sta _2 @@ -9289,7 +15140,7 @@ div10: { rol sta _2+1 // val += val << 1 - // [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz1 + // [186] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz1 lda val_1 clc adc val @@ -9298,7 +15149,7 @@ div10: { adc val+1 sta val_1+1 // val >> 4 - // [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + // [187] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lsr sta _3+1 lda val_1 @@ -9311,7 +15162,7 @@ div10: { lsr _3+1 ror _3 // val += val >> 4 - // [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 + // [188] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 lda val_2 clc adc val_1 @@ -9320,12 +15171,12 @@ div10: { adc val_1+1 sta val_2+1 // val >> 8 - // [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8 + // [189] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8 sta _4 lda #0 sta _4+1 // val += val >> 8 - // [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz1 + // [190] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz1 lda val_3 clc adc val_2 @@ -9334,7 +15185,7 @@ div10: { adc val_2+1 sta val_3+1 // val >> 4 - // [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + // [191] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr return+1 ror return lsr return+1 @@ -9345,7 +15196,7 @@ div10: { ror return // div10::@return // } - // [191] return + // [192] return rts } // div16u @@ -9359,21 +15210,21 @@ div16u: { .label return = 4 .label dividend = 2 // divr16u(dividend, divisor, 0) - // [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 + // [193] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 lda dividend sta divr16u.dividend lda dividend+1 sta divr16u.dividend+1 - // [193] call divr16u - // [197] phi from div16u to divr16u [phi:div16u->divr16u] + // [194] call divr16u + // [198] phi from div16u to divr16u [phi:div16u->divr16u] jsr divr16u // divr16u(dividend, divisor, 0) - // [194] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [195] (word) divr16u::return#2 ← (word) divr16u::return#0 // div16u::@1 - // [195] (word) div16u::return#0 ← (word) divr16u::return#2 + // [196] (word) div16u::return#0 ← (word) divr16u::return#2 // div16u::@return // } - // [196] return + // [197] return rts } // divr16u @@ -9387,58 +15238,58 @@ divr16u: { .label dividend = $d .label quotient = 4 .label return = 4 - // [198] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] - // [198] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + // [199] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [199] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [198] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [199] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 txa sta quotient sta quotient+1 - // [198] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy - // [198] phi (word) divr16u::rem#4 = (byte) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 + // [199] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy + // [199] phi (word) divr16u::rem#4 = (byte) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 sta rem sta rem+1 - // [198] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] - // [198] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [198] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [198] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [198] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [199] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [199] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [199] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [199] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [199] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy // divr16u::@1 b1: // rem = rem << 1 - // [199] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [200] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 // >dividend - // [200] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuaa=_hi_vwuz1 + // [201] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuaa=_hi_vwuz1 lda dividend+1 // >dividend & $80 - // [201] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [202] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 // if( (>dividend & $80) != 0 ) - // [202] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [203] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2 // divr16u::@4 // rem = rem | 1 - // [203] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [204] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [204] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] - // [204] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [205] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [205] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy // divr16u::@2 b2: // dividend = dividend << 1 - // [205] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [206] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 // quotient = quotient << 1 - // [206] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [207] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 // if(rem>=divisor) - // [207] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [208] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>div16u.divisor bcc b3 @@ -9449,13 +15300,13 @@ divr16u: { !: // divr16u::@5 // quotient++; - // [208] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [209] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: // rem = rem - divisor - // [209] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 + // [210] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<div16u.divisor @@ -9463,20 +15314,20 @@ divr16u: { lda rem+1 sbc #>div16u.divisor sta rem+1 - // [210] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] - // [210] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [210] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [211] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [211] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [211] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy // divr16u::@3 b3: // for( byte i : 0..15) - // [211] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [212] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [212] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [213] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1 // divr16u::@return // } - // [213] return + // [214] return rts } // File Data diff --git a/src/test/ref/sandbox.sym b/src/test/ref/sandbox.sym index 65eb761db..6ec0bc71d 100644 --- a/src/test/ref/sandbox.sym +++ b/src/test/ref/sandbox.sym @@ -17,21 +17,21 @@ (byte*) append::dst#1 dst zp ZP_WORD:19 2.0 (byte*) append::dst#2 dst zp ZP_WORD:19 2.0 (byte*) append::dst#3 dst zp ZP_WORD:19 2.0 -(byte*) append::dst#4 dst zp ZP_WORD:19 335.0 +(byte*) append::dst#4 dst zp ZP_WORD:19 3335.0 (word) append::return (word) append::return#10 return zp ZP_WORD:17 4.0 (word) append::return#2 return zp ZP_WORD:17 4.0 (word) append::return#3 return zp ZP_WORD:17 4.0 (word) append::return#4 return zp ZP_WORD:17 4.0 (word) append::sub -(word) append::sub#6 sub zp ZP_WORD:21 333.6666666666667 +(word) append::sub#6 sub zp ZP_WORD:21 3333.6666666666665 (word) append::value -(word) append::value#0 value zp ZP_WORD:17 2002.0 +(word) append::value#0 value zp ZP_WORD:17 20002.0 (word) append::value#1 value zp ZP_WORD:17 4.0 (word) append::value#2 value zp ZP_WORD:17 4.0 (word) append::value#3 value zp ZP_WORD:17 4.0 (word) append::value#4 value zp ZP_WORD:17 4.0 -(word) append::value#5 value zp ZP_WORD:17 376.625 +(word) append::value#5 value zp ZP_WORD:17 3751.625 (word) append::value#8 value zp ZP_WORD:17 5.0 (word()) div10((word) div10::val) (word~) div10::$0 $0 zp ZP_WORD:19 4.0 @@ -122,15 +122,15 @@ (word) main::v#1 v zp ZP_WORD:4 14.0 (word) main::v#2 v zp ZP_WORD:4 14.0 (byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) -(byte~) myprintf::$17 reg byte a 202.0 -(byte~) myprintf::$18 reg byte a 202.0 -(byte~) myprintf::$23 reg byte a 101.0 -(byte~) myprintf::$24 reg byte a 202.0 -(byte~) myprintf::$25 reg byte a 202.0 -(byte~) myprintf::$30 reg byte a 101.0 -(byte~) myprintf::$31 reg byte a 202.0 -(byte~) myprintf::$41 reg byte a 1001.0 -(byte~) myprintf::$49 reg byte a 202.0 +(byte~) myprintf::$17 reg byte a 2002.0 +(byte~) myprintf::$18 reg byte a 2002.0 +(byte~) myprintf::$23 reg byte a 1001.0 +(byte~) myprintf::$24 reg byte a 2002.0 +(byte~) myprintf::$25 reg byte a 2002.0 +(byte~) myprintf::$30 reg byte a 1001.0 +(byte~) myprintf::$31 reg byte a 2002.0 +(byte~) myprintf::$41 reg byte a 10001.0 +(byte~) myprintf::$49 reg byte a 2002.0 (label) myprintf::@1 (label) myprintf::@10 (label) myprintf::@11 @@ -142,6 +142,7 @@ (label) myprintf::@17 (label) myprintf::@18 (label) myprintf::@19 +(label) myprintf::@1_1 (label) myprintf::@2 (label) myprintf::@20 (label) myprintf::@21 @@ -176,81 +177,84 @@ (label) myprintf::@9 (label) myprintf::@return (byte) myprintf::b -(byte) myprintf::b#1 reg byte x 126.25000000000003 -(byte) myprintf::b#15 reg byte x 75.75 -(byte) myprintf::b#16 reg byte x 75.75 -(byte) myprintf::b#17 b zp ZP_BYTE:10 248.31999999999996 +(byte) myprintf::b#1 reg byte x 4223.444444444444 +(byte) myprintf::b#15 reg byte x 750.75 +(byte) myprintf::b#16 reg byte x 750.75 +(byte) myprintf::b#17 b zp ZP_BYTE:10 2480.32 (byte) myprintf::b#25 reg byte x 303.0 -(byte) myprintf::b#5 b zp ZP_BYTE:10 2002.0 +(byte) myprintf::b#35 reg byte x 2627.0 +(byte) myprintf::b#47 reg byte x 4.0 +(byte) myprintf::b#5 b zp ZP_BYTE:10 20002.0 (byte) myprintf::b#6 reg byte x 202.0 (byte) myprintf::bArg (byte) myprintf::bArg#1 bArg zp ZP_BYTE:7 202.0 -(byte) myprintf::bArg#10 bArg zp ZP_BYTE:7 235.66666666666663 -(byte) myprintf::bArg#12 bArg zp ZP_BYTE:7 12.283783783783784 +(byte) myprintf::bArg#10 bArg zp ZP_BYTE:7 574.7777777777778 +(byte) myprintf::bArg#48 bArg zp ZP_BYTE:7 743.2142857142856 (byte) myprintf::bDigits -(byte) myprintf::bDigits#1 bDigits zp ZP_BYTE:12 202.0 -(byte) myprintf::bDigits#10 bDigits zp ZP_BYTE:12 350.5 -(byte) myprintf::bDigits#14 bDigits zp ZP_BYTE:12 22.44444444444444 -(byte) myprintf::bDigits#16 bDigits zp ZP_BYTE:12 175.625 -(byte) myprintf::bDigits#2 bDigits zp ZP_BYTE:12 2002.0 -(byte) myprintf::bDigits#24 bDigits zp ZP_BYTE:12 201.99999999999997 -(byte) myprintf::bDigits#25 bDigits zp ZP_BYTE:12 1506.0 -(byte) myprintf::bDigits#3 bDigits zp ZP_BYTE:12 2002.0 -(byte) myprintf::bDigits#8 bDigits zp ZP_BYTE:12 701.0 +(byte) myprintf::bDigits#1 bDigits zp ZP_BYTE:12 2002.0 +(byte) myprintf::bDigits#10 bDigits zp ZP_BYTE:12 3500.5 +(byte) myprintf::bDigits#14 bDigits zp ZP_BYTE:12 1002.8499999999998 +(byte) myprintf::bDigits#16 bDigits zp ZP_BYTE:12 1750.625 +(byte) myprintf::bDigits#2 bDigits zp ZP_BYTE:12 20002.0 +(byte) myprintf::bDigits#25 bDigits zp ZP_BYTE:12 15006.0 +(byte) myprintf::bDigits#3 bDigits zp ZP_BYTE:12 20002.0 +(byte) myprintf::bDigits#47 bDigits zp ZP_BYTE:12 1262.75 +(byte) myprintf::bDigits#8 bDigits zp ZP_BYTE:12 7001.0 (byte) myprintf::bFormat -(byte) myprintf::bFormat#10 bFormat zp ZP_BYTE:6 40.4 -(byte) myprintf::bFormat#4 bFormat zp ZP_BYTE:6 168.33333333333331 +(byte) myprintf::bFormat#10 bFormat zp ZP_BYTE:6 4410.9 +(byte) myprintf::bFormat#22 bFormat zp ZP_BYTE:6 1262.75 (byte) myprintf::bLeadZero -(byte) myprintf::bLeadZero#10 bLeadZero zp ZP_BYTE:9 22.147058823529413 -(byte) myprintf::bLeadZero#18 bLeadZero zp ZP_BYTE:9 168.33333333333331 +(byte) myprintf::bLeadZero#10 bLeadZero zp ZP_BYTE:9 414.42857142857144 +(byte) myprintf::bLeadZero#47 bLeadZero zp ZP_BYTE:9 1262.75 (byte) myprintf::bLen -(byte) myprintf::bLen#1 bLen zp ZP_BYTE:11 202.0 -(byte) myprintf::bLen#10 reg byte y 37.875 -(byte) myprintf::bLen#11 bLen zp ZP_BYTE:11 620.8 -(byte) myprintf::bLen#12 bLen zp ZP_BYTE:11 1552.0 -(byte) myprintf::bLen#13 bLen zp ZP_BYTE:11 1552.0 -(byte) myprintf::bLen#14 bLen zp ZP_BYTE:11 33.666666666666664 -(byte) myprintf::bLen#23 bLen zp ZP_BYTE:11 1203.0 -(byte) myprintf::bLen#24 bLen zp ZP_BYTE:11 440.79999999999995 -(byte) myprintf::bLen#28 bLen zp ZP_BYTE:11 1506.0 -(byte) myprintf::bLen#3 bLen zp ZP_BYTE:11 202.0 -(byte) myprintf::bLen#4 bLen zp ZP_BYTE:11 1001.0 -(byte) myprintf::bLen#6 bLen zp ZP_BYTE:11 1001.0 +(byte) myprintf::bLen#1 bLen zp ZP_BYTE:11 2002.0 +(byte) myprintf::bLen#10 reg byte y 375.375 +(byte) myprintf::bLen#11 bLen zp ZP_BYTE:11 6200.8 +(byte) myprintf::bLen#12 bLen zp ZP_BYTE:11 15502.0 +(byte) myprintf::bLen#13 bLen zp ZP_BYTE:11 15502.0 +(byte) myprintf::bLen#14 bLen zp ZP_BYTE:11 1361.9032258064515 +(byte) myprintf::bLen#23 bLen zp ZP_BYTE:11 12003.0 +(byte) myprintf::bLen#24 bLen zp ZP_BYTE:11 4400.8 +(byte) myprintf::bLen#28 bLen zp ZP_BYTE:11 15006.0 +(byte) myprintf::bLen#3 bLen zp ZP_BYTE:11 2002.0 +(byte) myprintf::bLen#4 bLen zp ZP_BYTE:11 10001.0 +(byte) myprintf::bLen#54 bLen zp ZP_BYTE:11 735.9999999999999 +(byte) myprintf::bLen#6 bLen zp ZP_BYTE:11 10001.0 (byte) myprintf::bLen#7 bLen zp ZP_BYTE:11 202.0 (byte) myprintf::bTrailing -(byte) myprintf::bTrailing#10 bTrailing zp ZP_BYTE:8 10.397058823529413 -(byte) myprintf::bTrailing#21 bTrailing zp ZP_BYTE:8 168.33333333333331 +(byte) myprintf::bTrailing#10 bTrailing zp ZP_BYTE:8 573.1746031746034 +(byte) myprintf::bTrailing#46 bTrailing zp ZP_BYTE:8 1262.75 (byte[6]) myprintf::buf6 (const byte[6]) myprintf::buf6#0 buf6 = { fill( 6, 0) } (byte) myprintf::digit -(byte) myprintf::digit#2 reg byte x 1501.5 -(byte) myprintf::digit#3 reg byte x 1001.0 +(byte) myprintf::digit#2 reg byte x 15001.5 +(byte) myprintf::digit#3 reg byte x 10001.0 (byte*) myprintf::dst (byte) myprintf::return -(byte) myprintf::return#0 return zp ZP_BYTE:11 236.3333333333333 (byte*) myprintf::str -(byte*) myprintf::str#0 str zp ZP_WORD:13 151.5 -(byte*) myprintf::str#10 str zp ZP_WORD:13 4.0131578947368425 -(byte*) myprintf::str#5 str zp ZP_WORD:13 2.0 +(byte*) myprintf::str#0 str zp ZP_WORD:15 854.9677419354839 +(byte*) myprintf::str#47 str zp ZP_WORD:15 23207.0 +(byte*) myprintf::str#5 str zp ZP_WORD:15 2.0 +(byte*) myprintf::str#51 str zp ZP_WORD:15 680.3333333333334 (word) myprintf::w -(word) myprintf::w#10 w zp ZP_WORD:15 10.397058823529413 -(word) myprintf::w#17 w zp ZP_WORD:15 235.66666666666663 -(word) myprintf::w#21 w zp ZP_WORD:15 202.0 -(word~) myprintf::w#49 w zp ZP_WORD:15 202.0 -(word~) myprintf::w#50 w zp ZP_WORD:15 202.0 -(word~) myprintf::w#51 w zp ZP_WORD:15 202.0 +(word) myprintf::w#10 w zp ZP_WORD:13 590.6666666666667 +(word) myprintf::w#21 w zp ZP_WORD:13 202.0 +(word) myprintf::w#45 w zp ZP_WORD:13 1262.75 +(word~) myprintf::w#90 w zp ZP_WORD:13 202.0 +(word~) myprintf::w#91 w zp ZP_WORD:13 202.0 +(word~) myprintf::w#92 w zp ZP_WORD:13 202.0 (word) myprintf::w1 (word) myprintf::w1#0 w1 zp ZP_WORD:2 11.0 (word) myprintf::w1#1 w1 zp ZP_WORD:2 11.0 -(word) myprintf::w1#6 w1 zp ZP_WORD:2 1.5569620253164556 +(word) myprintf::w1#6 w1 zp ZP_WORD:2 1.5375 (word) myprintf::w2 (word) myprintf::w2#0 w2 zp ZP_WORD:4 22.0 (word) myprintf::w2#1 w2 zp ZP_WORD:4 22.0 -(word) myprintf::w2#7 w2 zp ZP_WORD:4 1.5569620253164556 +(word) myprintf::w2#7 w2 zp ZP_WORD:4 1.5375 (word) myprintf::w3 (word) myprintf::w3#0 w3 zp ZP_WORD:23 7.333333333333333 (word) myprintf::w3#1 w3 zp ZP_WORD:23 7.333333333333333 -(word) myprintf::w3#7 w3 zp ZP_WORD:23 1.5569620253164556 +(word) myprintf::w3#7 w3 zp ZP_WORD:23 1.5375 (byte[$64]) strTemp (const byte[$64]) strTemp#0 strTemp = { fill( $64, 0) } (void()) utoa((word) utoa::value , (byte*) utoa::dst) @@ -294,7 +298,7 @@ (word) utoa::value#12 value zp ZP_WORD:17 4.0 (word) utoa::value#2 value zp ZP_WORD:17 2.0 (word) utoa::value#3 value zp ZP_WORD:17 2.0 -(word) utoa::value#4 value zp ZP_WORD:17 35.66666666666666 +(word) utoa::value#4 value zp ZP_WORD:17 335.66666666666674 (word) utoa::value#6 value zp ZP_WORD:17 2.5 (byte*) zp1 (const byte*) zp1#0 zp1 = (byte*) 97 @@ -303,22 +307,22 @@ zp ZP_WORD:2 [ main::u#11 main::u#2 myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 div16u::dividend#0 main::u#15 main::u#4 div10::val#4 ] zp ZP_WORD:4 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$4 div10::val#3 ] -zp ZP_BYTE:6 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -zp ZP_BYTE:7 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -zp ZP_BYTE:8 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -zp ZP_BYTE:9 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +zp ZP_BYTE:6 [ myprintf::bFormat#22 myprintf::bFormat#10 ] +zp ZP_BYTE:7 [ myprintf::bArg#48 myprintf::bArg#10 myprintf::bArg#1 ] +zp ZP_BYTE:8 [ myprintf::bTrailing#46 myprintf::bTrailing#10 ] +zp ZP_BYTE:9 [ myprintf::bLeadZero#47 myprintf::bLeadZero#10 ] reg byte a [ myprintf::$23 ] reg byte a [ myprintf::$30 ] zp ZP_BYTE:10 [ myprintf::b#17 myprintf::b#5 ] reg byte x [ myprintf::digit#3 myprintf::digit#2 ] -zp ZP_BYTE:11 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -zp ZP_BYTE:12 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +zp ZP_BYTE:11 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#54 myprintf::bLen#14 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +zp ZP_BYTE:12 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#47 myprintf::bDigits#14 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] reg byte a [ myprintf::$41 ] -reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +reg byte x [ myprintf::b#25 myprintf::b#35 myprintf::b#1 myprintf::b#47 myprintf::b#6 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] -zp ZP_WORD:13 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 myprintf::str#10 myprintf::str#5 myprintf::str#0 ] +zp ZP_WORD:13 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 myprintf::w#45 myprintf::w#10 myprintf::w#21 myprintf::w#90 myprintf::w#91 myprintf::w#92 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:15 [ main::$4 myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#49 myprintf::w#50 myprintf::w#51 ] +zp ZP_WORD:15 [ main::$4 myprintf::str#47 myprintf::str#51 myprintf::str#0 myprintf::str#5 ] zp ZP_WORD:17 [ main::$13 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ] reg byte a [ myprintf::$17 ] reg byte a [ myprintf::$18 ] diff --git a/src/test/ref/screen-center-distance.asm b/src/test/ref/screen-center-distance.asm index fde0f70f6..3e67ef810 100644 --- a/src/test/ref/screen-center-distance.asm +++ b/src/test/ref/screen-center-distance.asm @@ -30,8 +30,8 @@ main: { .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f - .label _4 = $d - .label cyclecount = $d + .label _4 = $e + .label cyclecount = $e jsr init_font_hex lda #toD0181_return sta D018 @@ -57,9 +57,9 @@ main: { rts } // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($d) dw) +// print_dword_at(dword zeropage($e) dw) print_dword_at: { - .label dw = $d + .label dw = $e lda dw+2 sta print_word_at.w lda dw+3 @@ -81,10 +81,10 @@ print_dword_at: { rts } // Print a word as HEX at a specific position -// print_word_at(word zeropage(4) w, byte* zeropage(9) at) +// print_word_at(word zeropage(9) w, byte* zeropage(2) at) print_word_at: { - .label w = 4 - .label at = 9 + .label w = 9 + .label at = 2 lda w+1 sta print_byte_at.b jsr print_byte_at @@ -101,10 +101,10 @@ print_word_at: { rts } // Print a byte as HEX at a specific position -// print_byte_at(byte zeropage($c) b, byte* zeropage(9) at) +// print_byte_at(byte zeropage($d) b, byte* zeropage(2) at) print_byte_at: { - .label b = $c - .label at = 9 + .label b = $d + .label at = 2 lda b lsr lsr @@ -132,9 +132,9 @@ print_byte_at: { rts } // Print a single char -// print_char_at(byte register(X) ch, byte* zeropage(2) at) +// print_char_at(byte register(X) ch, byte* zeropage(4) at) print_char_at: { - .label at = 2 + .label at = 4 txa ldy #0 sta (at),y @@ -143,7 +143,7 @@ print_char_at: { // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { - .label return = $d + .label return = $e lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -162,14 +162,14 @@ clock: { // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision init_dist_screen: { - .label yds = $11 - .label xds = $13 - .label ds = $13 - .label x = 6 - .label xb = $b - .label screen_topline = 4 - .label screen_bottomline = 9 - .label y = $c + .label yds = $12 + .label xds = $14 + .label ds = $14 + .label x = $b + .label xb = $c + .label screen_topline = 9 + .label screen_bottomline = 2 + .label y = $d jsr init_squares lda #<SCREEN+$28*$18 sta screen_bottomline @@ -259,12 +259,12 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($13) val) +// sqrt(word zeropage($14) val) sqrt: { - .label _1 = 2 - .label _3 = 2 - .label found = 2 - .label val = $13 + .label _1 = 6 + .label _3 = 6 + .label found = 6 + .label val = $14 jsr bsearch16u lda _3 sec @@ -283,50 +283,30 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($13) key, word* zeropage(2) items, byte register(X) num) +// bsearch16u(word zeropage($14) key, word* zeropage(6) items, byte register(X) num) bsearch16u: { - .label _2 = 2 - .label pivot = $15 - .label result = $17 - .label return = 2 - .label items = 2 - .label key = $13 + .label _2 = 6 + .label pivot = 6 + .label result = $16 + .label return = 6 + .label items = 6 + .label key = $14 + .label items_10 = 4 + .label items_16 = 4 lda #<SQUARES - sta items + sta items_10 lda #>SQUARES - sta items+1 + sta items_10+1 ldx #NUM_SQUARES - b3: - cpx #0 - bne b4 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - b2: - rts b4: txa lsr asl clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 sec lda key @@ -340,38 +320,66 @@ bsearch16u: { bne b6 lda result bne b6 - lda pivot - sta return - lda pivot+1 - sta return+1 + breturn: rts b6: lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: dex b7: txa lsr tax - jmp b3 + cpx #0 + bne b9 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + rts + b9: + lda items + sta items_16 + lda items+1 + sta items_16+1 + jmp b4 + b10: + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $13 - .label return_2 = $11 + .label return = $14 + .label return_2 = $12 asl tay lda SQUARES,y @@ -384,7 +392,7 @@ sqr: { // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { .label squares = 9 - .label sqr = 4 + .label sqr = 6 jsr malloc ldx #0 lda #<SQUARES @@ -454,15 +462,15 @@ clock_start: { rts } // Make charset from proto chars -// init_font_hex(byte* zeropage(9) charset) +// init_font_hex(byte* zeropage($12) charset) init_font_hex: { - .label _0 = $19 - .label idx = $c - .label proto_lo = $11 - .label charset = 9 - .label c1 = $b - .label proto_hi = 4 - .label c = 6 + .label _0 = $18 + .label idx = $d + .label proto_lo = $14 + .label charset = $12 + .label c1 = $c + .label proto_hi = 9 + .label c = $b lda #0 sta c lda #<FONT_HEX_PROTO diff --git a/src/test/ref/screen-center-distance.cfg b/src/test/ref/screen-center-distance.cfg index 5804d5be1..6794e4cd2 100644 --- a/src/test/ref/screen-center-distance.cfg +++ b/src/test/ref/screen-center-distance.cfg @@ -185,129 +185,132 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [96] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [97] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(const word*) SQUARES#1 ) + [97] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [103] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [104] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [107] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [108] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#18 ) + [108] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [109] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [97] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [97] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [110] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [101] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [113] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [102] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [103] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [113] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [113] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [115] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) + [116] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [118] return + [119] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [119] phi() - [120] call malloc + [120] phi() + [121] call malloc to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [121] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [121] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [121] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) - [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [122] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) + [122] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) + [122] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) + [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [126] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [128] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [129] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [129] return + [130] return to:@return malloc: scope:[malloc] from init_squares - [130] phi() + [131] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc - [131] return + [132] return to:@return clock_start: scope:[clock_start] from main::@1 - [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start - [137] return + [138] return to:@return init_font_hex: scope:[init_font_hex] from main - [138] phi() + [139] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [139] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [139] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) - [139] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [140] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [140] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) + [140] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [140] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [140] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) - [140] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) - [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [141] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [141] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) + [141] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) + [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [142] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [142] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [143] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [143] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [146] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [147] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [148] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [149] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [150] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [152] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [156] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [157] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [159] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [160] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [160] return + [161] return to:@return diff --git a/src/test/ref/screen-center-distance.log b/src/test/ref/screen-center-distance.log index 71feb9283..244ebb5c1 100644 --- a/src/test/ref/screen-center-distance.log +++ b/src/test/ref/screen-center-distance.log @@ -2152,6 +2152,768 @@ Eliminating unused constant (const word*) SQUARES#0 Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP#0 Eliminating unused constant (const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 Successful SSA optimization PassNEliminateUnusedVars +GRAPH (NEW VERSIONS for bsearch16u::num#3) +@begin: scope:[] from + to:@4 +@4: scope:[] from @begin + to:@12 +malloc: scope:[malloc] from init_squares + [0] (byte*) malloc::mem#0 ← (const byte*) HEAP_TOP#0 - (word) malloc::size#0 + [1] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [2] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [3] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [3] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [4] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (byte) bsearch16u::num#9 ← phi( ) + [5] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [6] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [7] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [8] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [9] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [10] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [11] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [12] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (byte) bsearch16u::num#10 ← phi( ) + [13] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [14] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [15] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [16] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#2 ) + [16] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [17] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( ) + [18] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [19] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + [20] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [21] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#2 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@12: scope:[] from @4 + to:@15 +init_squares: scope:[init_squares] from init_dist_screen + [22] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [23] call malloc + [24] (void*) malloc::return#2 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [25] (void*~) init_squares::$1 ← (void*) malloc::return#2 + [26] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [27] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [28] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [29] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [29] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [29] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [30] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [31] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [32] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [33] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [34] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [35] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [36] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [37] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [38] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [39] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [40] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [41] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [42] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [43] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [44] call bsearch16u + [45] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [46] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [47] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [48] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [49] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [50] return + to:@return +@15: scope:[] from @12 + to:@20 +init_font_hex: scope:[init_font_hex] from main + to:init_font_hex::@1 +init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 + [51] (byte) init_font_hex::c#6 ← phi( init_font_hex/(const byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [51] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) + [51] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) init_font_hex::charset#1 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + to:init_font_hex::@2 +init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 + [52] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(const byte) init_font_hex::c1#0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [52] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte*) init_font_hex::proto_lo#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) + [52] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) + [53] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [54] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 + to:init_font_hex::@3 +init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 + [55] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) init_font_hex::idx#1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [55] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(const byte) init_font_hex::i#0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [56] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [57] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [58] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [59] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [60] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [61] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [62] if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 + to:init_font_hex::@4 +init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 + [63] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [64] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [66] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [67] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [68] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [69] if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 + to:init_font_hex::@5 +init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 + [70] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [71] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [72] if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 + to:init_font_hex::@return +init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 + [73] return + to:@return +@20: scope:[] from @15 + to:@39 +clock: scope:[clock] from main::@5 + [74] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [75] return + to:@return +clock_start: scope:[clock_start] from main::@1 + [76] (byte~) clock_start::$0 ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [77] (byte~) clock_start::$1 ← (byte~) clock_start::$0 + [78] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$1 + [79] (byte~) clock_start::$2 ← (byte~) clock_start::$0 + [80] (byte~) clock_start::$3 ← (byte~) clock_start::$2 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [81] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [82] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [83] (byte~) clock_start::$4 ← (const byte) CIA_TIMER_CONTROL_START#0 + [84] (byte~) clock_start::$5 ← (byte~) clock_start::$4 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [85] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [86] (byte~) clock_start::$6 ← (byte~) clock_start::$4 + [87] (byte~) clock_start::$7 ← (byte~) clock_start::$6 + [88] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$7 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [89] return + to:@return +print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 + [90] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) + [90] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) + [91] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 + [92] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 + [93] call print_byte_at + to:print_word_at::@1 +print_word_at::@1: scope:[print_word_at] from print_word_at + [94] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 + [95] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 + [96] call print_byte_at + to:print_word_at::@2 +print_word_at::@2: scope:[print_word_at] from print_word_at::@1 + to:print_word_at::@return +print_word_at::@return: scope:[print_word_at] from print_word_at::@2 + [97] return + to:@return +print_dword_at: scope:[print_dword_at] from main::@6 + [98] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 + [99] call print_word_at + to:print_dword_at::@1 +print_dword_at::@1: scope:[print_dword_at] from print_dword_at + [100] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 + [101] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 + [102] call print_word_at + to:print_dword_at::@2 +print_dword_at::@2: scope:[print_dword_at] from print_dword_at::@1 + to:print_dword_at::@return +print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 + [103] return + to:@return +@39: scope:[] from @20 + to:@46 +print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 + [104] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) + [104] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) + [105] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 + [106] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) + [107] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 + [108] call print_char_at + to:print_byte_at::@1 +print_byte_at::@1: scope:[print_byte_at] from print_byte_at + [109] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f + [110] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 + [111] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2) + [112] call print_char_at + to:print_byte_at::@2 +print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 + to:print_byte_at::@return +print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 + [113] return + to:@return +print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 + [114] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) + [114] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) + [115] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 + to:print_char_at::@return +print_char_at::@return: scope:[print_char_at] from print_char_at + [116] return + to:@return +@46: scope:[] from @39 + to:@48 +main: scope:[main] from @48 + [117] call init_font_hex + to:main::@3 +main::@3: scope:[main] from main + to:main::toD0181 +main::toD0181: scope:[main] from main::@3 + [118] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 + [119] (word~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff + [120] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [121] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [122] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 + [123] (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + [124] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [125] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [126] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@1 +main::@1: scope:[main] from main::toD0181_@return + [127] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [128] call clock_start + to:main::@4 +main::@4: scope:[main] from main::@1 + [129] call init_dist_screen + to:main::@5 +main::@5: scope:[main] from main::@4 + [130] call clock + [131] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@6 +main::@6: scope:[main] from main::@5 + [132] (dword~) main::$4 ← (dword) clock::return#2 + [133] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 + [134] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 + [135] call print_dword_at + to:main::@7 +main::@7: scope:[main] from main::@6 + to:main::toD0182 +main::toD0182: scope:[main] from main::@7 + [136] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::BASE_SCREEN#0 + [137] (word~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (word) $3fff + [138] (word~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 + [139] (byte~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 + [140] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::BASE_CHARSET#0 + [141] (byte~) main::toD0182_$5#0 ← > (word~) main::toD0182_$4#0 + [142] (byte~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 + [143] (byte~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f + [144] (byte) main::toD0182_return#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + to:main::@2 +main::@2: scope:[main] from main::toD0182_@return + [145] *((const byte*) D018#0) ← (byte) main::toD0182_return#0 + to:main::@return +main::@return: scope:[main] from main::@2 + [146] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main::@4 + [147] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [148] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [149] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [149] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(const byte*) init_dist_screen::screen#0 ) + [149] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [150] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [151] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [152] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [153] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [154] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [155] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [156] call sqr + [157] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [158] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [159] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [159] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [160] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [161] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [162] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [163] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [164] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [165] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [166] call sqr + [167] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [168] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [169] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [170] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [171] call sqrt + [172] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [173] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [174] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [175] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [176] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [177] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [178] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [179] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [180] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [181] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [182] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [183] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [184] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [185] return + to:@return +@48: scope:[] from @46 + [186] call main + to:@49 +@49: scope:[] from @48 + to:@end +@end: scope:[] from @49 + +GRAPH (NEW VERSIONS for bsearch16u::items#2) +@begin: scope:[] from + to:@4 +@4: scope:[] from @begin + to:@12 +malloc: scope:[malloc] from init_squares + [0] (byte*) malloc::mem#0 ← (const byte*) HEAP_TOP#0 - (word) malloc::size#0 + [1] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [2] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [3] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [3] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [4] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#10 ← phi( ) + (byte) bsearch16u::num#9 ← phi( bsearch16u::@6/(byte) bsearch16u::num#3 ) + [5] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [6] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [7] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [8] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [9] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [10] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [11] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#11 ← phi( ) + [12] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (word*) bsearch16u::items#12 ← phi( ) + (byte) bsearch16u::num#10 ← phi( bsearch16u::@7/(byte) bsearch16u::num#9 ) + [13] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [14] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [15] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [16] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#12 ) + [16] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [17] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( bsearch16u::@9/(byte) bsearch16u::num#10 ) + [18] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [19] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#14 ← phi( ) + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#13 ← phi( ) + [20] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#13 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [21] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#14 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@12: scope:[] from @4 + to:@15 +init_squares: scope:[init_squares] from init_dist_screen + [22] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [23] call malloc + [24] (void*) malloc::return#2 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [25] (void*~) init_squares::$1 ← (void*) malloc::return#2 + [26] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [27] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [28] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [29] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [29] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [29] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [30] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [31] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [32] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [33] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [34] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [35] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [36] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [37] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [38] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [39] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [40] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [41] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [42] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [43] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [44] call bsearch16u + [45] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [46] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [47] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [48] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [49] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [50] return + to:@return +@15: scope:[] from @12 + to:@20 +init_font_hex: scope:[init_font_hex] from main + to:init_font_hex::@1 +init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 + [51] (byte) init_font_hex::c#6 ← phi( init_font_hex/(const byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [51] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) + [51] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) init_font_hex::charset#1 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + to:init_font_hex::@2 +init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 + [52] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(const byte) init_font_hex::c1#0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [52] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte*) init_font_hex::proto_lo#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) + [52] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) + [53] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [54] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 + to:init_font_hex::@3 +init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 + [55] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) init_font_hex::idx#1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [55] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(const byte) init_font_hex::i#0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [56] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [57] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [58] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [59] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [60] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [61] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [62] if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 + to:init_font_hex::@4 +init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 + [63] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [64] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [66] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [67] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [68] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [69] if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 + to:init_font_hex::@5 +init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 + [70] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [71] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [72] if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 + to:init_font_hex::@return +init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 + [73] return + to:@return +@20: scope:[] from @15 + to:@39 +clock: scope:[clock] from main::@5 + [74] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [75] return + to:@return +clock_start: scope:[clock_start] from main::@1 + [76] (byte~) clock_start::$0 ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [77] (byte~) clock_start::$1 ← (byte~) clock_start::$0 + [78] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$1 + [79] (byte~) clock_start::$2 ← (byte~) clock_start::$0 + [80] (byte~) clock_start::$3 ← (byte~) clock_start::$2 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [81] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [82] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [83] (byte~) clock_start::$4 ← (const byte) CIA_TIMER_CONTROL_START#0 + [84] (byte~) clock_start::$5 ← (byte~) clock_start::$4 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [85] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [86] (byte~) clock_start::$6 ← (byte~) clock_start::$4 + [87] (byte~) clock_start::$7 ← (byte~) clock_start::$6 + [88] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$7 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [89] return + to:@return +print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 + [90] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) + [90] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) + [91] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 + [92] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 + [93] call print_byte_at + to:print_word_at::@1 +print_word_at::@1: scope:[print_word_at] from print_word_at + [94] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 + [95] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 + [96] call print_byte_at + to:print_word_at::@2 +print_word_at::@2: scope:[print_word_at] from print_word_at::@1 + to:print_word_at::@return +print_word_at::@return: scope:[print_word_at] from print_word_at::@2 + [97] return + to:@return +print_dword_at: scope:[print_dword_at] from main::@6 + [98] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 + [99] call print_word_at + to:print_dword_at::@1 +print_dword_at::@1: scope:[print_dword_at] from print_dword_at + [100] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 + [101] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 + [102] call print_word_at + to:print_dword_at::@2 +print_dword_at::@2: scope:[print_dword_at] from print_dword_at::@1 + to:print_dword_at::@return +print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 + [103] return + to:@return +@39: scope:[] from @20 + to:@46 +print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 + [104] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) + [104] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) + [105] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 + [106] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) + [107] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 + [108] call print_char_at + to:print_byte_at::@1 +print_byte_at::@1: scope:[print_byte_at] from print_byte_at + [109] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f + [110] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 + [111] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2) + [112] call print_char_at + to:print_byte_at::@2 +print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 + to:print_byte_at::@return +print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 + [113] return + to:@return +print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 + [114] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) + [114] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) + [115] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 + to:print_char_at::@return +print_char_at::@return: scope:[print_char_at] from print_char_at + [116] return + to:@return +@46: scope:[] from @39 + to:@48 +main: scope:[main] from @48 + [117] call init_font_hex + to:main::@3 +main::@3: scope:[main] from main + to:main::toD0181 +main::toD0181: scope:[main] from main::@3 + [118] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 + [119] (word~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff + [120] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [121] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [122] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 + [123] (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + [124] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [125] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [126] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@1 +main::@1: scope:[main] from main::toD0181_@return + [127] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [128] call clock_start + to:main::@4 +main::@4: scope:[main] from main::@1 + [129] call init_dist_screen + to:main::@5 +main::@5: scope:[main] from main::@4 + [130] call clock + [131] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@6 +main::@6: scope:[main] from main::@5 + [132] (dword~) main::$4 ← (dword) clock::return#2 + [133] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 + [134] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 + [135] call print_dword_at + to:main::@7 +main::@7: scope:[main] from main::@6 + to:main::toD0182 +main::toD0182: scope:[main] from main::@7 + [136] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::BASE_SCREEN#0 + [137] (word~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (word) $3fff + [138] (word~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 + [139] (byte~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 + [140] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::BASE_CHARSET#0 + [141] (byte~) main::toD0182_$5#0 ← > (word~) main::toD0182_$4#0 + [142] (byte~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 + [143] (byte~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f + [144] (byte) main::toD0182_return#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + to:main::@2 +main::@2: scope:[main] from main::toD0182_@return + [145] *((const byte*) D018#0) ← (byte) main::toD0182_return#0 + to:main::@return +main::@return: scope:[main] from main::@2 + [146] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main::@4 + [147] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [148] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [149] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [149] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(const byte*) init_dist_screen::screen#0 ) + [149] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [150] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [151] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [152] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [153] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [154] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [155] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [156] call sqr + [157] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [158] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [159] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [159] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [160] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [161] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [162] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [163] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [164] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [165] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [166] call sqr + [167] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [168] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [169] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [170] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [171] call sqrt + [172] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [173] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [174] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [175] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [176] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [177] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [178] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [179] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [180] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [181] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [182] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [183] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [184] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [185] return + to:@return +@48: scope:[] from @46 + [186] call main + to:@49 +@49: scope:[] from @48 + to:@end +@end: scope:[] from @49 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 5 in if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 @@ -2172,14 +2934,22 @@ Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte) bsearch16u::num#0 = (byte) bsearch16u::num#3 +Alias (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 +Alias (byte) bsearch16u::num#10 = (byte) bsearch16u::num#9 (byte) bsearch16u::num#11 +Alias (word*) bsearch16u::items#10 = (word*) bsearch16u::items#12 +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#14 (word*) bsearch16u::items#13 Alias (byte~) clock_start::$1 = (byte~) clock_start::$0 (byte~) clock_start::$2 Alias (byte~) clock_start::$6 = (byte~) clock_start::$4 (byte~) clock_start::$7 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [22] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [28] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 -Constant right-side identified [54] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 -Constant right-side identified [101] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 -Constant right-side identified [148] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 +Identical Phi Values (byte) bsearch16u::num#12 (const byte) bsearch16u::num#2 +Identical Phi Values (word*) bsearch16u::items#15 (word*) bsearch16u::items#1 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [28] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD +Constant right-side identified [34] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 +Constant right-side identified [60] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 +Constant right-side identified [107] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 +Constant right-side identified [154] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 @@ -2193,9 +2963,12 @@ Constant (const word) main::toD0182_$0#0 = (word)main::BASE_SCREEN#0 Constant (const word) main::toD0182_$4#0 = (word)main::BASE_CHARSET#0 Constant (const byte*) init_dist_screen::screen_bottomline#0 = init_dist_screen::screen#0+(word)$28*$18 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [35] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [36] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 in [80] (byte~) clock_start::$3 ← (const byte) clock_start::$1 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Removing PHI-reference to removed block (bsearch16u::@6_1) in block bsearch16u::@8 +if() condition always true - replacing block destination [194] if((const byte) bsearch16u::num#2>(byte) 0) goto bsearch16u::@7 +Successful SSA optimization Pass2ConstantIfs +Resolved ranged next value [41] init_squares::i#1 ← ++ init_squares::i#2 to ++ +Resolved ranged comparison value [42] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 in [86] (byte~) clock_start::$3 ← (const byte) clock_start::$1 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Successful SSA optimization PassNSimplifyExpressionWithZero Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 @@ -2205,12 +2978,14 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#2 +Successful SSA optimization Pass2AliasElimination Constant right-side identified [0] (byte*) malloc::mem#0 ← (const byte*) HEAP_TOP#0 - (const word) malloc::size#0 -Constant right-side identified [77] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -Constant right-side identified [108] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [111] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 -Constant right-side identified [124] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff -Constant right-side identified [127] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 +Constant right-side identified [78] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Constant right-side identified [109] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [112] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [125] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff +Constant right-side identified [128] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) malloc::mem#0 = HEAP_TOP#0-malloc::size#0 Constant (const byte) clock_start::$3 = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -2341,7 +3116,8 @@ Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Successful SSA optimization Pass2ConstantInlining Simplifying constant integer increment ++0 Successful SSA optimization Pass2ConstantSimplification -Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) +Added new block during phi lifting bsearch16u::@18(between bsearch16u::@6 and bsearch16u::@7) +Added new block during phi lifting bsearch16u::@19(between bsearch16u::@9 and bsearch16u::@10) Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2) @@ -2373,6 +3149,7 @@ Adding NOP phi() at start of print_byte_at::@2 Adding NOP phi() at start of init_dist_screen Adding NOP phi() at start of init_dist_screen::@15 Adding NOP phi() at start of bsearch16u +Adding NOP phi() at start of bsearch16u::@6_1 Adding NOP phi() at start of init_squares Adding NOP phi() at start of init_squares::@3 Adding NOP phi() at start of malloc @@ -2385,7 +3162,7 @@ Calls in [print_word_at] to print_byte_at:45 print_byte_at:50 Calls in [print_byte_at] to print_char_at:59 print_char_at:65 Calls in [init_dist_screen] to init_squares:74 sqr:84 sqr:95 sqrt:100 Calls in [sqrt] to bsearch16u:125 -Calls in [init_squares] to malloc:165 +Calls in [init_squares] to malloc:166 Created 31 initial phi equivalence classes Coalesced [33] print_word_at::w#4 ← print_word_at::w#0 @@ -2409,28 +3186,28 @@ Coalesced [118] init_dist_screen::x#8 ← init_dist_screen::x#1 Coalesced [119] init_dist_screen::xb#8 ← init_dist_screen::xb#1 Coalesced [121] init_dist_screen::xd#1 ← init_dist_screen::$15 Coalesced [123] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [137] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [139] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [142] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [148] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [152] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [153] bsearch16u::items#11 ← bsearch16u::items#0 -Coalesced [156] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [157] bsearch16u::items#10 ← bsearch16u::items#8 -Coalesced [158] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [159] bsearch16u::items#12 ← bsearch16u::items#2 -Coalesced [176] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [177] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [178] init_squares::i#3 ← init_squares::i#1 -Coalesced [189] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [211] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [212] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [213] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [214] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [215] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [216] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [217] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [218] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced [140] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [146] bsearch16u::num#14 ← bsearch16u::num#1 +Coalesced [147] bsearch16u::items#17 ← bsearch16u::items#0 +Coalesced [153] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [155] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [156] bsearch16u::return#8 ← bsearch16u::items#11 +Coalesced [157] bsearch16u::num#13 ← bsearch16u::num#0 +Not coalescing [158] bsearch16u::items#16 ← bsearch16u::items#11 +Coalesced [159] bsearch16u::num#15 ← bsearch16u::num#10 +Not coalescing [160] bsearch16u::items#18 ← bsearch16u::items#10 +Coalesced [177] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [178] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [179] init_squares::i#3 ← init_squares::i#1 +Coalesced [190] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [212] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [213] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [214] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [215] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [216] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [217] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [218] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [219] init_font_hex::idx#7 ← init_font_hex::idx#2 Coalesced down to 27 phi equivalence classes Culled Empty Block (label) @4 Culled Empty Block (label) @12 @@ -2449,8 +3226,9 @@ Culled Empty Block (label) print_byte_at::@2 Culled Empty Block (label) init_dist_screen::@15 Culled Empty Block (label) init_dist_screen::@19 Culled Empty Block (label) init_dist_screen::@20 +Culled Empty Block (label) bsearch16u::@6_1 +Culled Empty Block (label) bsearch16u::@13 Culled Empty Block (label) bsearch16u::@1 -Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@3 Culled Empty Block (label) init_squares::@4 Culled Empty Block (label) init_font_hex::@7 @@ -2464,8 +3242,9 @@ Renumbering block bsearch16u::@7 to bsearch16u::@4 Renumbering block bsearch16u::@8 to bsearch16u::@5 Renumbering block bsearch16u::@9 to bsearch16u::@6 Renumbering block bsearch16u::@10 to bsearch16u::@7 -Renumbering block bsearch16u::@13 to bsearch16u::@8 -Renumbering block bsearch16u::@15 to bsearch16u::@9 +Renumbering block bsearch16u::@15 to bsearch16u::@8 +Renumbering block bsearch16u::@18 to bsearch16u::@9 +Renumbering block bsearch16u::@19 to bsearch16u::@10 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block main::@4 to main::@3 Renumbering block main::@5 to main::@4 @@ -2676,131 +3455,134 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [96] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [97] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(const word*) SQUARES#1 ) + [97] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [103] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [104] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [107] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [108] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#18 ) + [108] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [109] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [97] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [97] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [110] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [101] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [113] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [102] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [103] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [113] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [113] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [115] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) + [116] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [118] return + [119] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [119] phi() - [120] call malloc + [120] phi() + [121] call malloc to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [121] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [121] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [121] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) - [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [122] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) + [122] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) + [122] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) + [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [126] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [128] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [129] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [129] return + [130] return to:@return malloc: scope:[malloc] from init_squares - [130] phi() + [131] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc - [131] return + [132] return to:@return clock_start: scope:[clock_start] from main::@1 - [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start - [137] return + [138] return to:@return init_font_hex: scope:[init_font_hex] from main - [138] phi() + [139] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [139] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [139] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) - [139] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [140] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [140] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) + [140] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [140] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [140] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) - [140] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) - [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [141] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [141] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) + [141] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) + [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [142] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [142] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [143] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [143] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [146] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [147] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [148] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [149] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [150] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [152] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [156] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [157] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [159] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [160] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [160] return + [161] return to:@return @@ -2827,24 +3609,25 @@ VARIABLE REGISTER WEIGHTS (byte~) bsearch16u::$6 2002.0 (word*) bsearch16u::items (word*) bsearch16u::items#0 1001.0 -(word*) bsearch16u::items#2 334.33333333333337 -(word*) bsearch16u::items#8 1501.5 +(word*) bsearch16u::items#10 429.0 +(word*) bsearch16u::items#11 752.25 +(word*~) bsearch16u::items#16 2002.0 +(word*~) bsearch16u::items#18 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 0.2857142857142857 +(word) bsearch16u::key#0 0.25 (byte) bsearch16u::num -(byte) bsearch16u::num#0 2002.0 +(byte) bsearch16u::num#0 1001.0 (byte) bsearch16u::num#1 2002.0 -(byte) bsearch16u::num#3 556.1111111111111 +(byte) bsearch16u::num#10 444.8888888888889 (byte) bsearch16u::num#5 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 501.0 +(word*) bsearch16u::pivot#0 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 2.0 +(word*) bsearch16u::return#1 335.00000000000006 (word*) bsearch16u::return#2 6.0 (word*) bsearch16u::return#3 4.0 -(word*~) bsearch16u::return#6 4.0 (dword()) clock() (dword) clock::return (dword) clock::return#0 1.3333333333333333 @@ -3029,8 +3812,9 @@ Initial phi equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 ] @@ -3067,7 +3851,6 @@ Added variable sqrt::$1 to zero page equivalence class [ sqrt::$1 ] Added variable sqrt::return#0 to zero page equivalence class [ sqrt::return#0 ] Added variable bsearch16u::$6 to zero page equivalence class [ bsearch16u::$6 ] Added variable bsearch16u::$16 to zero page equivalence class [ bsearch16u::$16 ] -Added variable bsearch16u::pivot#0 to zero page equivalence class [ bsearch16u::pivot#0 ] Added variable bsearch16u::result#0 to zero page equivalence class [ bsearch16u::result#0 ] Added variable sqr::$0 to zero page equivalence class [ sqr::$0 ] Added variable sqr::return#0 to zero page equivalence class [ sqr::return#0 ] @@ -3091,8 +3874,9 @@ Complete equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 ] @@ -3129,7 +3913,6 @@ Complete equivalence classes [ sqrt::return#0 ] [ bsearch16u::$6 ] [ bsearch16u::$16 ] -[ bsearch16u::pivot#0 ] [ bsearch16u::result#0 ] [ sqr::$0 ] [ sqr::return#0 ] @@ -3152,45 +3935,45 @@ Allocated zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_ Allocated zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Allocated zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Allocated zp ZP_BYTE:22 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -Allocated zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -Allocated zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Allocated zp ZP_BYTE:26 [ sqr::val#2 sqr::val#0 sqr::val#1 ] -Allocated zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] -Allocated zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] -Allocated zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_DWORD:42 [ clock::return#2 ] -Allocated zp ZP_DWORD:46 [ main::$4 ] -Allocated zp ZP_DWORD:50 [ main::cyclecount#0 ] -Allocated zp ZP_DWORD:54 [ print_dword_at::dw#0 ] -Allocated zp ZP_BYTE:58 [ print_byte_at::$0 ] -Allocated zp ZP_BYTE:59 [ print_byte_at::$2 ] -Allocated zp ZP_DWORD:60 [ clock::return#0 ] -Allocated zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] -Allocated zp ZP_WORD:65 [ sqr::return#2 ] -Allocated zp ZP_WORD:67 [ init_dist_screen::yds#0 ] -Allocated zp ZP_BYTE:69 [ init_dist_screen::x2#0 ] -Allocated zp ZP_WORD:70 [ sqr::return#3 ] -Allocated zp ZP_WORD:72 [ init_dist_screen::xds#0 ] -Allocated zp ZP_WORD:74 [ init_dist_screen::ds#0 ] -Allocated zp ZP_WORD:76 [ sqrt::val#0 ] -Allocated zp ZP_BYTE:78 [ sqrt::return#2 ] -Allocated zp ZP_BYTE:79 [ init_dist_screen::d#0 ] -Allocated zp ZP_WORD:80 [ bsearch16u::key#0 ] -Allocated zp ZP_WORD:82 [ bsearch16u::return#3 ] -Allocated zp ZP_WORD:84 [ sqrt::found#0 ] -Allocated zp ZP_WORD:86 [ sqrt::$3 ] -Allocated zp ZP_WORD:88 [ sqrt::$1 ] -Allocated zp ZP_BYTE:90 [ sqrt::return#0 ] -Allocated zp ZP_BYTE:91 [ bsearch16u::$6 ] -Allocated zp ZP_BYTE:92 [ bsearch16u::$16 ] -Allocated zp ZP_WORD:93 [ bsearch16u::pivot#0 ] +Allocated zp ZP_WORD:23 [ bsearch16u::items#10 bsearch16u::items#16 ] +Allocated zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 ] +Allocated zp ZP_BYTE:27 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Allocated zp ZP_BYTE:28 [ sqr::val#2 sqr::val#0 sqr::val#1 ] +Allocated zp ZP_WORD:29 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp ZP_WORD:31 [ init_squares::squares#2 init_squares::squares#1 ] +Allocated zp ZP_BYTE:33 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp ZP_WORD:34 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated zp ZP_WORD:37 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated zp ZP_WORD:39 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated zp ZP_BYTE:42 [ init_font_hex::i#2 init_font_hex::i#1 ] +Allocated zp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated zp ZP_DWORD:44 [ clock::return#2 ] +Allocated zp ZP_DWORD:48 [ main::$4 ] +Allocated zp ZP_DWORD:52 [ main::cyclecount#0 ] +Allocated zp ZP_DWORD:56 [ print_dword_at::dw#0 ] +Allocated zp ZP_BYTE:60 [ print_byte_at::$0 ] +Allocated zp ZP_BYTE:61 [ print_byte_at::$2 ] +Allocated zp ZP_DWORD:62 [ clock::return#0 ] +Allocated zp ZP_BYTE:66 [ init_dist_screen::y2#0 ] +Allocated zp ZP_WORD:67 [ sqr::return#2 ] +Allocated zp ZP_WORD:69 [ init_dist_screen::yds#0 ] +Allocated zp ZP_BYTE:71 [ init_dist_screen::x2#0 ] +Allocated zp ZP_WORD:72 [ sqr::return#3 ] +Allocated zp ZP_WORD:74 [ init_dist_screen::xds#0 ] +Allocated zp ZP_WORD:76 [ init_dist_screen::ds#0 ] +Allocated zp ZP_WORD:78 [ sqrt::val#0 ] +Allocated zp ZP_BYTE:80 [ sqrt::return#2 ] +Allocated zp ZP_BYTE:81 [ init_dist_screen::d#0 ] +Allocated zp ZP_WORD:82 [ bsearch16u::key#0 ] +Allocated zp ZP_WORD:84 [ bsearch16u::return#3 ] +Allocated zp ZP_WORD:86 [ sqrt::found#0 ] +Allocated zp ZP_WORD:88 [ sqrt::$3 ] +Allocated zp ZP_WORD:90 [ sqrt::$1 ] +Allocated zp ZP_BYTE:92 [ sqrt::return#0 ] +Allocated zp ZP_BYTE:93 [ bsearch16u::$6 ] +Allocated zp ZP_BYTE:94 [ bsearch16u::$16 ] Allocated zp ZP_WORD:95 [ bsearch16u::result#0 ] Allocated zp ZP_BYTE:97 [ sqr::$0 ] Allocated zp ZP_WORD:98 [ sqr::return#0 ] @@ -3255,10 +4038,10 @@ main: { .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f - .label _4 = $2e - .label cyclecount = $32 + .label _4 = $30 + .label cyclecount = $34 // [5] call init_font_hex - // [138] phi from main to init_font_hex [phi:main->init_font_hex] + // [139] phi from main to init_font_hex [phi:main->init_font_hex] init_font_hex_from_main: jsr init_font_hex // [6] phi from main to main::toD0181 [phi:main->main::toD0181] @@ -3355,9 +4138,9 @@ main: { } // print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($36) dw) +// print_dword_at(dword zeropage($38) dw) print_dword_at: { - .label dw = $36 + .label dw = $38 // [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 -- vwuz1=_hi_vduz2 lda dw+2 sta print_word_at.w @@ -3447,8 +4230,8 @@ print_word_at: { // Print a byte as HEX at a specific position // print_byte_at(byte zeropage(6) b, byte* zeropage(9) at) print_byte_at: { - .label _0 = $3a - .label _2 = $3b + .label _0 = $3c + .label _2 = $3d .label b = 6 .label at = 9 // [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 @@ -3524,8 +4307,8 @@ print_char_at: { // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { - .label return = $3c - .label return_2 = $2a + .label return = $3e + .label return_2 = $2c // [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -3554,21 +4337,21 @@ init_dist_screen: { .label _7 = $13 .label _13 = $16 .label _15 = $16 - .label y2 = $40 + .label y2 = $42 .label yd = $13 - .label yds = $43 - .label x2 = $45 + .label yds = $45 + .label x2 = $47 .label xd = $16 - .label xds = $48 - .label ds = $4a - .label d = $4f + .label xds = $4a + .label ds = $4c + .label d = $51 .label x = $14 .label xb = $15 .label screen_topline = $f .label screen_bottomline = $11 .label y = $e // [50] call init_squares - // [119] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [120] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares // [51] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] @@ -3622,9 +4405,9 @@ init_dist_screen: { lda yd sta sqr.val // [57] call sqr - // [115] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [116] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [115] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [116] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [58] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -3682,9 +4465,9 @@ init_dist_screen: { lda xd sta sqr.val // [66] call sqr - // [115] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [116] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [115] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [116] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [67] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -3796,14 +4579,14 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($4c) val) +// sqrt(word zeropage($4e) val) sqrt: { - .label _1 = $58 - .label _3 = $56 - .label found = $54 - .label return = $5a - .label val = $4c - .label return_2 = $4e + .label _1 = $5a + .label _3 = $58 + .label found = $56 + .label return = $5c + .label val = $4e + .label return_2 = $50 // [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 lda val sta bsearch16u.key @@ -3856,38 +4639,115 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($50) key, word* zeropage($17) items, byte zeropage($19) num) +// bsearch16u(word zeropage($52) key, word* zeropage($19) items, byte zeropage($1b) num) bsearch16u: { - .label _2 = $17 - .label _6 = $5b - .label _16 = $5c - .label pivot = $5d + .label _2 = $19 + .label _6 = $5d + .label _16 = $5e + .label pivot = $19 .label result = $5f - .label return = $17 - .label num = $19 - .label items = $17 - .label key = $50 - .label return_3 = $52 - // [97] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [97] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + .label return = $19 + .label num = $1b + .label items = $19 + .label key = $52 + .label return_3 = $54 + .label items_10 = $17 + .label items_16 = $17 + // [97] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [97] phi (word*) bsearch16u::items#10 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@4#0] -- pwuz1=pwuc1 lda #<SQUARES - sta items + sta items_10 lda #>SQUARES - sta items+1 - // [97] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 + sta items_10+1 + // [97] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuz1=vbuc1 lda #NUM_SQUARES sta num + jmp b4 + // bsearch16u::@4 + b4: + // [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + lda num + lsr + sta _6 + // [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda _6 + asl + sta _16 + // [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 + lda _16 + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [103] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [103] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [104] return + rts + // bsearch16u::@6 + b6: + // [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [107] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuz1=_dec_vbuz1 + dec num + // [108] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [108] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#18 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [108] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [109] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr num jmp b3 // bsearch16u::@3 b3: - // [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 + // [110] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuz1_gt_0_then_la1 lda num - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -3901,7 +4761,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -3909,117 +4769,50 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [101] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [113] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [101] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [113] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [102] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [102] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [103] return - rts - // bsearch16u::@4 - b4: - // [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 - lda num - lsr - sta _6 - // [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda _6 - asl - sta _16 - // [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 - lda _16 - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [97] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [97] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [97] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 - dec num - // [113] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [113] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [113] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 - lsr num - // [97] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [97] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [97] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte zeropage($1a) val) +// sqr(byte zeropage($1c) val) sqr: { .label _0 = $61 .label return = $62 - .label val = $1a - .label return_2 = $41 - .label return_3 = $46 - // [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label val = $1c + .label return_2 = $43 + .label return_3 = $48 + // [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda val asl sta _0 - // [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuz2 + // [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuz2 ldy _0 lda SQUARES,y sta return @@ -4028,7 +4821,7 @@ sqr: { jmp breturn // sqr::@return breturn: - // [118] return + // [119] return rts } // init_squares @@ -4037,45 +4830,45 @@ sqr: { init_squares: { .label _3 = $64 .label _4 = $65 - .label squares = $1d - .label sqr = $1b - .label i = $1f - // [120] call malloc - // [130] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $1f + .label sqr = $1d + .label i = $21 + // [121] call malloc + // [131] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: jsr malloc - // [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + // [122] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] b1_from_init_squares: - // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuz1=vbuc1 + // [122] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + // [122] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #<SQUARES sta squares lda #>SQUARES sta squares+1 - // [121] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + // [122] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [122] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [122] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [122] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [122] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -4083,15 +4876,15 @@ init_squares: { bcc !+ inc squares+1 !: - // [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _3 - // [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [126] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy _3 iny sty _4 - // [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda _4 clc adc sqr @@ -4099,16 +4892,16 @@ init_squares: { bcc !+ inc sqr+1 !: - // [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [128] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc i - // [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 + // [129] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_SQUARES-1+1 cmp i bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [129] return + // [130] return rts } // malloc @@ -4121,21 +4914,21 @@ malloc: { jmp breturn // malloc::@return breturn: - // [131] return + // [132] return rts } // clock_start // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { - // [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #CIA_TIMER_CONTROL_CONTINUOUS sta CIA2_TIMER_A_CONTROL - // [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + // [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -4144,98 +4937,98 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - // [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + // [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL jmp breturn // clock_start::@return breturn: - // [137] return + // [138] return rts } // init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($23) charset) +// init_font_hex(byte* zeropage($25) charset) init_font_hex: { .label _0 = $66 .label _1 = $67 .label _2 = $68 - .label idx = $29 - .label i = $28 + .label idx = $2b + .label i = $2a .label idx_3 = $69 - .label proto_lo = $25 - .label charset = $23 - .label c1 = $27 - .label proto_hi = $20 - .label c = $22 - // [139] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label proto_lo = $27 + .label charset = $25 + .label c1 = $29 + .label proto_hi = $22 + .label c = $24 + // [140] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - // [139] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + // [140] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - // [139] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + // [140] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #<FONT_HEX_PROTO sta proto_hi lda #>FONT_HEX_PROTO sta proto_hi+1 - // [139] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + // [140] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #<CHARSET sta charset lda #>CHARSET sta charset+1 jmp b1 - // [139] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + // [140] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - // [139] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - // [139] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - // [139] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + // [140] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + // [140] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + // [140] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy jmp b1 // init_font_hex::@1 b1: - // [140] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + // [141] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - // [140] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + // [141] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - // [140] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + // [141] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #<FONT_HEX_PROTO sta proto_lo lda #>FONT_HEX_PROTO sta proto_lo+1 - // [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + // [141] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy jmp b2 - // [140] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + // [141] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - // [140] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - // [140] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - // [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + // [141] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + // [141] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + // [141] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy jmp b2 // init_font_hex::@2 b2: - // [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - // [142] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + // [143] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - // [142] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + // [143] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - // [142] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + // [143] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 lda #0 sta i jmp b3 - // [142] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + // [143] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - // [142] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - // [142] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + // [143] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + // [143] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy jmp b3 // init_font_hex::@3 b3: - // [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuz3_rol_4 + // [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuz3_rol_4 ldy i lda (proto_hi),y asl @@ -4243,43 +5036,43 @@ init_font_hex: { asl asl sta _0 - // [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuz1=pbuz2_derefidx_vbuz3_rol_1 + // [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuz1=pbuz2_derefidx_vbuz3_rol_1 ldy i lda (proto_lo),y asl sta _1 - // [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + // [146] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 lda _0 ora _1 sta _2 - // [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + // [147] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 lda _2 ldy idx sta (charset),y - // [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + // [148] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - // [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + // [149] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - // [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + // [150] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp i bne b3_from_b3 jmp b4 // init_font_hex::@4 b4: - // [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + // [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - // [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + // [152] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - // [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + // [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx_3 sta (charset),y - // [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + // [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -4287,7 +5080,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - // [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + // [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4295,16 +5088,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - // [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + // [156] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - // [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + // [157] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2_from_b4 jmp b5 // init_font_hex::@5 b5: - // [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + // [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -4312,16 +5105,16 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - // [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + // [159] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - // [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + // [160] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1_from_b5 jmp breturn // init_font_hex::@return breturn: - // [160] return + // [161] return rts } // File Data @@ -4348,7 +5141,7 @@ Statement [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 [ pri Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] Statement [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f [ print_byte_at::at#2 print_byte_at::$2 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::at#2 print_byte_at::$2 ] ) always clobbers reg byte a Statement [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 [ print_byte_at::$2 print_char_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::$2 print_char_at::at#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ print_byte_at::$2 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:61 [ print_byte_at::$2 ] Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a @@ -4373,49 +5166,50 @@ Statement [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::fo Statement [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a Statement [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a Statement [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a -Statement [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Statement [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a -Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] -Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#18 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#18 ] ) always clobbers reg byte a +Statement [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:33 [ init_squares::i#2 init_squares::i#1 ] +Statement [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Statement [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:42 [ init_font_hex::i#2 init_font_hex::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Statement [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:102 [ init_font_hex::$0 ] -Statement [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Statement [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [13] (dword) clock::return#2 ← (dword) clock::return#0 [ clock::return#2 ] ( main:2 [ clock::return#2 ] ) always clobbers reg byte a Statement [14] (dword~) main::$4 ← (dword) clock::return#2 [ main::$4 ] ( main:2 [ main::$4 ] ) always clobbers reg byte a @@ -4445,7 +5239,7 @@ Statement [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_di Statement [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ) always clobbers reg byte a Statement [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ) always clobbers reg byte a Statement [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:79 [ init_dist_screen::d#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:81 [ init_dist_screen::d#0 ] Statement [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y Statement [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y Statement [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ) always clobbers reg byte y @@ -4457,35 +5251,36 @@ Statement [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::fo Statement [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a Statement [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a Statement [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a -Statement [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a -Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Statement [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Statement [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a -Statement [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Statement [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#18 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#18 ] ) always clobbers reg byte a +Statement [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Statement [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Statement [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Statement [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [13] (dword) clock::return#2 ← (dword) clock::return#0 [ clock::return#2 ] ( main:2 [ clock::return#2 ] ) always clobbers reg byte a Statement [14] (dword~) main::$4 ← (dword) clock::return#2 [ main::$4 ] ( main:2 [ main::$4 ] ) always clobbers reg byte a @@ -4526,35 +5321,36 @@ Statement [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::fo Statement [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a Statement [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a Statement [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a -Statement [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a -Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Statement [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Statement [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a -Statement [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Statement [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#18 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#18 ] ) always clobbers reg byte a +Statement [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Statement [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Statement [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Statement [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a Potential registers zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ print_word_at::at#2 ] : zp ZP_WORD:4 , Potential registers zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] : zp ZP_BYTE:6 , reg byte x , @@ -4568,45 +5364,45 @@ Potential registers zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 Potential registers zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:20 , reg byte x , Potential registers zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:21 , reg byte x , Potential registers zp ZP_BYTE:22 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:23 , -Potential registers zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:25 , reg byte x , -Potential registers zp ZP_BYTE:26 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:27 , -Potential registers zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] : zp ZP_WORD:29 , -Potential registers zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:31 , reg byte x , -Potential registers zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:32 , -Potential registers zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:34 , reg byte x , -Potential registers zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:35 , -Potential registers zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:37 , -Potential registers zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:39 , reg byte x , -Potential registers zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:40 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:41 , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:42 [ clock::return#2 ] : zp ZP_DWORD:42 , -Potential registers zp ZP_DWORD:46 [ main::$4 ] : zp ZP_DWORD:46 , -Potential registers zp ZP_DWORD:50 [ main::cyclecount#0 ] : zp ZP_DWORD:50 , -Potential registers zp ZP_DWORD:54 [ print_dword_at::dw#0 ] : zp ZP_DWORD:54 , -Potential registers zp ZP_BYTE:58 [ print_byte_at::$0 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:59 [ print_byte_at::$2 ] : zp ZP_BYTE:59 , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:60 [ clock::return#0 ] : zp ZP_DWORD:60 , -Potential registers zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:65 [ sqr::return#2 ] : zp ZP_WORD:65 , -Potential registers zp ZP_WORD:67 [ init_dist_screen::yds#0 ] : zp ZP_WORD:67 , -Potential registers zp ZP_BYTE:69 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:69 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:70 [ sqr::return#3 ] : zp ZP_WORD:70 , -Potential registers zp ZP_WORD:72 [ init_dist_screen::xds#0 ] : zp ZP_WORD:72 , -Potential registers zp ZP_WORD:74 [ init_dist_screen::ds#0 ] : zp ZP_WORD:74 , -Potential registers zp ZP_WORD:76 [ sqrt::val#0 ] : zp ZP_WORD:76 , -Potential registers zp ZP_BYTE:78 [ sqrt::return#2 ] : zp ZP_BYTE:78 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:79 [ init_dist_screen::d#0 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , -Potential registers zp ZP_WORD:80 [ bsearch16u::key#0 ] : zp ZP_WORD:80 , -Potential registers zp ZP_WORD:82 [ bsearch16u::return#3 ] : zp ZP_WORD:82 , -Potential registers zp ZP_WORD:84 [ sqrt::found#0 ] : zp ZP_WORD:84 , -Potential registers zp ZP_WORD:86 [ sqrt::$3 ] : zp ZP_WORD:86 , -Potential registers zp ZP_WORD:88 [ sqrt::$1 ] : zp ZP_WORD:88 , -Potential registers zp ZP_BYTE:90 [ sqrt::return#0 ] : zp ZP_BYTE:90 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:91 [ bsearch16u::$6 ] : zp ZP_BYTE:91 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:92 [ bsearch16u::$16 ] : zp ZP_BYTE:92 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:93 [ bsearch16u::pivot#0 ] : zp ZP_WORD:93 , +Potential registers zp ZP_WORD:23 [ bsearch16u::items#10 bsearch16u::items#16 ] : zp ZP_WORD:23 , +Potential registers zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 ] : zp ZP_WORD:25 , +Potential registers zp ZP_BYTE:27 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] : zp ZP_BYTE:27 , reg byte x , +Potential registers zp ZP_BYTE:28 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:29 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:29 , +Potential registers zp ZP_WORD:31 [ init_squares::squares#2 init_squares::squares#1 ] : zp ZP_WORD:31 , +Potential registers zp ZP_BYTE:33 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:33 , reg byte x , +Potential registers zp ZP_WORD:34 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:34 , +Potential registers zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:36 , reg byte x , +Potential registers zp ZP_WORD:37 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:37 , +Potential registers zp ZP_WORD:39 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:39 , +Potential registers zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:41 , reg byte x , +Potential registers zp ZP_BYTE:42 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:42 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:43 , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:44 [ clock::return#2 ] : zp ZP_DWORD:44 , +Potential registers zp ZP_DWORD:48 [ main::$4 ] : zp ZP_DWORD:48 , +Potential registers zp ZP_DWORD:52 [ main::cyclecount#0 ] : zp ZP_DWORD:52 , +Potential registers zp ZP_DWORD:56 [ print_dword_at::dw#0 ] : zp ZP_DWORD:56 , +Potential registers zp ZP_BYTE:60 [ print_byte_at::$0 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:61 [ print_byte_at::$2 ] : zp ZP_BYTE:61 , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:62 [ clock::return#0 ] : zp ZP_DWORD:62 , +Potential registers zp ZP_BYTE:66 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:67 [ sqr::return#2 ] : zp ZP_WORD:67 , +Potential registers zp ZP_WORD:69 [ init_dist_screen::yds#0 ] : zp ZP_WORD:69 , +Potential registers zp ZP_BYTE:71 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:72 [ sqr::return#3 ] : zp ZP_WORD:72 , +Potential registers zp ZP_WORD:74 [ init_dist_screen::xds#0 ] : zp ZP_WORD:74 , +Potential registers zp ZP_WORD:76 [ init_dist_screen::ds#0 ] : zp ZP_WORD:76 , +Potential registers zp ZP_WORD:78 [ sqrt::val#0 ] : zp ZP_WORD:78 , +Potential registers zp ZP_BYTE:80 [ sqrt::return#2 ] : zp ZP_BYTE:80 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:81 [ init_dist_screen::d#0 ] : zp ZP_BYTE:81 , reg byte a , reg byte x , +Potential registers zp ZP_WORD:82 [ bsearch16u::key#0 ] : zp ZP_WORD:82 , +Potential registers zp ZP_WORD:84 [ bsearch16u::return#3 ] : zp ZP_WORD:84 , +Potential registers zp ZP_WORD:86 [ sqrt::found#0 ] : zp ZP_WORD:86 , +Potential registers zp ZP_WORD:88 [ sqrt::$3 ] : zp ZP_WORD:88 , +Potential registers zp ZP_WORD:90 [ sqrt::$1 ] : zp ZP_WORD:90 , +Potential registers zp ZP_BYTE:92 [ sqrt::return#0 ] : zp ZP_BYTE:92 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:93 [ bsearch16u::$6 ] : zp ZP_BYTE:93 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:94 [ bsearch16u::$16 ] : zp ZP_BYTE:94 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:95 [ bsearch16u::result#0 ] : zp ZP_WORD:95 , Potential registers zp ZP_BYTE:97 [ sqr::$0 ] : zp ZP_BYTE:97 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:98 [ sqr::return#0 ] : zp ZP_WORD:98 , @@ -4618,102 +5414,102 @@ Potential registers zp ZP_BYTE:104 [ init_font_hex::$2 ] : zp ZP_BYTE:104 , reg Potential registers zp ZP_BYTE:105 [ init_font_hex::idx#3 ] : zp ZP_BYTE:105 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,852.83: zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:91 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:92 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:95 [ bsearch16u::result#0 ] 501: zp ZP_WORD:93 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:82 [ bsearch16u::return#3 ] 0.29: zp ZP_WORD:80 [ bsearch16u::key#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:103 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:104 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:102 [ init_font_hex::$0 ] 202: zp ZP_BYTE:105 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:22 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:69 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:72 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:74 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:79 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] 17.47: zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.12: zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] 12.5: zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] 4.87: zp ZP_WORD:67 [ init_dist_screen::yds#0 ] -Uplift Scope [sqr] 338: zp ZP_BYTE:26 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:70 [ sqr::return#3 ] 28.5: zp ZP_WORD:98 [ sqr::return#0 ] 22: zp ZP_WORD:65 [ sqr::return#2 ] 4: zp ZP_BYTE:97 [ sqr::$0 ] -Uplift Scope [sqrt] 202: zp ZP_BYTE:78 [ sqrt::return#2 ] 103: zp ZP_WORD:76 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:90 [ sqrt::return#0 ] 4: zp ZP_WORD:84 [ sqrt::found#0 ] 4: zp ZP_WORD:86 [ sqrt::$3 ] 2: zp ZP_WORD:88 [ sqrt::$1 ] -Uplift Scope [init_squares] 22: zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:100 [ init_squares::$3 ] 22: zp ZP_BYTE:101 [ init_squares::$4 ] 20.17: zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] 13.93: zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [bsearch16u] 6,450.89: zp ZP_BYTE:27 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] 4,851: zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 ] 2,431: zp ZP_WORD:23 [ bsearch16u::items#10 bsearch16u::items#16 ] 2,002: zp ZP_BYTE:93 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:94 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:95 [ bsearch16u::result#0 ] 4: zp ZP_WORD:84 [ bsearch16u::return#3 ] 0.25: zp ZP_WORD:82 [ bsearch16u::key#0 ] +Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:42 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:103 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:104 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:102 [ init_font_hex::$0 ] 202: zp ZP_BYTE:105 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:37 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:39 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:34 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:22 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:71 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:74 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:76 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:81 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:66 [ init_dist_screen::y2#0 ] 17.47: zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.12: zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] 12.5: zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] 4.87: zp ZP_WORD:69 [ init_dist_screen::yds#0 ] +Uplift Scope [sqr] 338: zp ZP_BYTE:28 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:72 [ sqr::return#3 ] 28.5: zp ZP_WORD:98 [ sqr::return#0 ] 22: zp ZP_WORD:67 [ sqr::return#2 ] 4: zp ZP_BYTE:97 [ sqr::$0 ] +Uplift Scope [sqrt] 202: zp ZP_BYTE:80 [ sqrt::return#2 ] 103: zp ZP_WORD:78 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:92 [ sqrt::return#0 ] 4: zp ZP_WORD:86 [ sqrt::found#0 ] 4: zp ZP_WORD:88 [ sqrt::$3 ] 2: zp ZP_WORD:90 [ sqrt::$1 ] +Uplift Scope [init_squares] 22: zp ZP_BYTE:33 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:100 [ init_squares::$3 ] 22: zp ZP_BYTE:101 [ init_squares::$4 ] 20.17: zp ZP_WORD:31 [ init_squares::squares#2 init_squares::squares#1 ] 13.93: zp ZP_WORD:29 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplift Scope [print_char_at] 12: zp ZP_BYTE:11 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] 12: zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] -Uplift Scope [print_byte_at] 9.33: zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] 5.6: zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] 4: zp ZP_BYTE:58 [ print_byte_at::$0 ] 2: zp ZP_BYTE:59 [ print_byte_at::$2 ] +Uplift Scope [print_byte_at] 9.33: zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] 5.6: zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] 4: zp ZP_BYTE:60 [ print_byte_at::$0 ] 2: zp ZP_BYTE:61 [ print_byte_at::$2 ] Uplift Scope [print_word_at] 10: zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] 0.8: zp ZP_WORD:4 [ print_word_at::at#2 ] -Uplift Scope [main] 4: zp ZP_DWORD:46 [ main::$4 ] 4: zp ZP_DWORD:50 [ main::cyclecount#0 ] -Uplift Scope [clock] 4: zp ZP_DWORD:42 [ clock::return#2 ] 1.33: zp ZP_DWORD:60 [ clock::return#0 ] -Uplift Scope [print_dword_at] 2: zp ZP_DWORD:54 [ print_dword_at::dw#0 ] +Uplift Scope [main] 4: zp ZP_DWORD:48 [ main::$4 ] 4: zp ZP_DWORD:52 [ main::cyclecount#0 ] +Uplift Scope [clock] 4: zp ZP_DWORD:44 [ clock::return#2 ] 1.33: zp ZP_DWORD:62 [ clock::return#0 ] +Uplift Scope [print_dword_at] 2: zp ZP_DWORD:56 [ print_dword_at::dw#0 ] Uplift Scope [malloc] Uplift Scope [RADIX] Uplift Scope [clock_start] Uplift Scope [] -Uplifting [bsearch16u] best 263251 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:95 [ bsearch16u::result#0 ] zp ZP_WORD:93 [ bsearch16u::pivot#0 ] zp ZP_WORD:82 [ bsearch16u::return#3 ] zp ZP_WORD:80 [ bsearch16u::key#0 ] -Uplifting [init_font_hex] best 244251 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:102 [ init_font_hex::$0 ] zp ZP_BYTE:105 [ init_font_hex::idx#3 ] zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [bsearch16u] best 289766 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 ] zp ZP_WORD:23 [ bsearch16u::items#10 bsearch16u::items#16 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:95 [ bsearch16u::result#0 ] zp ZP_WORD:84 [ bsearch16u::return#3 ] zp ZP_WORD:82 [ bsearch16u::key#0 ] +Uplifting [init_font_hex] best 270766 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:102 [ init_font_hex::$0 ] zp ZP_BYTE:105 [ init_font_hex::idx#3 ] zp ZP_WORD:37 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:39 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:34 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [init_dist_screen] best 241051 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:72 [ init_dist_screen::xds#0 ] zp ZP_WORD:74 [ init_dist_screen::ds#0 ] zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] zp ZP_WORD:67 [ init_dist_screen::yds#0 ] +Uplifting [init_dist_screen] best 267566 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:74 [ init_dist_screen::xds#0 ] zp ZP_WORD:76 [ init_dist_screen::ds#0 ] zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:66 [ init_dist_screen::y2#0 ] zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] zp ZP_WORD:69 [ init_dist_screen::yds#0 ] Limited combination testing to 100 combinations of 6144 possible. -Uplifting [sqr] best 240714 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:70 [ sqr::return#3 ] zp ZP_WORD:98 [ sqr::return#0 ] zp ZP_WORD:65 [ sqr::return#2 ] reg byte a [ sqr::$0 ] -Uplifting [sqrt] best 239811 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:76 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:84 [ sqrt::found#0 ] zp ZP_WORD:86 [ sqrt::$3 ] zp ZP_WORD:88 [ sqrt::$1 ] -Uplifting [init_squares] best 239611 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplifting [print_char_at] best 239604 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] -Uplifting [print_byte_at] best 239596 combination zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] -Uplifting [print_word_at] best 239596 combination zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] zp ZP_WORD:4 [ print_word_at::at#2 ] -Uplifting [main] best 239596 combination zp ZP_DWORD:46 [ main::$4 ] zp ZP_DWORD:50 [ main::cyclecount#0 ] -Uplifting [clock] best 239596 combination zp ZP_DWORD:42 [ clock::return#2 ] zp ZP_DWORD:60 [ clock::return#0 ] -Uplifting [print_dword_at] best 239596 combination zp ZP_DWORD:54 [ print_dword_at::dw#0 ] -Uplifting [malloc] best 239596 combination -Uplifting [RADIX] best 239596 combination -Uplifting [clock_start] best 239596 combination -Uplifting [] best 239596 combination -Attempting to uplift remaining variables inzp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 239596 combination zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [sqr] best 267229 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:72 [ sqr::return#3 ] zp ZP_WORD:98 [ sqr::return#0 ] zp ZP_WORD:67 [ sqr::return#2 ] reg byte a [ sqr::$0 ] +Uplifting [sqrt] best 266326 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:78 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:86 [ sqrt::found#0 ] zp ZP_WORD:88 [ sqrt::$3 ] zp ZP_WORD:90 [ sqrt::$1 ] +Uplifting [init_squares] best 266126 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:31 [ init_squares::squares#2 init_squares::squares#1 ] zp ZP_WORD:29 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [print_char_at] best 266119 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +Uplifting [print_byte_at] best 266111 combination zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] +Uplifting [print_word_at] best 266111 combination zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] zp ZP_WORD:4 [ print_word_at::at#2 ] +Uplifting [main] best 266111 combination zp ZP_DWORD:48 [ main::$4 ] zp ZP_DWORD:52 [ main::cyclecount#0 ] +Uplifting [clock] best 266111 combination zp ZP_DWORD:44 [ clock::return#2 ] zp ZP_DWORD:62 [ clock::return#0 ] +Uplifting [print_dword_at] best 266111 combination zp ZP_DWORD:56 [ print_dword_at::dw#0 ] +Uplifting [malloc] best 266111 combination +Uplifting [RADIX] best 266111 combination +Uplifting [clock_start] best 266111 combination +Uplifting [] best 266111 combination +Attempting to uplift remaining variables inzp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [init_font_hex] best 266111 combination zp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:102 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 239596 combination zp ZP_BYTE:102 [ init_font_hex::$0 ] +Uplifting [init_font_hex] best 266111 combination zp ZP_BYTE:102 [ init_font_hex::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:105 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 238996 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 238996 combination zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 265511 combination reg byte y [ init_font_hex::idx#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 265511 combination zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Uplifting [init_dist_screen] best 238996 combination zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Uplifting [init_dist_screen] best 265511 combination zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Uplifting [init_dist_screen] best 238996 combination zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Uplifting [init_dist_screen] best 265511 combination zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Uplifting [init_dist_screen] best 238926 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:64 [ init_dist_screen::y2#0 ] -Uplifting [init_dist_screen] best 238826 combination reg byte a [ init_dist_screen::y2#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 238826 combination zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_dist_screen] best 265441 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:66 [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 265341 combination reg byte a [ init_dist_screen::y2#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_font_hex] best 265341 combination zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Uplifting [init_dist_screen] best 238826 combination zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Uplifting [init_dist_screen] best 265341 combination zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] -Uplifting [print_byte_at] best 238826 combination zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Uplifting [print_byte_at] best 265341 combination zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] Coalescing zero page register [ zp ZP_WORD:4 [ print_word_at::at#2 ] ] with [ zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] ] - score: 2 -Coalescing zero page register [ zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:82 [ bsearch16u::return#3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:42 [ clock::return#2 ] ] with [ zp ZP_DWORD:46 [ main::$4 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:42 [ clock::return#2 main::$4 ] ] with [ zp ZP_DWORD:60 [ clock::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:50 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:54 [ print_dword_at::dw#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:65 [ sqr::return#2 ] ] with [ zp ZP_WORD:67 [ init_dist_screen::yds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:70 [ sqr::return#3 ] ] with [ zp ZP_WORD:72 [ init_dist_screen::xds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:70 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:98 [ sqr::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:74 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:76 [ sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:84 [ sqrt::found#0 ] ] with [ zp ZP_WORD:86 [ sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:84 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:42 [ clock::return#2 main::$4 clock::return#0 ] ] with [ zp ZP_DWORD:50 [ main::cyclecount#0 print_dword_at::dw#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:70 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:74 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:88 [ sqrt::$1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:70 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:80 [ bsearch16u::key#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 ] ] with [ zp ZP_WORD:84 [ bsearch16u::return#3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:44 [ clock::return#2 ] ] with [ zp ZP_DWORD:48 [ main::$4 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:44 [ clock::return#2 main::$4 ] ] with [ zp ZP_DWORD:62 [ clock::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:52 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:56 [ print_dword_at::dw#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:67 [ sqr::return#2 ] ] with [ zp ZP_WORD:69 [ init_dist_screen::yds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:72 [ sqr::return#3 ] ] with [ zp ZP_WORD:74 [ init_dist_screen::xds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:72 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:98 [ sqr::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:76 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:78 [ sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:86 [ sqrt::found#0 ] ] with [ zp ZP_WORD:88 [ sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 bsearch16u::return#3 ] ] with [ zp ZP_WORD:86 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:44 [ clock::return#2 main::$4 clock::return#0 ] ] with [ zp ZP_DWORD:52 [ main::cyclecount#0 print_dword_at::dw#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:72 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:76 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:90 [ sqrt::$1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:72 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:82 [ bsearch16u::key#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] ] with [ zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] ] Coalescing zero page register [ zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] ] with [ zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] ] Coalescing zero page register [ zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:4 [ print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] ] -Coalescing zero page register [ zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ] with [ zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] ] with [ zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] -Coalescing zero page register [ zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] ] with [ zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] ] with [ zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] -Coalescing zero page register [ zp ZP_WORD:65 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] ] -Coalescing zero page register [ zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 init_squares::squares#2 init_squares::squares#1 ] ] with [ zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] ] with [ zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] ] -Allocated (was zp ZP_WORD:23) zp ZP_WORD:2 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] -Allocated (was zp ZP_WORD:32) zp ZP_WORD:4 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] -Allocated (was zp ZP_BYTE:34) zp ZP_BYTE:6 [ init_font_hex::c#6 init_font_hex::c#1 init_dist_screen::x#2 init_dist_screen::x#1 ] -Allocated (was zp ZP_WORD:35) zp ZP_WORD:9 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 init_squares::squares#2 init_squares::squares#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] -Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:11 [ init_font_hex::c1#4 init_font_hex::c1#1 init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Allocated (was zp ZP_BYTE:41) zp ZP_BYTE:12 [ init_font_hex::idx#5 init_font_hex::idx#2 init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] -Allocated (was zp ZP_DWORD:42) zp ZP_DWORD:13 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] -Allocated (was zp ZP_WORD:65) zp ZP_WORD:17 [ sqr::return#2 init_dist_screen::yds#0 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_WORD:70) zp ZP_WORD:19 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] -Allocated (was zp ZP_WORD:93) zp ZP_WORD:21 [ bsearch16u::pivot#0 ] -Allocated (was zp ZP_WORD:95) zp ZP_WORD:23 [ bsearch16u::result#0 ] -Allocated (was zp ZP_BYTE:102) zp ZP_BYTE:25 [ init_font_hex::$0 ] +Coalescing zero page register [ zp ZP_WORD:23 [ bsearch16u::items#10 bsearch16u::items#16 ] ] with [ zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] ] +Coalescing zero page register [ zp ZP_WORD:29 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:25 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] +Coalescing zero page register [ zp ZP_WORD:34 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ] with [ zp ZP_WORD:31 [ init_squares::squares#2 init_squares::squares#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:36 [ init_font_hex::c#6 init_font_hex::c#1 ] ] with [ zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:41 [ init_font_hex::c1#4 init_font_hex::c1#1 ] ] with [ zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] +Coalescing zero page register [ zp ZP_WORD:67 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:37 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] ] +Coalescing zero page register [ zp ZP_WORD:72 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp ZP_WORD:39 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] ] +Coalescing zero page register [ zp ZP_WORD:34 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::squares#2 init_squares::squares#1 ] ] with [ zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:43 [ init_font_hex::idx#5 init_font_hex::idx#2 ] ] with [ zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:2 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] +Allocated (was zp ZP_WORD:23) zp ZP_WORD:4 [ bsearch16u::items#10 bsearch16u::items#16 print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:6 [ init_squares::sqr#2 init_squares::sqr#1 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] +Allocated (was zp ZP_WORD:34) zp ZP_WORD:9 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::squares#2 init_squares::squares#1 init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +Allocated (was zp ZP_BYTE:36) zp ZP_BYTE:11 [ init_font_hex::c#6 init_font_hex::c#1 init_dist_screen::x#2 init_dist_screen::x#1 ] +Allocated (was zp ZP_BYTE:41) zp ZP_BYTE:12 [ init_font_hex::c1#4 init_font_hex::c1#1 init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Allocated (was zp ZP_BYTE:43) zp ZP_BYTE:13 [ init_font_hex::idx#5 init_font_hex::idx#2 init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Allocated (was zp ZP_DWORD:44) zp ZP_DWORD:14 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +Allocated (was zp ZP_WORD:67) zp ZP_WORD:18 [ sqr::return#2 init_dist_screen::yds#0 init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated (was zp ZP_WORD:72) zp ZP_WORD:20 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated (was zp ZP_WORD:95) zp ZP_WORD:22 [ bsearch16u::result#0 ] +Allocated (was zp ZP_BYTE:102) zp ZP_BYTE:24 [ init_font_hex::$0 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -4768,10 +5564,10 @@ main: { .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f - .label _4 = $d - .label cyclecount = $d + .label _4 = $e + .label cyclecount = $e // [5] call init_font_hex - // [138] phi from main to init_font_hex [phi:main->init_font_hex] + // [139] phi from main to init_font_hex [phi:main->init_font_hex] init_font_hex_from_main: jsr init_font_hex // [6] phi from main to main::toD0181 [phi:main->main::toD0181] @@ -4844,9 +5640,9 @@ main: { } // print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($d) dw) +// print_dword_at(dword zeropage($e) dw) print_dword_at: { - .label dw = $d + .label dw = $e // [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 -- vwuz1=_hi_vduz2 lda dw+2 sta print_word_at.w @@ -4888,10 +5684,10 @@ print_dword_at: { } // print_word_at // Print a word as HEX at a specific position -// print_word_at(word zeropage(4) w, byte* zeropage(9) at) +// print_word_at(word zeropage(9) w, byte* zeropage(2) at) print_word_at: { - .label w = 4 - .label at = 9 + .label w = 9 + .label at = 2 // [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 -- vbuz1=_hi_vwuz2 lda w+1 sta print_byte_at.b @@ -4930,10 +5726,10 @@ print_word_at: { } // print_byte_at // Print a byte as HEX at a specific position -// print_byte_at(byte zeropage($c) b, byte* zeropage(9) at) +// print_byte_at(byte zeropage($d) b, byte* zeropage(2) at) print_byte_at: { - .label b = $c - .label at = 9 + .label b = $d + .label at = 2 // [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 -- vbuaa=vbuz1_ror_4 lda b lsr @@ -4985,9 +5781,9 @@ print_byte_at: { } // print_char_at // Print a single char -// print_char_at(byte register(X) ch, byte* zeropage(2) at) +// print_char_at(byte register(X) ch, byte* zeropage(4) at) print_char_at: { - .label at = 2 + .label at = 4 // [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 -- _deref_pbuz1=vbuxx txa ldy #0 @@ -5002,7 +5798,7 @@ print_char_at: { // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { - .label return = $d + .label return = $e // [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -5027,16 +5823,16 @@ clock: { // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision init_dist_screen: { - .label yds = $11 - .label xds = $13 - .label ds = $13 - .label x = 6 - .label xb = $b - .label screen_topline = 4 - .label screen_bottomline = 9 - .label y = $c + .label yds = $12 + .label xds = $14 + .label ds = $14 + .label x = $b + .label xb = $c + .label screen_topline = 9 + .label screen_bottomline = 2 + .label y = $d // [50] call init_squares - // [119] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [120] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares // [51] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] @@ -5085,9 +5881,9 @@ init_dist_screen: { b4: // [56] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [57] call sqr - // [115] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [116] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [115] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [116] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [58] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -5136,9 +5932,9 @@ init_dist_screen: { b8: // [65] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [66] call sqr - // [115] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [116] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [115] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [116] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [67] (word) sqr::return#3 ← (word) sqr::return#0 jmp b11 @@ -5228,12 +6024,12 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($13) val) +// sqrt(word zeropage($14) val) sqrt: { - .label _1 = 2 - .label _3 = 2 - .label found = 2 - .label val = $13 + .label _1 = 6 + .label _3 = 6 + .label found = 6 + .label val = $14 // [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [89] call bsearch16u // [96] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] @@ -5269,33 +6065,108 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($13) key, word* zeropage(2) items, byte register(X) num) +// bsearch16u(word zeropage($14) key, word* zeropage(6) items, byte register(X) num) bsearch16u: { - .label _2 = 2 - .label pivot = $15 - .label result = $17 - .label return = 2 - .label items = 2 - .label key = $13 - // [97] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [97] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + .label _2 = 6 + .label pivot = 6 + .label result = $16 + .label return = 6 + .label items = 6 + .label key = $14 + .label items_10 = 4 + .label items_16 = 4 + // [97] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [97] phi (word*) bsearch16u::items#10 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@4#0] -- pwuz1=pwuc1 lda #<SQUARES - sta items + sta items_10 lda #>SQUARES - sta items+1 - // [97] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + sta items_10+1 + // [97] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES + jmp b4 + // bsearch16u::@4 + b4: + // [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + txa + lsr + // [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + // [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [103] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [103] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [104] return + rts + // bsearch16u::@6 + b6: + // [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [107] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx + dex + // [108] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [108] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#18 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [108] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [109] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + txa + lsr + tax jmp b3 // bsearch16u::@3 b3: - // [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + // [110] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 cpx #0 - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -5309,7 +6180,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -5317,110 +6188,45 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [101] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [113] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [101] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [113] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [102] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [102] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [103] return - rts - // bsearch16u::@4 - b4: - // [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 - txa - lsr - // [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - // [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [97] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [97] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [97] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx - dex - // [113] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [113] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [113] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 - txa - lsr - tax - // [97] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [97] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [97] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $13 - .label return_2 = $11 - // [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $14 + .label return_2 = $12 + // [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa + // [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa tay lda SQUARES,y sta return @@ -5429,7 +6235,7 @@ sqr: { jmp breturn // sqr::@return breturn: - // [118] return + // [119] return rts } // init_squares @@ -5437,42 +6243,42 @@ sqr: { // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { .label squares = 9 - .label sqr = 4 - // [120] call malloc - // [130] phi from init_squares to malloc [phi:init_squares->malloc] + .label sqr = 6 + // [121] call malloc + // [131] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: jsr malloc - // [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + // [122] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] b1_from_init_squares: - // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 + // [122] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + // [122] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #<SQUARES sta squares lda #>SQUARES sta squares+1 - // [121] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + // [122] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [122] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [122] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [122] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [122] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -5480,28 +6286,28 @@ init_squares: { bcc !+ inc squares+1 !: - // [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [126] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - // [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [128] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [129] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [129] return + // [130] return rts } // malloc @@ -5514,21 +6320,21 @@ malloc: { jmp breturn // malloc::@return breturn: - // [131] return + // [132] return rts } // clock_start // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { - // [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #CIA_TIMER_CONTROL_CONTINUOUS sta CIA2_TIMER_A_CONTROL - // [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + // [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -5537,93 +6343,93 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - // [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + // [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL jmp breturn // clock_start::@return breturn: - // [137] return + // [138] return rts } // init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage(9) charset) +// init_font_hex(byte* zeropage($12) charset) init_font_hex: { - .label _0 = $19 - .label idx = $c - .label proto_lo = $11 - .label charset = 9 - .label c1 = $b - .label proto_hi = 4 - .label c = 6 - // [139] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $18 + .label idx = $d + .label proto_lo = $14 + .label charset = $12 + .label c1 = $c + .label proto_hi = 9 + .label c = $b + // [140] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - // [139] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + // [140] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - // [139] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + // [140] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #<FONT_HEX_PROTO sta proto_hi lda #>FONT_HEX_PROTO sta proto_hi+1 - // [139] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + // [140] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #<CHARSET sta charset lda #>CHARSET sta charset+1 jmp b1 - // [139] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + // [140] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - // [139] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - // [139] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - // [139] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + // [140] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + // [140] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + // [140] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy jmp b1 // init_font_hex::@1 b1: - // [140] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + // [141] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - // [140] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + // [141] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - // [140] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + // [141] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #<FONT_HEX_PROTO sta proto_lo lda #>FONT_HEX_PROTO sta proto_lo+1 - // [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + // [141] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy jmp b2 - // [140] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + // [141] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - // [140] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - // [140] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - // [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + // [141] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + // [141] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + // [141] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy jmp b2 // init_font_hex::@2 b2: - // [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - // [142] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + // [143] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - // [142] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + // [143] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - // [142] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + // [143] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - // [142] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + // [143] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - // [142] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - // [142] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + // [143] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + // [143] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy jmp b3 // init_font_hex::@3 b3: - // [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 + // [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y @@ -5632,37 +6438,37 @@ init_font_hex: { asl asl sta _0 - // [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 + // [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl - // [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + // [146] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - // [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + // [147] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy idx sta (charset),y - // [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + // [148] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - // [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + // [149] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - // [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + // [150] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3_from_b3 jmp b4 // init_font_hex::@4 b4: - // [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + // [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - // [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + // [152] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - // [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + // [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - // [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + // [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -5670,7 +6476,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - // [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + // [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -5678,16 +6484,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - // [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + // [156] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - // [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + // [157] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2_from_b4 jmp b5 // init_font_hex::@5 b5: - // [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + // [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -5695,16 +6501,16 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - // [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + // [159] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - // [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + // [160] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1_from_b5 jmp breturn // init_font_hex::@return breturn: - // [160] return + // [161] return rts } // File Data @@ -5744,15 +6550,15 @@ Removing instruction jmp b9 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b8 +Removing instruction jmp b7 Removing instruction jmp b3 Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp breturn -Removing instruction jmp b8 -Removing instruction jmp b9 -Removing instruction jmp b7 -Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp breturn @@ -5779,9 +6585,8 @@ Replacing label b8_from_b6 with b8 Replacing label b4_from_b2 with b4 Replacing label b2_from_b5 with b2 Replacing label b2_from_b5 with b2 -Replacing label breturn_from_b8 with b2 -Replacing label b7_from_b6 with b7 -Replacing label b7_from_b6 with b7 +Replacing label breturn_from_b2 with breturn +Replacing label b7_from_b10 with b7 Replacing label b1_from_b1 with b1 Replacing label b3_from_b3 with b3 Replacing label b2_from_b4 with b2 @@ -5806,13 +6611,12 @@ Removing instruction b5_from_b12: Removing instruction b8_from_b6: Removing instruction b8_from_b7: Removing instruction sqr_from_b8: +Removing instruction breturn_from_b2: +Removing instruction breturn_from_b4: +Removing instruction b7_from_b10: +Removing instruction b7_from_b8: Removing instruction b2_from_b1: Removing instruction b2_from_b5: -Removing instruction breturn_from_b2: -Removing instruction breturn_from_b8: -Removing instruction breturn: -Removing instruction b7_from_b6: -Removing instruction b7_from_b9: Removing instruction b1_from_b1: Removing instruction b1_from_b5: Removing instruction b2_from_b1: @@ -5853,12 +6657,12 @@ Removing instruction breturn: Removing instruction bsearch16u_from_sqrt: Removing instruction b1: Removing instruction breturn: -Removing instruction b3_from_bsearch16u: +Removing instruction b4_from_bsearch16u: +Removing instruction b8: +Removing instruction b3: Removing instruction b5: Removing instruction b1: -Removing instruction b8: -Removing instruction b9: -Removing instruction b3_from_b7: +Removing instruction b4_from_b9: Removing instruction breturn: Removing instruction malloc_from_init_squares: Removing instruction b1_from_init_squares: @@ -5874,7 +6678,9 @@ Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Replacing jump to rts with rts in jmp b2 +Skipping double jump to breturn in beq b2 +Skipping double jump to breturn in bcc b2 +Replacing jump to rts with rts in jmp breturn Succesful ASM optimization Pass5DoubleJumpElimination Removing instruction jmp b1 Removing instruction jmp b5 @@ -5884,6 +6690,7 @@ Removing instruction jmp b2 Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: +Removing instruction b2: Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE @@ -5927,9 +6734,10 @@ FINAL SYMBOL TABLE (const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:2 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:6 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -5940,30 +6748,31 @@ FINAL SYMBOL TABLE (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:2 1001.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:2 334.33333333333337 -(word*) bsearch16u::items#8 items zp ZP_WORD:2 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:6 1001.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:4 429.0 +(word*) bsearch16u::items#11 items zp ZP_WORD:6 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:4 2002.0 +(word*~) bsearch16u::items#18 items zp ZP_WORD:6 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:19 0.2857142857142857 +(word) bsearch16u::key#0 key zp ZP_WORD:20 0.25 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:21 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:6 750.75 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:23 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:22 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:2 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:2 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:2 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:2 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:6 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:6 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:6 4.0 (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:13 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:13 4.0 +(dword) clock::return#0 return zp ZP_DWORD:14 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:14 4.0 (void()) clock_start() (label) clock_start::@return (byte*) heap_head @@ -5988,37 +6797,37 @@ FINAL SYMBOL TABLE (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:19 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:20 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:9 7.333333333333333 -(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:9 6.787878787878788 +(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:2 7.333333333333333 +(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:2 6.787878787878788 (byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:4 5.5 -(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:4 7.0 +(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:9 5.5 +(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:9 7.0 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:6 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:6 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:11 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:11 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:11 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:11 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:12 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:12 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:19 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:20 202.0 (byte) init_dist_screen::y -(byte) init_dist_screen::y#1 y zp ZP_BYTE:12 16.5 -(byte) init_dist_screen::y#10 y zp ZP_BYTE:12 0.9705882352941178 +(byte) init_dist_screen::y#1 y zp ZP_BYTE:13 16.5 +(byte) init_dist_screen::y#10 y zp ZP_BYTE:13 0.9705882352941178 (byte) init_dist_screen::y2 (byte) init_dist_screen::y2#0 reg byte a 22.0 (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:17 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:18 4.869565217391305 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:25 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:24 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 (byte~) init_font_hex::$2 reg byte a 2002.0 (label) init_font_hex::@1 @@ -6028,28 +6837,28 @@ FINAL SYMBOL TABLE (label) init_font_hex::@5 (label) init_font_hex::@return (byte) init_font_hex::c -(byte) init_font_hex::c#1 c zp ZP_BYTE:6 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:6 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:11 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:11 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:11 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:11 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:12 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:12 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:9 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:9 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:9 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:18 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:18 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:18 22.0 (byte) init_font_hex::i (byte) init_font_hex::i#1 reg byte x 1501.5 (byte) init_font_hex::i#2 reg byte x 667.3333333333334 (byte) init_font_hex::idx -(byte) init_font_hex::idx#2 idx zp ZP_BYTE:12 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:13 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:12 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:13 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:4 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:4 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:9 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:9 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:17 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:17 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:20 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:20 92.53846153846155 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -6059,13 +6868,13 @@ FINAL SYMBOL TABLE (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:4 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:4 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:6 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:6 6.6000000000000005 (word*) init_squares::squares (word*) init_squares::squares#1 squares zp ZP_WORD:9 3.6666666666666665 (word*) init_squares::squares#2 squares zp ZP_WORD:9 16.5 (void()) main() -(dword~) main::$4 $4 zp ZP_DWORD:13 4.0 +(dword~) main::$4 $4 zp ZP_DWORD:14 4.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -6077,7 +6886,7 @@ FINAL SYMBOL TABLE (byte*) main::BASE_SCREEN (const byte*) main::BASE_SCREEN#0 BASE_SCREEN = (byte*) 1024 (dword) main::cyclecount -(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:13 4.0 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:14 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -6120,19 +6929,19 @@ FINAL SYMBOL TABLE (label) print_byte_at::@1 (label) print_byte_at::@return (byte*) print_byte_at::at -(byte*) print_byte_at::at#0 at zp ZP_WORD:9 4.0 -(byte*) print_byte_at::at#1 at zp ZP_WORD:9 4.0 -(byte*) print_byte_at::at#2 at zp ZP_WORD:9 1.3333333333333333 +(byte*) print_byte_at::at#0 at zp ZP_WORD:2 4.0 +(byte*) print_byte_at::at#1 at zp ZP_WORD:2 4.0 +(byte*) print_byte_at::at#2 at zp ZP_WORD:2 1.3333333333333333 (byte) print_byte_at::b -(byte) print_byte_at::b#0 b zp ZP_BYTE:12 2.0 -(byte) print_byte_at::b#1 b zp ZP_BYTE:12 2.0 -(byte) print_byte_at::b#2 b zp ZP_BYTE:12 1.6 +(byte) print_byte_at::b#0 b zp ZP_BYTE:13 2.0 +(byte) print_byte_at::b#1 b zp ZP_BYTE:13 2.0 +(byte) print_byte_at::b#2 b zp ZP_BYTE:13 1.6 (void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) (label) print_char_at::@return (byte*) print_char_at::at -(byte*) print_char_at::at#0 at zp ZP_WORD:2 4.0 -(byte*) print_char_at::at#1 at zp ZP_WORD:2 2.0 -(byte*) print_char_at::at#2 at zp ZP_WORD:2 6.0 +(byte*) print_char_at::at#0 at zp ZP_WORD:4 4.0 +(byte*) print_char_at::at#1 at zp ZP_WORD:4 2.0 +(byte*) print_char_at::at#2 at zp ZP_WORD:4 6.0 (byte) print_char_at::ch (byte) print_char_at::ch#0 reg byte x 2.0 (byte) print_char_at::ch#1 reg byte x 4.0 @@ -6142,81 +6951,81 @@ FINAL SYMBOL TABLE (label) print_dword_at::@return (byte*) print_dword_at::at (dword) print_dword_at::dw -(dword) print_dword_at::dw#0 dw zp ZP_DWORD:13 2.0 +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:14 2.0 (byte[]) print_hextab (const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" (void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) (label) print_word_at::@1 (label) print_word_at::@return (byte*) print_word_at::at -(byte*) print_word_at::at#2 at zp ZP_WORD:9 0.8 +(byte*) print_word_at::at#2 at zp ZP_WORD:2 0.8 (word) print_word_at::w -(word) print_word_at::w#0 w zp ZP_WORD:4 4.0 -(word) print_word_at::w#1 w zp ZP_WORD:4 4.0 -(word) print_word_at::w#2 w zp ZP_WORD:4 2.0 +(word) print_word_at::w#0 w zp ZP_WORD:9 4.0 +(word) print_word_at::w#1 w zp ZP_WORD:9 4.0 +(word) print_word_at::w#2 w zp ZP_WORD:9 2.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:19 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:17 22.0 -(word) sqr::return#3 return zp ZP_WORD:19 202.0 +(word) sqr::return#0 return zp ZP_WORD:20 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:18 22.0 +(word) sqr::return#3 return zp ZP_WORD:20 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:2 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:2 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:6 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:6 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:2 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:6 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:19 103.0 +(word) sqrt::val#0 val zp ZP_WORD:20 103.0 reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +zp ZP_WORD:2 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:2 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +zp ZP_WORD:4 [ bsearch16u::items#10 bsearch16u::items#16 print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] +zp ZP_WORD:6 [ init_squares::sqr#2 init_squares::sqr#1 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:4 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] -zp ZP_BYTE:6 [ init_font_hex::c#6 init_font_hex::c#1 init_dist_screen::x#2 init_dist_screen::x#1 ] -zp ZP_WORD:9 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 init_squares::squares#2 init_squares::squares#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] -zp ZP_BYTE:11 [ init_font_hex::c1#4 init_font_hex::c1#1 init_dist_screen::xb#2 init_dist_screen::xb#1 ] +zp ZP_WORD:9 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::squares#2 init_squares::squares#1 init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +zp ZP_BYTE:11 [ init_font_hex::c#6 init_font_hex::c#1 init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:12 [ init_font_hex::c1#4 init_font_hex::c1#1 init_dist_screen::xb#2 init_dist_screen::xb#1 ] reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:12 [ init_font_hex::idx#5 init_font_hex::idx#2 init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] -zp ZP_DWORD:13 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +zp ZP_BYTE:13 [ init_font_hex::idx#5 init_font_hex::idx#2 init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +zp ZP_DWORD:14 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:17 [ sqr::return#2 init_dist_screen::yds#0 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_WORD:18 [ sqr::return#2 init_dist_screen::yds#0 init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:19 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +zp ZP_WORD:20 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:21 [ bsearch16u::pivot#0 ] -zp ZP_WORD:23 [ bsearch16u::result#0 ] +zp ZP_WORD:22 [ bsearch16u::result#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] -zp ZP_BYTE:25 [ init_font_hex::$0 ] +zp ZP_BYTE:24 [ init_font_hex::$0 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 203337 +Score: 229879 // File Comments // Calculate the distance to the center of the screen - and show it using font-hex @@ -6261,11 +7070,11 @@ main: { .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f - .label _4 = $d - .label cyclecount = $d + .label _4 = $e + .label cyclecount = $e // init_font_hex(CHARSET) // [5] call init_font_hex - // [138] phi from main to init_font_hex [phi:main->init_font_hex] + // [139] phi from main to init_font_hex [phi:main->init_font_hex] jsr init_font_hex // [6] phi from main to main::toD0181 [phi:main->main::toD0181] // main::toD0181 @@ -6324,9 +7133,9 @@ main: { } // print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($d) dw) +// print_dword_at(dword zeropage($e) dw) print_dword_at: { - .label dw = $d + .label dw = $e // print_word_at(>dw, at) // [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 -- vwuz1=_hi_vduz2 lda dw+2 @@ -6365,10 +7174,10 @@ print_dword_at: { } // print_word_at // Print a word as HEX at a specific position -// print_word_at(word zeropage(4) w, byte* zeropage(9) at) +// print_word_at(word zeropage(9) w, byte* zeropage(2) at) print_word_at: { - .label w = 4 - .label at = 9 + .label w = 9 + .label at = 2 // print_byte_at(>w, at) // [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 -- vbuz1=_hi_vwuz2 lda w+1 @@ -6404,10 +7213,10 @@ print_word_at: { } // print_byte_at // Print a byte as HEX at a specific position -// print_byte_at(byte zeropage($c) b, byte* zeropage(9) at) +// print_byte_at(byte zeropage($d) b, byte* zeropage(2) at) print_byte_at: { - .label b = $c - .label at = 9 + .label b = $d + .label at = 2 // b>>4 // [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 -- vbuaa=vbuz1_ror_4 lda b @@ -6458,9 +7267,9 @@ print_byte_at: { } // print_char_at // Print a single char -// print_char_at(byte register(X) ch, byte* zeropage(2) at) +// print_char_at(byte register(X) ch, byte* zeropage(4) at) print_char_at: { - .label at = 2 + .label at = 4 // *(at) = ch // [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 -- _deref_pbuz1=vbuxx txa @@ -6475,7 +7284,7 @@ print_char_at: { // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { - .label return = $d + .label return = $e // 0xffffffff - *CIA2_TIMER_AB // [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff @@ -6500,17 +7309,17 @@ clock: { // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision init_dist_screen: { - .label yds = $11 - .label xds = $13 - .label ds = $13 - .label x = 6 - .label xb = $b - .label screen_topline = 4 - .label screen_bottomline = 9 - .label y = $c + .label yds = $12 + .label xds = $14 + .label ds = $14 + .label x = $b + .label xb = $c + .label screen_topline = 9 + .label screen_bottomline = 2 + .label y = $d // init_squares() // [50] call init_squares - // [119] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [120] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] jsr init_squares // [51] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] // [51] phi (byte*) init_dist_screen::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:init_dist_screen->init_dist_screen::@1#0] -- pbuz1=pbuc1 @@ -6552,8 +7361,8 @@ init_dist_screen: { // sqr(yd) // [56] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [57] call sqr - // [115] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - // [115] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [116] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [116] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // sqr(yd) // [58] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 @@ -6596,8 +7405,8 @@ init_dist_screen: { // sqr(xd) // [65] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [66] call sqr - // [115] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - // [115] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [116] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [116] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // sqr(xd) // [67] (word) sqr::return#3 ← (word) sqr::return#0 @@ -6693,12 +7502,12 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($13) val) +// sqrt(word zeropage($14) val) sqrt: { - .label _1 = 2 - .label _3 = 2 - .label found = 2 - .label val = $13 + .label _1 = 6 + .label _3 = 6 + .label found = 6 + .label val = $14 // bsearch16u(val, SQUARES, NUM_SQUARES) // [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [89] call bsearch16u @@ -6735,78 +7544,42 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($13) key, word* zeropage(2) items, byte register(X) num) +// bsearch16u(word zeropage($14) key, word* zeropage(6) items, byte register(X) num) bsearch16u: { - .label _2 = 2 - .label pivot = $15 - .label result = $17 - .label return = 2 - .label items = 2 - .label key = $13 - // [97] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - // [97] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + .label _2 = 6 + .label pivot = 6 + .label result = $16 + .label return = 6 + .label items = 6 + .label key = $14 + .label items_10 = 4 + .label items_16 = 4 + // [97] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + // [97] phi (word*) bsearch16u::items#10 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@4#0] -- pwuz1=pwuc1 lda #<SQUARES - sta items + sta items_10 lda #>SQUARES - sta items+1 - // [97] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + sta items_10+1 + // [97] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES - // bsearch16u::@3 - b3: - // while (num > 0) - // [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 - cpx #0 - bne b4 - // bsearch16u::@5 - // *items<=key?items:items-1 - // [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - // bsearch16u::@1 - // [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - // [101] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - // [101] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - // bsearch16u::@2 - b2: - // [102] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - // [102] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - // bsearch16u::@return - // } - // [103] return - rts // bsearch16u::@4 b4: // num >> 1 - // [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + // [98] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr // items + (num >> 1) - // [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [99] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + // [100] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 // result = (signed int)key-(signed int)*pivot - // [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + // [101] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -6817,66 +7590,112 @@ bsearch16u: { sbc (pivot),y sta result+1 // if (result == 0) - // [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + // [102] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 bne b6 lda result bne b6 - // bsearch16u::@8 - // [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 + // [103] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + // [103] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + // bsearch16u::@return + breturn: + // } + // [104] return rts // bsearch16u::@6 b6: // if (result > 0) - // [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + // [105] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: - // bsearch16u::@9 + // bsearch16u::@8 // items = pivot+1 - // [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + // [106] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: // num--; - // [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + // [107] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx dex - // [113] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - // [113] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [113] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + // [108] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + // [108] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#18 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [108] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy // bsearch16u::@7 b7: // num >>= 1 - // [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + // [109] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - // [97] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - // [97] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [97] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + // bsearch16u::@3 + // while (num > 0) + // [110] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 + cpx #0 + bne b9 + // bsearch16u::@5 + // *items<=key?items:items-1 + // [111] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + // bsearch16u::@1 + // [112] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + // [113] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [113] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // bsearch16u::@2 + rts + // bsearch16u::@9 + b9: + // [114] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [97] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + // [97] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [97] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [115] (word*~) bsearch16u::items#18 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $13 - .label return_2 = $11 + .label return = $14 + .label return_2 = $12 // return SQUARES[val]; - // [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [117] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa + // [118] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa tay lda SQUARES,y sta return @@ -6884,7 +7703,7 @@ sqr: { sta return+1 // sqr::@return // } - // [118] return + // [119] return rts } // init_squares @@ -6892,31 +7711,31 @@ sqr: { // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { .label squares = 9 - .label sqr = 4 + .label sqr = 6 // malloc(NUM_SQUARES*sizeof(word)) - // [120] call malloc - // [130] phi from init_squares to malloc [phi:init_squares->malloc] + // [121] call malloc + // [131] phi from init_squares to malloc [phi:init_squares->malloc] jsr malloc - // [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] - // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 + // [122] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + // [122] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + // [122] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #<SQUARES sta squares lda #>SQUARES sta squares+1 - // [121] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + // [122] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 txa sta sqr sta sqr+1 - // [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [122] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [122] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [122] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [122] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy // init_squares::@1 b1: // *squares++ = sqr - // [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [123] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y @@ -6924,7 +7743,7 @@ init_squares: { lda sqr+1 sta (squares),y // *squares++ = sqr; - // [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [124] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -6933,15 +7752,15 @@ init_squares: { inc squares+1 !: // i*2 - // [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [125] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl // i*2+1 - // [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [126] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 // sqr += i*2+1 - // [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [127] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr @@ -6949,14 +7768,14 @@ init_squares: { inc sqr+1 !: // for( byte i: 0..NUM_SQUARES-1) - // [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [128] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [129] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1 // init_squares::@return // } - // [129] return + // [130] return rts } // malloc @@ -6967,7 +7786,7 @@ malloc: { .label mem = HEAP_TOP-size .label return = mem // malloc::@return - // [131] return + // [132] return rts } // clock_start @@ -6975,16 +7794,16 @@ malloc: { // This uses CIA #2 Timer A+B on the C64 clock_start: { // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES - // [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // [133] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #CIA_TIMER_CONTROL_CONTINUOUS sta CIA2_TIMER_A_CONTROL // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A - // [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [134] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL // *CIA2_TIMER_AB = 0xffffffff - // [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + // [135] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -6994,83 +7813,83 @@ clock_start: { lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A - // [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [136] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES - // [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + // [137] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL // clock_start::@return // } - // [137] return + // [138] return rts } // init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage(9) charset) +// init_font_hex(byte* zeropage($12) charset) init_font_hex: { - .label _0 = $19 - .label idx = $c - .label proto_lo = $11 - .label charset = 9 - .label c1 = $b - .label proto_hi = 4 - .label c = 6 - // [139] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - // [139] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .label _0 = $18 + .label idx = $d + .label proto_lo = $14 + .label charset = $12 + .label c1 = $c + .label proto_hi = 9 + .label c = $b + // [140] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + // [140] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - // [139] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + // [140] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #<FONT_HEX_PROTO sta proto_hi lda #>FONT_HEX_PROTO sta proto_hi+1 - // [139] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + // [140] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #<CHARSET sta charset lda #>CHARSET sta charset+1 - // [139] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - // [139] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - // [139] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - // [139] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + // [140] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + // [140] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + // [140] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + // [140] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy // init_font_hex::@1 b1: - // [140] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - // [140] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + // [141] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + // [141] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - // [140] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + // [141] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #<FONT_HEX_PROTO sta proto_lo lda #>FONT_HEX_PROTO sta proto_lo+1 - // [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy - // [140] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - // [140] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - // [140] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - // [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + // [141] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + // [141] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + // [141] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + // [141] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + // [141] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy // init_font_hex::@2 b2: // charset[idx++] = 0 - // [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [142] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - // [142] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - // [142] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + // [143] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + // [143] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - // [142] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + // [143] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - // [142] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - // [142] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - // [142] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + // [143] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + // [143] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + // [143] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy // init_font_hex::@3 b3: // proto_hi[i]<<4 - // [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 + // [144] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y @@ -7080,41 +7899,41 @@ init_font_hex: { asl sta _0 // proto_lo[i]<<1 - // [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 + // [145] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl // proto_hi[i]<<4 | proto_lo[i]<<1 - // [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + // [146] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 - // [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + // [147] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy idx sta (charset),y // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; - // [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + // [148] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx // for( byte i: 0..4) - // [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + // [149] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - // [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + // [150] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 // init_font_hex::@4 // charset[idx++] = 0 - // [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + // [151] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y // charset[idx++] = 0; - // [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + // [152] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny // charset[idx++] = 0 - // [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + // [153] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y // proto_lo += 5 - // [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + // [154] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -7123,7 +7942,7 @@ init_font_hex: { inc proto_lo+1 !: // charset += 8 - // [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + // [155] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -7132,15 +7951,15 @@ init_font_hex: { inc charset+1 !: // for( byte c: 0..15 ) - // [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + // [156] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - // [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + // [157] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2 // init_font_hex::@5 // proto_hi += 5 - // [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + // [158] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -7149,15 +7968,15 @@ init_font_hex: { inc proto_hi+1 !: // for( byte c: 0..15 ) - // [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + // [159] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - // [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + // [160] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1 // init_font_hex::@return // } - // [160] return + // [161] return rts } // File Data diff --git a/src/test/ref/screen-center-distance.sym b/src/test/ref/screen-center-distance.sym index 4ffc83367..45fe09412 100644 --- a/src/test/ref/screen-center-distance.sym +++ b/src/test/ref/screen-center-distance.sym @@ -38,9 +38,10 @@ (const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:2 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:6 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -51,30 +52,31 @@ (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:2 1001.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:2 334.33333333333337 -(word*) bsearch16u::items#8 items zp ZP_WORD:2 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:6 1001.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:4 429.0 +(word*) bsearch16u::items#11 items zp ZP_WORD:6 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:4 2002.0 +(word*~) bsearch16u::items#18 items zp ZP_WORD:6 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:19 0.2857142857142857 +(word) bsearch16u::key#0 key zp ZP_WORD:20 0.25 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:21 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:6 750.75 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:23 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:22 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:2 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:2 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:2 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:2 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:6 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:6 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:6 4.0 (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:13 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:13 4.0 +(dword) clock::return#0 return zp ZP_DWORD:14 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:14 4.0 (void()) clock_start() (label) clock_start::@return (byte*) heap_head @@ -99,37 +101,37 @@ (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:19 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:20 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:9 7.333333333333333 -(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:9 6.787878787878788 +(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:2 7.333333333333333 +(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:2 6.787878787878788 (byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:4 5.5 -(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:4 7.0 +(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:9 5.5 +(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:9 7.0 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:6 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:6 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:11 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:11 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:11 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:11 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:12 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:12 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:19 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:20 202.0 (byte) init_dist_screen::y -(byte) init_dist_screen::y#1 y zp ZP_BYTE:12 16.5 -(byte) init_dist_screen::y#10 y zp ZP_BYTE:12 0.9705882352941178 +(byte) init_dist_screen::y#1 y zp ZP_BYTE:13 16.5 +(byte) init_dist_screen::y#10 y zp ZP_BYTE:13 0.9705882352941178 (byte) init_dist_screen::y2 (byte) init_dist_screen::y2#0 reg byte a 22.0 (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:17 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:18 4.869565217391305 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:25 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:24 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 (byte~) init_font_hex::$2 reg byte a 2002.0 (label) init_font_hex::@1 @@ -139,28 +141,28 @@ (label) init_font_hex::@5 (label) init_font_hex::@return (byte) init_font_hex::c -(byte) init_font_hex::c#1 c zp ZP_BYTE:6 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:6 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:11 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:11 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:11 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:11 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:12 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:12 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:9 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:9 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:9 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:18 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:18 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:18 22.0 (byte) init_font_hex::i (byte) init_font_hex::i#1 reg byte x 1501.5 (byte) init_font_hex::i#2 reg byte x 667.3333333333334 (byte) init_font_hex::idx -(byte) init_font_hex::idx#2 idx zp ZP_BYTE:12 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:13 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:12 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:13 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:4 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:4 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:9 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:9 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:17 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:17 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:20 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:20 92.53846153846155 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -170,13 +172,13 @@ (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:4 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:4 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:6 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:6 6.6000000000000005 (word*) init_squares::squares (word*) init_squares::squares#1 squares zp ZP_WORD:9 3.6666666666666665 (word*) init_squares::squares#2 squares zp ZP_WORD:9 16.5 (void()) main() -(dword~) main::$4 $4 zp ZP_DWORD:13 4.0 +(dword~) main::$4 $4 zp ZP_DWORD:14 4.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -188,7 +190,7 @@ (byte*) main::BASE_SCREEN (const byte*) main::BASE_SCREEN#0 BASE_SCREEN = (byte*) 1024 (dword) main::cyclecount -(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:13 4.0 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:14 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -231,19 +233,19 @@ (label) print_byte_at::@1 (label) print_byte_at::@return (byte*) print_byte_at::at -(byte*) print_byte_at::at#0 at zp ZP_WORD:9 4.0 -(byte*) print_byte_at::at#1 at zp ZP_WORD:9 4.0 -(byte*) print_byte_at::at#2 at zp ZP_WORD:9 1.3333333333333333 +(byte*) print_byte_at::at#0 at zp ZP_WORD:2 4.0 +(byte*) print_byte_at::at#1 at zp ZP_WORD:2 4.0 +(byte*) print_byte_at::at#2 at zp ZP_WORD:2 1.3333333333333333 (byte) print_byte_at::b -(byte) print_byte_at::b#0 b zp ZP_BYTE:12 2.0 -(byte) print_byte_at::b#1 b zp ZP_BYTE:12 2.0 -(byte) print_byte_at::b#2 b zp ZP_BYTE:12 1.6 +(byte) print_byte_at::b#0 b zp ZP_BYTE:13 2.0 +(byte) print_byte_at::b#1 b zp ZP_BYTE:13 2.0 +(byte) print_byte_at::b#2 b zp ZP_BYTE:13 1.6 (void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) (label) print_char_at::@return (byte*) print_char_at::at -(byte*) print_char_at::at#0 at zp ZP_WORD:2 4.0 -(byte*) print_char_at::at#1 at zp ZP_WORD:2 2.0 -(byte*) print_char_at::at#2 at zp ZP_WORD:2 6.0 +(byte*) print_char_at::at#0 at zp ZP_WORD:4 4.0 +(byte*) print_char_at::at#1 at zp ZP_WORD:4 2.0 +(byte*) print_char_at::at#2 at zp ZP_WORD:4 6.0 (byte) print_char_at::ch (byte) print_char_at::ch#0 reg byte x 2.0 (byte) print_char_at::ch#1 reg byte x 4.0 @@ -253,74 +255,74 @@ (label) print_dword_at::@return (byte*) print_dword_at::at (dword) print_dword_at::dw -(dword) print_dword_at::dw#0 dw zp ZP_DWORD:13 2.0 +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:14 2.0 (byte[]) print_hextab (const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" (void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) (label) print_word_at::@1 (label) print_word_at::@return (byte*) print_word_at::at -(byte*) print_word_at::at#2 at zp ZP_WORD:9 0.8 +(byte*) print_word_at::at#2 at zp ZP_WORD:2 0.8 (word) print_word_at::w -(word) print_word_at::w#0 w zp ZP_WORD:4 4.0 -(word) print_word_at::w#1 w zp ZP_WORD:4 4.0 -(word) print_word_at::w#2 w zp ZP_WORD:4 2.0 +(word) print_word_at::w#0 w zp ZP_WORD:9 4.0 +(word) print_word_at::w#1 w zp ZP_WORD:9 4.0 +(word) print_word_at::w#2 w zp ZP_WORD:9 2.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:19 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:17 22.0 -(word) sqr::return#3 return zp ZP_WORD:19 202.0 +(word) sqr::return#0 return zp ZP_WORD:20 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:18 22.0 +(word) sqr::return#3 return zp ZP_WORD:20 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:2 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:2 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:6 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:6 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:2 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:6 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:19 103.0 +(word) sqrt::val#0 val zp ZP_WORD:20 103.0 reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +zp ZP_WORD:2 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:2 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +zp ZP_WORD:4 [ bsearch16u::items#10 bsearch16u::items#16 print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] +zp ZP_WORD:6 [ init_squares::sqr#2 init_squares::sqr#1 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#18 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:4 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] -zp ZP_BYTE:6 [ init_font_hex::c#6 init_font_hex::c#1 init_dist_screen::x#2 init_dist_screen::x#1 ] -zp ZP_WORD:9 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 init_squares::squares#2 init_squares::squares#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] -zp ZP_BYTE:11 [ init_font_hex::c1#4 init_font_hex::c1#1 init_dist_screen::xb#2 init_dist_screen::xb#1 ] +zp ZP_WORD:9 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::squares#2 init_squares::squares#1 init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +zp ZP_BYTE:11 [ init_font_hex::c#6 init_font_hex::c#1 init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:12 [ init_font_hex::c1#4 init_font_hex::c1#1 init_dist_screen::xb#2 init_dist_screen::xb#1 ] reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:12 [ init_font_hex::idx#5 init_font_hex::idx#2 init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] -zp ZP_DWORD:13 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +zp ZP_BYTE:13 [ init_font_hex::idx#5 init_font_hex::idx#2 init_dist_screen::y#10 init_dist_screen::y#1 print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +zp ZP_DWORD:14 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:17 [ sqr::return#2 init_dist_screen::yds#0 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_WORD:18 [ sqr::return#2 init_dist_screen::yds#0 init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:19 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +zp ZP_WORD:20 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:21 [ bsearch16u::pivot#0 ] -zp ZP_WORD:23 [ bsearch16u::result#0 ] +zp ZP_WORD:22 [ bsearch16u::result#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] -zp ZP_BYTE:25 [ init_font_hex::$0 ] +zp ZP_BYTE:24 [ init_font_hex::$0 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] reg byte y [ init_font_hex::idx#3 ] diff --git a/src/test/ref/screen-show-spiral-buckets.asm b/src/test/ref/screen-show-spiral-buckets.asm index b751bbc7e..fcd0fed92 100644 --- a/src/test/ref/screen-show-spiral-buckets.asm +++ b/src/test/ref/screen-show-spiral-buckets.asm @@ -24,17 +24,17 @@ .label heap_head = 2 .label SQUARES = 5 // Screen containing distance to center - .label SCREEN_DIST = $16 + .label SCREEN_DIST = $1c // Screen containing angle to center - .label SCREEN_ANGLE = $e + .label SCREEN_ANGLE = $10 // Array containing the bucket size for each of the distance buckets - .label BUCKET_SIZES = $10 + .label BUCKET_SIZES = $12 // Buckets containing screen indices for each distance from the center. // BUCKETS[dist] is an array of words containing screen indices. // The size of the array BUCKETS[dist] is BUCKET_SIZES[dist] - .label BUCKETS = $12 + .label BUCKETS = $14 // Current index into each bucket. Used while populating the buckets. (After population the end the values will be equal to the bucket sizes) - .label BUCKET_IDX = $18 + .label BUCKET_IDX = $16 bbegin: lda #<$3e8 sta malloc.size @@ -88,12 +88,12 @@ bbegin: jsr main rts main: { - .label bucket = $14 - .label bucket_size = $1b - .label bucket_idx = $1a + .label bucket = $18 + .label bucket_size = $1f + .label bucket_idx = $1e .label offset = $a - .label fill = $16 - .label angle = $18 + .label fill = $1a + .label angle = $1c .label min_angle = 4 .label fill1 = $a .label min_offset = $a @@ -228,25 +228,25 @@ main: { jmp b6 } // Initialize buckets containing indices of chars on the screen with specific distances to the center. -// init_buckets(byte* zeropage($16) screen) +// init_buckets(byte* zeropage($1c) screen) init_buckets: { .label _5 = 5 - .label _9 = $22 - .label _10 = $1c - .label _12 = $20 - .label _13 = $22 - .label screen = $16 + .label _9 = $24 + .label _10 = $20 + .label _12 = $22 + .label _13 = $24 + .label screen = $1c .label dist = 8 .label i1 = $a - .label i2 = $14 - .label distance = $1a - .label bucket = $22 + .label i2 = $18 + .label distance = $1e + .label bucket = $24 .label dist_3 = 2 - .label i4 = $1e + .label i4 = $1a .label dist_5 = 2 .label _15 = 5 - .label _16 = $20 - .label _17 = $22 + .label _16 = $22 + .label _17 = $24 .label dist_8 = 2 ldy #0 // Init bucket sizes to 0 @@ -430,19 +430,19 @@ malloc: { } // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage($14) screen) +// init_angle_screen(byte* zeropage($18) screen) init_angle_screen: { .label _10 = $a - .label screen = $14 - .label screen_topline = $1e - .label screen_bottomline = $14 - .label xw = $20 - .label yw = $22 + .label screen = $18 + .label screen_topline = $1a + .label screen_bottomline = $18 + .label xw = $22 + .label yw = $24 .label angle_w = $a - .label ang_w = $1b + .label ang_w = $1f .label x = 4 .label xb = 7 - .label y = $1a + .label y = $1e lda screen clc adc #<$28*$c @@ -530,18 +530,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($20) x, signed word zeropage($22) y) +// atan2_16(signed word zeropage($22) x, signed word zeropage($24) y) atan2_16: { .label _2 = 5 .label _7 = 8 .label yi = 5 .label xi = 8 .label angle = $a - .label xd = $1c + .label xd = $e .label yd = $c .label return = $a - .label x = $20 - .label y = $22 + .label x = $22 + .label y = $24 lda y+1 bmi !b1+ jmp b1 @@ -723,11 +723,11 @@ atan2_16: { init_dist_screen: { .label screen = 8 .label screen_bottomline = $a - .label yds = $1c - .label xds = $1e - .label ds = $1e - .label x = $1b - .label xb = $1a + .label yds = $20 + .label xds = $22 + .label ds = $22 + .label x = $1f + .label xb = $1e .label screen_topline = 8 .label y = 7 jsr init_squares @@ -818,16 +818,16 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($1e) val) +// sqrt(word zeropage($22) val) sqrt: { - .label _1 = $c - .label _3 = $c - .label found = $c - .label val = $1e + .label _1 = $e + .label _3 = $e + .label found = $e + .label val = $22 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 jsr bsearch16u lda _3 sec @@ -846,46 +846,27 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($1e) key, word* zeropage($c) items, byte register(X) num) +// bsearch16u(word zeropage($22) key, word* zeropage($e) items, byte register(X) num) bsearch16u: { - .label _2 = $c - .label pivot = $20 - .label result = $22 - .label return = $c - .label items = $c - .label key = $1e + .label _2 = $e + .label pivot = $e + .label result = $24 + .label return = $e + .label items = $e + .label key = $22 + .label items_1 = $c + .label items_10 = $c + .label items_16 = $c ldx #NUM_SQUARES - b3: - cpx #0 - bne b4 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - b2: - rts b4: txa lsr asl clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 sec lda key @@ -899,38 +880,66 @@ bsearch16u: { bne b6 lda result bne b6 - lda pivot - sta return - lda pivot+1 - sta return+1 + breturn: rts b6: lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: dex b7: txa lsr tax - jmp b3 + cpx #0 + bne b9 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + rts + b9: + lda items + sta items_16 + lda items+1 + sta items_16+1 + jmp b4 + b10: + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $1e - .label return_2 = $1c + .label return = $22 + .label return_2 = $20 asl tay lda (SQUARES),y @@ -943,8 +952,8 @@ sqr: { // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $14 - .label sqr = $1c + .label squares = $1a + .label sqr = $18 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD diff --git a/src/test/ref/screen-show-spiral-buckets.cfg b/src/test/ref/screen-show-spiral-buckets.cfg index 23517a214..4fa2bdac5 100644 --- a/src/test/ref/screen-show-spiral-buckets.cfg +++ b/src/test/ref/screen-show-spiral-buckets.cfg @@ -415,75 +415,78 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [220] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [221] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(word*) bsearch16u::items#1 ) + [221] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [227] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [228] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [231] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [232] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#19 ) + [232] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [233] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [221] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [221] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [222] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [234] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [225] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [237] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [226] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [227] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [236] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [237] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [237] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [239] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + [240] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [242] return + [243] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [243] phi() - [244] call malloc + [244] phi() + [245] call malloc to:init_squares::@2 init_squares::@2: scope:[init_squares] from init_squares - [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [247] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [247] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [247] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [251] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [253] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [254] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [248] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [248] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [248] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [255] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [255] return + [256] return to:@return diff --git a/src/test/ref/screen-show-spiral-buckets.log b/src/test/ref/screen-show-spiral-buckets.log index 44f80d1e9..6556cc206 100644 --- a/src/test/ref/screen-show-spiral-buckets.log +++ b/src/test/ref/screen-show-spiral-buckets.log @@ -2896,6 +2896,1044 @@ Eliminating unused constant (const word*) SQUARES#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks +GRAPH (NEW VERSIONS for bsearch16u::num#3) +@begin: scope:[] from + to:@8 +@8: scope:[] from @begin + to:@16 +malloc: scope:[malloc] from @21 @22 @26 @28 @29 init_buckets::@5 init_squares + [0] (word) malloc::size#7 ← phi( @21/(const word) malloc::size#1 @22/(word) malloc::size#3 @26/(const word) malloc::size#2 @28/(word) malloc::size#4 @29/(word) malloc::size#5 init_buckets::@5/(word) malloc::size#6 init_squares/(word) malloc::size#0 ) + [0] (byte*) heap_head#18 ← phi( @21/(const byte*) HEAP_TOP#0 @22/(byte*) heap_head#1 @26/(byte*) heap_head#1 @28/(byte*) heap_head#1 @29/(byte*) heap_head#1 init_buckets::@5/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [1] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 + [2] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [4] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [5] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [5] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [6] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (byte) bsearch16u::num#9 ← phi( ) + [7] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [9] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [12] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [13] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [14] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (byte) bsearch16u::num#10 ← phi( ) + [15] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [16] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [17] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [18] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#2 ) + [18] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [19] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( ) + [20] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [21] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + [22] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [23] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#2 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@16: scope:[] from @8 + to:@19 +init_squares: scope:[init_squares] from init_dist_screen + [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [25] call malloc + [26] (void*) malloc::return#10 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [27] (void*~) init_squares::$1 ← (void*) malloc::return#10 + [28] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [29] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [31] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [31] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [31] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [32] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [33] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [34] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [35] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [36] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [37] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [38] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [39] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [40] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [41] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [42] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [43] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [44] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [45] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [46] call bsearch16u + [47] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [48] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [49] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [50] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [51] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [52] return + to:@return +@19: scope:[] from @16 + to:@21 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [53] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [54] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [55] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::y#0 atan2_16::@2/(signed word~) atan2_16::$2 ) + [56] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [57] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [58] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::x#0 atan2_16::@5/(signed word~) atan2_16::$7 ) + [59] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + [60] (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(const word) atan2_16::angle#0 ) + [60] (byte) atan2_16::i#2 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(const byte) atan2_16::i#0 ) + [60] (signed word) atan2_16::xi#3 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [60] (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + [62] (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + [63] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 + [64] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + [65] (signed word) atan2_16::yd#3 ← phi( atan2_16::@16/(signed word) atan2_16::yi#3 atan2_16::@19/(signed word) atan2_16::yd#1 ) + [65] (signed word) atan2_16::xd#3 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xd#1 ) + [65] (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::shift#1 ) + [66] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + [67] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [68] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [69] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + [70] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + [71] (signed word) atan2_16::xd#5 ← phi( atan2_16::@20/(signed word) atan2_16::xd#3 atan2_16::@24/(signed word) atan2_16::xd#2 ) + [71] (signed word) atan2_16::yd#5 ← phi( atan2_16::@20/(signed word) atan2_16::yd#3 atan2_16::@24/(signed word) atan2_16::yd#2 ) + [72] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + [73] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [74] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + [75] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [76] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [77] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [78] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + [79] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [80] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [81] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [82] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + [83] (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + [83] (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + [83] (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + [84] (byte) atan2_16::i#1 ← (byte) atan2_16::i#2 + rangenext(0,atan2_16::$16) + [85] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 + to:atan2_16::@15 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + [86] (word) atan2_16::angle#11 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + [87] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + [88] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + [89] (word) atan2_16::return#0 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + [90] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [91] return + to:@return +@21: scope:[] from @19 + [92] call malloc + [93] (void*) malloc::return#11 ← (void*) malloc::return#0 + to:@26 +@26: scope:[] from @21 + [94] (void*~) $0 ← (void*) malloc::return#11 + [95] (byte[]) SCREEN_DIST#0 ← (byte[])(void*~) $0 + [96] call malloc + [97] (void*) malloc::return#12 ← (void*) malloc::return#0 + to:@27 +@27: scope:[] from @26 + [98] (void*~) $1 ← (void*) malloc::return#12 + [99] (byte[]) SCREEN_ANGLE#0 ← (byte[])(void*~) $1 + to:@22 +main: scope:[main] from @25 + asm { sei } + [101] (byte*) init_dist_screen::screen#0 ← (byte[]) SCREEN_DIST#0 + [102] call init_dist_screen + to:main::@30 +main::@30: scope:[main] from main + [103] (byte*) init_angle_screen::screen#0 ← (byte[]) SCREEN_ANGLE#0 + [104] call init_angle_screen + to:main::@31 +main::@31: scope:[main] from main::@30 + [105] (byte*) init_buckets::screen#0 ← (byte[]) SCREEN_DIST#0 + [106] call init_buckets + to:main::@32 +main::@32: scope:[main] from main::@31 + to:main::@1 +main::@1: scope:[main] from main::@14 main::@17 main::@32 + [107] (byte) main::bucket_idx#6 ← phi( main::@14/(byte) main::bucket_idx#6 main::@17/(byte) main::bucket_idx#1 main::@32/(const byte) main::bucket_idx#0 ) + to:main::@4 +main::@4: scope:[main] from main::@1 main::@4 + [108] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@4 + to:main::@5 +main::@5: scope:[main] from main::@4 + [109] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + [110] (byte~) main::$21 ← (byte) main::bucket_idx#6 * (const byte) SIZEOF_POINTER + [111] (word[]) main::bucket#0 ← *((word*[]) BUCKETS#0 + (byte~) main::$21) + [112] (byte) main::bucket_size#0 ← *((byte[]) BUCKET_SIZES#0 + (byte) main::bucket_idx#6) + [113] if((byte) main::bucket_size#0<=(byte) 0) goto main::@7 + to:main::@6 +main::@7: scope:[main] from main::@13 main::@5 + [114] (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#6 + [115] if((byte) main::bucket_idx#1!=(const byte) NUM_BUCKETS#0) goto main::@17 + to:main::@21 +main::@6: scope:[main] from main::@5 + to:main::@8 +main::@8: scope:[main] from main::@6 main::@9 + [116] (word) main::min_offset#5 ← phi( main::@6/(const word) main::min_offset#0 main::@9/(word) main::min_offset#2 ) + [116] (byte) main::min_angle#2 ← phi( main::@6/(const byte) main::min_angle#0 main::@9/(byte) main::min_angle#4 ) + [116] (byte) main::i#2 ← phi( main::@6/(const byte) main::i#0 main::@9/(byte) main::i#1 ) + [117] (byte~) main::$22 ← (byte) main::i#2 * (const byte) SIZEOF_WORD + [118] (word) main::offset#0 ← *((word[]) main::bucket#0 + (byte~) main::$22) + [119] (byte*) main::fill#0 ← (const byte*) SCREEN_FILL#0 + (word) main::offset#0 + [120] if(*((byte*) main::fill#0)==(const byte) FILL_CHAR#0) goto main::@9 + to:main::@11 +main::@9: scope:[main] from main::@11 main::@12 main::@8 + [121] (byte) main::min_angle#4 ← phi( main::@11/(byte) main::min_angle#2 main::@12/(byte) main::min_angle#1 main::@8/(byte) main::min_angle#2 ) + [121] (word) main::min_offset#2 ← phi( main::@11/(word) main::min_offset#5 main::@12/(word) main::offset#0 main::@8/(word) main::min_offset#5 ) + [122] (byte) main::i#1 ← ++ (byte) main::i#2 + [123] if((byte) main::i#1<(byte) main::bucket_size#0) goto main::@8 + to:main::@13 +main::@11: scope:[main] from main::@8 + [124] (byte*) main::angle#0 ← (byte[]) SCREEN_ANGLE#0 + (word) main::offset#0 + [125] if(*((byte*) main::angle#0)>(byte) main::min_angle#2) goto main::@9 + to:main::@12 +main::@12: scope:[main] from main::@11 + [126] (byte) main::min_angle#1 ← *((byte*) main::angle#0) + to:main::@9 +main::@13: scope:[main] from main::@9 + [127] if((word) main::min_offset#2==(word) $ffff) goto main::@7 + to:main::@14 +main::@14: scope:[main] from main::@13 + [128] (byte*) main::fill1#0 ← (const byte*) SCREEN_FILL#0 + (word) main::min_offset#2 + [129] *((byte*) main::fill1#0) ← (const byte) FILL_CHAR#0 + [130] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) + to:main::@1 +main::@17: scope:[main] from main::@7 + [131] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) + to:main::@1 +main::@21: scope:[main] from main::@7 + [132] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) + to:main::@24 +main::@24: scope:[main] from main::@21 main::@25 + to:main::@25 +main::@25: scope:[main] from main::@24 + [133] (byte*~) main::$20 ← (const byte*) COLS#0 + (word) $3e7 + [134] *((byte*~) main::$20) ← ++ *((byte*~) main::$20) + to:main::@24 +@22: scope:[] from @27 + [135] (word) malloc::size#3 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE + [136] call malloc + [137] (void*) malloc::return#13 ← (void*) malloc::return#0 + to:@28 +@28: scope:[] from @22 + [138] (void*~) $3 ← (void*) malloc::return#13 + [139] (byte[]) BUCKET_SIZES#0 ← (byte[])(void*~) $3 + [140] (word) malloc::size#4 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_POINTER + [141] call malloc + [142] (void*) malloc::return#14 ← (void*) malloc::return#0 + to:@29 +@29: scope:[] from @28 + [143] (void*~) $5 ← (void*) malloc::return#14 + [144] (word*[]) BUCKETS#0 ← (word*[])(void*~) $5 + [145] (word) malloc::size#5 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE + [146] call malloc + [147] (void*) malloc::return#15 ← (void*) malloc::return#0 + to:@30 +@30: scope:[] from @29 + [148] (void*~) $7 ← (void*) malloc::return#15 + [149] (byte[]) BUCKET_IDX#0 ← (byte[])(void*~) $7 + to:@25 +init_buckets: scope:[init_buckets] from main::@31 + [150] (byte~) init_buckets::$0 ← (const byte) NUM_BUCKETS#0 - (byte) 1 + to:init_buckets::@1 +init_buckets::@1: scope:[init_buckets] from init_buckets init_buckets::@1 + [151] (byte) init_buckets::i#2 ← phi( init_buckets/(const byte) init_buckets::i#0 init_buckets::@1/(byte) init_buckets::i#1 ) + [152] *((byte[]) BUCKET_SIZES#0 + (byte) init_buckets::i#2) ← (byte) 0 + [153] (byte) init_buckets::i#1 ← (byte) init_buckets::i#2 + rangenext(0,init_buckets::$0) + [154] if((byte) init_buckets::i#1!=rangelast(0,init_buckets::$0)) goto init_buckets::@1 + to:init_buckets::@2 +init_buckets::@2: scope:[init_buckets] from init_buckets::@1 + to:init_buckets::@3 +init_buckets::@3: scope:[init_buckets] from init_buckets::@2 init_buckets::@3 + [155] (word) init_buckets::i1#2 ← phi( init_buckets::@2/(const word) init_buckets::i1#0 init_buckets::@3/(word) init_buckets::i1#1 ) + [155] (byte*) init_buckets::dist#4 ← phi( init_buckets::@2/(byte*) init_buckets::screen#0 init_buckets::@3/(byte*) init_buckets::dist#1 ) + [156] *((byte[]) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4)) ← ++ *((byte[]) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4)) + [157] (byte*) init_buckets::dist#1 ← ++ (byte*) init_buckets::dist#4 + [158] (word) init_buckets::i1#1 ← ++ (word) init_buckets::i1#2 + [159] if((word) init_buckets::i1#1!=(number) $3e8) goto init_buckets::@3 + to:init_buckets::@4 +init_buckets::@4: scope:[init_buckets] from init_buckets::@3 + [160] (byte~) init_buckets::$3 ← (const byte) NUM_BUCKETS#0 - (byte) 1 + to:init_buckets::@5 +init_buckets::@5: scope:[init_buckets] from init_buckets::@11 init_buckets::@4 + [161] (word) init_buckets::i2#2 ← phi( init_buckets::@11/(word) init_buckets::i2#1 init_buckets::@4/(const word) init_buckets::i2#0 ) + [162] (byte*~) init_buckets::$15 ← (byte[]) BUCKET_SIZES#0 + (word) init_buckets::i2#2 + [163] (word) malloc::size#6 ← *((byte*~) init_buckets::$15) * (const byte) SIZEOF_POINTER + [164] call malloc + [165] (void*) malloc::return#16 ← (void*) malloc::return#0 + to:init_buckets::@11 +init_buckets::@11: scope:[init_buckets] from init_buckets::@5 + [166] (void*~) init_buckets::$5 ← (void*) malloc::return#16 + [167] (word~) init_buckets::$12 ← (word) init_buckets::i2#2 * (const byte) SIZEOF_POINTER + [168] (word**~) init_buckets::$16 ← (word*[]) BUCKETS#0 + (word~) init_buckets::$12 + [169] *((word**~) init_buckets::$16) ← (word*)(void*~) init_buckets::$5 + [170] (word) init_buckets::i2#1 ← (word) init_buckets::i2#2 + rangenext(0,init_buckets::$3) + [171] if((word) init_buckets::i2#1!=rangelast(0,init_buckets::$3)) goto init_buckets::@5 + to:init_buckets::@6 +init_buckets::@6: scope:[init_buckets] from init_buckets::@11 + [172] (byte~) init_buckets::$7 ← (const byte) NUM_BUCKETS#0 - (byte) 1 + to:init_buckets::@7 +init_buckets::@7: scope:[init_buckets] from init_buckets::@6 init_buckets::@7 + [173] (byte) init_buckets::i3#2 ← phi( init_buckets::@6/(const byte) init_buckets::i3#0 init_buckets::@7/(byte) init_buckets::i3#1 ) + [174] *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::i3#2) ← (byte) 0 + [175] (byte) init_buckets::i3#1 ← (byte) init_buckets::i3#2 + rangenext(0,init_buckets::$7) + [176] if((byte) init_buckets::i3#1!=rangelast(0,init_buckets::$7)) goto init_buckets::@7 + to:init_buckets::@8 +init_buckets::@8: scope:[init_buckets] from init_buckets::@7 + to:init_buckets::@9 +init_buckets::@9: scope:[init_buckets] from init_buckets::@8 init_buckets::@9 + [177] (word) init_buckets::i4#2 ← phi( init_buckets::@8/(const word) init_buckets::i4#0 init_buckets::@9/(word) init_buckets::i4#1 ) + [177] (byte*) init_buckets::dist#5 ← phi( init_buckets::@8/(byte*) init_buckets::screen#0 init_buckets::@9/(byte*) init_buckets::dist#3 ) + [178] (byte) init_buckets::distance#0 ← *((byte*) init_buckets::dist#5) + [179] (word~) init_buckets::$9 ← (word)(byte) init_buckets::distance#0 + [180] (word~) init_buckets::$13 ← (word~) init_buckets::$9 * (const byte) SIZEOF_POINTER + [181] (word**~) init_buckets::$17 ← (word*[]) BUCKETS#0 + (word~) init_buckets::$13 + [182] (word*) init_buckets::bucket#0 ← *((word**~) init_buckets::$17) + [183] (word~) init_buckets::$10 ← (byte*) init_buckets::dist#5 - (byte*) init_buckets::screen#0 + [184] (byte~) init_buckets::$14 ← *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) * (const byte) SIZEOF_WORD + [185] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$14) ← (word~) init_buckets::$10 + [186] *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) ← ++ *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) + [187] (byte*) init_buckets::dist#3 ← ++ (byte*) init_buckets::dist#5 + [188] (word) init_buckets::i4#1 ← ++ (word) init_buckets::i4#2 + [189] if((word) init_buckets::i4#1!=(number) $3e8) goto init_buckets::@9 + to:init_buckets::@return +init_buckets::@return: scope:[init_buckets] from init_buckets::@9 + [190] return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@30 + [191] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [192] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [193] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [193] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [193] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(const byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + [194] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + [194] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + [195] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 + [196] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [197] (word~) init_angle_screen::$4 ← (byte)(byte~) init_angle_screen::$3 w= (byte) 0 + [198] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 + [199] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 + [200] (word~) init_angle_screen::$7 ← (byte)(byte~) init_angle_screen::$6 w= (byte) 0 + [201] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 + [202] (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + [203] (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + [204] call atan2_16 + [205] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + [206] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [207] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [208] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [209] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [210] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [211] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [212] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [213] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [214] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [215] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [216] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [217] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [218] if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + [219] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [220] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [221] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [222] if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [223] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main + [224] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [225] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [226] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [226] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen#0 ) + [226] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [227] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [228] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [229] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [230] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [231] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [232] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [233] call sqr + [234] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [235] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [236] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [236] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [237] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [238] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [239] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [240] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [241] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [242] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [243] call sqr + [244] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [245] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [246] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [247] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [248] call sqrt + [249] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [250] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [251] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [252] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [253] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [254] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [255] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [256] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [257] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [258] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [259] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [260] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [261] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [262] return + to:@return +@25: scope:[] from @30 + [263] call main + to:@31 +@31: scope:[] from @25 + to:@end +@end: scope:[] from @31 + +GRAPH (NEW VERSIONS for bsearch16u::items#2) +@begin: scope:[] from + to:@8 +@8: scope:[] from @begin + to:@16 +malloc: scope:[malloc] from @21 @22 @26 @28 @29 init_buckets::@5 init_squares + [0] (word) malloc::size#7 ← phi( @21/(const word) malloc::size#1 @22/(word) malloc::size#3 @26/(const word) malloc::size#2 @28/(word) malloc::size#4 @29/(word) malloc::size#5 init_buckets::@5/(word) malloc::size#6 init_squares/(word) malloc::size#0 ) + [0] (byte*) heap_head#18 ← phi( @21/(const byte*) HEAP_TOP#0 @22/(byte*) heap_head#1 @26/(byte*) heap_head#1 @28/(byte*) heap_head#1 @29/(byte*) heap_head#1 init_buckets::@5/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [1] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 + [2] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [4] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [5] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [5] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [6] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#10 ← phi( ) + (byte) bsearch16u::num#9 ← phi( bsearch16u::@6/(byte) bsearch16u::num#3 ) + [7] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [9] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [12] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [13] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#11 ← phi( ) + [14] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (word*) bsearch16u::items#12 ← phi( ) + (byte) bsearch16u::num#10 ← phi( bsearch16u::@7/(byte) bsearch16u::num#9 ) + [15] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [16] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [17] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [18] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#12 ) + [18] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [19] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( bsearch16u::@9/(byte) bsearch16u::num#10 ) + [20] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [21] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#14 ← phi( ) + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#13 ← phi( ) + [22] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#13 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [23] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#14 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@16: scope:[] from @8 + to:@19 +init_squares: scope:[init_squares] from init_dist_screen + [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [25] call malloc + [26] (void*) malloc::return#10 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [27] (void*~) init_squares::$1 ← (void*) malloc::return#10 + [28] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [29] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [31] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [31] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [31] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [32] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [33] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [34] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [35] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [36] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [37] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [38] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [39] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [40] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [41] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [42] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [43] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [44] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [45] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [46] call bsearch16u + [47] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [48] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [49] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [50] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [51] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [52] return + to:@return +@19: scope:[] from @16 + to:@21 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [53] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [54] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [55] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::y#0 atan2_16::@2/(signed word~) atan2_16::$2 ) + [56] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [57] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [58] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::x#0 atan2_16::@5/(signed word~) atan2_16::$7 ) + [59] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + [60] (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(const word) atan2_16::angle#0 ) + [60] (byte) atan2_16::i#2 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(const byte) atan2_16::i#0 ) + [60] (signed word) atan2_16::xi#3 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [60] (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + [62] (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + [63] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 + [64] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + [65] (signed word) atan2_16::yd#3 ← phi( atan2_16::@16/(signed word) atan2_16::yi#3 atan2_16::@19/(signed word) atan2_16::yd#1 ) + [65] (signed word) atan2_16::xd#3 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xd#1 ) + [65] (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::shift#1 ) + [66] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + [67] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [68] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [69] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + [70] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + [71] (signed word) atan2_16::xd#5 ← phi( atan2_16::@20/(signed word) atan2_16::xd#3 atan2_16::@24/(signed word) atan2_16::xd#2 ) + [71] (signed word) atan2_16::yd#5 ← phi( atan2_16::@20/(signed word) atan2_16::yd#3 atan2_16::@24/(signed word) atan2_16::yd#2 ) + [72] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + [73] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [74] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + [75] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [76] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [77] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [78] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + [79] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [80] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [81] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [82] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + [83] (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + [83] (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + [83] (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + [84] (byte) atan2_16::i#1 ← (byte) atan2_16::i#2 + rangenext(0,atan2_16::$16) + [85] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 + to:atan2_16::@15 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + [86] (word) atan2_16::angle#11 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + [87] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + [88] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + [89] (word) atan2_16::return#0 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + [90] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [91] return + to:@return +@21: scope:[] from @19 + [92] call malloc + [93] (void*) malloc::return#11 ← (void*) malloc::return#0 + to:@26 +@26: scope:[] from @21 + [94] (void*~) $0 ← (void*) malloc::return#11 + [95] (byte[]) SCREEN_DIST#0 ← (byte[])(void*~) $0 + [96] call malloc + [97] (void*) malloc::return#12 ← (void*) malloc::return#0 + to:@27 +@27: scope:[] from @26 + [98] (void*~) $1 ← (void*) malloc::return#12 + [99] (byte[]) SCREEN_ANGLE#0 ← (byte[])(void*~) $1 + to:@22 +main: scope:[main] from @25 + asm { sei } + [101] (byte*) init_dist_screen::screen#0 ← (byte[]) SCREEN_DIST#0 + [102] call init_dist_screen + to:main::@30 +main::@30: scope:[main] from main + [103] (byte*) init_angle_screen::screen#0 ← (byte[]) SCREEN_ANGLE#0 + [104] call init_angle_screen + to:main::@31 +main::@31: scope:[main] from main::@30 + [105] (byte*) init_buckets::screen#0 ← (byte[]) SCREEN_DIST#0 + [106] call init_buckets + to:main::@32 +main::@32: scope:[main] from main::@31 + to:main::@1 +main::@1: scope:[main] from main::@14 main::@17 main::@32 + [107] (byte) main::bucket_idx#6 ← phi( main::@14/(byte) main::bucket_idx#6 main::@17/(byte) main::bucket_idx#1 main::@32/(const byte) main::bucket_idx#0 ) + to:main::@4 +main::@4: scope:[main] from main::@1 main::@4 + [108] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@4 + to:main::@5 +main::@5: scope:[main] from main::@4 + [109] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + [110] (byte~) main::$21 ← (byte) main::bucket_idx#6 * (const byte) SIZEOF_POINTER + [111] (word[]) main::bucket#0 ← *((word*[]) BUCKETS#0 + (byte~) main::$21) + [112] (byte) main::bucket_size#0 ← *((byte[]) BUCKET_SIZES#0 + (byte) main::bucket_idx#6) + [113] if((byte) main::bucket_size#0<=(byte) 0) goto main::@7 + to:main::@6 +main::@7: scope:[main] from main::@13 main::@5 + [114] (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#6 + [115] if((byte) main::bucket_idx#1!=(const byte) NUM_BUCKETS#0) goto main::@17 + to:main::@21 +main::@6: scope:[main] from main::@5 + to:main::@8 +main::@8: scope:[main] from main::@6 main::@9 + [116] (word) main::min_offset#5 ← phi( main::@6/(const word) main::min_offset#0 main::@9/(word) main::min_offset#2 ) + [116] (byte) main::min_angle#2 ← phi( main::@6/(const byte) main::min_angle#0 main::@9/(byte) main::min_angle#4 ) + [116] (byte) main::i#2 ← phi( main::@6/(const byte) main::i#0 main::@9/(byte) main::i#1 ) + [117] (byte~) main::$22 ← (byte) main::i#2 * (const byte) SIZEOF_WORD + [118] (word) main::offset#0 ← *((word[]) main::bucket#0 + (byte~) main::$22) + [119] (byte*) main::fill#0 ← (const byte*) SCREEN_FILL#0 + (word) main::offset#0 + [120] if(*((byte*) main::fill#0)==(const byte) FILL_CHAR#0) goto main::@9 + to:main::@11 +main::@9: scope:[main] from main::@11 main::@12 main::@8 + [121] (byte) main::min_angle#4 ← phi( main::@11/(byte) main::min_angle#2 main::@12/(byte) main::min_angle#1 main::@8/(byte) main::min_angle#2 ) + [121] (word) main::min_offset#2 ← phi( main::@11/(word) main::min_offset#5 main::@12/(word) main::offset#0 main::@8/(word) main::min_offset#5 ) + [122] (byte) main::i#1 ← ++ (byte) main::i#2 + [123] if((byte) main::i#1<(byte) main::bucket_size#0) goto main::@8 + to:main::@13 +main::@11: scope:[main] from main::@8 + [124] (byte*) main::angle#0 ← (byte[]) SCREEN_ANGLE#0 + (word) main::offset#0 + [125] if(*((byte*) main::angle#0)>(byte) main::min_angle#2) goto main::@9 + to:main::@12 +main::@12: scope:[main] from main::@11 + [126] (byte) main::min_angle#1 ← *((byte*) main::angle#0) + to:main::@9 +main::@13: scope:[main] from main::@9 + [127] if((word) main::min_offset#2==(word) $ffff) goto main::@7 + to:main::@14 +main::@14: scope:[main] from main::@13 + [128] (byte*) main::fill1#0 ← (const byte*) SCREEN_FILL#0 + (word) main::min_offset#2 + [129] *((byte*) main::fill1#0) ← (const byte) FILL_CHAR#0 + [130] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) + to:main::@1 +main::@17: scope:[main] from main::@7 + [131] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) + to:main::@1 +main::@21: scope:[main] from main::@7 + [132] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) + to:main::@24 +main::@24: scope:[main] from main::@21 main::@25 + to:main::@25 +main::@25: scope:[main] from main::@24 + [133] (byte*~) main::$20 ← (const byte*) COLS#0 + (word) $3e7 + [134] *((byte*~) main::$20) ← ++ *((byte*~) main::$20) + to:main::@24 +@22: scope:[] from @27 + [135] (word) malloc::size#3 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE + [136] call malloc + [137] (void*) malloc::return#13 ← (void*) malloc::return#0 + to:@28 +@28: scope:[] from @22 + [138] (void*~) $3 ← (void*) malloc::return#13 + [139] (byte[]) BUCKET_SIZES#0 ← (byte[])(void*~) $3 + [140] (word) malloc::size#4 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_POINTER + [141] call malloc + [142] (void*) malloc::return#14 ← (void*) malloc::return#0 + to:@29 +@29: scope:[] from @28 + [143] (void*~) $5 ← (void*) malloc::return#14 + [144] (word*[]) BUCKETS#0 ← (word*[])(void*~) $5 + [145] (word) malloc::size#5 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE + [146] call malloc + [147] (void*) malloc::return#15 ← (void*) malloc::return#0 + to:@30 +@30: scope:[] from @29 + [148] (void*~) $7 ← (void*) malloc::return#15 + [149] (byte[]) BUCKET_IDX#0 ← (byte[])(void*~) $7 + to:@25 +init_buckets: scope:[init_buckets] from main::@31 + [150] (byte~) init_buckets::$0 ← (const byte) NUM_BUCKETS#0 - (byte) 1 + to:init_buckets::@1 +init_buckets::@1: scope:[init_buckets] from init_buckets init_buckets::@1 + [151] (byte) init_buckets::i#2 ← phi( init_buckets/(const byte) init_buckets::i#0 init_buckets::@1/(byte) init_buckets::i#1 ) + [152] *((byte[]) BUCKET_SIZES#0 + (byte) init_buckets::i#2) ← (byte) 0 + [153] (byte) init_buckets::i#1 ← (byte) init_buckets::i#2 + rangenext(0,init_buckets::$0) + [154] if((byte) init_buckets::i#1!=rangelast(0,init_buckets::$0)) goto init_buckets::@1 + to:init_buckets::@2 +init_buckets::@2: scope:[init_buckets] from init_buckets::@1 + to:init_buckets::@3 +init_buckets::@3: scope:[init_buckets] from init_buckets::@2 init_buckets::@3 + [155] (word) init_buckets::i1#2 ← phi( init_buckets::@2/(const word) init_buckets::i1#0 init_buckets::@3/(word) init_buckets::i1#1 ) + [155] (byte*) init_buckets::dist#4 ← phi( init_buckets::@2/(byte*) init_buckets::screen#0 init_buckets::@3/(byte*) init_buckets::dist#1 ) + [156] *((byte[]) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4)) ← ++ *((byte[]) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4)) + [157] (byte*) init_buckets::dist#1 ← ++ (byte*) init_buckets::dist#4 + [158] (word) init_buckets::i1#1 ← ++ (word) init_buckets::i1#2 + [159] if((word) init_buckets::i1#1!=(number) $3e8) goto init_buckets::@3 + to:init_buckets::@4 +init_buckets::@4: scope:[init_buckets] from init_buckets::@3 + [160] (byte~) init_buckets::$3 ← (const byte) NUM_BUCKETS#0 - (byte) 1 + to:init_buckets::@5 +init_buckets::@5: scope:[init_buckets] from init_buckets::@11 init_buckets::@4 + [161] (word) init_buckets::i2#2 ← phi( init_buckets::@11/(word) init_buckets::i2#1 init_buckets::@4/(const word) init_buckets::i2#0 ) + [162] (byte*~) init_buckets::$15 ← (byte[]) BUCKET_SIZES#0 + (word) init_buckets::i2#2 + [163] (word) malloc::size#6 ← *((byte*~) init_buckets::$15) * (const byte) SIZEOF_POINTER + [164] call malloc + [165] (void*) malloc::return#16 ← (void*) malloc::return#0 + to:init_buckets::@11 +init_buckets::@11: scope:[init_buckets] from init_buckets::@5 + [166] (void*~) init_buckets::$5 ← (void*) malloc::return#16 + [167] (word~) init_buckets::$12 ← (word) init_buckets::i2#2 * (const byte) SIZEOF_POINTER + [168] (word**~) init_buckets::$16 ← (word*[]) BUCKETS#0 + (word~) init_buckets::$12 + [169] *((word**~) init_buckets::$16) ← (word*)(void*~) init_buckets::$5 + [170] (word) init_buckets::i2#1 ← (word) init_buckets::i2#2 + rangenext(0,init_buckets::$3) + [171] if((word) init_buckets::i2#1!=rangelast(0,init_buckets::$3)) goto init_buckets::@5 + to:init_buckets::@6 +init_buckets::@6: scope:[init_buckets] from init_buckets::@11 + [172] (byte~) init_buckets::$7 ← (const byte) NUM_BUCKETS#0 - (byte) 1 + to:init_buckets::@7 +init_buckets::@7: scope:[init_buckets] from init_buckets::@6 init_buckets::@7 + [173] (byte) init_buckets::i3#2 ← phi( init_buckets::@6/(const byte) init_buckets::i3#0 init_buckets::@7/(byte) init_buckets::i3#1 ) + [174] *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::i3#2) ← (byte) 0 + [175] (byte) init_buckets::i3#1 ← (byte) init_buckets::i3#2 + rangenext(0,init_buckets::$7) + [176] if((byte) init_buckets::i3#1!=rangelast(0,init_buckets::$7)) goto init_buckets::@7 + to:init_buckets::@8 +init_buckets::@8: scope:[init_buckets] from init_buckets::@7 + to:init_buckets::@9 +init_buckets::@9: scope:[init_buckets] from init_buckets::@8 init_buckets::@9 + [177] (word) init_buckets::i4#2 ← phi( init_buckets::@8/(const word) init_buckets::i4#0 init_buckets::@9/(word) init_buckets::i4#1 ) + [177] (byte*) init_buckets::dist#5 ← phi( init_buckets::@8/(byte*) init_buckets::screen#0 init_buckets::@9/(byte*) init_buckets::dist#3 ) + [178] (byte) init_buckets::distance#0 ← *((byte*) init_buckets::dist#5) + [179] (word~) init_buckets::$9 ← (word)(byte) init_buckets::distance#0 + [180] (word~) init_buckets::$13 ← (word~) init_buckets::$9 * (const byte) SIZEOF_POINTER + [181] (word**~) init_buckets::$17 ← (word*[]) BUCKETS#0 + (word~) init_buckets::$13 + [182] (word*) init_buckets::bucket#0 ← *((word**~) init_buckets::$17) + [183] (word~) init_buckets::$10 ← (byte*) init_buckets::dist#5 - (byte*) init_buckets::screen#0 + [184] (byte~) init_buckets::$14 ← *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) * (const byte) SIZEOF_WORD + [185] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$14) ← (word~) init_buckets::$10 + [186] *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) ← ++ *((byte[]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) + [187] (byte*) init_buckets::dist#3 ← ++ (byte*) init_buckets::dist#5 + [188] (word) init_buckets::i4#1 ← ++ (word) init_buckets::i4#2 + [189] if((word) init_buckets::i4#1!=(number) $3e8) goto init_buckets::@9 + to:init_buckets::@return +init_buckets::@return: scope:[init_buckets] from init_buckets::@9 + [190] return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@30 + [191] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [192] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [193] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [193] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [193] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(const byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + [194] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + [194] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + [195] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 + [196] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [197] (word~) init_angle_screen::$4 ← (byte)(byte~) init_angle_screen::$3 w= (byte) 0 + [198] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 + [199] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 + [200] (word~) init_angle_screen::$7 ← (byte)(byte~) init_angle_screen::$6 w= (byte) 0 + [201] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 + [202] (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + [203] (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + [204] call atan2_16 + [205] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + [206] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [207] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [208] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [209] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [210] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [211] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [212] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [213] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [214] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [215] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [216] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [217] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [218] if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + [219] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [220] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [221] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [222] if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [223] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main + [224] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [225] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [226] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [226] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen#0 ) + [226] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [227] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [228] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [229] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [230] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [231] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [232] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [233] call sqr + [234] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [235] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [236] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [236] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [237] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [238] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [239] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [240] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [241] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [242] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [243] call sqr + [244] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [245] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [246] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [247] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [248] call sqrt + [249] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [250] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [251] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [252] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [253] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [254] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [255] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [256] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [257] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [258] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [259] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [260] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [261] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [262] return + to:@return +@25: scope:[] from @30 + [263] call main + to:@31 +@31: scope:[] from @25 + to:@end +@end: scope:[] from @31 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $3e8 in if((word) init_buckets::i1#1!=(number) $3e8) goto init_buckets::@3 Adding number conversion cast (unumber) $3e8 in if((word) init_buckets::i4#1!=(number) $3e8) goto init_buckets::@9 Adding number conversion cast (unumber) $13+1 in if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 @@ -2923,16 +3961,25 @@ Finalized unsigned number type (byte) $d Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 -Constant right-side identified [59] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 -Constant right-side identified [133] (byte*~) main::$20 ← (const byte*) COLS#0 + (word) $3e7 -Constant right-side identified [135] (word) malloc::size#3 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE -Constant right-side identified [140] (word) malloc::size#4 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_POINTER -Constant right-side identified [145] (word) malloc::size#5 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE -Constant right-side identified [150] (byte~) init_buckets::$0 ← (const byte) NUM_BUCKETS#0 - (byte) 1 -Constant right-side identified [160] (byte~) init_buckets::$3 ← (const byte) NUM_BUCKETS#0 - (byte) 1 -Constant right-side identified [172] (byte~) init_buckets::$7 ← (const byte) NUM_BUCKETS#0 - (byte) 1 +Alias (byte) bsearch16u::num#0 = (byte) bsearch16u::num#3 +Alias (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 +Alias (byte) bsearch16u::num#10 = (byte) bsearch16u::num#9 (byte) bsearch16u::num#11 +Alias (word*) bsearch16u::items#10 = (word*) bsearch16u::items#12 +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#14 (word*) bsearch16u::items#13 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) bsearch16u::num#12 (const byte) bsearch16u::num#2 +Identical Phi Values (word*) bsearch16u::items#15 (word*) bsearch16u::items#1 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [30] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD +Constant right-side identified [36] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 +Constant right-side identified [65] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 +Constant right-side identified [139] (byte*~) main::$20 ← (const byte*) COLS#0 + (word) $3e7 +Constant right-side identified [141] (word) malloc::size#3 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE +Constant right-side identified [146] (word) malloc::size#4 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_POINTER +Constant right-side identified [151] (word) malloc::size#5 ← (const byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE +Constant right-side identified [156] (byte~) init_buckets::$0 ← (const byte) NUM_BUCKETS#0 - (byte) 1 +Constant right-side identified [166] (byte~) init_buckets::$3 ← (const byte) NUM_BUCKETS#0 - (byte) 1 +Constant right-side identified [178] (byte~) init_buckets::$7 ← (const byte) NUM_BUCKETS#0 - (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 @@ -2945,16 +3992,19 @@ Constant (const byte) init_buckets::$0 = NUM_BUCKETS#0-1 Constant (const byte) init_buckets::$3 = NUM_BUCKETS#0-1 Constant (const byte) init_buckets::$7 = NUM_BUCKETS#0-1 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [37] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [38] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Resolved ranged next value [84] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [85] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 -Resolved ranged next value [153] init_buckets::i#1 ← ++ init_buckets::i#2 to ++ -Resolved ranged comparison value [154] if(init_buckets::i#1!=rangelast(0,init_buckets::$0)) goto init_buckets::@1 to (const byte) init_buckets::$0+(number) 1 -Resolved ranged next value [170] init_buckets::i2#1 ← ++ init_buckets::i2#2 to ++ -Resolved ranged comparison value [171] if(init_buckets::i2#1!=rangelast(0,init_buckets::$3)) goto init_buckets::@5 to (const byte) init_buckets::$3+(number) 1 -Resolved ranged next value [175] init_buckets::i3#1 ← ++ init_buckets::i3#2 to ++ -Resolved ranged comparison value [176] if(init_buckets::i3#1!=rangelast(0,init_buckets::$7)) goto init_buckets::@7 to (const byte) init_buckets::$7+(number) 1 +Removing PHI-reference to removed block (bsearch16u::@6_1) in block bsearch16u::@8 +if() condition always true - replacing block destination [271] if((const byte) bsearch16u::num#2>(byte) 0) goto bsearch16u::@7 +Successful SSA optimization Pass2ConstantIfs +Resolved ranged next value [43] init_squares::i#1 ← ++ init_squares::i#2 to ++ +Resolved ranged comparison value [44] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 +Resolved ranged next value [90] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [91] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 +Resolved ranged next value [159] init_buckets::i#1 ← ++ init_buckets::i#2 to ++ +Resolved ranged comparison value [160] if(init_buckets::i#1!=rangelast(0,init_buckets::$0)) goto init_buckets::@1 to (const byte) init_buckets::$0+(number) 1 +Resolved ranged next value [176] init_buckets::i2#1 ← ++ init_buckets::i2#2 to ++ +Resolved ranged comparison value [177] if(init_buckets::i2#1!=rangelast(0,init_buckets::$3)) goto init_buckets::@5 to (const byte) init_buckets::$3+(number) 1 +Resolved ranged next value [181] init_buckets::i3#1 ← ++ init_buckets::i3#2 to ++ +Resolved ranged comparison value [182] if(init_buckets::i3#1!=rangelast(0,init_buckets::$7)) goto init_buckets::@7 to (const byte) init_buckets::$7+(number) 1 Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 @@ -2983,6 +4033,8 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#2 +Successful SSA optimization Pass2AliasElimination Inlining Noop Cast [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 Inlining Noop Cast [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 Inlining Noop Cast [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) @@ -3083,7 +4135,8 @@ Constant inlined bsearch16u::$18 = (byte) 1*(const byte) SIZEOF_WORD Constant inlined init_squares::i#0 = (byte) 0 Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) +Added new block during phi lifting bsearch16u::@18(between bsearch16u::@6 and bsearch16u::@7) +Added new block during phi lifting bsearch16u::@19(between bsearch16u::@9 and bsearch16u::@10) Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) @@ -3118,6 +4171,7 @@ Adding NOP phi() at start of init_buckets Adding NOP phi() at start of init_buckets::@4 Adding NOP phi() at start of init_buckets::@6 Adding NOP phi() at start of init_dist_screen +Adding NOP phi() at start of bsearch16u CALL GRAPH Calls in [] to malloc:5 malloc:8 malloc:11 malloc:14 malloc:17 main:20 Calls in [main] to init_dist_screen:25 init_angle_screen:27 init_buckets:29 @@ -3125,7 +4179,7 @@ Calls in [init_buckets] to malloc:88 Calls in [init_angle_screen] to atan2_16:139 Calls in [init_dist_screen] to init_squares:235 sqr:247 sqr:258 sqrt:263 Calls in [sqrt] to bsearch16u:289 -Calls in [init_squares] to malloc:329 +Calls in [init_squares] to malloc:330 Created 54 initial phi equivalence classes Coalesced [7] heap_head#83 ← heap_head#1 @@ -3207,22 +4261,22 @@ Coalesced [281] init_dist_screen::x#8 ← init_dist_screen::x#1 Coalesced [282] init_dist_screen::xb#8 ← init_dist_screen::xb#1 Coalesced [284] init_dist_screen::xd#1 ← init_dist_screen::$15 Coalesced [286] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [296] bsearch16u::items#10 ← bsearch16u::items#1 -Coalesced [301] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [303] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [306] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [312] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [316] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [317] bsearch16u::items#12 ← bsearch16u::items#0 -Coalesced [320] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [321] bsearch16u::items#11 ← bsearch16u::items#8 -Coalesced [322] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [323] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [328] heap_head#87 ← heap_head#1 -Coalesced [332] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [342] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [343] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [344] init_squares::i#3 ← init_squares::i#1 +Coalesced [297] bsearch16u::items#17 ← bsearch16u::items#1 +Coalesced [304] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [310] bsearch16u::num#14 ← bsearch16u::num#1 +Coalesced [311] bsearch16u::items#18 ← bsearch16u::items#0 +Coalesced [317] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [319] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [320] bsearch16u::return#8 ← bsearch16u::items#11 +Coalesced [321] bsearch16u::num#13 ← bsearch16u::num#0 +Not coalescing [322] bsearch16u::items#16 ← bsearch16u::items#11 +Coalesced [323] bsearch16u::num#15 ← bsearch16u::num#10 +Not coalescing [324] bsearch16u::items#19 ← bsearch16u::items#10 +Coalesced (already) [329] heap_head#87 ← heap_head#1 +Coalesced [333] init_squares::squares#4 ← init_squares::squares#0 +Coalesced [343] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [344] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [345] init_squares::i#3 ← init_squares::i#1 Coalesced down to 45 phi equivalence classes Culled Empty Block (label) @8 Culled Empty Block (label) @16 @@ -3248,8 +4302,9 @@ Culled Empty Block (label) atan2_16::@36 Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_dist_screen::@19 Culled Empty Block (label) init_dist_screen::@20 +Culled Empty Block (label) bsearch16u::@6_1 +Culled Empty Block (label) bsearch16u::@13 Culled Empty Block (label) bsearch16u::@1 -Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@4 Renumbering block @21 to @1 Renumbering block @22 to @2 @@ -3266,8 +4321,9 @@ Renumbering block bsearch16u::@7 to bsearch16u::@4 Renumbering block bsearch16u::@8 to bsearch16u::@5 Renumbering block bsearch16u::@9 to bsearch16u::@6 Renumbering block bsearch16u::@10 to bsearch16u::@7 -Renumbering block bsearch16u::@13 to bsearch16u::@8 -Renumbering block bsearch16u::@15 to bsearch16u::@9 +Renumbering block bsearch16u::@15 to bsearch16u::@8 +Renumbering block bsearch16u::@18 to bsearch16u::@9 +Renumbering block bsearch16u::@19 to bsearch16u::@10 Renumbering block init_squares::@3 to init_squares::@2 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block atan2_16::@13 to atan2_16::@9 @@ -3739,77 +4795,80 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [220] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [221] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(word*) bsearch16u::items#1 ) + [221] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [227] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [228] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [231] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [232] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#19 ) + [232] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [233] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [221] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [221] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [222] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [234] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [225] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [237] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [226] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [227] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [236] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [237] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [237] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [239] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + [240] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [242] return + [243] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [243] phi() - [244] call malloc + [244] phi() + [245] call malloc to:init_squares::@2 init_squares::@2: scope:[init_squares] from init_squares - [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [247] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [247] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [247] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [251] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [253] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [254] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [248] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [248] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [248] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [255] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [255] return + [256] return to:@return null depth in calling loop Loop head: init_buckets::@4 tails: init_buckets::@8 blocks: init_buckets::@8 init_buckets::@4 in scope malloc @@ -3899,24 +4958,25 @@ VARIABLE REGISTER WEIGHTS (word*) bsearch16u::items (word*) bsearch16u::items#0 1001.0 (word*) bsearch16u::items#1 2.0 -(word*) bsearch16u::items#2 334.5555555555556 -(word*) bsearch16u::items#8 1501.5 +(word*) bsearch16u::items#10 429.2857142857143 +(word*) bsearch16u::items#11 752.25 +(word*~) bsearch16u::items#16 2002.0 +(word*~) bsearch16u::items#19 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 0.26666666666666666 +(word) bsearch16u::key#0 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 2002.0 +(byte) bsearch16u::num#0 1001.0 (byte) bsearch16u::num#1 2002.0 -(byte) bsearch16u::num#3 556.1111111111111 +(byte) bsearch16u::num#10 444.8888888888889 (byte) bsearch16u::num#5 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 501.0 +(word*) bsearch16u::pivot#0 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 2.0 +(word*) bsearch16u::return#1 335.00000000000006 (word*) bsearch16u::return#2 6.0 (word*) bsearch16u::return#3 4.0 -(word*~) bsearch16u::return#6 4.0 (byte*) heap_head (byte*) heap_head#1 0.2446808510638298 (byte*) heap_head#18 23.0 @@ -4140,8 +5200,9 @@ Initial phi equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] @@ -4206,7 +5267,6 @@ Added variable sqrt::$1 to zero page equivalence class [ sqrt::$1 ] Added variable sqrt::return#0 to zero page equivalence class [ sqrt::return#0 ] Added variable bsearch16u::$6 to zero page equivalence class [ bsearch16u::$6 ] Added variable bsearch16u::$16 to zero page equivalence class [ bsearch16u::$16 ] -Added variable bsearch16u::pivot#0 to zero page equivalence class [ bsearch16u::pivot#0 ] Added variable bsearch16u::result#0 to zero page equivalence class [ bsearch16u::result#0 ] Added variable sqr::$0 to zero page equivalence class [ sqr::$0 ] Added variable sqr::return#0 to zero page equivalence class [ sqr::return#0 ] @@ -4248,8 +5308,9 @@ Complete equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] @@ -4314,7 +5375,6 @@ Complete equivalence classes [ sqrt::return#0 ] [ bsearch16u::$6 ] [ bsearch16u::$16 ] -[ bsearch16u::pivot#0 ] [ bsearch16u::result#0 ] [ sqr::$0 ] [ sqr::return#0 ] @@ -4355,73 +5415,73 @@ Allocated zp ZP_BYTE:51 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_ Allocated zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Allocated zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Allocated zp ZP_BYTE:54 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -Allocated zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -Allocated zp ZP_BYTE:57 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Allocated zp ZP_BYTE:58 [ sqr::val#2 sqr::val#0 sqr::val#1 ] -Allocated zp ZP_WORD:59 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp ZP_WORD:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated zp ZP_BYTE:63 [ init_squares::i#2 init_squares::i#1 ] -Allocated zp ZP_WORD:64 [ SCREEN_DIST#0 ] -Allocated zp ZP_WORD:66 [ SCREEN_ANGLE#0 ] -Allocated zp ZP_WORD:68 [ BUCKET_SIZES#0 ] -Allocated zp ZP_WORD:70 [ BUCKETS#0 ] -Allocated zp ZP_WORD:72 [ BUCKET_IDX#0 ] -Allocated zp ZP_WORD:74 [ init_angle_screen::screen#0 ] -Allocated zp ZP_WORD:76 [ init_buckets::screen#0 ] -Allocated zp ZP_BYTE:78 [ main::$21 ] -Allocated zp ZP_WORD:79 [ main::bucket#0 ] -Allocated zp ZP_BYTE:81 [ main::bucket_size#0 ] -Allocated zp ZP_BYTE:82 [ main::$22 ] -Allocated zp ZP_WORD:83 [ main::fill#0 ] -Allocated zp ZP_WORD:85 [ main::angle#0 ] -Allocated zp ZP_WORD:87 [ main::fill1#0 ] -Allocated zp ZP_WORD:89 [ init_buckets::$15 ] -Allocated zp ZP_WORD:91 [ init_buckets::$5 ] -Allocated zp ZP_WORD:93 [ init_buckets::$12 ] -Allocated zp ZP_WORD:95 [ init_buckets::$16 ] -Allocated zp ZP_BYTE:97 [ init_buckets::distance#0 ] -Allocated zp ZP_WORD:98 [ init_buckets::$9 ] -Allocated zp ZP_WORD:100 [ init_buckets::$13 ] -Allocated zp ZP_WORD:102 [ init_buckets::$17 ] -Allocated zp ZP_WORD:104 [ init_buckets::bucket#0 ] -Allocated zp ZP_WORD:106 [ init_buckets::$10 ] -Allocated zp ZP_BYTE:108 [ init_buckets::$14 ] -Allocated zp ZP_WORD:109 [ malloc::mem#0 ] -Allocated zp ZP_BYTE:111 [ init_angle_screen::$2 ] -Allocated zp ZP_BYTE:112 [ init_angle_screen::$3 ] -Allocated zp ZP_WORD:113 [ init_angle_screen::xw#0 ] -Allocated zp ZP_BYTE:115 [ init_angle_screen::$6 ] -Allocated zp ZP_WORD:116 [ init_angle_screen::yw#0 ] -Allocated zp ZP_WORD:118 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:120 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:122 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:124 [ init_angle_screen::angle_w#0 ] -Allocated zp ZP_WORD:126 [ init_angle_screen::$10 ] -Allocated zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] -Allocated zp ZP_BYTE:129 [ init_angle_screen::$12 ] -Allocated zp ZP_BYTE:130 [ init_angle_screen::$13 ] -Allocated zp ZP_BYTE:131 [ init_angle_screen::$14 ] -Allocated zp ZP_BYTE:132 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:133 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:134 [ init_dist_screen::y2#0 ] -Allocated zp ZP_WORD:135 [ sqr::return#2 ] -Allocated zp ZP_WORD:137 [ init_dist_screen::yds#0 ] -Allocated zp ZP_BYTE:139 [ init_dist_screen::x2#0 ] -Allocated zp ZP_WORD:140 [ sqr::return#3 ] -Allocated zp ZP_WORD:142 [ init_dist_screen::xds#0 ] -Allocated zp ZP_WORD:144 [ init_dist_screen::ds#0 ] -Allocated zp ZP_WORD:146 [ sqrt::val#0 ] -Allocated zp ZP_BYTE:148 [ sqrt::return#2 ] -Allocated zp ZP_BYTE:149 [ init_dist_screen::d#0 ] -Allocated zp ZP_WORD:150 [ bsearch16u::key#0 ] -Allocated zp ZP_WORD:152 [ bsearch16u::return#3 ] -Allocated zp ZP_WORD:154 [ sqrt::found#0 ] -Allocated zp ZP_WORD:156 [ sqrt::$3 ] -Allocated zp ZP_WORD:158 [ sqrt::$1 ] -Allocated zp ZP_BYTE:160 [ sqrt::return#0 ] -Allocated zp ZP_BYTE:161 [ bsearch16u::$6 ] -Allocated zp ZP_BYTE:162 [ bsearch16u::$16 ] -Allocated zp ZP_WORD:163 [ bsearch16u::pivot#0 ] +Allocated zp ZP_WORD:55 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +Allocated zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +Allocated zp ZP_BYTE:59 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Allocated zp ZP_BYTE:60 [ sqr::val#2 sqr::val#0 sqr::val#1 ] +Allocated zp ZP_WORD:61 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp ZP_WORD:63 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +Allocated zp ZP_BYTE:65 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp ZP_WORD:66 [ SCREEN_DIST#0 ] +Allocated zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] +Allocated zp ZP_WORD:70 [ BUCKET_SIZES#0 ] +Allocated zp ZP_WORD:72 [ BUCKETS#0 ] +Allocated zp ZP_WORD:74 [ BUCKET_IDX#0 ] +Allocated zp ZP_WORD:76 [ init_angle_screen::screen#0 ] +Allocated zp ZP_WORD:78 [ init_buckets::screen#0 ] +Allocated zp ZP_BYTE:80 [ main::$21 ] +Allocated zp ZP_WORD:81 [ main::bucket#0 ] +Allocated zp ZP_BYTE:83 [ main::bucket_size#0 ] +Allocated zp ZP_BYTE:84 [ main::$22 ] +Allocated zp ZP_WORD:85 [ main::fill#0 ] +Allocated zp ZP_WORD:87 [ main::angle#0 ] +Allocated zp ZP_WORD:89 [ main::fill1#0 ] +Allocated zp ZP_WORD:91 [ init_buckets::$15 ] +Allocated zp ZP_WORD:93 [ init_buckets::$5 ] +Allocated zp ZP_WORD:95 [ init_buckets::$12 ] +Allocated zp ZP_WORD:97 [ init_buckets::$16 ] +Allocated zp ZP_BYTE:99 [ init_buckets::distance#0 ] +Allocated zp ZP_WORD:100 [ init_buckets::$9 ] +Allocated zp ZP_WORD:102 [ init_buckets::$13 ] +Allocated zp ZP_WORD:104 [ init_buckets::$17 ] +Allocated zp ZP_WORD:106 [ init_buckets::bucket#0 ] +Allocated zp ZP_WORD:108 [ init_buckets::$10 ] +Allocated zp ZP_BYTE:110 [ init_buckets::$14 ] +Allocated zp ZP_WORD:111 [ malloc::mem#0 ] +Allocated zp ZP_BYTE:113 [ init_angle_screen::$2 ] +Allocated zp ZP_BYTE:114 [ init_angle_screen::$3 ] +Allocated zp ZP_WORD:115 [ init_angle_screen::xw#0 ] +Allocated zp ZP_BYTE:117 [ init_angle_screen::$6 ] +Allocated zp ZP_WORD:118 [ init_angle_screen::yw#0 ] +Allocated zp ZP_WORD:120 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:122 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:124 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:126 [ init_angle_screen::angle_w#0 ] +Allocated zp ZP_WORD:128 [ init_angle_screen::$10 ] +Allocated zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] +Allocated zp ZP_BYTE:131 [ init_angle_screen::$12 ] +Allocated zp ZP_BYTE:132 [ init_angle_screen::$13 ] +Allocated zp ZP_BYTE:133 [ init_angle_screen::$14 ] +Allocated zp ZP_BYTE:134 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:135 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:136 [ init_dist_screen::y2#0 ] +Allocated zp ZP_WORD:137 [ sqr::return#2 ] +Allocated zp ZP_WORD:139 [ init_dist_screen::yds#0 ] +Allocated zp ZP_BYTE:141 [ init_dist_screen::x2#0 ] +Allocated zp ZP_WORD:142 [ sqr::return#3 ] +Allocated zp ZP_WORD:144 [ init_dist_screen::xds#0 ] +Allocated zp ZP_WORD:146 [ init_dist_screen::ds#0 ] +Allocated zp ZP_WORD:148 [ sqrt::val#0 ] +Allocated zp ZP_BYTE:150 [ sqrt::return#2 ] +Allocated zp ZP_BYTE:151 [ init_dist_screen::d#0 ] +Allocated zp ZP_WORD:152 [ bsearch16u::key#0 ] +Allocated zp ZP_WORD:154 [ bsearch16u::return#3 ] +Allocated zp ZP_WORD:156 [ sqrt::found#0 ] +Allocated zp ZP_WORD:158 [ sqrt::$3 ] +Allocated zp ZP_WORD:160 [ sqrt::$1 ] +Allocated zp ZP_BYTE:162 [ sqrt::return#0 ] +Allocated zp ZP_BYTE:163 [ bsearch16u::$6 ] +Allocated zp ZP_BYTE:164 [ bsearch16u::$16 ] Allocated zp ZP_WORD:165 [ bsearch16u::result#0 ] Allocated zp ZP_BYTE:167 [ sqr::$0 ] Allocated zp ZP_WORD:168 [ sqr::return#0 ] @@ -4460,17 +5520,17 @@ Target platform is c64basic .label heap_head = $15 .label SQUARES = $aa // Screen containing distance to center - .label SCREEN_DIST = $40 + .label SCREEN_DIST = $42 // Screen containing angle to center - .label SCREEN_ANGLE = $42 + .label SCREEN_ANGLE = $44 // Array containing the bucket size for each of the distance buckets - .label BUCKET_SIZES = $44 + .label BUCKET_SIZES = $46 // Buckets containing screen indices for each distance from the center. // BUCKETS[dist] is an array of words containing screen indices. // The size of the array BUCKETS[dist] is BUCKET_SIZES[dist] - .label BUCKETS = $46 + .label BUCKETS = $48 // Current index into each bucket. Used while populating the buckets. (After population the end the values will be equal to the bucket sizes) - .label BUCKET_IDX = $48 + .label BUCKET_IDX = $4a // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -4591,17 +5651,17 @@ bend_from_b3: bend: // main main: { - .label _21 = $4e - .label _22 = $52 - .label bucket = $4f - .label bucket_size = $51 + .label _21 = $50 + .label _22 = $54 + .label bucket = $51 + .label bucket_size = $53 .label bucket_idx = 2 .label offset = 7 - .label fill = $53 + .label fill = $55 .label i = 3 - .label angle = $55 + .label angle = $57 .label min_angle = 4 - .label fill1 = $57 + .label fill1 = $59 .label min_offset = 7 .label min_offset_5 = 5 .label min_offset_7 = 5 @@ -4846,28 +5906,28 @@ main: { } // init_buckets // Initialize buckets containing indices of chars on the screen with specific distances to the center. -// init_buckets(byte* zeropage($4c) screen) +// init_buckets(byte* zeropage($4e) screen) init_buckets: { - .label _5 = $5b - .label _9 = $62 - .label _10 = $6a - .label _12 = $5d - .label _13 = $64 - .label _14 = $6c - .label screen = $4c + .label _5 = $5d + .label _9 = $64 + .label _10 = $6c + .label _12 = $5f + .label _13 = $66 + .label _14 = $6e + .label screen = $4e .label i = 9 .label dist = $a .label i1 = $c .label i2 = $e .label i3 = $10 - .label distance = $61 - .label bucket = $68 + .label distance = $63 + .label bucket = $6a .label dist_3 = $11 .label i4 = $13 .label dist_5 = $11 - .label _15 = $59 - .label _16 = $5f - .label _17 = $66 + .label _15 = $5b + .label _16 = $61 + .label _17 = $68 .label dist_8 = $11 // [54] phi from init_buckets to init_buckets::@1 [phi:init_buckets->init_buckets::@1] b1_from_init_buckets: @@ -5152,7 +6212,7 @@ init_buckets: { // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. // malloc(word zeropage($17) size) malloc: { - .label mem = $6d + .label mem = $6f .label size = $17 // [94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 -- pbuz1=pbuz2_minus_vwuz3 lda heap_head @@ -5176,22 +6236,22 @@ malloc: { // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage($4a) screen) +// init_angle_screen(byte* zeropage($4c) screen) init_angle_screen: { - .label _2 = $6f - .label _3 = $70 - .label _6 = $73 - .label _10 = $7e - .label _12 = $81 - .label _13 = $82 - .label _14 = $83 - .label screen = $4a + .label _2 = $71 + .label _3 = $72 + .label _6 = $75 + .label _10 = $80 + .label _12 = $83 + .label _13 = $84 + .label _14 = $85 + .label screen = $4c .label screen_topline = $1c .label screen_bottomline = $1a - .label xw = $71 - .label yw = $74 - .label angle_w = $7c - .label ang_w = $80 + .label xw = $73 + .label yw = $76 + .label angle_w = $7e + .label ang_w = $82 .label x = $1e .label xb = $1f .label y = $19 @@ -5376,12 +6436,12 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($76) x, signed word zeropage($78) y) +// atan2_16(signed word zeropage($78) x, signed word zeropage($7a) y) atan2_16: { .label _2 = $20 .label _7 = $22 - .label _23 = $85 - .label _24 = $84 + .label _23 = $87 + .label _24 = $86 .label yi = $20 .label xi = $22 .label angle = $27 @@ -5392,9 +6452,9 @@ atan2_16: { .label angle_3 = $25 .label i = $24 .label return = $27 - .label x = $76 - .label y = $78 - .label return_2 = $7a + .label x = $78 + .label y = $7a + .label return_2 = $7c .label angle_6 = $25 .label angle_12 = $25 .label angle_13 = $25 @@ -5719,20 +6779,20 @@ init_dist_screen: { .label _15 = $36 .label screen = $2f .label screen_bottomline = $31 - .label y2 = $86 + .label y2 = $88 .label yd = $33 - .label yds = $89 - .label x2 = $8b + .label yds = $8b + .label x2 = $8d .label xd = $36 - .label xds = $8e - .label ds = $90 - .label d = $95 + .label xds = $90 + .label ds = $92 + .label d = $97 .label x = $34 .label xb = $35 .label screen_topline = $2f .label y = $2e // [172] call init_squares - // [243] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [244] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares jmp b10 @@ -5789,9 +6849,9 @@ init_dist_screen: { lda yd sta sqr.val // [180] call sqr - // [239] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [240] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [239] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [240] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [181] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -5849,9 +6909,9 @@ init_dist_screen: { lda xd sta sqr.val // [189] call sqr - // [239] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [240] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [239] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [240] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [190] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -5963,14 +7023,14 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($92) val) +// sqrt(word zeropage($94) val) sqrt: { - .label _1 = $9e - .label _3 = $9c - .label found = $9a - .label return = $a0 - .label val = $92 - .label return_2 = $94 + .label _1 = $a0 + .label _3 = $9e + .label found = $9c + .label return = $a2 + .label val = $94 + .label return_2 = $96 // [211] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 lda val sta bsearch16u.key @@ -5978,9 +7038,9 @@ sqrt: { sta bsearch16u.key+1 // [212] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [213] call bsearch16u // [220] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: @@ -6028,34 +7088,112 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($96) key, word* zeropage($37) items, byte zeropage($39) num) +// bsearch16u(word zeropage($98) key, word* zeropage($39) items, byte zeropage($3b) num) bsearch16u: { - .label _2 = $37 - .label _6 = $a1 - .label _16 = $a2 - .label pivot = $a3 + .label _2 = $39 + .label _6 = $a3 + .label _16 = $a4 + .label pivot = $39 .label result = $a5 - .label return = $37 - .label num = $39 - .label items = $37 - .label key = $96 - .label return_3 = $98 - // [221] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [221] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [221] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 + .label return = $39 + .label num = $3b + .label items = $39 + .label key = $98 + .label items_1 = $37 + .label return_3 = $9a + .label items_10 = $37 + .label items_16 = $37 + // [221] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [221] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [221] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuz1=vbuc1 lda #NUM_SQUARES sta num + jmp b4 + // bsearch16u::@4 + b4: + // [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + lda num + lsr + sta _6 + // [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda _6 + asl + sta _16 + // [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 + lda _16 + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [227] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [227] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [228] return + rts + // bsearch16u::@6 + b6: + // [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [231] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuz1=_dec_vbuz1 + dec num + // [232] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [232] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [232] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [233] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr num jmp b3 // bsearch16u::@3 b3: - // [222] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 + // [234] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuz1_gt_0_then_la1 lda num - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -6069,7 +7207,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -6077,117 +7215,50 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [225] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [237] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [225] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [237] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [226] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [226] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [227] return - rts - // bsearch16u::@4 - b4: - // [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 - lda num - lsr - sta _6 - // [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda _6 - asl - sta _16 - // [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 - lda _16 - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [221] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [221] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [221] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [236] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 - dec num - // [237] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [237] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [237] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 - lsr num - // [221] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [221] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [221] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte zeropage($3a) val) +// sqr(byte zeropage($3c) val) sqr: { .label _0 = $a7 .label return = $a8 - .label val = $3a - .label return_2 = $87 - .label return_3 = $8c - // [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label val = $3c + .label return_2 = $89 + .label return_3 = $8e + // [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda val asl sta _0 - // [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 + // [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 ldy _0 lda (SQUARES),y sta return @@ -6197,7 +7268,7 @@ sqr: { jmp breturn // sqr::@return breturn: - // [242] return + // [243] return rts } // init_squares @@ -6206,10 +7277,10 @@ sqr: { init_squares: { .label _3 = $ac .label _4 = $ad - .label squares = $3d - .label sqr = $3b - .label i = $3f - // [244] call malloc + .label squares = $3f + .label sqr = $3d + .label i = $41 + // [245] call malloc // [93] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: // [93] phi (word) malloc::size#7 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 @@ -6222,44 +7293,44 @@ init_squares: { jmp b2 // init_squares::@2 b2: - // [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + // [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda malloc.mem sta SQUARES lda malloc.mem+1 sta SQUARES+1 - // [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [247] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [248] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] b1_from_b2: - // [247] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 + // [248] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [247] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [247] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [248] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [248] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [247] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [248] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [247] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [247] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [247] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [248] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [248] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [248] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -6267,15 +7338,15 @@ init_squares: { bcc !+ inc squares+1 !: - // [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _3 - // [251] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy _3 iny sty _4 - // [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda _4 clc adc sqr @@ -6283,16 +7354,16 @@ init_squares: { bcc !+ inc sqr+1 !: - // [253] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc i - // [254] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 + // [255] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_SQUARES-1+1 cmp i bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [255] return + // [256] return rts } // File Data @@ -6318,11 +7389,11 @@ Statement [27] (word[]) main::bucket#0 ← *((word*[])(void*) BUCKETS#0 + (byte~ Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] Statement [28] (byte) main::bucket_size#0 ← *((byte[])(void*) BUCKET_SIZES#0 + (byte) main::bucket_idx#6) [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 ] ( main:14 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 ] ) always clobbers reg byte a reg byte y Statement [31] (byte~) main::$22 ← (byte) main::i#2 << (byte) 1 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 main::i#2 main::min_angle#2 main::min_offset#5 main::$22 ] ( main:14 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 main::i#2 main::min_angle#2 main::min_offset#5 main::$22 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:81 [ main::bucket_size#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:83 [ main::bucket_size#0 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::i#2 main::i#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] Statement [32] (word) main::offset#0 ← *((word[]) main::bucket#0 + (byte~) main::$22) [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 main::i#2 main::min_angle#2 main::min_offset#5 main::offset#0 ] ( main:14 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 main::i#2 main::min_angle#2 main::min_offset#5 main::offset#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:81 [ main::bucket_size#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:83 [ main::bucket_size#0 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ main::i#2 main::i#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] Statement [33] (byte*) main::fill#0 ← (const byte*) SCREEN_FILL#0 + (word) main::offset#0 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 main::i#2 main::min_angle#2 main::min_offset#5 main::offset#0 main::fill#0 ] ( main:14 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 main::bucket_idx#6 main::bucket#0 main::bucket_size#0 main::i#2 main::min_angle#2 main::min_offset#5 main::offset#0 main::fill#0 ] ) always clobbers reg byte a @@ -6353,18 +7424,18 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:16 [ i Statement [78] (byte*~) init_buckets::dist#8 ← (byte*) init_buckets::screen#0 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#8 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#8 ] ) always clobbers reg byte a Statement [80] (byte) init_buckets::distance#0 ← *((byte*) init_buckets::dist#5) [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ) always clobbers reg byte a reg byte y Statement [81] (word~) init_buckets::$9 ← (word)(byte) init_buckets::distance#0 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::$9 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::$9 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:97 [ init_buckets::distance#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:99 [ init_buckets::distance#0 ] Statement [82] (word~) init_buckets::$13 ← (word~) init_buckets::$9 << (byte) 1 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::$13 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::$13 ] ) always clobbers reg byte a Statement [83] (word**~) init_buckets::$17 ← (word*[])(void*) BUCKETS#0 + (word~) init_buckets::$13 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::$17 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::$17 ] ) always clobbers reg byte a Statement [84] (word*) init_buckets::bucket#0 ← *((word**~) init_buckets::$17) [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::bucket#0 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::bucket#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:97 [ init_buckets::distance#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:99 [ init_buckets::distance#0 ] Statement [85] (word~) init_buckets::$10 ← (byte*) init_buckets::dist#5 - (byte*) init_buckets::screen#0 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::bucket#0 init_buckets::$10 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::bucket#0 init_buckets::$10 ] ) always clobbers reg byte a Statement [86] (byte~) init_buckets::$14 ← *((byte[])(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) << (byte) 1 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::bucket#0 init_buckets::$10 init_buckets::$14 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 init_buckets::bucket#0 init_buckets::$10 init_buckets::$14 ] ) always clobbers reg byte a reg byte y Statement [87] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$14) ← (word~) init_buckets::$10 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ) always clobbers reg byte a reg byte y Statement [88] *((byte[])(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) ← ++ *((byte[])(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 ] ) always clobbers reg byte a reg byte y Statement [91] if((word) init_buckets::i4#1!=(word) $3e8) goto init_buckets::@7 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#3 init_buckets::i4#1 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#3 init_buckets::i4#1 ] ) always clobbers reg byte a -Statement [94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] malloc:7 [ malloc::mem#0 ] malloc:9 [ malloc::mem#0 ] malloc:11 [ malloc::mem#0 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 ] main:14::init_dist_screen:18::init_squares:172::malloc:244 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [95] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] malloc:7 [ malloc::mem#0 heap_head#1 ] malloc:9 [ malloc::mem#0 heap_head#1 ] malloc:11 [ malloc::mem#0 heap_head#1 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 heap_head#1 ] main:14::init_dist_screen:18::init_squares:172::malloc:244 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] malloc:7 [ malloc::mem#0 ] malloc:9 [ malloc::mem#0 ] malloc:11 [ malloc::mem#0 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 ] main:14::init_dist_screen:18::init_squares:172::malloc:245 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [95] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] malloc:7 [ malloc::mem#0 heap_head#1 ] malloc:9 [ malloc::mem#0 heap_head#1 ] malloc:11 [ malloc::mem#0 heap_head#1 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 heap_head#1 ] main:14::init_dist_screen:18::init_squares:172::malloc:245 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ) always clobbers reg byte a Statement [98] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ) always clobbers reg byte a Statement [101] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a @@ -6385,9 +7456,9 @@ Statement [110] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return# Statement [111] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a Statement [112] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a Statement [113] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] Statement [114] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] Statement [115] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y Statement [116] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a Statement [117] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y @@ -6447,31 +7518,32 @@ Statement [215] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [216] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [217] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [218] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Statement [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:57 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:57 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:63 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:63 [ init_squares::i#2 init_squares::i#1 ] -Statement [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:59 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:65 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:65 [ init_squares::i#2 init_squares::i#1 ] +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [8] (void*) BUCKET_SIZES#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ) always clobbers reg byte a @@ -6520,8 +7592,8 @@ Statement [86] (byte~) init_buckets::$14 ← *((byte[])(void*) BUCKET_IDX#0 + (b Statement [87] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$14) ← (word~) init_buckets::$10 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ) always clobbers reg byte a reg byte y Statement [88] *((byte[])(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) ← ++ *((byte[])(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 ] ) always clobbers reg byte a reg byte y Statement [91] if((word) init_buckets::i4#1!=(word) $3e8) goto init_buckets::@7 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#3 init_buckets::i4#1 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#3 init_buckets::i4#1 ] ) always clobbers reg byte a -Statement [94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] malloc:7 [ malloc::mem#0 ] malloc:9 [ malloc::mem#0 ] malloc:11 [ malloc::mem#0 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 ] main:14::init_dist_screen:18::init_squares:172::malloc:244 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [95] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] malloc:7 [ malloc::mem#0 heap_head#1 ] malloc:9 [ malloc::mem#0 heap_head#1 ] malloc:11 [ malloc::mem#0 heap_head#1 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 heap_head#1 ] main:14::init_dist_screen:18::init_squares:172::malloc:244 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] malloc:7 [ malloc::mem#0 ] malloc:9 [ malloc::mem#0 ] malloc:11 [ malloc::mem#0 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 ] main:14::init_dist_screen:18::init_squares:172::malloc:245 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [95] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] malloc:7 [ malloc::mem#0 heap_head#1 ] malloc:9 [ malloc::mem#0 heap_head#1 ] malloc:11 [ malloc::mem#0 heap_head#1 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 heap_head#1 ] main:14::init_dist_screen:18::init_squares:172::malloc:245 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ) always clobbers reg byte a Statement [98] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ) always clobbers reg byte a Statement [101] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a @@ -6583,7 +7655,7 @@ Statement [191] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ heap_h Statement [192] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:14::init_dist_screen:18 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a Statement [193] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:14::init_dist_screen:18 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a Statement [197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:14::init_dist_screen:18 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:149 [ init_dist_screen::d#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:151 [ init_dist_screen::d#0 ] Statement [198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:14::init_dist_screen:18 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y Statement [199] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:14::init_dist_screen:18 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y Statement [200] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ( main:14::init_dist_screen:18 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ) always clobbers reg byte y @@ -6596,24 +7668,25 @@ Statement [215] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [216] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [217] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [218] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [8] (void*) BUCKET_SIZES#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ) always clobbers reg byte a @@ -6662,8 +7735,8 @@ Statement [86] (byte~) init_buckets::$14 ← *((byte[])(void*) BUCKET_IDX#0 + (b Statement [87] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$14) ← (word~) init_buckets::$10 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 init_buckets::distance#0 ] ) always clobbers reg byte a reg byte y Statement [88] *((byte[])(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) ← ++ *((byte[])(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#5 init_buckets::i4#2 ] ) always clobbers reg byte a reg byte y Statement [91] if((word) init_buckets::i4#1!=(word) $3e8) goto init_buckets::@7 [ BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#3 init_buckets::i4#1 ] ( main:14::init_buckets:22 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::dist#3 init_buckets::i4#1 ] ) always clobbers reg byte a -Statement [94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] malloc:7 [ malloc::mem#0 ] malloc:9 [ malloc::mem#0 ] malloc:11 [ malloc::mem#0 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 ] main:14::init_dist_screen:18::init_squares:172::malloc:244 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [95] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] malloc:7 [ malloc::mem#0 heap_head#1 ] malloc:9 [ malloc::mem#0 heap_head#1 ] malloc:11 [ malloc::mem#0 heap_head#1 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 heap_head#1 ] main:14::init_dist_screen:18::init_squares:172::malloc:244 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] malloc:7 [ malloc::mem#0 ] malloc:9 [ malloc::mem#0 ] malloc:11 [ malloc::mem#0 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 ] main:14::init_dist_screen:18::init_squares:172::malloc:245 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [95] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] malloc:7 [ malloc::mem#0 heap_head#1 ] malloc:9 [ malloc::mem#0 heap_head#1 ] malloc:11 [ malloc::mem#0 heap_head#1 ] main:14::init_buckets:22::malloc:67 [ SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_buckets::screen#0 init_buckets::i2#2 malloc::mem#0 heap_head#1 ] main:14::init_dist_screen:18::init_squares:172::malloc:245 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ) always clobbers reg byte a Statement [98] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ) always clobbers reg byte a Statement [101] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:14::init_angle_screen:20 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a @@ -6737,24 +7810,25 @@ Statement [215] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [216] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [217] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [218] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqrt:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a -Statement [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:14::init_dist_screen:18::sqrt:194::bsearch16u:213 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:14::init_dist_screen:18::sqr:180 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:14::init_dist_screen:18::sqr:189 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:14::init_dist_screen:18::init_squares:172 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Potential registers zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] : zp ZP_BYTE:2 , reg byte x , Potential registers zp ZP_BYTE:3 [ main::i#2 main::i#1 ] : zp ZP_BYTE:3 , reg byte x , Potential registers zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] : zp ZP_BYTE:4 , reg byte x , @@ -6789,73 +7863,73 @@ Potential registers zp ZP_BYTE:51 [ init_dist_screen::yd#0 init_dist_screen::$7 Potential registers zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:52 , reg byte x , Potential registers zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:53 , reg byte x , Potential registers zp ZP_BYTE:54 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:54 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:55 , -Potential registers zp ZP_BYTE:57 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:57 , reg byte x , -Potential registers zp ZP_BYTE:58 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:59 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:59 , -Potential registers zp ZP_WORD:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:61 , -Potential registers zp ZP_BYTE:63 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:63 , reg byte x , -Potential registers zp ZP_WORD:64 [ SCREEN_DIST#0 ] : zp ZP_WORD:64 , -Potential registers zp ZP_WORD:66 [ SCREEN_ANGLE#0 ] : zp ZP_WORD:66 , -Potential registers zp ZP_WORD:68 [ BUCKET_SIZES#0 ] : zp ZP_WORD:68 , -Potential registers zp ZP_WORD:70 [ BUCKETS#0 ] : zp ZP_WORD:70 , -Potential registers zp ZP_WORD:72 [ BUCKET_IDX#0 ] : zp ZP_WORD:72 , -Potential registers zp ZP_WORD:74 [ init_angle_screen::screen#0 ] : zp ZP_WORD:74 , -Potential registers zp ZP_WORD:76 [ init_buckets::screen#0 ] : zp ZP_WORD:76 , -Potential registers zp ZP_BYTE:78 [ main::$21 ] : zp ZP_BYTE:78 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:79 [ main::bucket#0 ] : zp ZP_WORD:79 , -Potential registers zp ZP_BYTE:81 [ main::bucket_size#0 ] : zp ZP_BYTE:81 , reg byte x , -Potential registers zp ZP_BYTE:82 [ main::$22 ] : zp ZP_BYTE:82 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:83 [ main::fill#0 ] : zp ZP_WORD:83 , -Potential registers zp ZP_WORD:85 [ main::angle#0 ] : zp ZP_WORD:85 , -Potential registers zp ZP_WORD:87 [ main::fill1#0 ] : zp ZP_WORD:87 , -Potential registers zp ZP_WORD:89 [ init_buckets::$15 ] : zp ZP_WORD:89 , -Potential registers zp ZP_WORD:91 [ init_buckets::$5 ] : zp ZP_WORD:91 , -Potential registers zp ZP_WORD:93 [ init_buckets::$12 ] : zp ZP_WORD:93 , -Potential registers zp ZP_WORD:95 [ init_buckets::$16 ] : zp ZP_WORD:95 , -Potential registers zp ZP_BYTE:97 [ init_buckets::distance#0 ] : zp ZP_BYTE:97 , reg byte x , -Potential registers zp ZP_WORD:98 [ init_buckets::$9 ] : zp ZP_WORD:98 , -Potential registers zp ZP_WORD:100 [ init_buckets::$13 ] : zp ZP_WORD:100 , -Potential registers zp ZP_WORD:102 [ init_buckets::$17 ] : zp ZP_WORD:102 , -Potential registers zp ZP_WORD:104 [ init_buckets::bucket#0 ] : zp ZP_WORD:104 , -Potential registers zp ZP_WORD:106 [ init_buckets::$10 ] : zp ZP_WORD:106 , -Potential registers zp ZP_BYTE:108 [ init_buckets::$14 ] : zp ZP_BYTE:108 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:109 [ malloc::mem#0 ] : zp ZP_WORD:109 , -Potential registers zp ZP_BYTE:111 [ init_angle_screen::$2 ] : zp ZP_BYTE:111 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:112 [ init_angle_screen::$3 ] : zp ZP_BYTE:112 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:113 [ init_angle_screen::xw#0 ] : zp ZP_WORD:113 , -Potential registers zp ZP_BYTE:115 [ init_angle_screen::$6 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:116 [ init_angle_screen::yw#0 ] : zp ZP_WORD:116 , -Potential registers zp ZP_WORD:118 [ atan2_16::x#0 ] : zp ZP_WORD:118 , -Potential registers zp ZP_WORD:120 [ atan2_16::y#0 ] : zp ZP_WORD:120 , -Potential registers zp ZP_WORD:122 [ atan2_16::return#2 ] : zp ZP_WORD:122 , -Potential registers zp ZP_WORD:124 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:124 , -Potential registers zp ZP_WORD:126 [ init_angle_screen::$10 ] : zp ZP_WORD:126 , -Potential registers zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:128 , reg byte x , -Potential registers zp ZP_BYTE:129 [ init_angle_screen::$12 ] : zp ZP_BYTE:129 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:130 [ init_angle_screen::$13 ] : zp ZP_BYTE:130 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:131 [ init_angle_screen::$14 ] : zp ZP_BYTE:131 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:132 [ atan2_16::$24 ] : zp ZP_BYTE:132 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:133 [ atan2_16::$23 ] : zp ZP_BYTE:133 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:134 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:134 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:135 [ sqr::return#2 ] : zp ZP_WORD:135 , -Potential registers zp ZP_WORD:137 [ init_dist_screen::yds#0 ] : zp ZP_WORD:137 , -Potential registers zp ZP_BYTE:139 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:139 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:140 [ sqr::return#3 ] : zp ZP_WORD:140 , -Potential registers zp ZP_WORD:142 [ init_dist_screen::xds#0 ] : zp ZP_WORD:142 , -Potential registers zp ZP_WORD:144 [ init_dist_screen::ds#0 ] : zp ZP_WORD:144 , -Potential registers zp ZP_WORD:146 [ sqrt::val#0 ] : zp ZP_WORD:146 , -Potential registers zp ZP_BYTE:148 [ sqrt::return#2 ] : zp ZP_BYTE:148 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:149 [ init_dist_screen::d#0 ] : zp ZP_BYTE:149 , reg byte a , reg byte x , -Potential registers zp ZP_WORD:150 [ bsearch16u::key#0 ] : zp ZP_WORD:150 , -Potential registers zp ZP_WORD:152 [ bsearch16u::return#3 ] : zp ZP_WORD:152 , -Potential registers zp ZP_WORD:154 [ sqrt::found#0 ] : zp ZP_WORD:154 , -Potential registers zp ZP_WORD:156 [ sqrt::$3 ] : zp ZP_WORD:156 , -Potential registers zp ZP_WORD:158 [ sqrt::$1 ] : zp ZP_WORD:158 , -Potential registers zp ZP_BYTE:160 [ sqrt::return#0 ] : zp ZP_BYTE:160 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:161 [ bsearch16u::$6 ] : zp ZP_BYTE:161 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:162 [ bsearch16u::$16 ] : zp ZP_BYTE:162 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:163 [ bsearch16u::pivot#0 ] : zp ZP_WORD:163 , +Potential registers zp ZP_WORD:55 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] : zp ZP_WORD:55 , +Potential registers zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] : zp ZP_WORD:57 , +Potential registers zp ZP_BYTE:59 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] : zp ZP_BYTE:59 , reg byte x , +Potential registers zp ZP_BYTE:60 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:61 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:61 , +Potential registers zp ZP_WORD:63 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:63 , +Potential registers zp ZP_BYTE:65 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:65 , reg byte x , +Potential registers zp ZP_WORD:66 [ SCREEN_DIST#0 ] : zp ZP_WORD:66 , +Potential registers zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] : zp ZP_WORD:68 , +Potential registers zp ZP_WORD:70 [ BUCKET_SIZES#0 ] : zp ZP_WORD:70 , +Potential registers zp ZP_WORD:72 [ BUCKETS#0 ] : zp ZP_WORD:72 , +Potential registers zp ZP_WORD:74 [ BUCKET_IDX#0 ] : zp ZP_WORD:74 , +Potential registers zp ZP_WORD:76 [ init_angle_screen::screen#0 ] : zp ZP_WORD:76 , +Potential registers zp ZP_WORD:78 [ init_buckets::screen#0 ] : zp ZP_WORD:78 , +Potential registers zp ZP_BYTE:80 [ main::$21 ] : zp ZP_BYTE:80 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:81 [ main::bucket#0 ] : zp ZP_WORD:81 , +Potential registers zp ZP_BYTE:83 [ main::bucket_size#0 ] : zp ZP_BYTE:83 , reg byte x , +Potential registers zp ZP_BYTE:84 [ main::$22 ] : zp ZP_BYTE:84 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:85 [ main::fill#0 ] : zp ZP_WORD:85 , +Potential registers zp ZP_WORD:87 [ main::angle#0 ] : zp ZP_WORD:87 , +Potential registers zp ZP_WORD:89 [ main::fill1#0 ] : zp ZP_WORD:89 , +Potential registers zp ZP_WORD:91 [ init_buckets::$15 ] : zp ZP_WORD:91 , +Potential registers zp ZP_WORD:93 [ init_buckets::$5 ] : zp ZP_WORD:93 , +Potential registers zp ZP_WORD:95 [ init_buckets::$12 ] : zp ZP_WORD:95 , +Potential registers zp ZP_WORD:97 [ init_buckets::$16 ] : zp ZP_WORD:97 , +Potential registers zp ZP_BYTE:99 [ init_buckets::distance#0 ] : zp ZP_BYTE:99 , reg byte x , +Potential registers zp ZP_WORD:100 [ init_buckets::$9 ] : zp ZP_WORD:100 , +Potential registers zp ZP_WORD:102 [ init_buckets::$13 ] : zp ZP_WORD:102 , +Potential registers zp ZP_WORD:104 [ init_buckets::$17 ] : zp ZP_WORD:104 , +Potential registers zp ZP_WORD:106 [ init_buckets::bucket#0 ] : zp ZP_WORD:106 , +Potential registers zp ZP_WORD:108 [ init_buckets::$10 ] : zp ZP_WORD:108 , +Potential registers zp ZP_BYTE:110 [ init_buckets::$14 ] : zp ZP_BYTE:110 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:111 [ malloc::mem#0 ] : zp ZP_WORD:111 , +Potential registers zp ZP_BYTE:113 [ init_angle_screen::$2 ] : zp ZP_BYTE:113 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:114 [ init_angle_screen::$3 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:115 [ init_angle_screen::xw#0 ] : zp ZP_WORD:115 , +Potential registers zp ZP_BYTE:117 [ init_angle_screen::$6 ] : zp ZP_BYTE:117 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:118 [ init_angle_screen::yw#0 ] : zp ZP_WORD:118 , +Potential registers zp ZP_WORD:120 [ atan2_16::x#0 ] : zp ZP_WORD:120 , +Potential registers zp ZP_WORD:122 [ atan2_16::y#0 ] : zp ZP_WORD:122 , +Potential registers zp ZP_WORD:124 [ atan2_16::return#2 ] : zp ZP_WORD:124 , +Potential registers zp ZP_WORD:126 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:126 , +Potential registers zp ZP_WORD:128 [ init_angle_screen::$10 ] : zp ZP_WORD:128 , +Potential registers zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:130 , reg byte x , +Potential registers zp ZP_BYTE:131 [ init_angle_screen::$12 ] : zp ZP_BYTE:131 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:132 [ init_angle_screen::$13 ] : zp ZP_BYTE:132 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:133 [ init_angle_screen::$14 ] : zp ZP_BYTE:133 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:134 [ atan2_16::$24 ] : zp ZP_BYTE:134 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:135 [ atan2_16::$23 ] : zp ZP_BYTE:135 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:136 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:136 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:137 [ sqr::return#2 ] : zp ZP_WORD:137 , +Potential registers zp ZP_WORD:139 [ init_dist_screen::yds#0 ] : zp ZP_WORD:139 , +Potential registers zp ZP_BYTE:141 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:141 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:142 [ sqr::return#3 ] : zp ZP_WORD:142 , +Potential registers zp ZP_WORD:144 [ init_dist_screen::xds#0 ] : zp ZP_WORD:144 , +Potential registers zp ZP_WORD:146 [ init_dist_screen::ds#0 ] : zp ZP_WORD:146 , +Potential registers zp ZP_WORD:148 [ sqrt::val#0 ] : zp ZP_WORD:148 , +Potential registers zp ZP_BYTE:150 [ sqrt::return#2 ] : zp ZP_BYTE:150 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:151 [ init_dist_screen::d#0 ] : zp ZP_BYTE:151 , reg byte a , reg byte x , +Potential registers zp ZP_WORD:152 [ bsearch16u::key#0 ] : zp ZP_WORD:152 , +Potential registers zp ZP_WORD:154 [ bsearch16u::return#3 ] : zp ZP_WORD:154 , +Potential registers zp ZP_WORD:156 [ sqrt::found#0 ] : zp ZP_WORD:156 , +Potential registers zp ZP_WORD:158 [ sqrt::$3 ] : zp ZP_WORD:158 , +Potential registers zp ZP_WORD:160 [ sqrt::$1 ] : zp ZP_WORD:160 , +Potential registers zp ZP_BYTE:162 [ sqrt::return#0 ] : zp ZP_BYTE:162 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:163 [ bsearch16u::$6 ] : zp ZP_BYTE:163 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:164 [ bsearch16u::$16 ] : zp ZP_BYTE:164 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:165 [ bsearch16u::result#0 ] : zp ZP_WORD:165 , Potential registers zp ZP_BYTE:167 [ sqr::$0 ] : zp ZP_BYTE:167 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:168 [ sqr::return#0 ] : zp ZP_WORD:168 , @@ -6864,92 +7938,92 @@ Potential registers zp ZP_BYTE:172 [ init_squares::$3 ] : zp ZP_BYTE:172 , reg b Potential registers zp ZP_BYTE:173 [ init_squares::$4 ] : zp ZP_BYTE:173 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:41 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:42 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:32 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:34 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:132 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:133 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:36 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:122 [ atan2_16::return#2 ] 50: zp ZP_WORD:39 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:118 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:120 [ atan2_16::y#0 ] -Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:57 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,855.06: zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:161 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:162 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:165 [ bsearch16u::result#0 ] 501: zp ZP_WORD:163 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:152 [ bsearch16u::return#3 ] 0.27: zp ZP_WORD:150 [ bsearch16u::key#0 ] -Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:111 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:112 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:115 [ init_angle_screen::$6 ] 202: zp ZP_WORD:124 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:126 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:129 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:130 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:131 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:30 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:116 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:113 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:28 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:74 [ init_angle_screen::screen#0 ] -Uplift Scope [main] 577.83: zp ZP_WORD:7 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 ] 347.89: zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] 245.29: zp ZP_WORD:5 [ main::min_offset#5 main::min_offset#7 ] 202: zp ZP_BYTE:82 [ main::$22 ] 202: zp ZP_WORD:83 [ main::fill#0 ] 151.5: zp ZP_WORD:85 [ main::angle#0 ] 128.55: zp ZP_BYTE:3 [ main::i#2 main::i#1 ] 22: zp ZP_BYTE:78 [ main::$21 ] 22: zp ZP_WORD:87 [ main::fill1#0 ] 13.64: zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] 7.69: zp ZP_BYTE:81 [ main::bucket_size#0 ] 6.59: zp ZP_WORD:79 [ main::bucket#0 ] -Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:54 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:139 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:142 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:144 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:149 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:51 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:134 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:49 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:47 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:137 [ init_dist_screen::yds#0 ] -Uplift Scope [sqr] 338: zp ZP_BYTE:58 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:140 [ sqr::return#3 ] 28.5: zp ZP_WORD:168 [ sqr::return#0 ] 22: zp ZP_WORD:135 [ sqr::return#2 ] 4: zp ZP_BYTE:167 [ sqr::$0 ] -Uplift Scope [init_buckets] 34.33: zp ZP_WORD:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ] 33: zp ZP_BYTE:9 [ init_buckets::i#2 init_buckets::i#1 ] 33: zp ZP_BYTE:16 [ init_buckets::i3#2 init_buckets::i3#1 ] 23.83: zp ZP_WORD:12 [ init_buckets::i1#2 init_buckets::i1#1 ] 22: zp ZP_WORD:14 [ init_buckets::i2#2 init_buckets::i2#1 ] 22: zp ZP_WORD:89 [ init_buckets::$15 ] 22: zp ZP_WORD:93 [ init_buckets::$12 ] 22: zp ZP_WORD:95 [ init_buckets::$16 ] 22: zp ZP_WORD:98 [ init_buckets::$9 ] 22: zp ZP_WORD:100 [ init_buckets::$13 ] 22: zp ZP_WORD:102 [ init_buckets::$17 ] 22: zp ZP_BYTE:108 [ init_buckets::$14 ] 18.5: zp ZP_WORD:19 [ init_buckets::i4#2 init_buckets::i4#1 ] 15.93: zp ZP_WORD:17 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] 11: zp ZP_WORD:106 [ init_buckets::$10 ] 7.33: zp ZP_WORD:104 [ init_buckets::bucket#0 ] 5.5: zp ZP_BYTE:97 [ init_buckets::distance#0 ] 3.67: zp ZP_WORD:91 [ init_buckets::$5 ] 0.43: zp ZP_WORD:76 [ init_buckets::screen#0 ] -Uplift Scope [sqrt] 202: zp ZP_BYTE:148 [ sqrt::return#2 ] 103: zp ZP_WORD:146 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:160 [ sqrt::return#0 ] 4: zp ZP_WORD:154 [ sqrt::found#0 ] 4: zp ZP_WORD:156 [ sqrt::$3 ] 2: zp ZP_WORD:158 [ sqrt::$1 ] -Uplift Scope [init_squares] 25.17: zp ZP_WORD:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:63 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:172 [ init_squares::$3 ] 22: zp ZP_BYTE:173 [ init_squares::$4 ] 13.93: zp ZP_WORD:59 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplift Scope [malloc] 35: zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 ] 0.4: zp ZP_WORD:109 [ malloc::mem#0 ] -Uplift Scope [] 23.24: zp ZP_WORD:21 [ heap_head#18 heap_head#1 ] 0.12: zp ZP_WORD:64 [ SCREEN_DIST#0 ] 0.05: zp ZP_WORD:66 [ SCREEN_ANGLE#0 ] 0.04: zp ZP_WORD:72 [ BUCKET_IDX#0 ] 0.03: zp ZP_WORD:170 [ SQUARES#1 ] 0.03: zp ZP_WORD:70 [ BUCKETS#0 ] 0.02: zp ZP_WORD:68 [ BUCKET_SIZES#0 ] +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:41 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:42 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:32 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:34 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:134 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:135 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:36 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:124 [ atan2_16::return#2 ] 50: zp ZP_WORD:39 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:120 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:122 [ atan2_16::y#0 ] +Uplift Scope [bsearch16u] 6,450.89: zp ZP_BYTE:59 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] 4,851: zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] 2,433.29: zp ZP_WORD:55 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] 2,002: zp ZP_BYTE:163 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:164 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:165 [ bsearch16u::result#0 ] 4: zp ZP_WORD:154 [ bsearch16u::return#3 ] 0.24: zp ZP_WORD:152 [ bsearch16u::key#0 ] +Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:113 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:114 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:117 [ init_angle_screen::$6 ] 202: zp ZP_WORD:126 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:128 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:131 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:132 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:133 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:30 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:118 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:115 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:28 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:76 [ init_angle_screen::screen#0 ] +Uplift Scope [main] 577.83: zp ZP_WORD:7 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 ] 347.89: zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] 245.29: zp ZP_WORD:5 [ main::min_offset#5 main::min_offset#7 ] 202: zp ZP_BYTE:84 [ main::$22 ] 202: zp ZP_WORD:85 [ main::fill#0 ] 151.5: zp ZP_WORD:87 [ main::angle#0 ] 128.55: zp ZP_BYTE:3 [ main::i#2 main::i#1 ] 22: zp ZP_BYTE:80 [ main::$21 ] 22: zp ZP_WORD:89 [ main::fill1#0 ] 13.64: zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] 7.69: zp ZP_BYTE:83 [ main::bucket_size#0 ] 6.59: zp ZP_WORD:81 [ main::bucket#0 ] +Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:54 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:141 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:144 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:146 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:151 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:51 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:136 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:49 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:47 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:139 [ init_dist_screen::yds#0 ] +Uplift Scope [sqr] 338: zp ZP_BYTE:60 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:142 [ sqr::return#3 ] 28.5: zp ZP_WORD:168 [ sqr::return#0 ] 22: zp ZP_WORD:137 [ sqr::return#2 ] 4: zp ZP_BYTE:167 [ sqr::$0 ] +Uplift Scope [init_buckets] 34.33: zp ZP_WORD:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ] 33: zp ZP_BYTE:9 [ init_buckets::i#2 init_buckets::i#1 ] 33: zp ZP_BYTE:16 [ init_buckets::i3#2 init_buckets::i3#1 ] 23.83: zp ZP_WORD:12 [ init_buckets::i1#2 init_buckets::i1#1 ] 22: zp ZP_WORD:14 [ init_buckets::i2#2 init_buckets::i2#1 ] 22: zp ZP_WORD:91 [ init_buckets::$15 ] 22: zp ZP_WORD:95 [ init_buckets::$12 ] 22: zp ZP_WORD:97 [ init_buckets::$16 ] 22: zp ZP_WORD:100 [ init_buckets::$9 ] 22: zp ZP_WORD:102 [ init_buckets::$13 ] 22: zp ZP_WORD:104 [ init_buckets::$17 ] 22: zp ZP_BYTE:110 [ init_buckets::$14 ] 18.5: zp ZP_WORD:19 [ init_buckets::i4#2 init_buckets::i4#1 ] 15.93: zp ZP_WORD:17 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] 11: zp ZP_WORD:108 [ init_buckets::$10 ] 7.33: zp ZP_WORD:106 [ init_buckets::bucket#0 ] 5.5: zp ZP_BYTE:99 [ init_buckets::distance#0 ] 3.67: zp ZP_WORD:93 [ init_buckets::$5 ] 0.43: zp ZP_WORD:78 [ init_buckets::screen#0 ] +Uplift Scope [sqrt] 202: zp ZP_BYTE:150 [ sqrt::return#2 ] 103: zp ZP_WORD:148 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:162 [ sqrt::return#0 ] 4: zp ZP_WORD:156 [ sqrt::found#0 ] 4: zp ZP_WORD:158 [ sqrt::$3 ] 2: zp ZP_WORD:160 [ sqrt::$1 ] +Uplift Scope [init_squares] 25.17: zp ZP_WORD:63 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:65 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:172 [ init_squares::$3 ] 22: zp ZP_BYTE:173 [ init_squares::$4 ] 13.93: zp ZP_WORD:61 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [malloc] 35: zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 ] 0.4: zp ZP_WORD:111 [ malloc::mem#0 ] +Uplift Scope [] 23.24: zp ZP_WORD:21 [ heap_head#18 heap_head#1 ] 0.12: zp ZP_WORD:66 [ SCREEN_DIST#0 ] 0.05: zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] 0.04: zp ZP_WORD:74 [ BUCKET_IDX#0 ] 0.03: zp ZP_WORD:170 [ SQUARES#1 ] 0.03: zp ZP_WORD:72 [ BUCKETS#0 ] 0.02: zp ZP_WORD:70 [ BUCKET_SIZES#0 ] Uplift Scope [RADIX] -Uplifting [atan2_16] best 1253979 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:42 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:32 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:34 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:122 [ atan2_16::return#2 ] zp ZP_WORD:39 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:118 [ atan2_16::x#0 ] zp ZP_WORD:120 [ atan2_16::y#0 ] +Uplifting [atan2_16] best 1280494 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:42 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:32 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:34 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:124 [ atan2_16::return#2 ] zp ZP_WORD:39 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:120 [ atan2_16::x#0 ] zp ZP_WORD:122 [ atan2_16::y#0 ] Limited combination testing to 100 combinations of 144 possible. -Uplifting [bsearch16u] best 1234979 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:165 [ bsearch16u::result#0 ] zp ZP_WORD:163 [ bsearch16u::pivot#0 ] zp ZP_WORD:152 [ bsearch16u::return#3 ] zp ZP_WORD:150 [ bsearch16u::key#0 ] -Uplifting [init_angle_screen] best 1232779 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:124 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:126 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:130 [ init_angle_screen::$13 ] zp ZP_BYTE:131 [ init_angle_screen::$14 ] zp ZP_BYTE:30 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:116 [ init_angle_screen::yw#0 ] zp ZP_WORD:113 [ init_angle_screen::xw#0 ] zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:28 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:74 [ init_angle_screen::screen#0 ] +Uplifting [bsearch16u] best 1261494 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] zp ZP_WORD:55 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:165 [ bsearch16u::result#0 ] zp ZP_WORD:154 [ bsearch16u::return#3 ] zp ZP_WORD:152 [ bsearch16u::key#0 ] +Uplifting [init_angle_screen] best 1259294 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:126 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:128 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:132 [ init_angle_screen::$13 ] zp ZP_BYTE:133 [ init_angle_screen::$14 ] zp ZP_BYTE:30 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:118 [ init_angle_screen::yw#0 ] zp ZP_WORD:115 [ init_angle_screen::xw#0 ] zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:28 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:76 [ init_angle_screen::screen#0 ] Limited combination testing to 100 combinations of 65536 possible. -Uplifting [main] best 1231339 combination zp ZP_WORD:7 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 ] zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] zp ZP_WORD:5 [ main::min_offset#5 main::min_offset#7 ] reg byte a [ main::$22 ] zp ZP_WORD:83 [ main::fill#0 ] zp ZP_WORD:85 [ main::angle#0 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$21 ] zp ZP_WORD:87 [ main::fill1#0 ] zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] zp ZP_BYTE:81 [ main::bucket_size#0 ] zp ZP_WORD:79 [ main::bucket#0 ] +Uplifting [main] best 1257854 combination zp ZP_WORD:7 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 ] zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] zp ZP_WORD:5 [ main::min_offset#5 main::min_offset#7 ] reg byte a [ main::$22 ] zp ZP_WORD:85 [ main::fill#0 ] zp ZP_WORD:87 [ main::angle#0 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$21 ] zp ZP_WORD:89 [ main::fill1#0 ] zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] zp ZP_BYTE:83 [ main::bucket_size#0 ] zp ZP_WORD:81 [ main::bucket#0 ] Limited combination testing to 100 combinations of 256 possible. -Uplifting [init_dist_screen] best 1228139 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:142 [ init_dist_screen::xds#0 ] zp ZP_WORD:144 [ init_dist_screen::ds#0 ] zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:51 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:134 [ init_dist_screen::y2#0 ] zp ZP_WORD:49 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:47 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:137 [ init_dist_screen::yds#0 ] +Uplifting [init_dist_screen] best 1254654 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:144 [ init_dist_screen::xds#0 ] zp ZP_WORD:146 [ init_dist_screen::ds#0 ] zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:51 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:136 [ init_dist_screen::y2#0 ] zp ZP_WORD:49 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:47 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:139 [ init_dist_screen::yds#0 ] Limited combination testing to 100 combinations of 6144 possible. -Uplifting [sqr] best 1227802 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:140 [ sqr::return#3 ] zp ZP_WORD:168 [ sqr::return#0 ] zp ZP_WORD:135 [ sqr::return#2 ] reg byte a [ sqr::$0 ] -Uplifting [init_buckets] best 1227522 combination zp ZP_WORD:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ] reg byte y [ init_buckets::i#2 init_buckets::i#1 ] reg byte y [ init_buckets::i3#2 init_buckets::i3#1 ] zp ZP_WORD:12 [ init_buckets::i1#2 init_buckets::i1#1 ] zp ZP_WORD:14 [ init_buckets::i2#2 init_buckets::i2#1 ] zp ZP_WORD:89 [ init_buckets::$15 ] zp ZP_WORD:93 [ init_buckets::$12 ] zp ZP_WORD:95 [ init_buckets::$16 ] zp ZP_WORD:98 [ init_buckets::$9 ] zp ZP_WORD:100 [ init_buckets::$13 ] zp ZP_WORD:102 [ init_buckets::$17 ] reg byte a [ init_buckets::$14 ] zp ZP_WORD:19 [ init_buckets::i4#2 init_buckets::i4#1 ] zp ZP_WORD:17 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] zp ZP_WORD:106 [ init_buckets::$10 ] zp ZP_WORD:104 [ init_buckets::bucket#0 ] zp ZP_BYTE:97 [ init_buckets::distance#0 ] zp ZP_WORD:91 [ init_buckets::$5 ] zp ZP_WORD:76 [ init_buckets::screen#0 ] -Uplifting [sqrt] best 1226619 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:146 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:154 [ sqrt::found#0 ] zp ZP_WORD:156 [ sqrt::$3 ] zp ZP_WORD:158 [ sqrt::$1 ] -Uplifting [init_squares] best 1226419 combination zp ZP_WORD:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:59 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplifting [malloc] best 1226419 combination zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 ] zp ZP_WORD:109 [ malloc::mem#0 ] -Uplifting [] best 1226419 combination zp ZP_WORD:21 [ heap_head#18 heap_head#1 ] zp ZP_WORD:64 [ SCREEN_DIST#0 ] zp ZP_WORD:66 [ SCREEN_ANGLE#0 ] zp ZP_WORD:72 [ BUCKET_IDX#0 ] zp ZP_WORD:170 [ SQUARES#1 ] zp ZP_WORD:70 [ BUCKETS#0 ] zp ZP_WORD:68 [ BUCKET_SIZES#0 ] -Uplifting [RADIX] best 1226419 combination +Uplifting [sqr] best 1254317 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:142 [ sqr::return#3 ] zp ZP_WORD:168 [ sqr::return#0 ] zp ZP_WORD:137 [ sqr::return#2 ] reg byte a [ sqr::$0 ] +Uplifting [init_buckets] best 1254037 combination zp ZP_WORD:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ] reg byte y [ init_buckets::i#2 init_buckets::i#1 ] reg byte y [ init_buckets::i3#2 init_buckets::i3#1 ] zp ZP_WORD:12 [ init_buckets::i1#2 init_buckets::i1#1 ] zp ZP_WORD:14 [ init_buckets::i2#2 init_buckets::i2#1 ] zp ZP_WORD:91 [ init_buckets::$15 ] zp ZP_WORD:95 [ init_buckets::$12 ] zp ZP_WORD:97 [ init_buckets::$16 ] zp ZP_WORD:100 [ init_buckets::$9 ] zp ZP_WORD:102 [ init_buckets::$13 ] zp ZP_WORD:104 [ init_buckets::$17 ] reg byte a [ init_buckets::$14 ] zp ZP_WORD:19 [ init_buckets::i4#2 init_buckets::i4#1 ] zp ZP_WORD:17 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] zp ZP_WORD:108 [ init_buckets::$10 ] zp ZP_WORD:106 [ init_buckets::bucket#0 ] zp ZP_BYTE:99 [ init_buckets::distance#0 ] zp ZP_WORD:93 [ init_buckets::$5 ] zp ZP_WORD:78 [ init_buckets::screen#0 ] +Uplifting [sqrt] best 1253134 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:148 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:156 [ sqrt::found#0 ] zp ZP_WORD:158 [ sqrt::$3 ] zp ZP_WORD:160 [ sqrt::$1 ] +Uplifting [init_squares] best 1252934 combination zp ZP_WORD:63 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:61 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [malloc] best 1252934 combination zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 ] zp ZP_WORD:111 [ malloc::mem#0 ] +Uplifting [] best 1252934 combination zp ZP_WORD:21 [ heap_head#18 heap_head#1 ] zp ZP_WORD:66 [ SCREEN_DIST#0 ] zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] zp ZP_WORD:74 [ BUCKET_IDX#0 ] zp ZP_WORD:170 [ SQUARES#1 ] zp ZP_WORD:72 [ BUCKETS#0 ] zp ZP_WORD:70 [ BUCKET_SIZES#0 ] +Uplifting [RADIX] best 1252934 combination Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] -Uplifting [main] best 1226419 combination zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:130 [ init_angle_screen::$13 ] -Uplifting [init_angle_screen] best 1226019 combination reg byte a [ init_angle_screen::$13 ] -Attempting to uplift remaining variables inzp ZP_BYTE:131 [ init_angle_screen::$14 ] -Uplifting [init_angle_screen] best 1225419 combination reg byte a [ init_angle_screen::$14 ] +Uplifting [main] best 1252934 combination zp ZP_BYTE:4 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:132 [ init_angle_screen::$13 ] +Uplifting [init_angle_screen] best 1252534 combination reg byte a [ init_angle_screen::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:133 [ init_angle_screen::$14 ] +Uplifting [init_angle_screen] best 1251934 combination reg byte a [ init_angle_screen::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Uplifting [init_dist_screen] best 1225419 combination zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Uplifting [init_dist_screen] best 1251934 combination zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Uplifting [init_angle_screen] best 1225419 combination zp ZP_BYTE:30 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Uplifting [init_angle_screen] best 1251934 combination zp ZP_BYTE:30 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Uplifting [init_dist_screen] best 1225419 combination zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Uplifting [init_dist_screen] best 1251934 combination zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Uplifting [init_angle_screen] best 1225419 combination zp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] -Uplifting [init_angle_screen] best 1225419 combination zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1251934 combination zp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1251934 combination zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:51 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Uplifting [init_dist_screen] best 1225349 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:134 [ init_dist_screen::y2#0 ] -Uplifting [init_dist_screen] best 1225249 combination reg byte a [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 1251864 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:136 [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 1251764 combination reg byte a [ init_dist_screen::y2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Uplifting [init_angle_screen] best 1225249 combination zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Uplifting [init_angle_screen] best 1251764 combination zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Uplifting [init_dist_screen] best 1225249 combination zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Uplifting [init_dist_screen] best 1251764 combination zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] -Uplifting [main] best 1225249 combination zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:81 [ main::bucket_size#0 ] -Uplifting [main] best 1225249 combination zp ZP_BYTE:81 [ main::bucket_size#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:97 [ init_buckets::distance#0 ] -Uplifting [init_buckets] best 1225249 combination zp ZP_BYTE:97 [ init_buckets::distance#0 ] -Coalescing zero page register [ zp ZP_WORD:7 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 ] ] with [ zp ZP_WORD:87 [ main::fill1#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 ] ] with [ zp ZP_WORD:89 [ init_buckets::$15 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 init_buckets::$15 ] ] with [ zp ZP_WORD:109 [ malloc::mem#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:74 [ init_angle_screen::screen#0 ] ] - score: 1 +Uplifting [main] best 1251764 combination zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:83 [ main::bucket_size#0 ] +Uplifting [main] best 1251764 combination zp ZP_BYTE:83 [ main::bucket_size#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:99 [ init_buckets::distance#0 ] +Uplifting [init_buckets] best 1251764 combination zp ZP_BYTE:99 [ init_buckets::distance#0 ] +Coalescing zero page register [ zp ZP_WORD:7 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 ] ] with [ zp ZP_WORD:89 [ main::fill1#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 ] ] with [ zp ZP_WORD:91 [ init_buckets::$15 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 init_buckets::$15 ] ] with [ zp ZP_WORD:111 [ malloc::mem#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:76 [ init_angle_screen::screen#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:39 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:152 [ bsearch16u::return#3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:64 [ SCREEN_DIST#0 ] ] with [ zp ZP_WORD:76 [ init_buckets::screen#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:93 [ init_buckets::$12 ] ] with [ zp ZP_WORD:95 [ init_buckets::$16 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:98 [ init_buckets::$9 ] ] with [ zp ZP_WORD:100 [ init_buckets::$13 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:102 [ init_buckets::$17 ] ] with [ zp ZP_WORD:104 [ init_buckets::bucket#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:113 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:118 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:116 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:120 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:122 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:124 [ init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:135 [ sqr::return#2 ] ] with [ zp ZP_WORD:137 [ init_dist_screen::yds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:140 [ sqr::return#3 ] ] with [ zp ZP_WORD:142 [ init_dist_screen::xds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:140 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:168 [ sqr::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:144 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:146 [ sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:154 [ sqrt::found#0 ] ] with [ zp ZP_WORD:156 [ sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 init_buckets::$15 malloc::mem#0 ] ] with [ zp ZP_WORD:91 [ init_buckets::$5 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] ] with [ zp ZP_WORD:154 [ bsearch16u::return#3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:66 [ SCREEN_DIST#0 ] ] with [ zp ZP_WORD:78 [ init_buckets::screen#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:95 [ init_buckets::$12 ] ] with [ zp ZP_WORD:97 [ init_buckets::$16 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:100 [ init_buckets::$9 ] ] with [ zp ZP_WORD:102 [ init_buckets::$13 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:104 [ init_buckets::$17 ] ] with [ zp ZP_WORD:106 [ init_buckets::bucket#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:115 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:120 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:118 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:122 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:124 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:126 [ init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:137 [ sqr::return#2 ] ] with [ zp ZP_WORD:139 [ init_dist_screen::yds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:142 [ sqr::return#3 ] ] with [ zp ZP_WORD:144 [ init_dist_screen::xds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:142 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:168 [ sqr::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:146 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:148 [ sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:156 [ sqrt::found#0 ] ] with [ zp ZP_WORD:158 [ sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 init_buckets::$15 malloc::mem#0 ] ] with [ zp ZP_WORD:93 [ init_buckets::$5 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:23 [ malloc::size#7 malloc::size#6 init_buckets::$15 malloc::mem#0 init_buckets::$5 ] ] with [ zp ZP_WORD:170 [ SQUARES#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:122 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:154 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:98 [ init_buckets::$9 init_buckets::$13 ] ] with [ zp ZP_WORD:102 [ init_buckets::$17 init_buckets::bucket#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:140 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:144 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:126 [ init_angle_screen::$10 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:158 [ sqrt::$1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:140 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:150 [ bsearch16u::key#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:124 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 ] ] with [ zp ZP_WORD:156 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:100 [ init_buckets::$9 init_buckets::$13 ] ] with [ zp ZP_WORD:104 [ init_buckets::$17 init_buckets::bucket#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:142 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:146 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:128 [ init_angle_screen::$10 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:160 [ sqrt::$1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:142 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:152 [ bsearch16u::key#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ] ] with [ zp ZP_WORD:5 [ main::min_offset#5 main::min_offset#7 ] ] Coalescing zero page register [ zp ZP_WORD:12 [ init_buckets::i1#2 init_buckets::i1#1 ] ] with [ zp ZP_WORD:7 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 main::fill1#0 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ heap_head#18 heap_head#1 ] ] with [ zp ZP_WORD:17 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] ] @@ -6961,44 +8035,44 @@ Coalescing zero page register [ zp ZP_WORD:32 [ atan2_16::yi#3 atan2_16::yi#8 at Coalescing zero page register [ zp ZP_BYTE:46 [ init_dist_screen::y#10 init_dist_screen::y#1 ] ] with [ zp ZP_BYTE:31 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] ] Coalescing zero page register [ zp ZP_WORD:47 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] ] with [ zp ZP_WORD:34 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] Coalescing zero page register [ zp ZP_WORD:49 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] ] with [ zp ZP_WORD:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] ] -Coalescing zero page register [ zp ZP_WORD:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp ZP_WORD:42 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] -Coalescing zero page register [ zp ZP_WORD:59 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] -Coalescing zero page register [ zp ZP_WORD:79 [ main::bucket#0 ] ] with [ zp ZP_WORD:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:81 [ main::bucket_size#0 ] ] with [ zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] -Coalescing zero page register [ zp ZP_WORD:83 [ main::fill#0 ] ] with [ zp ZP_WORD:64 [ SCREEN_DIST#0 init_buckets::screen#0 ] ] -Coalescing zero page register [ zp ZP_WORD:85 [ main::angle#0 ] ] with [ zp ZP_WORD:72 [ BUCKET_IDX#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:97 [ init_buckets::distance#0 ] ] with [ zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] -Coalescing zero page register [ zp ZP_WORD:113 [ init_angle_screen::xw#0 atan2_16::x#0 ] ] with [ zp ZP_WORD:93 [ init_buckets::$12 init_buckets::$16 ] ] -Coalescing zero page register [ zp ZP_WORD:116 [ init_angle_screen::yw#0 atan2_16::y#0 ] ] with [ zp ZP_WORD:98 [ init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] ] -Coalescing zero page register [ zp ZP_WORD:135 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:106 [ init_buckets::$10 ] ] +Coalescing zero page register [ zp ZP_WORD:55 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] ] with [ zp ZP_WORD:42 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] +Coalescing zero page register [ zp ZP_WORD:57 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp ZP_WORD:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] +Coalescing zero page register [ zp ZP_WORD:81 [ main::bucket#0 ] ] with [ zp ZP_WORD:61 [ init_squares::sqr#2 init_squares::sqr#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:83 [ main::bucket_size#0 ] ] with [ zp ZP_BYTE:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] +Coalescing zero page register [ zp ZP_WORD:85 [ main::fill#0 ] ] with [ zp ZP_WORD:63 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] +Coalescing zero page register [ zp ZP_WORD:87 [ main::angle#0 ] ] with [ zp ZP_WORD:66 [ SCREEN_DIST#0 init_buckets::screen#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:99 [ init_buckets::distance#0 ] ] with [ zp ZP_BYTE:53 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] +Coalescing zero page register [ zp ZP_WORD:115 [ init_angle_screen::xw#0 atan2_16::x#0 ] ] with [ zp ZP_WORD:95 [ init_buckets::$12 init_buckets::$16 ] ] +Coalescing zero page register [ zp ZP_WORD:118 [ init_angle_screen::yw#0 atan2_16::y#0 ] ] with [ zp ZP_WORD:100 [ init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] ] +Coalescing zero page register [ zp ZP_WORD:137 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:108 [ init_buckets::$10 ] ] Coalescing zero page register [ zp ZP_WORD:47 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] with [ zp ZP_WORD:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 main::min_offset#5 main::min_offset#7 ] ] Coalescing zero page register [ zp ZP_WORD:49 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] ] with [ zp ZP_WORD:12 [ init_buckets::i1#2 init_buckets::i1#1 main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 main::fill1#0 ] ] -Coalescing zero page register [ zp ZP_WORD:79 [ main::bucket#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:97 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:128 [ init_angle_screen::ang_w#0 ] ] with [ zp ZP_BYTE:81 [ main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] ] -Coalescing zero page register [ zp ZP_WORD:135 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$10 ] ] with [ zp ZP_WORD:59 [ init_squares::sqr#2 init_squares::sqr#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] -Coalescing zero page register [ zp ZP_WORD:140 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp ZP_WORD:28 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] ] -Coalescing zero page register [ zp ZP_WORD:163 [ bsearch16u::pivot#0 ] ] with [ zp ZP_WORD:113 [ init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] ] -Coalescing zero page register [ zp ZP_WORD:165 [ bsearch16u::result#0 ] ] with [ zp ZP_WORD:116 [ init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] ] +Coalescing zero page register [ zp ZP_WORD:81 [ main::bucket#0 init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:26 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] ] +Coalescing zero page register [ zp ZP_WORD:85 [ main::fill#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp ZP_WORD:28 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:99 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp ZP_BYTE:25 [ init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:130 [ init_angle_screen::ang_w#0 ] ] with [ zp ZP_BYTE:83 [ main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] ] +Coalescing zero page register [ zp ZP_WORD:142 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp ZP_WORD:115 [ init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] ] +Coalescing zero page register [ zp ZP_WORD:165 [ bsearch16u::result#0 ] ] with [ zp ZP_WORD:118 [ init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] ] Allocated (was zp ZP_WORD:21) zp ZP_WORD:2 [ heap_head#18 heap_head#1 init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] Allocated (was zp ZP_BYTE:30) zp ZP_BYTE:4 [ init_angle_screen::x#2 init_angle_screen::x#1 main::min_angle#2 main::min_angle#4 main::min_angle#1 ] Allocated (was zp ZP_WORD:32) zp ZP_WORD:5 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 malloc::size#7 malloc::size#6 init_buckets::$15 malloc::mem#0 init_buckets::$5 SQUARES#1 ] Allocated (was zp ZP_BYTE:46) zp ZP_BYTE:7 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] Allocated (was zp ZP_WORD:47) zp ZP_WORD:8 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 main::min_offset#5 main::min_offset#7 ] Allocated (was zp ZP_WORD:49) zp ZP_WORD:10 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 init_buckets::i1#2 init_buckets::i1#1 main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 main::fill1#0 ] -Allocated (was zp ZP_WORD:55) zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] -Allocated (was zp ZP_WORD:66) zp ZP_WORD:14 [ SCREEN_ANGLE#0 ] -Allocated (was zp ZP_WORD:68) zp ZP_WORD:16 [ BUCKET_SIZES#0 ] -Allocated (was zp ZP_WORD:70) zp ZP_WORD:18 [ BUCKETS#0 ] -Allocated (was zp ZP_WORD:79) zp ZP_WORD:20 [ main::bucket#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] -Allocated (was zp ZP_WORD:83) zp ZP_WORD:22 [ main::fill#0 SCREEN_DIST#0 init_buckets::screen#0 ] -Allocated (was zp ZP_WORD:85) zp ZP_WORD:24 [ main::angle#0 BUCKET_IDX#0 ] -Allocated (was zp ZP_BYTE:97) zp ZP_BYTE:26 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] -Allocated (was zp ZP_BYTE:128) zp ZP_BYTE:27 [ init_angle_screen::ang_w#0 main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] -Allocated (was zp ZP_WORD:135) zp ZP_WORD:28 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$10 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] -Allocated (was zp ZP_WORD:140) zp ZP_WORD:30 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] -Allocated (was zp ZP_WORD:163) zp ZP_WORD:32 [ bsearch16u::pivot#0 init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] -Allocated (was zp ZP_WORD:165) zp ZP_WORD:34 [ bsearch16u::result#0 init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] +Allocated (was zp ZP_WORD:55) zp ZP_WORD:12 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated (was zp ZP_WORD:57) zp ZP_WORD:14 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_WORD:68) zp ZP_WORD:16 [ SCREEN_ANGLE#0 ] +Allocated (was zp ZP_WORD:70) zp ZP_WORD:18 [ BUCKET_SIZES#0 ] +Allocated (was zp ZP_WORD:72) zp ZP_WORD:20 [ BUCKETS#0 ] +Allocated (was zp ZP_WORD:74) zp ZP_WORD:22 [ BUCKET_IDX#0 ] +Allocated (was zp ZP_WORD:81) zp ZP_WORD:24 [ main::bucket#0 init_squares::sqr#2 init_squares::sqr#1 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] +Allocated (was zp ZP_WORD:85) zp ZP_WORD:26 [ main::fill#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] +Allocated (was zp ZP_WORD:87) zp ZP_WORD:28 [ main::angle#0 SCREEN_DIST#0 init_buckets::screen#0 ] +Allocated (was zp ZP_BYTE:99) zp ZP_BYTE:30 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] +Allocated (was zp ZP_BYTE:130) zp ZP_BYTE:31 [ init_angle_screen::ang_w#0 main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] +Allocated (was zp ZP_WORD:137) zp ZP_WORD:32 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$10 ] +Allocated (was zp ZP_WORD:142) zp ZP_WORD:34 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] +Allocated (was zp ZP_WORD:165) zp ZP_WORD:36 [ bsearch16u::result#0 init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -7030,17 +8104,17 @@ ASSEMBLER BEFORE OPTIMIZATION .label heap_head = 2 .label SQUARES = 5 // Screen containing distance to center - .label SCREEN_DIST = $16 + .label SCREEN_DIST = $1c // Screen containing angle to center - .label SCREEN_ANGLE = $e + .label SCREEN_ANGLE = $10 // Array containing the bucket size for each of the distance buckets - .label BUCKET_SIZES = $10 + .label BUCKET_SIZES = $12 // Buckets containing screen indices for each distance from the center. // BUCKETS[dist] is an array of words containing screen indices. // The size of the array BUCKETS[dist] is BUCKET_SIZES[dist] - .label BUCKETS = $12 + .label BUCKETS = $14 // Current index into each bucket. Used while populating the buckets. (After population the end the values will be equal to the bucket sizes) - .label BUCKET_IDX = $18 + .label BUCKET_IDX = $16 // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -7161,12 +8235,12 @@ bend_from_b3: bend: // main main: { - .label bucket = $14 - .label bucket_size = $1b - .label bucket_idx = $1a + .label bucket = $18 + .label bucket_size = $1f + .label bucket_idx = $1e .label offset = $a - .label fill = $16 - .label angle = $18 + .label fill = $1a + .label angle = $1c .label min_angle = 4 .label fill1 = $a .label min_offset = $a @@ -7405,25 +8479,25 @@ main: { } // init_buckets // Initialize buckets containing indices of chars on the screen with specific distances to the center. -// init_buckets(byte* zeropage($16) screen) +// init_buckets(byte* zeropage($1c) screen) init_buckets: { .label _5 = 5 - .label _9 = $22 - .label _10 = $1c - .label _12 = $20 - .label _13 = $22 - .label screen = $16 + .label _9 = $24 + .label _10 = $20 + .label _12 = $22 + .label _13 = $24 + .label screen = $1c .label dist = 8 .label i1 = $a - .label i2 = $14 - .label distance = $1a - .label bucket = $22 + .label i2 = $18 + .label distance = $1e + .label bucket = $24 .label dist_3 = 2 - .label i4 = $1e + .label i4 = $1a .label dist_5 = 2 .label _15 = 5 - .label _16 = $20 - .label _17 = $22 + .label _16 = $22 + .label _17 = $24 .label dist_8 = 2 // [54] phi from init_buckets to init_buckets::@1 [phi:init_buckets->init_buckets::@1] b1_from_init_buckets: @@ -7719,19 +8793,19 @@ malloc: { // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage($14) screen) +// init_angle_screen(byte* zeropage($18) screen) init_angle_screen: { .label _10 = $a - .label screen = $14 - .label screen_topline = $1e - .label screen_bottomline = $14 - .label xw = $20 - .label yw = $22 + .label screen = $18 + .label screen_topline = $1a + .label screen_bottomline = $18 + .label xw = $22 + .label yw = $24 .label angle_w = $a - .label ang_w = $1b + .label ang_w = $1f .label x = 4 .label xb = 7 - .label y = $1a + .label y = $1e // [97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen clc @@ -7887,18 +8961,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($20) x, signed word zeropage($22) y) +// atan2_16(signed word zeropage($22) x, signed word zeropage($24) y) atan2_16: { .label _2 = 5 .label _7 = 8 .label yi = 5 .label xi = 8 .label angle = $a - .label xd = $1c + .label xd = $e .label yd = $c .label return = $a - .label x = $20 - .label y = $22 + .label x = $22 + .label y = $24 // [128] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bpl b1 @@ -8206,15 +9280,15 @@ atan2_16: { init_dist_screen: { .label screen = 8 .label screen_bottomline = $a - .label yds = $1c - .label xds = $1e - .label ds = $1e - .label x = $1b - .label xb = $1a + .label yds = $20 + .label xds = $22 + .label ds = $22 + .label x = $1f + .label xb = $1e .label screen_topline = 8 .label y = 7 // [172] call init_squares - // [243] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [244] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares jmp b10 @@ -8266,9 +9340,9 @@ init_dist_screen: { b4: // [179] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [180] call sqr - // [239] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [240] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [239] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [240] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [181] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -8317,9 +9391,9 @@ init_dist_screen: { b8: // [188] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [189] call sqr - // [239] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [240] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [239] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [240] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [190] (word) sqr::return#3 ← (word) sqr::return#0 jmp b12 @@ -8409,18 +9483,18 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($1e) val) +// sqrt(word zeropage($22) val) sqrt: { - .label _1 = $c - .label _3 = $c - .label found = $c - .label val = $1e + .label _1 = $e + .label _3 = $e + .label found = $e + .label val = $22 // [211] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [212] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [213] call bsearch16u // [220] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: @@ -8455,29 +9529,105 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($1e) key, word* zeropage($c) items, byte register(X) num) +// bsearch16u(word zeropage($22) key, word* zeropage($e) items, byte register(X) num) bsearch16u: { - .label _2 = $c - .label pivot = $20 - .label result = $22 - .label return = $c - .label items = $c - .label key = $1e - // [221] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [221] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [221] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + .label _2 = $e + .label pivot = $e + .label result = $24 + .label return = $e + .label items = $e + .label key = $22 + .label items_1 = $c + .label items_10 = $c + .label items_16 = $c + // [221] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [221] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [221] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES + jmp b4 + // bsearch16u::@4 + b4: + // [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + txa + lsr + // [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + // [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [227] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [227] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [228] return + rts + // bsearch16u::@6 + b6: + // [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [231] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx + dex + // [232] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [232] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [232] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [233] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + txa + lsr + tax jmp b3 // bsearch16u::@3 b3: - // [222] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + // [234] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 cpx #0 - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -8491,7 +9641,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -8499,110 +9649,45 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [225] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [237] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [225] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [237] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [226] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [226] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [227] return - rts - // bsearch16u::@4 - b4: - // [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 - txa - lsr - // [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - // [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [221] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [221] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [221] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [236] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx - dex - // [237] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [237] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [237] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 - txa - lsr - tax - // [221] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [221] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [221] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $1e - .label return_2 = $1c - // [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $22 + .label return_2 = $20 + // [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + // [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa tay lda (SQUARES),y sta return @@ -8612,16 +9697,16 @@ sqr: { jmp breturn // sqr::@return breturn: - // [242] return + // [243] return rts } // init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $14 - .label sqr = $1c - // [244] call malloc + .label squares = $1a + .label sqr = $18 + // [245] call malloc // [93] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: // [93] phi (word) malloc::size#7 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 @@ -8634,39 +9719,39 @@ init_squares: { jmp b2 // init_squares::@2 b2: - // [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - // [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + // [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [247] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [248] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] b1_from_b2: - // [247] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + // [248] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [247] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [247] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [248] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [248] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [247] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [248] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [247] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [247] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [247] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [248] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [248] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [248] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -8674,28 +9759,28 @@ init_squares: { bcc !+ inc squares+1 !: - // [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [251] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - // [253] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [254] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [255] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [255] return + // [256] return rts } // File Data @@ -8774,15 +9859,15 @@ Removing instruction jmp b9 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b8 +Removing instruction jmp b7 Removing instruction jmp b3 Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp breturn -Removing instruction jmp b8 -Removing instruction jmp b9 -Removing instruction jmp b7 -Removing instruction jmp breturn Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn @@ -8835,9 +9920,8 @@ Replacing label b8_from_b6 with b8 Replacing label b4_from_b2 with b4 Replacing label b2_from_b5 with b2 Replacing label b2_from_b5 with b2 -Replacing label breturn_from_b8 with b2 -Replacing label b7_from_b6 with b7 -Replacing label b7_from_b6 with b7 +Replacing label breturn_from_b2 with breturn +Replacing label b7_from_b10 with b7 Replacing label b1_from_b1 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: @@ -8887,13 +9971,12 @@ Removing instruction b5_from_b13: Removing instruction b8_from_b6: Removing instruction b8_from_b7: Removing instruction sqr_from_b8: +Removing instruction breturn_from_b2: +Removing instruction breturn_from_b4: +Removing instruction b7_from_b10: +Removing instruction b7_from_b8: Removing instruction b2_from_b1: Removing instruction b2_from_b5: -Removing instruction breturn_from_b2: -Removing instruction breturn_from_b8: -Removing instruction breturn: -Removing instruction b7_from_b6: -Removing instruction b7_from_b9: Removing instruction b1_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction b4: @@ -8955,12 +10038,12 @@ Removing instruction breturn: Removing instruction bsearch16u_from_sqrt: Removing instruction b1: Removing instruction breturn: -Removing instruction b3_from_bsearch16u: +Removing instruction b4_from_bsearch16u: +Removing instruction b8: +Removing instruction b3: Removing instruction b5: Removing instruction b1: -Removing instruction b8: -Removing instruction b9: -Removing instruction b3_from_b7: +Removing instruction b4_from_b9: Removing instruction breturn: Removing instruction malloc_from_init_squares: Removing instruction b2: @@ -8968,7 +10051,9 @@ Removing instruction b1_from_b2: Removing instruction breturn: Succesful ASM optimization Pass5UnusedLabelElimination Skipping double jump to b2 in jmp b1_from_b11 -Replacing jump to rts with rts in jmp b2 +Skipping double jump to breturn in beq b2 +Skipping double jump to breturn in bcc b2 +Replacing jump to rts with rts in jmp breturn Succesful ASM optimization Pass5DoubleJumpElimination Relabelling long label b1_from_b11 to b1 Succesful ASM optimization Pass5RelabelLongLabels @@ -8988,6 +10073,7 @@ Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination Removing instruction b1: +Removing instruction b2: Succesful ASM optimization Pass5UnusedLabelElimination Fixing long branch [651] beq b12 to bne Fixing long branch [545] bpl b1 to bmi @@ -9007,11 +10093,11 @@ FINAL SYMBOL TABLE (byte*) BORDERCOL (const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280 (word*[]) BUCKETS -(void*) BUCKETS#0 BUCKETS zp ZP_WORD:18 0.02531645569620253 +(void*) BUCKETS#0 BUCKETS zp ZP_WORD:20 0.02531645569620253 (byte[]) BUCKET_IDX -(void*) BUCKET_IDX#0 BUCKET_IDX zp ZP_WORD:24 0.0425531914893617 +(void*) BUCKET_IDX#0 BUCKET_IDX zp ZP_WORD:22 0.0425531914893617 (byte[]) BUCKET_SIZES -(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:16 0.024691358024691357 +(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:18 0.024691358024691357 (byte*) COLS (const byte*) COLS#0 COLS = (byte*) 55296 (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16 @@ -9035,9 +10121,9 @@ FINAL SYMBOL TABLE (byte*) RASTER (const byte*) RASTER#0 RASTER = (byte*) 53266 (byte[]) SCREEN_ANGLE -(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:14 0.045454545454545456 +(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:16 0.045454545454545456 (byte[]) SCREEN_DIST -(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:22 0.125 +(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:28 0.125 (byte*) SCREEN_FILL (const byte*) SCREEN_FILL#0 SCREEN_FILL = (byte*) 1024 (const byte) SIZEOF_BYTE SIZEOF_BYTE = (byte) 1 @@ -9093,13 +10179,13 @@ FINAL SYMBOL TABLE (byte) atan2_16::shift#2 reg byte y 8001.25 (byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:32 2.8684210526315796 +(signed word) atan2_16::x#0 x zp ZP_WORD:34 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#1 xd zp ZP_WORD:28 6667.333333333333 -(signed word~) atan2_16::xd#10 xd zp ZP_WORD:28 1001.0 -(signed word) atan2_16::xd#2 xd zp ZP_WORD:28 1001.0 -(signed word) atan2_16::xd#3 xd zp ZP_WORD:28 7668.333333333332 -(signed word) atan2_16::xd#5 xd zp ZP_WORD:28 1001.0 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:14 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:14 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:14 1001.0 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 xi zp ZP_WORD:8 6.0 (signed word) atan2_16::xi#1 xi zp ZP_WORD:8 500.5 @@ -9108,7 +10194,7 @@ FINAL SYMBOL TABLE (signed word) atan2_16::xi#3 xi zp ZP_WORD:8 267.0666666666667 (signed word) atan2_16::xi#8 xi zp ZP_WORD:8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:34 2.724999999999999 +(signed word) atan2_16::y#0 y zp ZP_WORD:36 2.724999999999999 (signed word) atan2_16::yd (signed word) atan2_16::yd#1 yd zp ZP_WORD:12 10001.0 (signed word~) atan2_16::yd#10 yd zp ZP_WORD:12 2002.0 @@ -9124,9 +10210,10 @@ FINAL SYMBOL TABLE (signed word) atan2_16::yi#8 yi zp ZP_WORD:5 1001.0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:12 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:14 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -9137,26 +10224,27 @@ FINAL SYMBOL TABLE (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:12 1001.0 -(word*) bsearch16u::items#1 items zp ZP_WORD:12 2.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:12 334.5555555555556 -(word*) bsearch16u::items#8 items zp ZP_WORD:12 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:14 1001.0 +(word*) bsearch16u::items#1 items#1 zp ZP_WORD:12 2.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:12 429.2857142857143 +(word*) bsearch16u::items#11 items zp ZP_WORD:14 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:12 2002.0 +(word*~) bsearch16u::items#19 items zp ZP_WORD:14 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:30 0.26666666666666666 +(word) bsearch16u::key#0 key zp ZP_WORD:34 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:32 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:14 750.75 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:34 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:36 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:12 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:12 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:12 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:12 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:14 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:14 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:14 4.0 (byte*) heap_head (byte*) heap_head#1 heap_head zp ZP_WORD:2 0.2446808510638298 (byte*) heap_head#18 heap_head zp ZP_WORD:2 23.0 @@ -9174,19 +10262,19 @@ FINAL SYMBOL TABLE (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:27 84.16666666666666 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:31 84.16666666666666 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:10 202.0 (byte*) init_angle_screen::screen -(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:20 3.0 +(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:24 3.0 (byte*) init_angle_screen::screen_bottomline -(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:20 4.0 -(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:20 7.333333333333333 -(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:20 9.040000000000001 +(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:24 4.0 +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:24 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:24 9.040000000000001 (byte*) init_angle_screen::screen_topline -(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:30 2.0 -(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:30 5.5 -(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:30 9.416666666666666 +(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:26 2.0 +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:26 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:26 9.416666666666666 (byte) init_angle_screen::x (byte) init_angle_screen::x#1 x zp ZP_BYTE:4 101.0 (byte) init_angle_screen::x#2 x zp ZP_BYTE:4 25.25 @@ -9194,22 +10282,22 @@ FINAL SYMBOL TABLE (byte) init_angle_screen::xb#1 xb zp ZP_BYTE:7 101.0 (byte) init_angle_screen::xb#2 xb zp ZP_BYTE:7 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:32 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:34 33.666666666666664 (byte) init_angle_screen::y -(byte) init_angle_screen::y#1 y zp ZP_BYTE:26 16.5 -(byte) init_angle_screen::y#4 y zp ZP_BYTE:26 4.730769230769231 +(byte) init_angle_screen::y#1 y zp ZP_BYTE:30 16.5 +(byte) init_angle_screen::y#4 y zp ZP_BYTE:30 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:34 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:36 50.5 (void()) init_buckets((byte*) init_buckets::screen) -(word~) init_buckets::$10 $10 zp ZP_WORD:28 11.0 -(word~) init_buckets::$12 $12 zp ZP_WORD:32 22.0 -(word~) init_buckets::$13 $13 zp ZP_WORD:34 22.0 +(word~) init_buckets::$10 $10 zp ZP_WORD:32 11.0 +(word~) init_buckets::$12 $12 zp ZP_WORD:34 22.0 +(word~) init_buckets::$13 $13 zp ZP_WORD:36 22.0 (byte~) init_buckets::$14 reg byte a 22.0 (byte*~) init_buckets::$15 $15 zp ZP_WORD:5 22.0 -(word**~) init_buckets::$16 $16 zp ZP_WORD:32 22.0 -(word**~) init_buckets::$17 $17 zp ZP_WORD:34 22.0 +(word**~) init_buckets::$16 $16 zp ZP_WORD:34 22.0 +(word**~) init_buckets::$17 $17 zp ZP_WORD:36 22.0 (void*~) init_buckets::$5 $5 zp ZP_WORD:5 3.6666666666666665 -(word~) init_buckets::$9 $9 zp ZP_WORD:34 22.0 +(word~) init_buckets::$9 $9 zp ZP_WORD:36 22.0 (label) init_buckets::@1 (label) init_buckets::@2 (label) init_buckets::@3 @@ -9220,7 +10308,7 @@ FINAL SYMBOL TABLE (label) init_buckets::@8 (label) init_buckets::@return (word*) init_buckets::bucket -(word*) init_buckets::bucket#0 bucket zp ZP_WORD:34 7.333333333333333 +(word*) init_buckets::bucket#0 bucket zp ZP_WORD:36 7.333333333333333 (byte*) init_buckets::dist (byte*) init_buckets::dist#1 dist zp ZP_WORD:8 7.333333333333333 (byte*) init_buckets::dist#3 dist#3 zp ZP_WORD:2 7.333333333333333 @@ -9229,7 +10317,7 @@ FINAL SYMBOL TABLE (byte*~) init_buckets::dist#6 dist zp ZP_WORD:8 4.0 (byte*~) init_buckets::dist#8 dist#8 zp ZP_WORD:2 4.0 (byte) init_buckets::distance -(byte) init_buckets::distance#0 distance zp ZP_BYTE:26 5.5 +(byte) init_buckets::distance#0 distance zp ZP_BYTE:30 5.5 (byte) init_buckets::i (byte) init_buckets::i#1 reg byte y 16.5 (byte) init_buckets::i#2 reg byte y 16.5 @@ -9237,16 +10325,16 @@ FINAL SYMBOL TABLE (word) init_buckets::i1#1 i1 zp ZP_WORD:10 16.5 (word) init_buckets::i1#2 i1 zp ZP_WORD:10 7.333333333333333 (word) init_buckets::i2 -(word) init_buckets::i2#1 i2 zp ZP_WORD:20 16.5 -(word) init_buckets::i2#2 i2 zp ZP_WORD:20 5.5 +(word) init_buckets::i2#1 i2 zp ZP_WORD:24 16.5 +(word) init_buckets::i2#2 i2 zp ZP_WORD:24 5.5 (byte) init_buckets::i3 (byte) init_buckets::i3#1 reg byte y 16.5 (byte) init_buckets::i3#2 reg byte y 16.5 (word) init_buckets::i4 -(word) init_buckets::i4#1 i4 zp ZP_WORD:30 16.5 -(word) init_buckets::i4#2 i4 zp ZP_WORD:30 2.0 +(word) init_buckets::i4#1 i4 zp ZP_WORD:26 16.5 +(word) init_buckets::i4#2 i4 zp ZP_WORD:26 2.0 (byte*) init_buckets::screen -(byte*) init_buckets::screen#0 screen zp ZP_WORD:22 0.42500000000000004 +(byte*) init_buckets::screen#0 screen zp ZP_WORD:28 0.42500000000000004 (void()) init_dist_screen((byte*) init_dist_screen::screen) (byte~) init_dist_screen::$13 reg byte a 202.0 (byte~) init_dist_screen::$15 reg byte a 202.0 @@ -9269,7 +10357,7 @@ FINAL SYMBOL TABLE (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:30 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:34 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen#0 screen zp ZP_WORD:8 1.5 (byte*) init_dist_screen::screen_bottomline @@ -9280,17 +10368,17 @@ FINAL SYMBOL TABLE (byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:8 5.5 (byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:8 7.0625 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:27 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:27 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:31 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:31 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:26 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:26 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:30 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:30 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:30 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:34 202.0 (byte) init_dist_screen::y (byte) init_dist_screen::y#1 y zp ZP_BYTE:7 16.5 (byte) init_dist_screen::y#10 y zp ZP_BYTE:7 0.9705882352941178 @@ -9299,7 +10387,7 @@ FINAL SYMBOL TABLE (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:28 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:32 4.869565217391305 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -9310,12 +10398,12 @@ FINAL SYMBOL TABLE (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:28 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:28 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:24 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:24 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#0 squares zp ZP_WORD:20 4.0 -(word*) init_squares::squares#1 squares zp ZP_WORD:20 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:20 17.5 +(word*) init_squares::squares#0 squares zp ZP_WORD:26 4.0 +(word*) init_squares::squares#1 squares zp ZP_WORD:26 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:26 17.5 (void()) main() (byte~) main::$21 reg byte a 22.0 (byte~) main::$22 reg byte a 202.0 @@ -9338,16 +10426,16 @@ FINAL SYMBOL TABLE (label) main::@8 (label) main::@9 (byte*) main::angle -(byte*) main::angle#0 angle zp ZP_WORD:24 151.5 +(byte*) main::angle#0 angle zp ZP_WORD:28 151.5 (word[]) main::bucket -(word[]) main::bucket#0 bucket zp ZP_WORD:20 6.588235294117648 +(word[]) main::bucket#0 bucket zp ZP_WORD:24 6.588235294117648 (byte) main::bucket_idx -(byte) main::bucket_idx#1 bucket_idx zp ZP_BYTE:26 11.0 -(byte) main::bucket_idx#6 bucket_idx zp ZP_BYTE:26 2.64 +(byte) main::bucket_idx#1 bucket_idx zp ZP_BYTE:30 11.0 +(byte) main::bucket_idx#6 bucket_idx zp ZP_BYTE:30 2.64 (byte) main::bucket_size -(byte) main::bucket_size#0 bucket_size zp ZP_BYTE:27 7.6875 +(byte) main::bucket_size#0 bucket_size zp ZP_BYTE:31 7.6875 (byte*) main::fill -(byte*) main::fill#0 fill zp ZP_WORD:22 202.0 +(byte*) main::fill#0 fill zp ZP_WORD:26 202.0 (byte*) main::fill1 (byte*) main::fill1#0 fill1 zp ZP_WORD:10 22.0 (byte) main::i @@ -9377,26 +10465,26 @@ FINAL SYMBOL TABLE (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:30 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:28 22.0 -(word) sqr::return#3 return zp ZP_WORD:30 202.0 +(word) sqr::return#0 return zp ZP_WORD:34 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:32 22.0 +(word) sqr::return#3 return zp ZP_WORD:34 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:12 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:12 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:14 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:14 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:12 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:14 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:30 103.0 +(word) sqrt::val#0 val zp ZP_WORD:34 103.0 reg byte x [ main::i#2 main::i#1 ] reg byte y [ init_buckets::i#2 init_buckets::i#1 ] @@ -9411,47 +10499,48 @@ zp ZP_WORD:8 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topl zp ZP_WORD:10 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 init_buckets::i1#2 init_buckets::i1#1 main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 main::fill1#0 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +zp ZP_WORD:12 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:14 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:14 [ SCREEN_ANGLE#0 ] -zp ZP_WORD:16 [ BUCKET_SIZES#0 ] -zp ZP_WORD:18 [ BUCKETS#0 ] +zp ZP_WORD:16 [ SCREEN_ANGLE#0 ] +zp ZP_WORD:18 [ BUCKET_SIZES#0 ] +zp ZP_WORD:20 [ BUCKETS#0 ] +zp ZP_WORD:22 [ BUCKET_IDX#0 ] reg byte a [ main::$21 ] -zp ZP_WORD:20 [ main::bucket#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] +zp ZP_WORD:24 [ main::bucket#0 init_squares::sqr#2 init_squares::sqr#1 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] reg byte a [ main::$22 ] -zp ZP_WORD:22 [ main::fill#0 SCREEN_DIST#0 init_buckets::screen#0 ] -zp ZP_WORD:24 [ main::angle#0 BUCKET_IDX#0 ] -zp ZP_BYTE:26 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] +zp ZP_WORD:26 [ main::fill#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] +zp ZP_WORD:28 [ main::angle#0 SCREEN_DIST#0 init_buckets::screen#0 ] +zp ZP_BYTE:30 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] reg byte a [ init_buckets::$14 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_BYTE:27 [ init_angle_screen::ang_w#0 main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:31 [ init_angle_screen::ang_w#0 main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:28 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$10 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:32 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$10 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:30 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] +zp ZP_WORD:34 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:32 [ bsearch16u::pivot#0 init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] -zp ZP_WORD:34 [ bsearch16u::result#0 init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] +zp ZP_WORD:36 [ bsearch16u::result#0 init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] FINAL ASSEMBLER -Score: 1116084 +Score: 1142626 // File Comments // Fill screen using a spiral based on distance-to-center / angle-to-center @@ -9482,17 +10571,17 @@ Score: 1116084 .label heap_head = 2 .label SQUARES = 5 // Screen containing distance to center - .label SCREEN_DIST = $16 + .label SCREEN_DIST = $1c // Screen containing angle to center - .label SCREEN_ANGLE = $e + .label SCREEN_ANGLE = $10 // Array containing the bucket size for each of the distance buckets - .label BUCKET_SIZES = $10 + .label BUCKET_SIZES = $12 // Buckets containing screen indices for each distance from the center. // BUCKETS[dist] is an array of words containing screen indices. // The size of the array BUCKETS[dist] is BUCKET_SIZES[dist] - .label BUCKETS = $12 + .label BUCKETS = $14 // Current index into each bucket. Used while populating the buckets. (After population the end the values will be equal to the bucket sizes) - .label BUCKET_IDX = $18 + .label BUCKET_IDX = $16 // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -9596,12 +10685,12 @@ bbegin: // @end // main main: { - .label bucket = $14 - .label bucket_size = $1b - .label bucket_idx = $1a + .label bucket = $18 + .label bucket_size = $1f + .label bucket_idx = $1e .label offset = $a - .label fill = $16 - .label angle = $18 + .label fill = $1a + .label angle = $1c .label min_angle = 4 .label fill1 = $a .label min_offset = $a @@ -9831,25 +10920,25 @@ main: { } // init_buckets // Initialize buckets containing indices of chars on the screen with specific distances to the center. -// init_buckets(byte* zeropage($16) screen) +// init_buckets(byte* zeropage($1c) screen) init_buckets: { .label _5 = 5 - .label _9 = $22 - .label _10 = $1c - .label _12 = $20 - .label _13 = $22 - .label screen = $16 + .label _9 = $24 + .label _10 = $20 + .label _12 = $22 + .label _13 = $24 + .label screen = $1c .label dist = 8 .label i1 = $a - .label i2 = $14 - .label distance = $1a - .label bucket = $22 + .label i2 = $18 + .label distance = $1e + .label bucket = $24 .label dist_3 = 2 - .label i4 = $1e + .label i4 = $1a .label dist_5 = 2 .label _15 = 5 - .label _16 = $20 - .label _17 = $22 + .label _16 = $22 + .label _17 = $24 .label dist_8 = 2 // [54] phi from init_buckets to init_buckets::@1 [phi:init_buckets->init_buckets::@1] // [54] phi (byte) init_buckets::i#2 = (byte) 0 [phi:init_buckets->init_buckets::@1#0] -- vbuyy=vbuc1 @@ -10132,19 +11221,19 @@ malloc: { // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage($14) screen) +// init_angle_screen(byte* zeropage($18) screen) init_angle_screen: { .label _10 = $a - .label screen = $14 - .label screen_topline = $1e - .label screen_bottomline = $14 - .label xw = $20 - .label yw = $22 + .label screen = $18 + .label screen_topline = $1a + .label screen_bottomline = $18 + .label xw = $22 + .label yw = $24 .label angle_w = $a - .label ang_w = $1b + .label ang_w = $1f .label x = 4 .label xb = 7 - .label y = $1a + .label y = $1e // screen_topline = screen+40*12 // [97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen @@ -10304,18 +11393,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($20) x, signed word zeropage($22) y) +// atan2_16(signed word zeropage($22) x, signed word zeropage($24) y) atan2_16: { .label _2 = 5 .label _7 = 8 .label yi = 5 .label xi = 8 .label angle = $a - .label xd = $1c + .label xd = $e .label yd = $c .label return = $a - .label x = $20 - .label y = $22 + .label x = $22 + .label y = $24 // (y>=0)?y:-y // [128] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 @@ -10609,16 +11698,16 @@ atan2_16: { init_dist_screen: { .label screen = 8 .label screen_bottomline = $a - .label yds = $1c - .label xds = $1e - .label ds = $1e - .label x = $1b - .label xb = $1a + .label yds = $20 + .label xds = $22 + .label ds = $22 + .label x = $1f + .label xb = $1e .label screen_topline = 8 .label y = 7 // init_squares() // [172] call init_squares - // [243] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [244] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] jsr init_squares // init_dist_screen::@10 // screen_bottomline = screen+40*24 @@ -10662,8 +11751,8 @@ init_dist_screen: { // sqr(yd) // [179] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [180] call sqr - // [239] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - // [239] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [240] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [240] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // sqr(yd) // [181] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 @@ -10706,8 +11795,8 @@ init_dist_screen: { // sqr(xd) // [188] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [189] call sqr - // [239] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - // [239] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [240] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [240] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // sqr(xd) // [190] (word) sqr::return#3 ← (word) sqr::return#0 @@ -10803,19 +11892,19 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($1e) val) +// sqrt(word zeropage($22) val) sqrt: { - .label _1 = $c - .label _3 = $c - .label found = $c - .label val = $1e + .label _1 = $e + .label _3 = $e + .label found = $e + .label val = $22 // bsearch16u(val, SQUARES, NUM_SQUARES) // [211] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [212] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [213] call bsearch16u // [220] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] jsr bsearch16u @@ -10850,74 +11939,39 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($1e) key, word* zeropage($c) items, byte register(X) num) +// bsearch16u(word zeropage($22) key, word* zeropage($e) items, byte register(X) num) bsearch16u: { - .label _2 = $c - .label pivot = $20 - .label result = $22 - .label return = $c - .label items = $c - .label key = $1e - // [221] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - // [221] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [221] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + .label _2 = $e + .label pivot = $e + .label result = $24 + .label return = $e + .label items = $e + .label key = $22 + .label items_1 = $c + .label items_10 = $c + .label items_16 = $c + // [221] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + // [221] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [221] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES - // bsearch16u::@3 - b3: - // while (num > 0) - // [222] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 - cpx #0 - bne b4 - // bsearch16u::@5 - // *items<=key?items:items-1 - // [223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - // bsearch16u::@1 - // [224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - // [225] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - // [225] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - // bsearch16u::@2 - b2: - // [226] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - // [226] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - // bsearch16u::@return - // } - // [227] return - rts // bsearch16u::@4 b4: // num >> 1 - // [228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + // [222] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr // items + (num >> 1) - // [229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [223] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + // [224] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 // result = (signed int)key-(signed int)*pivot - // [231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + // [225] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -10928,66 +11982,112 @@ bsearch16u: { sbc (pivot),y sta result+1 // if (result == 0) - // [232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + // [226] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 bne b6 lda result bne b6 - // bsearch16u::@8 - // [233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 + // [227] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + // [227] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + // bsearch16u::@return + breturn: + // } + // [228] return rts // bsearch16u::@6 b6: // if (result > 0) - // [234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + // [229] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: - // bsearch16u::@9 + // bsearch16u::@8 // items = pivot+1 - // [235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + // [230] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: // num--; - // [236] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + // [231] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx dex - // [237] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - // [237] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [237] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + // [232] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + // [232] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [232] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy // bsearch16u::@7 b7: // num >>= 1 - // [238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + // [233] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - // [221] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - // [221] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [221] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + // bsearch16u::@3 + // while (num > 0) + // [234] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 + cpx #0 + bne b9 + // bsearch16u::@5 + // *items<=key?items:items-1 + // [235] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + // bsearch16u::@1 + // [236] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + // [237] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [237] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // bsearch16u::@2 + rts + // bsearch16u::@9 + b9: + // [238] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [221] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + // [221] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [221] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [239] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $1e - .label return_2 = $1c + .label return = $22 + .label return_2 = $20 // return SQUARES[val]; - // [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [241] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + // [242] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa tay lda (SQUARES),y sta return @@ -10996,17 +12096,17 @@ sqr: { sta return+1 // sqr::@return // } - // [242] return + // [243] return rts } // init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $14 - .label sqr = $1c + .label squares = $1a + .label sqr = $18 // malloc(NUM_SQUARES*sizeof(word)) - // [244] call malloc + // [245] call malloc // [93] phi from init_squares to malloc [phi:init_squares->malloc] // [93] phi (word) malloc::size#7 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 lda #<NUM_SQUARES*SIZEOF_WORD @@ -11017,29 +12117,29 @@ init_squares: { jsr malloc // init_squares::@2 // malloc(NUM_SQUARES*sizeof(word)) - // [245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + // [246] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // squares = SQUARES - // [246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [247] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [247] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - // [247] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + // [248] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [248] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [247] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [247] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [248] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [248] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 txa sta sqr sta sqr+1 - // [247] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [247] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [247] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [247] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [248] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [248] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [248] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [248] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy // init_squares::@1 b1: // *squares++ = sqr - // [248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y @@ -11047,7 +12147,7 @@ init_squares: { lda sqr+1 sta (squares),y // *squares++ = sqr; - // [249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -11056,15 +12156,15 @@ init_squares: { inc squares+1 !: // i*2 - // [250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl // i*2+1 - // [251] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 // sqr += i*2+1 - // [252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr @@ -11072,14 +12172,14 @@ init_squares: { inc sqr+1 !: // for( byte i: 0..NUM_SQUARES-1) - // [253] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [254] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [255] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1 // init_squares::@return // } - // [255] return + // [256] return rts } // File Data diff --git a/src/test/ref/screen-show-spiral-buckets.sym b/src/test/ref/screen-show-spiral-buckets.sym index 10031e18c..598d27ac7 100644 --- a/src/test/ref/screen-show-spiral-buckets.sym +++ b/src/test/ref/screen-show-spiral-buckets.sym @@ -11,11 +11,11 @@ (byte*) BORDERCOL (const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280 (word*[]) BUCKETS -(void*) BUCKETS#0 BUCKETS zp ZP_WORD:18 0.02531645569620253 +(void*) BUCKETS#0 BUCKETS zp ZP_WORD:20 0.02531645569620253 (byte[]) BUCKET_IDX -(void*) BUCKET_IDX#0 BUCKET_IDX zp ZP_WORD:24 0.0425531914893617 +(void*) BUCKET_IDX#0 BUCKET_IDX zp ZP_WORD:22 0.0425531914893617 (byte[]) BUCKET_SIZES -(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:16 0.024691358024691357 +(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:18 0.024691358024691357 (byte*) COLS (const byte*) COLS#0 COLS = (byte*) 55296 (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16 @@ -39,9 +39,9 @@ (byte*) RASTER (const byte*) RASTER#0 RASTER = (byte*) 53266 (byte[]) SCREEN_ANGLE -(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:14 0.045454545454545456 +(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:16 0.045454545454545456 (byte[]) SCREEN_DIST -(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:22 0.125 +(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:28 0.125 (byte*) SCREEN_FILL (const byte*) SCREEN_FILL#0 SCREEN_FILL = (byte*) 1024 (const byte) SIZEOF_BYTE SIZEOF_BYTE = (byte) 1 @@ -97,13 +97,13 @@ (byte) atan2_16::shift#2 reg byte y 8001.25 (byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:32 2.8684210526315796 +(signed word) atan2_16::x#0 x zp ZP_WORD:34 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#1 xd zp ZP_WORD:28 6667.333333333333 -(signed word~) atan2_16::xd#10 xd zp ZP_WORD:28 1001.0 -(signed word) atan2_16::xd#2 xd zp ZP_WORD:28 1001.0 -(signed word) atan2_16::xd#3 xd zp ZP_WORD:28 7668.333333333332 -(signed word) atan2_16::xd#5 xd zp ZP_WORD:28 1001.0 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:14 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:14 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:14 1001.0 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 xi zp ZP_WORD:8 6.0 (signed word) atan2_16::xi#1 xi zp ZP_WORD:8 500.5 @@ -112,7 +112,7 @@ (signed word) atan2_16::xi#3 xi zp ZP_WORD:8 267.0666666666667 (signed word) atan2_16::xi#8 xi zp ZP_WORD:8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:34 2.724999999999999 +(signed word) atan2_16::y#0 y zp ZP_WORD:36 2.724999999999999 (signed word) atan2_16::yd (signed word) atan2_16::yd#1 yd zp ZP_WORD:12 10001.0 (signed word~) atan2_16::yd#10 yd zp ZP_WORD:12 2002.0 @@ -128,9 +128,10 @@ (signed word) atan2_16::yi#8 yi zp ZP_WORD:5 1001.0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:12 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:14 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -141,26 +142,27 @@ (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:12 1001.0 -(word*) bsearch16u::items#1 items zp ZP_WORD:12 2.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:12 334.5555555555556 -(word*) bsearch16u::items#8 items zp ZP_WORD:12 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:14 1001.0 +(word*) bsearch16u::items#1 items#1 zp ZP_WORD:12 2.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:12 429.2857142857143 +(word*) bsearch16u::items#11 items zp ZP_WORD:14 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:12 2002.0 +(word*~) bsearch16u::items#19 items zp ZP_WORD:14 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:30 0.26666666666666666 +(word) bsearch16u::key#0 key zp ZP_WORD:34 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:32 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:14 750.75 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:34 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:36 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:12 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:12 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:12 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:12 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:14 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:14 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:14 4.0 (byte*) heap_head (byte*) heap_head#1 heap_head zp ZP_WORD:2 0.2446808510638298 (byte*) heap_head#18 heap_head zp ZP_WORD:2 23.0 @@ -178,19 +180,19 @@ (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:27 84.16666666666666 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:31 84.16666666666666 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:10 202.0 (byte*) init_angle_screen::screen -(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:20 3.0 +(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:24 3.0 (byte*) init_angle_screen::screen_bottomline -(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:20 4.0 -(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:20 7.333333333333333 -(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:20 9.040000000000001 +(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:24 4.0 +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:24 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:24 9.040000000000001 (byte*) init_angle_screen::screen_topline -(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:30 2.0 -(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:30 5.5 -(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:30 9.416666666666666 +(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:26 2.0 +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:26 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:26 9.416666666666666 (byte) init_angle_screen::x (byte) init_angle_screen::x#1 x zp ZP_BYTE:4 101.0 (byte) init_angle_screen::x#2 x zp ZP_BYTE:4 25.25 @@ -198,22 +200,22 @@ (byte) init_angle_screen::xb#1 xb zp ZP_BYTE:7 101.0 (byte) init_angle_screen::xb#2 xb zp ZP_BYTE:7 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:32 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:34 33.666666666666664 (byte) init_angle_screen::y -(byte) init_angle_screen::y#1 y zp ZP_BYTE:26 16.5 -(byte) init_angle_screen::y#4 y zp ZP_BYTE:26 4.730769230769231 +(byte) init_angle_screen::y#1 y zp ZP_BYTE:30 16.5 +(byte) init_angle_screen::y#4 y zp ZP_BYTE:30 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:34 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:36 50.5 (void()) init_buckets((byte*) init_buckets::screen) -(word~) init_buckets::$10 $10 zp ZP_WORD:28 11.0 -(word~) init_buckets::$12 $12 zp ZP_WORD:32 22.0 -(word~) init_buckets::$13 $13 zp ZP_WORD:34 22.0 +(word~) init_buckets::$10 $10 zp ZP_WORD:32 11.0 +(word~) init_buckets::$12 $12 zp ZP_WORD:34 22.0 +(word~) init_buckets::$13 $13 zp ZP_WORD:36 22.0 (byte~) init_buckets::$14 reg byte a 22.0 (byte*~) init_buckets::$15 $15 zp ZP_WORD:5 22.0 -(word**~) init_buckets::$16 $16 zp ZP_WORD:32 22.0 -(word**~) init_buckets::$17 $17 zp ZP_WORD:34 22.0 +(word**~) init_buckets::$16 $16 zp ZP_WORD:34 22.0 +(word**~) init_buckets::$17 $17 zp ZP_WORD:36 22.0 (void*~) init_buckets::$5 $5 zp ZP_WORD:5 3.6666666666666665 -(word~) init_buckets::$9 $9 zp ZP_WORD:34 22.0 +(word~) init_buckets::$9 $9 zp ZP_WORD:36 22.0 (label) init_buckets::@1 (label) init_buckets::@2 (label) init_buckets::@3 @@ -224,7 +226,7 @@ (label) init_buckets::@8 (label) init_buckets::@return (word*) init_buckets::bucket -(word*) init_buckets::bucket#0 bucket zp ZP_WORD:34 7.333333333333333 +(word*) init_buckets::bucket#0 bucket zp ZP_WORD:36 7.333333333333333 (byte*) init_buckets::dist (byte*) init_buckets::dist#1 dist zp ZP_WORD:8 7.333333333333333 (byte*) init_buckets::dist#3 dist#3 zp ZP_WORD:2 7.333333333333333 @@ -233,7 +235,7 @@ (byte*~) init_buckets::dist#6 dist zp ZP_WORD:8 4.0 (byte*~) init_buckets::dist#8 dist#8 zp ZP_WORD:2 4.0 (byte) init_buckets::distance -(byte) init_buckets::distance#0 distance zp ZP_BYTE:26 5.5 +(byte) init_buckets::distance#0 distance zp ZP_BYTE:30 5.5 (byte) init_buckets::i (byte) init_buckets::i#1 reg byte y 16.5 (byte) init_buckets::i#2 reg byte y 16.5 @@ -241,16 +243,16 @@ (word) init_buckets::i1#1 i1 zp ZP_WORD:10 16.5 (word) init_buckets::i1#2 i1 zp ZP_WORD:10 7.333333333333333 (word) init_buckets::i2 -(word) init_buckets::i2#1 i2 zp ZP_WORD:20 16.5 -(word) init_buckets::i2#2 i2 zp ZP_WORD:20 5.5 +(word) init_buckets::i2#1 i2 zp ZP_WORD:24 16.5 +(word) init_buckets::i2#2 i2 zp ZP_WORD:24 5.5 (byte) init_buckets::i3 (byte) init_buckets::i3#1 reg byte y 16.5 (byte) init_buckets::i3#2 reg byte y 16.5 (word) init_buckets::i4 -(word) init_buckets::i4#1 i4 zp ZP_WORD:30 16.5 -(word) init_buckets::i4#2 i4 zp ZP_WORD:30 2.0 +(word) init_buckets::i4#1 i4 zp ZP_WORD:26 16.5 +(word) init_buckets::i4#2 i4 zp ZP_WORD:26 2.0 (byte*) init_buckets::screen -(byte*) init_buckets::screen#0 screen zp ZP_WORD:22 0.42500000000000004 +(byte*) init_buckets::screen#0 screen zp ZP_WORD:28 0.42500000000000004 (void()) init_dist_screen((byte*) init_dist_screen::screen) (byte~) init_dist_screen::$13 reg byte a 202.0 (byte~) init_dist_screen::$15 reg byte a 202.0 @@ -273,7 +275,7 @@ (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:30 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:34 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen#0 screen zp ZP_WORD:8 1.5 (byte*) init_dist_screen::screen_bottomline @@ -284,17 +286,17 @@ (byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:8 5.5 (byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:8 7.0625 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:27 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:27 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:31 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:31 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:26 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:26 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:30 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:30 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:30 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:34 202.0 (byte) init_dist_screen::y (byte) init_dist_screen::y#1 y zp ZP_BYTE:7 16.5 (byte) init_dist_screen::y#10 y zp ZP_BYTE:7 0.9705882352941178 @@ -303,7 +305,7 @@ (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:28 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:32 4.869565217391305 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -314,12 +316,12 @@ (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:28 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:28 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:24 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:24 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#0 squares zp ZP_WORD:20 4.0 -(word*) init_squares::squares#1 squares zp ZP_WORD:20 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:20 17.5 +(word*) init_squares::squares#0 squares zp ZP_WORD:26 4.0 +(word*) init_squares::squares#1 squares zp ZP_WORD:26 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:26 17.5 (void()) main() (byte~) main::$21 reg byte a 22.0 (byte~) main::$22 reg byte a 202.0 @@ -342,16 +344,16 @@ (label) main::@8 (label) main::@9 (byte*) main::angle -(byte*) main::angle#0 angle zp ZP_WORD:24 151.5 +(byte*) main::angle#0 angle zp ZP_WORD:28 151.5 (word[]) main::bucket -(word[]) main::bucket#0 bucket zp ZP_WORD:20 6.588235294117648 +(word[]) main::bucket#0 bucket zp ZP_WORD:24 6.588235294117648 (byte) main::bucket_idx -(byte) main::bucket_idx#1 bucket_idx zp ZP_BYTE:26 11.0 -(byte) main::bucket_idx#6 bucket_idx zp ZP_BYTE:26 2.64 +(byte) main::bucket_idx#1 bucket_idx zp ZP_BYTE:30 11.0 +(byte) main::bucket_idx#6 bucket_idx zp ZP_BYTE:30 2.64 (byte) main::bucket_size -(byte) main::bucket_size#0 bucket_size zp ZP_BYTE:27 7.6875 +(byte) main::bucket_size#0 bucket_size zp ZP_BYTE:31 7.6875 (byte*) main::fill -(byte*) main::fill#0 fill zp ZP_WORD:22 202.0 +(byte*) main::fill#0 fill zp ZP_WORD:26 202.0 (byte*) main::fill1 (byte*) main::fill1#0 fill1 zp ZP_WORD:10 22.0 (byte) main::i @@ -381,26 +383,26 @@ (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:30 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:28 22.0 -(word) sqr::return#3 return zp ZP_WORD:30 202.0 +(word) sqr::return#0 return zp ZP_WORD:34 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:32 22.0 +(word) sqr::return#3 return zp ZP_WORD:34 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:12 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:12 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:14 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:14 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:12 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:14 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:30 103.0 +(word) sqrt::val#0 val zp ZP_WORD:34 103.0 reg byte x [ main::i#2 main::i#1 ] reg byte y [ init_buckets::i#2 init_buckets::i#1 ] @@ -415,40 +417,41 @@ zp ZP_WORD:8 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topl zp ZP_WORD:10 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 init_buckets::i1#2 init_buckets::i1#1 main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 main::fill1#0 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +zp ZP_WORD:12 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:14 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:14 [ SCREEN_ANGLE#0 ] -zp ZP_WORD:16 [ BUCKET_SIZES#0 ] -zp ZP_WORD:18 [ BUCKETS#0 ] +zp ZP_WORD:16 [ SCREEN_ANGLE#0 ] +zp ZP_WORD:18 [ BUCKET_SIZES#0 ] +zp ZP_WORD:20 [ BUCKETS#0 ] +zp ZP_WORD:22 [ BUCKET_IDX#0 ] reg byte a [ main::$21 ] -zp ZP_WORD:20 [ main::bucket#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] +zp ZP_WORD:24 [ main::bucket#0 init_squares::sqr#2 init_squares::sqr#1 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i2#2 init_buckets::i2#1 ] reg byte a [ main::$22 ] -zp ZP_WORD:22 [ main::fill#0 SCREEN_DIST#0 init_buckets::screen#0 ] -zp ZP_WORD:24 [ main::angle#0 BUCKET_IDX#0 ] -zp ZP_BYTE:26 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] +zp ZP_WORD:26 [ main::fill#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] +zp ZP_WORD:28 [ main::angle#0 SCREEN_DIST#0 init_buckets::screen#0 ] +zp ZP_BYTE:30 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::y#4 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] reg byte a [ init_buckets::$14 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_BYTE:27 [ init_angle_screen::ang_w#0 main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:31 [ init_angle_screen::ang_w#0 main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:28 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$10 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:32 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$10 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:30 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i4#2 init_buckets::i4#1 ] +zp ZP_WORD:34 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:32 [ bsearch16u::pivot#0 init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] -zp ZP_WORD:34 [ bsearch16u::result#0 init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] +zp ZP_WORD:36 [ bsearch16u::result#0 init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] diff --git a/src/test/ref/screen-show-spiral.asm b/src/test/ref/screen-show-spiral.asm index 19002a373..2c5e7c9f0 100644 --- a/src/test/ref/screen-show-spiral.asm +++ b/src/test/ref/screen-show-spiral.asm @@ -12,12 +12,12 @@ // Char to fill with .const FILL_CHAR = '@' .const NUM_SQUARES = $30 - .label heap_head = $f - .label SQUARES = $11 + .label heap_head = $d + .label SQUARES = $13 // Screen containing distance to center - .label SCREEN_DIST = $b + .label SCREEN_DIST = $f // Screen containing angle to center - .label SCREEN_ANGLE = $d + .label SCREEN_ANGLE = $11 bbegin: lda #<$3e8 sta malloc.size @@ -44,15 +44,15 @@ bbegin: jsr main rts main: { - .label dist = 9 - .label angle = $14 - .label fill = 7 - .label dist_angle = $1a - .label min_dist_angle = $16 - .label min_dist_angle_3 = $1a - .label min_fill = $18 - .label min_dist_angle_7 = $1a - .label min_dist_angle_8 = $1a + .label dist = $b + .label angle = $d + .label fill = 9 + .label dist_angle = 2 + .label min_dist_angle = $18 + .label min_dist_angle_3 = 2 + .label min_fill = $1a + .label min_dist_angle_7 = 2 + .label min_dist_angle_8 = 2 lda SCREEN_DIST sta init_dist_screen.screen lda SCREEN_DIST+1 @@ -161,19 +161,19 @@ main: { } // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage(7) screen) +// init_angle_screen(byte* zeropage(9) screen) init_angle_screen: { - .label _10 = $18 - .label screen = 7 - .label screen_topline = 9 - .label screen_bottomline = 7 - .label xw = $f - .label yw = $11 - .label angle_w = $18 - .label ang_w = $13 - .label x = 5 - .label xb = 6 - .label y = 2 + .label _10 = $1a + .label screen = 9 + .label screen_topline = $b + .label screen_bottomline = 9 + .label xw = $13 + .label yw = $16 + .label angle_w = $1a + .label ang_w = $15 + .label x = 7 + .label xb = 8 + .label y = 4 lda screen clc adc #<$28*$c @@ -261,18 +261,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($f) x, signed word zeropage($11) y) +// atan2_16(signed word zeropage($13) x, signed word zeropage($16) y) atan2_16: { - .label _2 = $14 - .label _7 = $16 - .label yi = $14 - .label xi = $16 - .label angle = $18 - .label xd = 3 - .label yd = $1a - .label return = $18 - .label x = $f - .label y = $11 + .label _2 = $d + .label _7 = $18 + .label yi = $d + .label xi = $18 + .label angle = $1a + .label xd = 5 + .label yd = 2 + .label return = $1a + .label x = $13 + .label y = $16 lda y+1 bmi !b1+ jmp b1 @@ -449,17 +449,17 @@ atan2_16: { } // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision -// init_dist_screen(byte* zeropage(3) screen) +// init_dist_screen(byte* zeropage(5) screen) init_dist_screen: { - .label screen = 3 - .label screen_bottomline = 7 - .label yds = $14 - .label xds = $16 - .label ds = $16 - .label x = 5 - .label xb = 6 - .label screen_topline = 3 - .label y = 2 + .label screen = 5 + .label screen_bottomline = 9 + .label yds = $16 + .label xds = $18 + .label ds = $18 + .label x = 7 + .label xb = 8 + .label screen_topline = 5 + .label y = 4 jsr init_squares lda screen clc @@ -548,16 +548,16 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($16) val) +// sqrt(word zeropage($18) val) sqrt: { - .label _1 = 9 - .label _3 = 9 - .label found = 9 - .label val = $16 + .label _1 = $d + .label _3 = $d + .label found = $d + .label val = $18 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 jsr bsearch16u lda _3 sec @@ -576,46 +576,27 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($16) key, word* zeropage(9) items, byte register(X) num) +// bsearch16u(word zeropage($18) key, word* zeropage($d) items, byte register(X) num) bsearch16u: { - .label _2 = 9 - .label pivot = $18 + .label _2 = $d + .label pivot = $d .label result = $1a - .label return = 9 - .label items = 9 - .label key = $16 + .label return = $d + .label items = $d + .label key = $18 + .label items_1 = $b + .label items_10 = $b + .label items_16 = $b ldx #NUM_SQUARES - b3: - cpx #0 - bne b4 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - b2: - rts b4: txa lsr asl clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 sec lda key @@ -629,38 +610,66 @@ bsearch16u: { bne b6 lda result bne b6 - lda pivot - sta return - lda pivot+1 - sta return+1 + breturn: rts b6: lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: dex b7: txa lsr tax - jmp b3 + cpx #0 + bne b9 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + rts + b9: + lda items + sta items_16 + lda items+1 + sta items_16+1 + jmp b4 + b10: + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $16 - .label return_2 = $14 + .label return = $18 + .label return_2 = $16 asl tay lda (SQUARES),y @@ -673,8 +682,8 @@ sqr: { // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = 9 - .label sqr = 7 + .label squares = $b + .label sqr = 9 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD @@ -719,10 +728,10 @@ init_squares: { } // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($11) size) +// malloc(word zeropage($13) size) malloc: { - .label mem = $11 - .label size = $11 + .label mem = $13 + .label size = $13 lda heap_head sec sbc mem diff --git a/src/test/ref/screen-show-spiral.cfg b/src/test/ref/screen-show-spiral.cfg index 02cfcec0b..b448057d4 100644 --- a/src/test/ref/screen-show-spiral.cfg +++ b/src/test/ref/screen-show-spiral.cfg @@ -304,84 +304,87 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [154] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [155] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(word*) bsearch16u::items#1 ) + [155] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [161] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [162] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [165] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [166] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#19 ) + [166] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [167] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [155] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [155] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [156] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [168] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [159] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [171] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [160] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [161] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [170] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [171] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [171] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [173] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + [174] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [176] return + [177] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [177] phi() - [178] call malloc + [178] phi() + [179] call malloc to:init_squares::@2 init_squares::@2: scope:[init_squares] from init_squares - [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [181] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [181] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [181] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [182] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [182] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [182] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [186] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [188] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [189] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [189] return + [190] return to:@return malloc: scope:[malloc] from @1 @3 init_squares - [190] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [190] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) - [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 - [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [191] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [191] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 to:malloc::@return malloc::@return: scope:[malloc] from malloc - [193] return + [194] return to:@return diff --git a/src/test/ref/screen-show-spiral.log b/src/test/ref/screen-show-spiral.log index cb22d503f..1dfca7163 100644 --- a/src/test/ref/screen-show-spiral.log +++ b/src/test/ref/screen-show-spiral.log @@ -2310,6 +2310,808 @@ Rewriting conditional comparison [370] if((byte) init_dist_screen::x#1<=(byte) $ Eliminating unused constant (const byte) NUM_SQUARES#0 Eliminating unused constant (const word*) SQUARES#0 Successful SSA optimization PassNEliminateUnusedVars +GRAPH (NEW VERSIONS for bsearch16u::num#3) +@begin: scope:[] from + to:@4 +@4: scope:[] from @begin + to:@12 +malloc: scope:[malloc] from @17 @21 init_squares + [0] (word) malloc::size#3 ← phi( @17/(const word) malloc::size#1 @21/(const word) malloc::size#2 init_squares/(word) malloc::size#0 ) + [0] (byte*) heap_head#12 ← phi( @17/(const byte*) HEAP_TOP#0 @21/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [1] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [2] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [4] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [5] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [5] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [6] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (byte) bsearch16u::num#9 ← phi( ) + [7] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [9] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [12] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [13] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [14] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (byte) bsearch16u::num#10 ← phi( ) + [15] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [16] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [17] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [18] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#2 ) + [18] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [19] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( ) + [20] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [21] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + [22] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [23] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#2 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@12: scope:[] from @4 + to:@15 +init_squares: scope:[init_squares] from init_dist_screen + [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [25] call malloc + [26] (void*) malloc::return#2 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [27] (void*~) init_squares::$1 ← (void*) malloc::return#2 + [28] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [29] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [31] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [31] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [31] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [32] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [33] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [34] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [35] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [36] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [37] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [38] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [39] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [40] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [41] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [42] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [43] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [44] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [45] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [46] call bsearch16u + [47] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [48] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [49] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [50] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [51] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [52] return + to:@return +@15: scope:[] from @12 + to:@17 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [53] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [54] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [55] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::y#0 atan2_16::@2/(signed word~) atan2_16::$2 ) + [56] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [57] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [58] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::x#0 atan2_16::@5/(signed word~) atan2_16::$7 ) + [59] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + [60] (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(const word) atan2_16::angle#0 ) + [60] (byte) atan2_16::i#2 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(const byte) atan2_16::i#0 ) + [60] (signed word) atan2_16::xi#3 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [60] (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + [62] (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + [63] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 + [64] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + [65] (signed word) atan2_16::yd#3 ← phi( atan2_16::@16/(signed word) atan2_16::yi#3 atan2_16::@19/(signed word) atan2_16::yd#1 ) + [65] (signed word) atan2_16::xd#3 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xd#1 ) + [65] (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::shift#1 ) + [66] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + [67] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [68] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [69] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + [70] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + [71] (signed word) atan2_16::xd#5 ← phi( atan2_16::@20/(signed word) atan2_16::xd#3 atan2_16::@24/(signed word) atan2_16::xd#2 ) + [71] (signed word) atan2_16::yd#5 ← phi( atan2_16::@20/(signed word) atan2_16::yd#3 atan2_16::@24/(signed word) atan2_16::yd#2 ) + [72] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + [73] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [74] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + [75] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [76] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [77] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [78] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + [79] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [80] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [81] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [82] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + [83] (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + [83] (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + [83] (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + [84] (byte) atan2_16::i#1 ← (byte) atan2_16::i#2 + rangenext(0,atan2_16::$16) + [85] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 + to:atan2_16::@15 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + [86] (word) atan2_16::angle#11 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + [87] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + [88] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + [89] (word) atan2_16::return#0 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + [90] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [91] return + to:@return +@17: scope:[] from @15 + [92] call malloc + [93] (void*) malloc::return#3 ← (void*) malloc::return#0 + to:@21 +@21: scope:[] from @17 + [94] (void*~) $0 ← (void*) malloc::return#3 + [95] (byte*) SCREEN_DIST#0 ← (byte*)(void*~) $0 + [96] call malloc + [97] (void*) malloc::return#4 ← (void*) malloc::return#0 + to:@22 +@22: scope:[] from @21 + [98] (void*~) $1 ← (void*) malloc::return#4 + [99] (byte*) SCREEN_ANGLE#0 ← (byte*)(void*~) $1 + to:@20 +main: scope:[main] from @20 + [100] (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#0 + [101] call init_dist_screen + to:main::@17 +main::@17: scope:[main] from main + [102] (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN_ANGLE#0 + [103] call init_angle_screen + to:main::@18 +main::@18: scope:[main] from main::@17 + to:main::@1 +main::@1: scope:[main] from main::@12 main::@18 + to:main::@2 +main::@2: scope:[main] from main::@1 + [104] (byte*) main::dist#0 ← (byte*) SCREEN_DIST#0 + [105] (byte*) main::angle#0 ← (byte*) SCREEN_ANGLE#0 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@5 + [106] (byte*) main::min_fill#5 ← phi( main::@2/(const byte*) main::min_fill#0 main::@5/(byte*) main::min_fill#2 ) + [106] (word) main::min_dist_angle#2 ← phi( main::@2/(const word) main::min_dist_angle#0 main::@5/(word) main::min_dist_angle#3 ) + [106] (byte*) main::angle#2 ← phi( main::@2/(byte*) main::angle#0 main::@5/(byte*) main::angle#1 ) + [106] (byte*) main::dist#2 ← phi( main::@2/(byte*) main::dist#0 main::@5/(byte*) main::dist#1 ) + [106] (byte*) main::fill#2 ← phi( main::@2/(const byte*) main::fill#0 main::@5/(byte*) main::fill#1 ) + [107] if(*((byte*) main::fill#2)==(const byte) FILL_CHAR#0) goto main::@5 + to:main::@7 +main::@5: scope:[main] from main::@4 main::@7 main::@8 + [108] (byte*) main::min_fill#2 ← phi( main::@4/(byte*) main::min_fill#5 main::@7/(byte*) main::min_fill#5 main::@8/(byte*) main::fill#2 ) + [108] (word) main::min_dist_angle#3 ← phi( main::@4/(word) main::min_dist_angle#2 main::@7/(word) main::min_dist_angle#2 main::@8/(word) main::dist_angle#0 ) + [109] (byte*) main::dist#1 ← ++ (byte*) main::dist#2 + [110] (byte*) main::angle#1 ← ++ (byte*) main::angle#2 + [111] (byte*) main::fill#1 ← ++ (byte*) main::fill#2 + [112] (byte*~) main::$6 ← (const byte*) SCREEN_FILL#0 + (word) $3e8 + [113] if((byte*) main::fill#1<(byte*~) main::$6) goto main::@4 + to:main::@9 +main::@7: scope:[main] from main::@4 + [114] (word) main::dist_angle#0 ← *((byte*) main::dist#2) w= *((byte*) main::angle#2) + [115] if((word) main::dist_angle#0>=(word) main::min_dist_angle#2) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@7 + to:main::@5 +main::@9: scope:[main] from main::@5 + [116] if((word) main::min_dist_angle#3!=(word) $ffff) goto main::@12 + to:main::@return +main::@12: scope:[main] from main::@9 + [117] *((byte*) main::min_fill#2) ← (const byte) FILL_CHAR#0 + to:main::@1 +main::@return: scope:[main] from main::@9 + [118] return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@17 + [119] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [120] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [121] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [121] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [121] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(const byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + [122] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + [122] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + [123] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 + [124] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [125] (word~) init_angle_screen::$4 ← (byte)(byte~) init_angle_screen::$3 w= (byte) 0 + [126] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 + [127] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 + [128] (word~) init_angle_screen::$7 ← (byte)(byte~) init_angle_screen::$6 w= (byte) 0 + [129] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 + [130] (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + [131] (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + [132] call atan2_16 + [133] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + [134] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [135] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [136] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [137] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [138] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [139] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [140] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [141] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [142] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [143] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [144] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [145] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [146] if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + [147] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [148] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [149] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [150] if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [151] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main + [152] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [153] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [154] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [154] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen#0 ) + [154] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [155] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [156] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [157] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [158] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [159] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [160] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [161] call sqr + [162] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [163] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [164] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [164] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [165] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [166] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [167] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [168] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [169] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [170] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [171] call sqr + [172] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [173] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [174] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [175] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [176] call sqrt + [177] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [178] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [179] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [180] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [181] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [182] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [183] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [184] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [185] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [186] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [187] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [188] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [189] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [190] return + to:@return +@20: scope:[] from @22 + [191] call main + to:@23 +@23: scope:[] from @20 + to:@end +@end: scope:[] from @23 + +GRAPH (NEW VERSIONS for bsearch16u::items#2) +@begin: scope:[] from + to:@4 +@4: scope:[] from @begin + to:@12 +malloc: scope:[malloc] from @17 @21 init_squares + [0] (word) malloc::size#3 ← phi( @17/(const word) malloc::size#1 @21/(const word) malloc::size#2 init_squares/(word) malloc::size#0 ) + [0] (byte*) heap_head#12 ← phi( @17/(const byte*) HEAP_TOP#0 @21/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [1] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [2] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [4] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + [5] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@10/(word*) bsearch16u::items#8 ) + [5] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) bsearch16u::num#2 bsearch16u::@10/(byte) bsearch16u::num#0 ) + [6] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#10 ← phi( ) + (byte) bsearch16u::num#9 ← phi( bsearch16u::@6/(byte) bsearch16u::num#3 ) + [7] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#9 >> (byte) 1 + [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + [9] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 + [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) + [12] (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + [13] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + (word*) bsearch16u::items#11 ← phi( ) + [14] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (word*) bsearch16u::items#12 ← phi( ) + (byte) bsearch16u::num#10 ← phi( bsearch16u::@7/(byte) bsearch16u::num#9 ) + [15] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + [16] (word*) bsearch16u::return#1 ← phi( bsearch16u::@13/(word*) bsearch16u::pivot#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + [17] return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + [18] (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#12 ) + [18] (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#10 ) + [19] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (byte) bsearch16u::num#11 ← phi( bsearch16u::@9/(byte) bsearch16u::num#10 ) + [20] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (const byte) bsearch16u::$17 + [21] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#11 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#14 ← phi( ) + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#13 ← phi( ) + [22] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#13 - (const byte) bsearch16u::$18 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + [23] (word*) bsearch16u::return#2 ← phi( bsearch16u::@1/(word*) bsearch16u::items#14 bsearch16u::@2/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +@12: scope:[] from @4 + to:@15 +init_squares: scope:[init_squares] from init_dist_screen + [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD + [25] call malloc + [26] (void*) malloc::return#2 ← (void*) malloc::return#0 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + [27] (void*~) init_squares::$1 ← (void*) malloc::return#2 + [28] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 + [29] (word*) init_squares::squares#0 ← (word*) SQUARES#1 + [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + [31] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(const byte) init_squares::i#0 ) + [31] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [31] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(const word) init_squares::sqr#0 ) + [32] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [33] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [34] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 + [35] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [36] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [37] (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + [38] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [39] return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [40] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [41] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + [42] (word) sqr::return#0 ← *((word*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [43] return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + [44] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [45] (word*) bsearch16u::items#1 ← (word*) SQUARES#1 + [46] call bsearch16u + [47] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + [48] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [49] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#1 + [50] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + [51] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + [52] return + to:@return +@15: scope:[] from @12 + to:@17 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [53] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [54] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [55] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::y#0 atan2_16::@2/(signed word~) atan2_16::$2 ) + [56] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [57] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [58] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::x#0 atan2_16::@5/(signed word~) atan2_16::$7 ) + [59] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + [60] (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(const word) atan2_16::angle#0 ) + [60] (byte) atan2_16::i#2 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(const byte) atan2_16::i#0 ) + [60] (signed word) atan2_16::xi#3 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [60] (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [61] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + [62] (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + [63] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 + [64] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + [65] (signed word) atan2_16::yd#3 ← phi( atan2_16::@16/(signed word) atan2_16::yi#3 atan2_16::@19/(signed word) atan2_16::yd#1 ) + [65] (signed word) atan2_16::xd#3 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xd#1 ) + [65] (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::shift#1 ) + [66] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + [67] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [68] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [69] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + [70] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + [71] (signed word) atan2_16::xd#5 ← phi( atan2_16::@20/(signed word) atan2_16::xd#3 atan2_16::@24/(signed word) atan2_16::xd#2 ) + [71] (signed word) atan2_16::yd#5 ← phi( atan2_16::@20/(signed word) atan2_16::yd#3 atan2_16::@24/(signed word) atan2_16::yd#2 ) + [72] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + [73] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [74] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + [75] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [76] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [77] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [78] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + [79] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [80] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [81] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD + [82] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + [83] (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + [83] (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + [83] (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + [84] (byte) atan2_16::i#1 ← (byte) atan2_16::i#2 + rangenext(0,atan2_16::$16) + [85] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 + to:atan2_16::@15 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + [86] (word) atan2_16::angle#11 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + [87] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + [88] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + [89] (word) atan2_16::return#0 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + [90] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [91] return + to:@return +@17: scope:[] from @15 + [92] call malloc + [93] (void*) malloc::return#3 ← (void*) malloc::return#0 + to:@21 +@21: scope:[] from @17 + [94] (void*~) $0 ← (void*) malloc::return#3 + [95] (byte*) SCREEN_DIST#0 ← (byte*)(void*~) $0 + [96] call malloc + [97] (void*) malloc::return#4 ← (void*) malloc::return#0 + to:@22 +@22: scope:[] from @21 + [98] (void*~) $1 ← (void*) malloc::return#4 + [99] (byte*) SCREEN_ANGLE#0 ← (byte*)(void*~) $1 + to:@20 +main: scope:[main] from @20 + [100] (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#0 + [101] call init_dist_screen + to:main::@17 +main::@17: scope:[main] from main + [102] (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN_ANGLE#0 + [103] call init_angle_screen + to:main::@18 +main::@18: scope:[main] from main::@17 + to:main::@1 +main::@1: scope:[main] from main::@12 main::@18 + to:main::@2 +main::@2: scope:[main] from main::@1 + [104] (byte*) main::dist#0 ← (byte*) SCREEN_DIST#0 + [105] (byte*) main::angle#0 ← (byte*) SCREEN_ANGLE#0 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@5 + [106] (byte*) main::min_fill#5 ← phi( main::@2/(const byte*) main::min_fill#0 main::@5/(byte*) main::min_fill#2 ) + [106] (word) main::min_dist_angle#2 ← phi( main::@2/(const word) main::min_dist_angle#0 main::@5/(word) main::min_dist_angle#3 ) + [106] (byte*) main::angle#2 ← phi( main::@2/(byte*) main::angle#0 main::@5/(byte*) main::angle#1 ) + [106] (byte*) main::dist#2 ← phi( main::@2/(byte*) main::dist#0 main::@5/(byte*) main::dist#1 ) + [106] (byte*) main::fill#2 ← phi( main::@2/(const byte*) main::fill#0 main::@5/(byte*) main::fill#1 ) + [107] if(*((byte*) main::fill#2)==(const byte) FILL_CHAR#0) goto main::@5 + to:main::@7 +main::@5: scope:[main] from main::@4 main::@7 main::@8 + [108] (byte*) main::min_fill#2 ← phi( main::@4/(byte*) main::min_fill#5 main::@7/(byte*) main::min_fill#5 main::@8/(byte*) main::fill#2 ) + [108] (word) main::min_dist_angle#3 ← phi( main::@4/(word) main::min_dist_angle#2 main::@7/(word) main::min_dist_angle#2 main::@8/(word) main::dist_angle#0 ) + [109] (byte*) main::dist#1 ← ++ (byte*) main::dist#2 + [110] (byte*) main::angle#1 ← ++ (byte*) main::angle#2 + [111] (byte*) main::fill#1 ← ++ (byte*) main::fill#2 + [112] (byte*~) main::$6 ← (const byte*) SCREEN_FILL#0 + (word) $3e8 + [113] if((byte*) main::fill#1<(byte*~) main::$6) goto main::@4 + to:main::@9 +main::@7: scope:[main] from main::@4 + [114] (word) main::dist_angle#0 ← *((byte*) main::dist#2) w= *((byte*) main::angle#2) + [115] if((word) main::dist_angle#0>=(word) main::min_dist_angle#2) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@7 + to:main::@5 +main::@9: scope:[main] from main::@5 + [116] if((word) main::min_dist_angle#3!=(word) $ffff) goto main::@12 + to:main::@return +main::@12: scope:[main] from main::@9 + [117] *((byte*) main::min_fill#2) ← (const byte) FILL_CHAR#0 + to:main::@1 +main::@return: scope:[main] from main::@9 + [118] return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@17 + [119] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [120] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [121] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [121] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [121] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(const byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + [122] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + [122] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(const byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + [123] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 + [124] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [125] (word~) init_angle_screen::$4 ← (byte)(byte~) init_angle_screen::$3 w= (byte) 0 + [126] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 + [127] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 + [128] (word~) init_angle_screen::$7 ← (byte)(byte~) init_angle_screen::$6 w= (byte) 0 + [129] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 + [130] (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + [131] (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + [132] call atan2_16 + [133] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + [134] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [135] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [136] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [137] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [138] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [139] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [140] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [141] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [142] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [143] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [144] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [145] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [146] if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + [147] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [148] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [149] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [150] if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [151] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main + [152] call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + [153] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + [154] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + [154] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen#0 ) + [154] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(const byte) init_dist_screen::y#0 ) + [155] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 + [156] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [157] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [158] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [159] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [160] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [161] call sqr + [162] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + [163] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + [164] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + [164] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(const byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + [165] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 + [166] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [167] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [168] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [169] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [170] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [171] call sqr + [172] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + [173] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [174] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [175] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [176] call sqrt + [177] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + [178] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [179] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [180] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [181] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [182] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [183] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [184] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [185] if((byte) init_dist_screen::x#1<(byte) $13+(number) 1) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + [186] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [187] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [188] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [189] if((byte) init_dist_screen::y#1!=(number) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + [190] return + to:@return +@20: scope:[] from @22 + [191] call main + to:@23 +@23: scope:[] from @20 + to:@end +@end: scope:[] from @23 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $13+1 in if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 Adding number conversion cast (unumber) 1 in if((byte) init_angle_screen::x#1<(unumber)(byte) $13+(number) 1) goto init_angle_screen::@2 Adding number conversion cast (unumber) $d in if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 @@ -2331,20 +3133,32 @@ Finalized unsigned number type (byte) $d Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 -Constant right-side identified [59] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 -Constant right-side identified [112] (byte*~) main::$6 ← (const byte*) SCREEN_FILL#0 + (word) $3e8 +Alias (byte) bsearch16u::num#0 = (byte) bsearch16u::num#3 +Alias (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 +Alias (byte) bsearch16u::num#10 = (byte) bsearch16u::num#9 (byte) bsearch16u::num#11 +Alias (word*) bsearch16u::items#10 = (word*) bsearch16u::items#12 +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#14 (word*) bsearch16u::items#13 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) bsearch16u::num#12 (const byte) bsearch16u::num#2 +Identical Phi Values (word*) bsearch16u::items#15 (word*) bsearch16u::items#1 +Successful SSA optimization Pass2IdenticalPhiElimination +Constant right-side identified [30] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD +Constant right-side identified [36] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 +Constant right-side identified [65] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 +Constant right-side identified [118] (byte*~) main::$6 ← (const byte*) SCREEN_FILL#0 + (word) $3e8 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 Constant (const byte) atan2_16::$16 = CORDIC_ITERATIONS_16#0-1 Constant (const byte*) main::$6 = SCREEN_FILL#0+$3e8 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [37] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [38] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Resolved ranged next value [84] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [85] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 +Removing PHI-reference to removed block (bsearch16u::@6_1) in block bsearch16u::@8 +if() condition always true - replacing block destination [199] if((const byte) bsearch16u::num#2>(byte) 0) goto bsearch16u::@7 +Successful SSA optimization Pass2ConstantIfs +Resolved ranged next value [43] init_squares::i#1 ← ++ init_squares::i#2 to ++ +Resolved ranged comparison value [44] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 +Resolved ranged next value [90] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [91] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 @@ -2358,6 +3172,8 @@ Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (word*) bsearch16u::items#11 = (word*) bsearch16u::items#2 +Successful SSA optimization Pass2AliasElimination Inlining Noop Cast [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 Inlining Noop Cast [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 Inlining Noop Cast [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) @@ -2424,7 +3240,8 @@ Constant inlined main::$6 = (const byte*) SCREEN_FILL#0+(word) $3e8 Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Constant inlined atan2_16::$16 = (const byte) CORDIC_ITERATIONS_16#0-(byte) 1 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) +Added new block during phi lifting bsearch16u::@18(between bsearch16u::@6 and bsearch16u::@7) +Added new block during phi lifting bsearch16u::@19(between bsearch16u::@9 and bsearch16u::@10) Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) @@ -2450,13 +3267,14 @@ Adding NOP phi() at start of @end Adding NOP phi() at start of main::@18 Adding NOP phi() at start of main::@1 Adding NOP phi() at start of init_dist_screen +Adding NOP phi() at start of bsearch16u CALL GRAPH Calls in [] to malloc:5 malloc:8 main:11 Calls in [main] to init_dist_screen:15 init_angle_screen:17 Calls in [init_angle_screen] to atan2_16:60 Calls in [init_dist_screen] to init_squares:156 sqr:168 sqr:179 sqrt:184 Calls in [sqrt] to bsearch16u:210 -Calls in [init_squares] to malloc:250 +Calls in [init_squares] to malloc:251 Created 48 initial phi equivalence classes Coalesced [7] heap_head#52 ← heap_head#1 @@ -2525,23 +3343,23 @@ Coalesced [202] init_dist_screen::x#8 ← init_dist_screen::x#1 Coalesced [203] init_dist_screen::xb#8 ← init_dist_screen::xb#1 Coalesced [205] init_dist_screen::xd#1 ← init_dist_screen::$15 Coalesced [207] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [217] bsearch16u::items#10 ← bsearch16u::items#1 -Coalesced [222] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [224] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [227] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [233] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [237] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [238] bsearch16u::items#12 ← bsearch16u::items#0 -Coalesced [241] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [242] bsearch16u::items#11 ← bsearch16u::items#8 -Coalesced [243] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [244] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [249] heap_head#53 ← heap_head#1 -Coalesced [253] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [263] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [264] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [265] init_squares::i#3 ← init_squares::i#1 -Not coalescing [268] heap_head#1 ← malloc::mem#0 +Coalesced [218] bsearch16u::items#17 ← bsearch16u::items#1 +Coalesced [225] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [231] bsearch16u::num#14 ← bsearch16u::num#1 +Coalesced [232] bsearch16u::items#18 ← bsearch16u::items#0 +Coalesced [238] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [240] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [241] bsearch16u::return#8 ← bsearch16u::items#11 +Coalesced [242] bsearch16u::num#13 ← bsearch16u::num#0 +Not coalescing [243] bsearch16u::items#16 ← bsearch16u::items#11 +Coalesced [244] bsearch16u::num#15 ← bsearch16u::num#10 +Not coalescing [245] bsearch16u::items#19 ← bsearch16u::items#10 +Coalesced (already) [250] heap_head#53 ← heap_head#1 +Coalesced [254] init_squares::squares#4 ← init_squares::squares#0 +Coalesced [264] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [265] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [266] init_squares::i#3 ← init_squares::i#1 +Not coalescing [269] heap_head#1 ← malloc::mem#0 Coalesced down to 38 phi equivalence classes Culled Empty Block (label) @4 Culled Empty Block (label) @12 @@ -2559,8 +3377,9 @@ Culled Empty Block (label) atan2_16::@36 Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_dist_screen::@19 Culled Empty Block (label) init_dist_screen::@20 +Culled Empty Block (label) bsearch16u::@6_1 +Culled Empty Block (label) bsearch16u::@13 Culled Empty Block (label) bsearch16u::@1 -Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@4 Renumbering block @17 to @1 Renumbering block @20 to @2 @@ -2573,8 +3392,9 @@ Renumbering block bsearch16u::@7 to bsearch16u::@4 Renumbering block bsearch16u::@8 to bsearch16u::@5 Renumbering block bsearch16u::@9 to bsearch16u::@6 Renumbering block bsearch16u::@10 to bsearch16u::@7 -Renumbering block bsearch16u::@13 to bsearch16u::@8 -Renumbering block bsearch16u::@15 to bsearch16u::@9 +Renumbering block bsearch16u::@15 to bsearch16u::@8 +Renumbering block bsearch16u::@18 to bsearch16u::@9 +Renumbering block bsearch16u::@19 to bsearch16u::@10 Renumbering block init_squares::@3 to init_squares::@2 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block atan2_16::@13 to atan2_16::@9 @@ -2922,86 +3742,89 @@ sqrt::@return: scope:[sqrt] from sqrt::@1 to:@return bsearch16u: scope:[bsearch16u] from sqrt [154] phi() + to:bsearch16u::@4 +bsearch16u::@4: scope:[bsearch16u] from bsearch16u bsearch16u::@9 + [155] (word*) bsearch16u::items#10 ← phi( bsearch16u::@9/(word*~) bsearch16u::items#16 bsearch16u/(word*) bsearch16u::items#1 ) + [155] (byte) bsearch16u::num#10 ← phi( bsearch16u::@9/(byte) bsearch16u::num#0 bsearch16u/(const byte) NUM_SQUARES#3 ) + [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 + [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 + [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@4 + [161] (word*) bsearch16u::return#1 ← phi( bsearch16u::@4/(word*) bsearch16u::pivot#0 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [162] return + to:@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [165] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@10 bsearch16u::@8 + [166] (word*) bsearch16u::items#11 ← phi( bsearch16u::@8/(word*) bsearch16u::items#0 bsearch16u::@10/(word*~) bsearch16u::items#19 ) + [166] (byte) bsearch16u::num#5 ← phi( bsearch16u::@8/(byte) bsearch16u::num#1 bsearch16u::@10/(byte) bsearch16u::num#10 ) + [167] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 -bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [155] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [155] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [156] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@7 + [168] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [159] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [171] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#11 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return -bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [160] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [161] return - to:@return -bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 - to:bsearch16u::@8 -bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 - to:bsearch16u::@return -bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 - to:bsearch16u::@9 -bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [170] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@3 + [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 + to:bsearch16u::@4 +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@6 + [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 to:bsearch16u::@7 -bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [171] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [171] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 - to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [173] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + [174] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [176] return + [177] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [177] phi() - [178] call malloc + [178] phi() + [179] call malloc to:init_squares::@2 init_squares::@2: scope:[init_squares] from init_squares - [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [181] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [181] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [181] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) - [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [182] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [182] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [182] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [186] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [188] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [189] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [189] return + [190] return to:@return malloc: scope:[malloc] from @1 @3 init_squares - [190] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [190] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) - [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 - [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 + [191] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [191] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 + [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 to:malloc::@return malloc::@return: scope:[malloc] from malloc - [193] return + [194] return to:@return @@ -3080,24 +3903,25 @@ VARIABLE REGISTER WEIGHTS (word*) bsearch16u::items (word*) bsearch16u::items#0 1001.0 (word*) bsearch16u::items#1 2.0 -(word*) bsearch16u::items#2 334.5555555555556 -(word*) bsearch16u::items#8 1501.5 +(word*) bsearch16u::items#10 429.2857142857143 +(word*) bsearch16u::items#11 752.25 +(word*~) bsearch16u::items#16 2002.0 +(word*~) bsearch16u::items#19 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 0.26666666666666666 +(word) bsearch16u::key#0 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 2002.0 +(byte) bsearch16u::num#0 1001.0 (byte) bsearch16u::num#1 2002.0 -(byte) bsearch16u::num#3 556.1111111111111 +(byte) bsearch16u::num#10 444.8888888888889 (byte) bsearch16u::num#5 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 501.0 +(word*) bsearch16u::pivot#0 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 2.0 +(word*) bsearch16u::return#1 335.00000000000006 (word*) bsearch16u::return#2 6.0 (word*) bsearch16u::return#3 4.0 -(word*~) bsearch16u::return#6 4.0 (byte*) heap_head (byte*) heap_head#1 0.6000000000000001 (byte*) heap_head#12 6.0 @@ -3267,8 +4091,9 @@ Initial phi equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] @@ -3312,7 +4137,6 @@ Added variable sqrt::$1 to zero page equivalence class [ sqrt::$1 ] Added variable sqrt::return#0 to zero page equivalence class [ sqrt::return#0 ] Added variable bsearch16u::$6 to zero page equivalence class [ bsearch16u::$6 ] Added variable bsearch16u::$16 to zero page equivalence class [ bsearch16u::$16 ] -Added variable bsearch16u::pivot#0 to zero page equivalence class [ bsearch16u::pivot#0 ] Added variable bsearch16u::result#0 to zero page equivalence class [ bsearch16u::result#0 ] Added variable sqr::$0 to zero page equivalence class [ sqr::$0 ] Added variable sqr::return#0 to zero page equivalence class [ sqr::return#0 ] @@ -3347,8 +4171,9 @@ Complete equivalence classes [ init_dist_screen::x#2 init_dist_screen::x#1 ] [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +[ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] @@ -3392,7 +4217,6 @@ Complete equivalence classes [ sqrt::return#0 ] [ bsearch16u::$6 ] [ bsearch16u::$16 ] -[ bsearch16u::pivot#0 ] [ bsearch16u::result#0 ] [ sqr::$0 ] [ sqr::return#0 ] @@ -3426,52 +4250,52 @@ Allocated zp ZP_BYTE:40 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_ Allocated zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Allocated zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Allocated zp ZP_BYTE:43 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -Allocated zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -Allocated zp ZP_BYTE:46 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Allocated zp ZP_BYTE:47 [ sqr::val#2 sqr::val#0 sqr::val#1 ] -Allocated zp ZP_WORD:48 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp ZP_WORD:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated zp ZP_BYTE:52 [ init_squares::i#2 init_squares::i#1 ] -Allocated zp ZP_WORD:53 [ heap_head#12 heap_head#1 ] -Allocated zp ZP_WORD:55 [ malloc::size#3 ] -Allocated zp ZP_WORD:57 [ SCREEN_DIST#0 ] -Allocated zp ZP_WORD:59 [ SCREEN_ANGLE#0 ] -Allocated zp ZP_WORD:61 [ init_angle_screen::screen#0 ] -Allocated zp ZP_BYTE:63 [ init_angle_screen::$2 ] -Allocated zp ZP_BYTE:64 [ init_angle_screen::$3 ] -Allocated zp ZP_WORD:65 [ init_angle_screen::xw#0 ] -Allocated zp ZP_BYTE:67 [ init_angle_screen::$6 ] -Allocated zp ZP_WORD:68 [ init_angle_screen::yw#0 ] -Allocated zp ZP_WORD:70 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:72 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:74 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:76 [ init_angle_screen::angle_w#0 ] -Allocated zp ZP_WORD:78 [ init_angle_screen::$10 ] -Allocated zp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] -Allocated zp ZP_BYTE:81 [ init_angle_screen::$12 ] -Allocated zp ZP_BYTE:82 [ init_angle_screen::$13 ] -Allocated zp ZP_BYTE:83 [ init_angle_screen::$14 ] -Allocated zp ZP_BYTE:84 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:85 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:86 [ init_dist_screen::y2#0 ] -Allocated zp ZP_WORD:87 [ sqr::return#2 ] -Allocated zp ZP_WORD:89 [ init_dist_screen::yds#0 ] -Allocated zp ZP_BYTE:91 [ init_dist_screen::x2#0 ] -Allocated zp ZP_WORD:92 [ sqr::return#3 ] -Allocated zp ZP_WORD:94 [ init_dist_screen::xds#0 ] -Allocated zp ZP_WORD:96 [ init_dist_screen::ds#0 ] -Allocated zp ZP_WORD:98 [ sqrt::val#0 ] -Allocated zp ZP_BYTE:100 [ sqrt::return#2 ] -Allocated zp ZP_BYTE:101 [ init_dist_screen::d#0 ] -Allocated zp ZP_WORD:102 [ bsearch16u::key#0 ] -Allocated zp ZP_WORD:104 [ bsearch16u::return#3 ] -Allocated zp ZP_WORD:106 [ sqrt::found#0 ] -Allocated zp ZP_WORD:108 [ sqrt::$3 ] -Allocated zp ZP_WORD:110 [ sqrt::$1 ] -Allocated zp ZP_BYTE:112 [ sqrt::return#0 ] -Allocated zp ZP_BYTE:113 [ bsearch16u::$6 ] -Allocated zp ZP_BYTE:114 [ bsearch16u::$16 ] -Allocated zp ZP_WORD:115 [ bsearch16u::pivot#0 ] +Allocated zp ZP_WORD:44 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] +Allocated zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] +Allocated zp ZP_BYTE:48 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Allocated zp ZP_BYTE:49 [ sqr::val#2 sqr::val#0 sqr::val#1 ] +Allocated zp ZP_WORD:50 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp ZP_WORD:52 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +Allocated zp ZP_BYTE:54 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp ZP_WORD:55 [ heap_head#12 heap_head#1 ] +Allocated zp ZP_WORD:57 [ malloc::size#3 ] +Allocated zp ZP_WORD:59 [ SCREEN_DIST#0 ] +Allocated zp ZP_WORD:61 [ SCREEN_ANGLE#0 ] +Allocated zp ZP_WORD:63 [ init_angle_screen::screen#0 ] +Allocated zp ZP_BYTE:65 [ init_angle_screen::$2 ] +Allocated zp ZP_BYTE:66 [ init_angle_screen::$3 ] +Allocated zp ZP_WORD:67 [ init_angle_screen::xw#0 ] +Allocated zp ZP_BYTE:69 [ init_angle_screen::$6 ] +Allocated zp ZP_WORD:70 [ init_angle_screen::yw#0 ] +Allocated zp ZP_WORD:72 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:74 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:76 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] +Allocated zp ZP_WORD:80 [ init_angle_screen::$10 ] +Allocated zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] +Allocated zp ZP_BYTE:83 [ init_angle_screen::$12 ] +Allocated zp ZP_BYTE:84 [ init_angle_screen::$13 ] +Allocated zp ZP_BYTE:85 [ init_angle_screen::$14 ] +Allocated zp ZP_BYTE:86 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:87 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:88 [ init_dist_screen::y2#0 ] +Allocated zp ZP_WORD:89 [ sqr::return#2 ] +Allocated zp ZP_WORD:91 [ init_dist_screen::yds#0 ] +Allocated zp ZP_BYTE:93 [ init_dist_screen::x2#0 ] +Allocated zp ZP_WORD:94 [ sqr::return#3 ] +Allocated zp ZP_WORD:96 [ init_dist_screen::xds#0 ] +Allocated zp ZP_WORD:98 [ init_dist_screen::ds#0 ] +Allocated zp ZP_WORD:100 [ sqrt::val#0 ] +Allocated zp ZP_BYTE:102 [ sqrt::return#2 ] +Allocated zp ZP_BYTE:103 [ init_dist_screen::d#0 ] +Allocated zp ZP_WORD:104 [ bsearch16u::key#0 ] +Allocated zp ZP_WORD:106 [ bsearch16u::return#3 ] +Allocated zp ZP_WORD:108 [ sqrt::found#0 ] +Allocated zp ZP_WORD:110 [ sqrt::$3 ] +Allocated zp ZP_WORD:112 [ sqrt::$1 ] +Allocated zp ZP_BYTE:114 [ sqrt::return#0 ] +Allocated zp ZP_BYTE:115 [ bsearch16u::$6 ] +Allocated zp ZP_BYTE:116 [ bsearch16u::$16 ] Allocated zp ZP_WORD:117 [ bsearch16u::result#0 ] Allocated zp ZP_BYTE:119 [ sqr::$0 ] Allocated zp ZP_WORD:120 [ sqr::return#0 ] @@ -3499,12 +4323,12 @@ Target platform is c64basic // Char to fill with .const FILL_CHAR = '@' .const NUM_SQUARES = $30 - .label heap_head = $35 + .label heap_head = $37 .label SQUARES = $7a // Screen containing distance to center - .label SCREEN_DIST = $39 + .label SCREEN_DIST = $3b // Screen containing angle to center - .label SCREEN_ANGLE = $3b + .label SCREEN_ANGLE = $3d // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -3513,14 +4337,14 @@ b1_from_bbegin: // @1 b1: // [2] call malloc - // [190] phi from @1 to malloc [phi:@1->malloc] + // [191] phi from @1 to malloc [phi:@1->malloc] malloc_from_b1: - // [190] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + // [191] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + // [191] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 lda #<HEAP_TOP sta heap_head lda #>HEAP_TOP @@ -3535,14 +4359,14 @@ b3: lda malloc.mem+1 sta SCREEN_DIST+1 // [4] call malloc - // [190] phi from @3 to malloc [phi:@3->malloc] + // [191] phi from @3 to malloc [phi:@3->malloc] malloc_from_b3: - // [190] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + // [191] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + // [191] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy jsr malloc jmp b4 // @4 @@ -3752,22 +4576,22 @@ main: { // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage($3d) screen) +// init_angle_screen(byte* zeropage($3f) screen) init_angle_screen: { - .label _2 = $3f - .label _3 = $40 - .label _6 = $43 - .label _10 = $4e - .label _12 = $51 - .label _13 = $52 - .label _14 = $53 - .label screen = $3d + .label _2 = $41 + .label _3 = $42 + .label _6 = $45 + .label _10 = $50 + .label _12 = $53 + .label _13 = $54 + .label _14 = $55 + .label screen = $3f .label screen_topline = $11 .label screen_bottomline = $f - .label xw = $41 - .label yw = $44 - .label angle_w = $4c - .label ang_w = $50 + .label xw = $43 + .label yw = $46 + .label angle_w = $4e + .label ang_w = $52 .label x = $13 .label xb = $14 .label y = $e @@ -3952,12 +4776,12 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($46) x, signed word zeropage($48) y) +// atan2_16(signed word zeropage($48) x, signed word zeropage($4a) y) atan2_16: { .label _2 = $15 .label _7 = $17 - .label _23 = $55 - .label _24 = $54 + .label _23 = $57 + .label _24 = $56 .label yi = $15 .label xi = $17 .label angle = $1c @@ -3968,9 +4792,9 @@ atan2_16: { .label angle_3 = $1a .label i = $19 .label return = $1c - .label x = $46 - .label y = $48 - .label return_2 = $4a + .label x = $48 + .label y = $4a + .label return_2 = $4c .label angle_6 = $1a .label angle_12 = $1a .label angle_13 = $1a @@ -4294,20 +5118,20 @@ init_dist_screen: { .label _15 = $2b .label screen = $24 .label screen_bottomline = $26 - .label y2 = $56 + .label y2 = $58 .label yd = $28 - .label yds = $59 - .label x2 = $5b + .label yds = $5b + .label x2 = $5d .label xd = $2b - .label xds = $5e - .label ds = $60 - .label d = $65 + .label xds = $60 + .label ds = $62 + .label d = $67 .label x = $29 .label xb = $2a .label screen_topline = $24 .label y = $23 // [106] call init_squares - // [177] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [178] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares jmp b10 @@ -4364,9 +5188,9 @@ init_dist_screen: { lda yd sta sqr.val // [114] call sqr - // [173] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [174] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [173] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [174] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [115] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -4424,9 +5248,9 @@ init_dist_screen: { lda xd sta sqr.val // [123] call sqr - // [173] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [174] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [173] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [174] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [124] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -4538,14 +5362,14 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($62) val) +// sqrt(word zeropage($64) val) sqrt: { - .label _1 = $6e - .label _3 = $6c - .label found = $6a - .label return = $70 - .label val = $62 - .label return_2 = $64 + .label _1 = $70 + .label _3 = $6e + .label found = $6c + .label return = $72 + .label val = $64 + .label return_2 = $66 // [145] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 lda val sta bsearch16u.key @@ -4553,9 +5377,9 @@ sqrt: { sta bsearch16u.key+1 // [146] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [147] call bsearch16u // [154] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: @@ -4603,34 +5427,112 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($66) key, word* zeropage($2c) items, byte zeropage($2e) num) +// bsearch16u(word zeropage($68) key, word* zeropage($2e) items, byte zeropage($30) num) bsearch16u: { - .label _2 = $2c - .label _6 = $71 - .label _16 = $72 - .label pivot = $73 + .label _2 = $2e + .label _6 = $73 + .label _16 = $74 + .label pivot = $2e .label result = $75 - .label return = $2c - .label num = $2e - .label items = $2c - .label key = $66 - .label return_3 = $68 - // [155] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [155] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [155] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 + .label return = $2e + .label num = $30 + .label items = $2e + .label key = $68 + .label items_1 = $2c + .label return_3 = $6a + .label items_10 = $2c + .label items_16 = $2c + // [155] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [155] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [155] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuz1=vbuc1 lda #NUM_SQUARES sta num + jmp b4 + // bsearch16u::@4 + b4: + // [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + lda num + lsr + sta _6 + // [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda _6 + asl + sta _16 + // [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 + lda _16 + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [161] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [161] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [162] return + rts + // bsearch16u::@6 + b6: + // [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [165] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuz1=_dec_vbuz1 + dec num + // [166] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [166] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [166] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [167] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr num jmp b3 // bsearch16u::@3 b3: - // [156] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 + // [168] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuz1_gt_0_then_la1 lda num - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -4644,7 +5546,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -4652,117 +5554,50 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [159] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [171] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [159] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [171] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [160] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [160] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [161] return - rts - // bsearch16u::@4 - b4: - // [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 - lda num - lsr - sta _6 - // [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda _6 - asl - sta _16 - // [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 - lda _16 - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [155] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [155] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [155] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [170] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 - dec num - // [171] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [171] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [171] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 - lsr num - // [155] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [155] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [155] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte zeropage($2f) val) +// sqr(byte zeropage($31) val) sqr: { .label _0 = $77 .label return = $78 - .label val = $2f - .label return_2 = $57 - .label return_3 = $5c - // [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label val = $31 + .label return_2 = $59 + .label return_3 = $5e + // [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda val asl sta _0 - // [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 + // [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 ldy _0 lda (SQUARES),y sta return @@ -4772,7 +5607,7 @@ sqr: { jmp breturn // sqr::@return breturn: - // [176] return + // [177] return rts } // init_squares @@ -4781,60 +5616,60 @@ sqr: { init_squares: { .label _3 = $7c .label _4 = $7d - .label squares = $32 - .label sqr = $30 - .label i = $34 - // [178] call malloc - // [190] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $34 + .label sqr = $32 + .label i = $36 + // [179] call malloc + // [191] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: - // [190] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + // [191] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + // [191] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc jmp b2 // init_squares::@2 b2: - // [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + // [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda malloc.mem sta SQUARES lda malloc.mem+1 sta SQUARES+1 - // [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [182] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] b1_from_b2: - // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 + // [182] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [182] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [182] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [181] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [182] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [182] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [182] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [182] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -4842,15 +5677,15 @@ init_squares: { bcc !+ inc squares+1 !: - // [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _3 - // [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [186] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy _3 iny sty _4 - // [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda _4 clc adc sqr @@ -4858,26 +5693,26 @@ init_squares: { bcc !+ inc sqr+1 !: - // [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [188] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc i - // [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 + // [189] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_SQUARES-1+1 cmp i bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [189] return + // [190] return rts } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($37) size) +// malloc(word zeropage($39) size) malloc: { .label mem = $7e - .label size = $37 - // [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz3 + .label size = $39 + // [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz3 lda heap_head sec sbc size @@ -4885,7 +5720,7 @@ malloc: { lda heap_head+1 sbc size+1 sta mem+1 - // [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 + // [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 lda mem sta heap_head lda mem+1 @@ -4893,7 +5728,7 @@ malloc: { jmp breturn // malloc::@return breturn: - // [193] return + // [194] return rts } // File Data @@ -4940,9 +5775,9 @@ Statement [44] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 Statement [45] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a Statement [46] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a Statement [47] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] Statement [48] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] Statement [49] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y Statement [50] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a Statement [51] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y @@ -5002,33 +5837,34 @@ Statement [149] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [150] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [151] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [152] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Statement [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:46 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:46 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:52 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:52 [ init_squares::i#2 init_squares::i#1 ] -Statement [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:48 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] +Statement [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:54 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:54 [ init_squares::i#2 init_squares::i#1 ] +Statement [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a @@ -5106,7 +5942,7 @@ Statement [125] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_d Statement [126] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a Statement [127] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a Statement [131] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:101 [ init_dist_screen::d#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:103 [ init_dist_screen::d#0 ] Statement [132] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y Statement [133] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y Statement [134] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ) always clobbers reg byte y @@ -5119,26 +5955,27 @@ Statement [149] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [150] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [151] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [152] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a @@ -5228,26 +6065,27 @@ Statement [149] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES Statement [150] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a Statement [151] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a Statement [152] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:128 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a -Statement [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y -Statement [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a -Statement [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a -Statement [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#10 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#11 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#11 ] ) always clobbers reg byte a reg byte y +Statement [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 [ bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#0 bsearch16u::items#16 ] ) always clobbers reg byte a +Statement [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 [ bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ( main:7::init_dist_screen:10::sqrt:128::bsearch16u:147 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#10 bsearch16u::items#19 ] ) always clobbers reg byte a +Statement [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:123 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a +Statement [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Potential registers zp ZP_WORD:2 [ main::fill#2 main::fill#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ main::dist#2 main::dist#0 main::dist#1 ] : zp ZP_WORD:4 , Potential registers zp ZP_WORD:6 [ main::angle#2 main::angle#0 main::angle#1 ] : zp ZP_WORD:6 , @@ -5274,52 +6112,52 @@ Potential registers zp ZP_BYTE:40 [ init_dist_screen::yd#0 init_dist_screen::$7 Potential registers zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:41 , reg byte x , Potential registers zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:42 , reg byte x , Potential registers zp ZP_BYTE:43 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:43 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:44 , -Potential registers zp ZP_BYTE:46 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:46 , reg byte x , -Potential registers zp ZP_BYTE:47 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:47 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:48 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:48 , -Potential registers zp ZP_WORD:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:50 , -Potential registers zp ZP_BYTE:52 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:52 , reg byte x , -Potential registers zp ZP_WORD:53 [ heap_head#12 heap_head#1 ] : zp ZP_WORD:53 , -Potential registers zp ZP_WORD:55 [ malloc::size#3 ] : zp ZP_WORD:55 , -Potential registers zp ZP_WORD:57 [ SCREEN_DIST#0 ] : zp ZP_WORD:57 , -Potential registers zp ZP_WORD:59 [ SCREEN_ANGLE#0 ] : zp ZP_WORD:59 , -Potential registers zp ZP_WORD:61 [ init_angle_screen::screen#0 ] : zp ZP_WORD:61 , -Potential registers zp ZP_BYTE:63 [ init_angle_screen::$2 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:64 [ init_angle_screen::$3 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:65 [ init_angle_screen::xw#0 ] : zp ZP_WORD:65 , -Potential registers zp ZP_BYTE:67 [ init_angle_screen::$6 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:68 [ init_angle_screen::yw#0 ] : zp ZP_WORD:68 , -Potential registers zp ZP_WORD:70 [ atan2_16::x#0 ] : zp ZP_WORD:70 , -Potential registers zp ZP_WORD:72 [ atan2_16::y#0 ] : zp ZP_WORD:72 , -Potential registers zp ZP_WORD:74 [ atan2_16::return#2 ] : zp ZP_WORD:74 , -Potential registers zp ZP_WORD:76 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:76 , -Potential registers zp ZP_WORD:78 [ init_angle_screen::$10 ] : zp ZP_WORD:78 , -Potential registers zp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:80 , reg byte x , -Potential registers zp ZP_BYTE:81 [ init_angle_screen::$12 ] : zp ZP_BYTE:81 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:82 [ init_angle_screen::$13 ] : zp ZP_BYTE:82 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:83 [ init_angle_screen::$14 ] : zp ZP_BYTE:83 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:84 [ atan2_16::$24 ] : zp ZP_BYTE:84 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:85 [ atan2_16::$23 ] : zp ZP_BYTE:85 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:86 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:86 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:87 [ sqr::return#2 ] : zp ZP_WORD:87 , -Potential registers zp ZP_WORD:89 [ init_dist_screen::yds#0 ] : zp ZP_WORD:89 , -Potential registers zp ZP_BYTE:91 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:91 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:92 [ sqr::return#3 ] : zp ZP_WORD:92 , -Potential registers zp ZP_WORD:94 [ init_dist_screen::xds#0 ] : zp ZP_WORD:94 , -Potential registers zp ZP_WORD:96 [ init_dist_screen::ds#0 ] : zp ZP_WORD:96 , -Potential registers zp ZP_WORD:98 [ sqrt::val#0 ] : zp ZP_WORD:98 , -Potential registers zp ZP_BYTE:100 [ sqrt::return#2 ] : zp ZP_BYTE:100 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:101 [ init_dist_screen::d#0 ] : zp ZP_BYTE:101 , reg byte a , reg byte x , -Potential registers zp ZP_WORD:102 [ bsearch16u::key#0 ] : zp ZP_WORD:102 , -Potential registers zp ZP_WORD:104 [ bsearch16u::return#3 ] : zp ZP_WORD:104 , -Potential registers zp ZP_WORD:106 [ sqrt::found#0 ] : zp ZP_WORD:106 , -Potential registers zp ZP_WORD:108 [ sqrt::$3 ] : zp ZP_WORD:108 , -Potential registers zp ZP_WORD:110 [ sqrt::$1 ] : zp ZP_WORD:110 , -Potential registers zp ZP_BYTE:112 [ sqrt::return#0 ] : zp ZP_BYTE:112 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:113 [ bsearch16u::$6 ] : zp ZP_BYTE:113 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:114 [ bsearch16u::$16 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:115 [ bsearch16u::pivot#0 ] : zp ZP_WORD:115 , +Potential registers zp ZP_WORD:44 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] : zp ZP_WORD:44 , +Potential registers zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] : zp ZP_WORD:46 , +Potential registers zp ZP_BYTE:48 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] : zp ZP_BYTE:48 , reg byte x , +Potential registers zp ZP_BYTE:49 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:50 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:50 , +Potential registers zp ZP_WORD:52 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:52 , +Potential registers zp ZP_BYTE:54 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:54 , reg byte x , +Potential registers zp ZP_WORD:55 [ heap_head#12 heap_head#1 ] : zp ZP_WORD:55 , +Potential registers zp ZP_WORD:57 [ malloc::size#3 ] : zp ZP_WORD:57 , +Potential registers zp ZP_WORD:59 [ SCREEN_DIST#0 ] : zp ZP_WORD:59 , +Potential registers zp ZP_WORD:61 [ SCREEN_ANGLE#0 ] : zp ZP_WORD:61 , +Potential registers zp ZP_WORD:63 [ init_angle_screen::screen#0 ] : zp ZP_WORD:63 , +Potential registers zp ZP_BYTE:65 [ init_angle_screen::$2 ] : zp ZP_BYTE:65 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:66 [ init_angle_screen::$3 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:67 [ init_angle_screen::xw#0 ] : zp ZP_WORD:67 , +Potential registers zp ZP_BYTE:69 [ init_angle_screen::$6 ] : zp ZP_BYTE:69 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:70 [ init_angle_screen::yw#0 ] : zp ZP_WORD:70 , +Potential registers zp ZP_WORD:72 [ atan2_16::x#0 ] : zp ZP_WORD:72 , +Potential registers zp ZP_WORD:74 [ atan2_16::y#0 ] : zp ZP_WORD:74 , +Potential registers zp ZP_WORD:76 [ atan2_16::return#2 ] : zp ZP_WORD:76 , +Potential registers zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:78 , +Potential registers zp ZP_WORD:80 [ init_angle_screen::$10 ] : zp ZP_WORD:80 , +Potential registers zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:82 , reg byte x , +Potential registers zp ZP_BYTE:83 [ init_angle_screen::$12 ] : zp ZP_BYTE:83 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:84 [ init_angle_screen::$13 ] : zp ZP_BYTE:84 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:85 [ init_angle_screen::$14 ] : zp ZP_BYTE:85 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:86 [ atan2_16::$24 ] : zp ZP_BYTE:86 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:87 [ atan2_16::$23 ] : zp ZP_BYTE:87 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:88 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:88 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:89 [ sqr::return#2 ] : zp ZP_WORD:89 , +Potential registers zp ZP_WORD:91 [ init_dist_screen::yds#0 ] : zp ZP_WORD:91 , +Potential registers zp ZP_BYTE:93 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:93 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:94 [ sqr::return#3 ] : zp ZP_WORD:94 , +Potential registers zp ZP_WORD:96 [ init_dist_screen::xds#0 ] : zp ZP_WORD:96 , +Potential registers zp ZP_WORD:98 [ init_dist_screen::ds#0 ] : zp ZP_WORD:98 , +Potential registers zp ZP_WORD:100 [ sqrt::val#0 ] : zp ZP_WORD:100 , +Potential registers zp ZP_BYTE:102 [ sqrt::return#2 ] : zp ZP_BYTE:102 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:103 [ init_dist_screen::d#0 ] : zp ZP_BYTE:103 , reg byte a , reg byte x , +Potential registers zp ZP_WORD:104 [ bsearch16u::key#0 ] : zp ZP_WORD:104 , +Potential registers zp ZP_WORD:106 [ bsearch16u::return#3 ] : zp ZP_WORD:106 , +Potential registers zp ZP_WORD:108 [ sqrt::found#0 ] : zp ZP_WORD:108 , +Potential registers zp ZP_WORD:110 [ sqrt::$3 ] : zp ZP_WORD:110 , +Potential registers zp ZP_WORD:112 [ sqrt::$1 ] : zp ZP_WORD:112 , +Potential registers zp ZP_BYTE:114 [ sqrt::return#0 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:115 [ bsearch16u::$6 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:116 [ bsearch16u::$16 ] : zp ZP_BYTE:116 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:117 [ bsearch16u::result#0 ] : zp ZP_WORD:117 , Potential registers zp ZP_BYTE:119 [ sqr::$0 ] : zp ZP_BYTE:119 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:120 [ sqr::return#0 ] : zp ZP_WORD:120 , @@ -5329,73 +6167,73 @@ Potential registers zp ZP_BYTE:125 [ init_squares::$4 ] : zp ZP_BYTE:125 , reg b Potential registers zp ZP_WORD:126 [ malloc::mem#0 ] : zp ZP_WORD:126 , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:30 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:31 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:33 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:23 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:84 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:85 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:25 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:74 [ atan2_16::return#2 ] 50: zp ZP_WORD:28 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:70 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:72 [ atan2_16::y#0 ] -Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:46 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,855.06: zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:113 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:114 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:117 [ bsearch16u::result#0 ] 501: zp ZP_WORD:115 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:104 [ bsearch16u::return#3 ] 0.27: zp ZP_WORD:102 [ bsearch16u::key#0 ] -Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:63 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:64 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:67 [ init_angle_screen::$6 ] 202: zp ZP_WORD:76 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:78 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:81 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:82 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:83 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:68 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:65 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:14 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:17 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:61 [ init_angle_screen::screen#0 ] -Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:43 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:91 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:94 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:96 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:101 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:40 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:86 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:38 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:36 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:89 [ init_dist_screen::yds#0 ] +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:30 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:31 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:33 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:23 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:86 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:87 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:25 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:76 [ atan2_16::return#2 ] 50: zp ZP_WORD:28 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:72 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:74 [ atan2_16::y#0 ] +Uplift Scope [bsearch16u] 6,450.89: zp ZP_BYTE:48 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] 4,851: zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] 2,433.29: zp ZP_WORD:44 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] 2,002: zp ZP_BYTE:115 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:116 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:117 [ bsearch16u::result#0 ] 4: zp ZP_WORD:106 [ bsearch16u::return#3 ] 0.24: zp ZP_WORD:104 [ bsearch16u::key#0 ] +Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:65 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:66 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:69 [ init_angle_screen::$6 ] 202: zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:80 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:83 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:84 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:85 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:70 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:67 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:14 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:17 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:63 [ init_angle_screen::screen#0 ] +Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:43 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:93 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:96 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:98 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:103 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:40 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:88 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:38 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:36 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:91 [ init_dist_screen::yds#0 ] Uplift Scope [main] 588: zp ZP_WORD:12 [ main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] 311.79: zp ZP_WORD:10 [ main::min_fill#5 main::min_fill#2 main::min_fill#10 ] 303: zp ZP_WORD:8 [ main::min_dist_angle#2 main::min_dist_angle#6 ] 141.4: zp ZP_WORD:2 [ main::fill#2 main::fill#1 ] 107.39: zp ZP_WORD:6 [ main::angle#2 main::angle#0 main::angle#1 ] 90.65: zp ZP_WORD:4 [ main::dist#2 main::dist#0 main::dist#1 ] -Uplift Scope [sqr] 338: zp ZP_BYTE:47 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:92 [ sqr::return#3 ] 28.5: zp ZP_WORD:120 [ sqr::return#0 ] 22: zp ZP_WORD:87 [ sqr::return#2 ] 4: zp ZP_BYTE:119 [ sqr::$0 ] -Uplift Scope [sqrt] 202: zp ZP_BYTE:100 [ sqrt::return#2 ] 103: zp ZP_WORD:98 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:112 [ sqrt::return#0 ] 4: zp ZP_WORD:106 [ sqrt::found#0 ] 4: zp ZP_WORD:108 [ sqrt::$3 ] 2: zp ZP_WORD:110 [ sqrt::$1 ] -Uplift Scope [init_squares] 25.17: zp ZP_WORD:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:52 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:124 [ init_squares::$3 ] 22: zp ZP_BYTE:125 [ init_squares::$4 ] 13.93: zp ZP_WORD:48 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplift Scope [] 6.6: zp ZP_WORD:53 [ heap_head#12 heap_head#1 ] 0.09: zp ZP_WORD:59 [ SCREEN_ANGLE#0 ] 0.08: zp ZP_WORD:57 [ SCREEN_DIST#0 ] 0.03: zp ZP_WORD:122 [ SQUARES#1 ] -Uplift Scope [malloc] 2: zp ZP_WORD:55 [ malloc::size#3 ] 0.67: zp ZP_WORD:126 [ malloc::mem#0 ] +Uplift Scope [sqr] 338: zp ZP_BYTE:49 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:94 [ sqr::return#3 ] 28.5: zp ZP_WORD:120 [ sqr::return#0 ] 22: zp ZP_WORD:89 [ sqr::return#2 ] 4: zp ZP_BYTE:119 [ sqr::$0 ] +Uplift Scope [sqrt] 202: zp ZP_BYTE:102 [ sqrt::return#2 ] 103: zp ZP_WORD:100 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:114 [ sqrt::return#0 ] 4: zp ZP_WORD:108 [ sqrt::found#0 ] 4: zp ZP_WORD:110 [ sqrt::$3 ] 2: zp ZP_WORD:112 [ sqrt::$1 ] +Uplift Scope [init_squares] 25.17: zp ZP_WORD:52 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:54 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:124 [ init_squares::$3 ] 22: zp ZP_BYTE:125 [ init_squares::$4 ] 13.93: zp ZP_WORD:50 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [] 6.6: zp ZP_WORD:55 [ heap_head#12 heap_head#1 ] 0.09: zp ZP_WORD:61 [ SCREEN_ANGLE#0 ] 0.08: zp ZP_WORD:59 [ SCREEN_DIST#0 ] 0.03: zp ZP_WORD:122 [ SQUARES#1 ] +Uplift Scope [malloc] 2: zp ZP_WORD:57 [ malloc::size#3 ] 0.67: zp ZP_WORD:126 [ malloc::mem#0 ] Uplift Scope [RADIX] -Uplifting [atan2_16] best 1247286 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:31 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:33 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:23 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:74 [ atan2_16::return#2 ] zp ZP_WORD:28 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:70 [ atan2_16::x#0 ] zp ZP_WORD:72 [ atan2_16::y#0 ] +Uplifting [atan2_16] best 1273801 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:31 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:33 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:23 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:76 [ atan2_16::return#2 ] zp ZP_WORD:28 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:72 [ atan2_16::x#0 ] zp ZP_WORD:74 [ atan2_16::y#0 ] Limited combination testing to 100 combinations of 144 possible. -Uplifting [bsearch16u] best 1228286 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:117 [ bsearch16u::result#0 ] zp ZP_WORD:115 [ bsearch16u::pivot#0 ] zp ZP_WORD:104 [ bsearch16u::return#3 ] zp ZP_WORD:102 [ bsearch16u::key#0 ] -Uplifting [init_angle_screen] best 1226086 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:76 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:78 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:82 [ init_angle_screen::$13 ] zp ZP_BYTE:83 [ init_angle_screen::$14 ] zp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:68 [ init_angle_screen::yw#0 ] zp ZP_WORD:65 [ init_angle_screen::xw#0 ] zp ZP_BYTE:14 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:17 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:61 [ init_angle_screen::screen#0 ] +Uplifting [bsearch16u] best 1254801 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] zp ZP_WORD:44 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:117 [ bsearch16u::result#0 ] zp ZP_WORD:106 [ bsearch16u::return#3 ] zp ZP_WORD:104 [ bsearch16u::key#0 ] +Uplifting [init_angle_screen] best 1252601 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:80 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:84 [ init_angle_screen::$13 ] zp ZP_BYTE:85 [ init_angle_screen::$14 ] zp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:70 [ init_angle_screen::yw#0 ] zp ZP_WORD:67 [ init_angle_screen::xw#0 ] zp ZP_BYTE:14 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:17 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:63 [ init_angle_screen::screen#0 ] Limited combination testing to 100 combinations of 65536 possible. -Uplifting [init_dist_screen] best 1222886 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:94 [ init_dist_screen::xds#0 ] zp ZP_WORD:96 [ init_dist_screen::ds#0 ] zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:40 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:86 [ init_dist_screen::y2#0 ] zp ZP_WORD:38 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:36 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:89 [ init_dist_screen::yds#0 ] +Uplifting [init_dist_screen] best 1249401 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:96 [ init_dist_screen::xds#0 ] zp ZP_WORD:98 [ init_dist_screen::ds#0 ] zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:40 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:88 [ init_dist_screen::y2#0 ] zp ZP_WORD:38 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:36 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:91 [ init_dist_screen::yds#0 ] Limited combination testing to 100 combinations of 6144 possible. -Uplifting [main] best 1222886 combination zp ZP_WORD:12 [ main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] zp ZP_WORD:10 [ main::min_fill#5 main::min_fill#2 main::min_fill#10 ] zp ZP_WORD:8 [ main::min_dist_angle#2 main::min_dist_angle#6 ] zp ZP_WORD:2 [ main::fill#2 main::fill#1 ] zp ZP_WORD:6 [ main::angle#2 main::angle#0 main::angle#1 ] zp ZP_WORD:4 [ main::dist#2 main::dist#0 main::dist#1 ] -Uplifting [sqr] best 1222549 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:92 [ sqr::return#3 ] zp ZP_WORD:120 [ sqr::return#0 ] zp ZP_WORD:87 [ sqr::return#2 ] reg byte a [ sqr::$0 ] -Uplifting [sqrt] best 1221646 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:98 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:106 [ sqrt::found#0 ] zp ZP_WORD:108 [ sqrt::$3 ] zp ZP_WORD:110 [ sqrt::$1 ] -Uplifting [init_squares] best 1221446 combination zp ZP_WORD:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:48 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplifting [] best 1221446 combination zp ZP_WORD:53 [ heap_head#12 heap_head#1 ] zp ZP_WORD:59 [ SCREEN_ANGLE#0 ] zp ZP_WORD:57 [ SCREEN_DIST#0 ] zp ZP_WORD:122 [ SQUARES#1 ] -Uplifting [malloc] best 1221446 combination zp ZP_WORD:55 [ malloc::size#3 ] zp ZP_WORD:126 [ malloc::mem#0 ] -Uplifting [RADIX] best 1221446 combination -Attempting to uplift remaining variables inzp ZP_BYTE:82 [ init_angle_screen::$13 ] -Uplifting [init_angle_screen] best 1221046 combination reg byte a [ init_angle_screen::$13 ] -Attempting to uplift remaining variables inzp ZP_BYTE:83 [ init_angle_screen::$14 ] -Uplifting [init_angle_screen] best 1220446 combination reg byte a [ init_angle_screen::$14 ] +Uplifting [main] best 1249401 combination zp ZP_WORD:12 [ main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] zp ZP_WORD:10 [ main::min_fill#5 main::min_fill#2 main::min_fill#10 ] zp ZP_WORD:8 [ main::min_dist_angle#2 main::min_dist_angle#6 ] zp ZP_WORD:2 [ main::fill#2 main::fill#1 ] zp ZP_WORD:6 [ main::angle#2 main::angle#0 main::angle#1 ] zp ZP_WORD:4 [ main::dist#2 main::dist#0 main::dist#1 ] +Uplifting [sqr] best 1249064 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:94 [ sqr::return#3 ] zp ZP_WORD:120 [ sqr::return#0 ] zp ZP_WORD:89 [ sqr::return#2 ] reg byte a [ sqr::$0 ] +Uplifting [sqrt] best 1248161 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:100 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:108 [ sqrt::found#0 ] zp ZP_WORD:110 [ sqrt::$3 ] zp ZP_WORD:112 [ sqrt::$1 ] +Uplifting [init_squares] best 1247961 combination zp ZP_WORD:52 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:50 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [] best 1247961 combination zp ZP_WORD:55 [ heap_head#12 heap_head#1 ] zp ZP_WORD:61 [ SCREEN_ANGLE#0 ] zp ZP_WORD:59 [ SCREEN_DIST#0 ] zp ZP_WORD:122 [ SQUARES#1 ] +Uplifting [malloc] best 1247961 combination zp ZP_WORD:57 [ malloc::size#3 ] zp ZP_WORD:126 [ malloc::mem#0 ] +Uplifting [RADIX] best 1247961 combination +Attempting to uplift remaining variables inzp ZP_BYTE:84 [ init_angle_screen::$13 ] +Uplifting [init_angle_screen] best 1247561 combination reg byte a [ init_angle_screen::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:85 [ init_angle_screen::$14 ] +Uplifting [init_angle_screen] best 1246961 combination reg byte a [ init_angle_screen::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Uplifting [init_dist_screen] best 1220446 combination zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Uplifting [init_dist_screen] best 1246961 combination zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Uplifting [init_angle_screen] best 1220446 combination zp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Uplifting [init_angle_screen] best 1246961 combination zp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Uplifting [init_dist_screen] best 1220446 combination zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Uplifting [init_dist_screen] best 1246961 combination zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Uplifting [init_angle_screen] best 1220446 combination zp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] -Uplifting [init_angle_screen] best 1220446 combination zp ZP_BYTE:80 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1246961 combination zp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1246961 combination zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:40 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Uplifting [init_dist_screen] best 1220376 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:86 [ init_dist_screen::y2#0 ] -Uplifting [init_dist_screen] best 1220276 combination reg byte a [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 1246891 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:88 [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 1246791 combination reg byte a [ init_dist_screen::y2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:14 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Uplifting [init_angle_screen] best 1220276 combination zp ZP_BYTE:14 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Uplifting [init_angle_screen] best 1246791 combination zp ZP_BYTE:14 [ init_angle_screen::y#4 init_angle_screen::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Uplifting [init_dist_screen] best 1220276 combination zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Coalescing zero page register [ zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:61 [ init_angle_screen::screen#0 ] ] - score: 1 +Uplifting [init_dist_screen] best 1246791 combination zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Coalescing zero page register [ zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:63 [ init_angle_screen::screen#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:28 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:104 [ bsearch16u::return#3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:55 [ malloc::size#3 ] ] with [ zp ZP_WORD:126 [ malloc::mem#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:65 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:70 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:68 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:72 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:74 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:76 [ init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:87 [ sqr::return#2 ] ] with [ zp ZP_WORD:89 [ init_dist_screen::yds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:92 [ sqr::return#3 ] ] with [ zp ZP_WORD:94 [ init_dist_screen::xds#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:92 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:120 [ sqr::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:96 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:98 [ sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:106 [ sqrt::found#0 ] ] with [ zp ZP_WORD:108 [ sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:74 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:106 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:55 [ malloc::size#3 malloc::mem#0 ] ] with [ zp ZP_WORD:122 [ SQUARES#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:92 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:96 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:78 [ init_angle_screen::$10 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:110 [ sqrt::$1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:92 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:102 [ bsearch16u::key#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 ] ] with [ zp ZP_WORD:106 [ bsearch16u::return#3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:57 [ malloc::size#3 ] ] with [ zp ZP_WORD:126 [ malloc::mem#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:67 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:72 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:70 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:74 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:76 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:89 [ sqr::return#2 ] ] with [ zp ZP_WORD:91 [ init_dist_screen::yds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:94 [ sqr::return#3 ] ] with [ zp ZP_WORD:96 [ init_dist_screen::xds#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:94 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:120 [ sqr::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:98 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:100 [ sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:108 [ sqrt::found#0 ] ] with [ zp ZP_WORD:110 [ sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:76 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 ] ] with [ zp ZP_WORD:108 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:57 [ malloc::size#3 malloc::mem#0 ] ] with [ zp ZP_WORD:122 [ SQUARES#1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:94 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:98 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:80 [ init_angle_screen::$10 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:112 [ sqrt::$1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:94 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:104 [ bsearch16u::key#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] ] with [ zp ZP_WORD:2 [ main::fill#2 main::fill#1 ] ] Coalescing zero page register [ zp ZP_WORD:17 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] ] with [ zp ZP_WORD:4 [ main::dist#2 main::dist#0 main::dist#1 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] with [ zp ZP_WORD:6 [ main::angle#2 main::angle#0 main::angle#1 ] ] @@ -5406,31 +6244,31 @@ Coalescing zero page register [ zp ZP_BYTE:35 [ init_dist_screen::y#10 init_dist Coalescing zero page register [ zp ZP_WORD:36 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] ] with [ zp ZP_WORD:33 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] Coalescing zero page register [ zp ZP_BYTE:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] with [ zp ZP_BYTE:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] ] Coalescing zero page register [ zp ZP_BYTE:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp ZP_BYTE:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] ] -Coalescing zero page register [ zp ZP_WORD:48 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:38 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] ] -Coalescing zero page register [ zp ZP_WORD:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] -Coalescing zero page register [ zp ZP_WORD:65 [ init_angle_screen::xw#0 atan2_16::x#0 ] ] with [ zp ZP_WORD:53 [ heap_head#12 heap_head#1 ] ] -Coalescing zero page register [ zp ZP_WORD:68 [ init_angle_screen::yw#0 atan2_16::y#0 ] ] with [ zp ZP_WORD:55 [ malloc::size#3 malloc::mem#0 SQUARES#1 ] ] -Coalescing zero page register [ zp ZP_WORD:48 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] ] with [ zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] ] -Coalescing zero page register [ zp ZP_WORD:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp ZP_WORD:17 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] ] -Coalescing zero page register [ zp ZP_WORD:87 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] ] -Coalescing zero page register [ zp ZP_WORD:92 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp ZP_WORD:23 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] ] -Coalescing zero page register [ zp ZP_WORD:115 [ bsearch16u::pivot#0 ] ] with [ zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] ] -Coalescing zero page register [ zp ZP_WORD:117 [ bsearch16u::result#0 ] ] with [ zp ZP_WORD:31 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] ] -Allocated (was zp ZP_BYTE:35) zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::y#4 init_angle_screen::y#1 ] -Allocated (was zp ZP_WORD:36) zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] -Allocated (was zp ZP_BYTE:41) zp ZP_BYTE:5 [ init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ] -Allocated (was zp ZP_BYTE:42) zp ZP_BYTE:6 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Allocated (was zp ZP_WORD:48) zp ZP_WORD:7 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] -Allocated (was zp ZP_WORD:50) zp ZP_WORD:9 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] -Allocated (was zp ZP_WORD:57) zp ZP_WORD:11 [ SCREEN_DIST#0 ] -Allocated (was zp ZP_WORD:59) zp ZP_WORD:13 [ SCREEN_ANGLE#0 ] -Allocated (was zp ZP_WORD:65) zp ZP_WORD:15 [ init_angle_screen::xw#0 atan2_16::x#0 heap_head#12 heap_head#1 ] -Allocated (was zp ZP_WORD:68) zp ZP_WORD:17 [ init_angle_screen::yw#0 atan2_16::y#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] -Allocated (was zp ZP_BYTE:80) zp ZP_BYTE:19 [ init_angle_screen::ang_w#0 ] -Allocated (was zp ZP_WORD:87) zp ZP_WORD:20 [ sqr::return#2 init_dist_screen::yds#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] -Allocated (was zp ZP_WORD:92) zp ZP_WORD:22 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] -Allocated (was zp ZP_WORD:115) zp ZP_WORD:24 [ bsearch16u::pivot#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] -Allocated (was zp ZP_WORD:117) zp ZP_WORD:26 [ bsearch16u::result#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] +Coalescing zero page register [ zp ZP_WORD:50 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp ZP_WORD:38 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] ] +Coalescing zero page register [ zp ZP_WORD:52 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp ZP_WORD:44 [ bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] ] +Coalescing zero page register [ zp ZP_WORD:55 [ heap_head#12 heap_head#1 ] ] with [ zp ZP_WORD:46 [ bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] +Coalescing zero page register [ zp ZP_WORD:67 [ init_angle_screen::xw#0 atan2_16::x#0 ] ] with [ zp ZP_WORD:57 [ malloc::size#3 malloc::mem#0 SQUARES#1 ] ] +Coalescing zero page register [ zp ZP_WORD:89 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp ZP_WORD:70 [ init_angle_screen::yw#0 atan2_16::y#0 ] ] +Coalescing zero page register [ zp ZP_WORD:50 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] ] with [ zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] ] +Coalescing zero page register [ zp ZP_WORD:52 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 ] ] with [ zp ZP_WORD:17 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] ] +Coalescing zero page register [ zp ZP_WORD:55 [ heap_head#12 heap_head#1 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp ZP_WORD:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] ] +Coalescing zero page register [ zp ZP_WORD:94 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp ZP_WORD:23 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] ] +Coalescing zero page register [ zp ZP_WORD:117 [ bsearch16u::result#0 ] ] with [ zp ZP_WORD:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] ] +Allocated (was zp ZP_WORD:31) zp ZP_WORD:2 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] +Allocated (was zp ZP_BYTE:35) zp ZP_BYTE:4 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::y#4 init_angle_screen::y#1 ] +Allocated (was zp ZP_WORD:36) zp ZP_WORD:5 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_BYTE:41) zp ZP_BYTE:7 [ init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ] +Allocated (was zp ZP_BYTE:42) zp ZP_BYTE:8 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Allocated (was zp ZP_WORD:50) zp ZP_WORD:9 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] +Allocated (was zp ZP_WORD:52) zp ZP_WORD:11 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] +Allocated (was zp ZP_WORD:55) zp ZP_WORD:13 [ heap_head#12 heap_head#1 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] +Allocated (was zp ZP_WORD:59) zp ZP_WORD:15 [ SCREEN_DIST#0 ] +Allocated (was zp ZP_WORD:61) zp ZP_WORD:17 [ SCREEN_ANGLE#0 ] +Allocated (was zp ZP_WORD:67) zp ZP_WORD:19 [ init_angle_screen::xw#0 atan2_16::x#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] +Allocated (was zp ZP_BYTE:82) zp ZP_BYTE:21 [ init_angle_screen::ang_w#0 ] +Allocated (was zp ZP_WORD:89) zp ZP_WORD:22 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_WORD:94) zp ZP_WORD:24 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] +Allocated (was zp ZP_WORD:117) zp ZP_WORD:26 [ bsearch16u::result#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -5450,12 +6288,12 @@ ASSEMBLER BEFORE OPTIMIZATION // Char to fill with .const FILL_CHAR = '@' .const NUM_SQUARES = $30 - .label heap_head = $f - .label SQUARES = $11 + .label heap_head = $d + .label SQUARES = $13 // Screen containing distance to center - .label SCREEN_DIST = $b + .label SCREEN_DIST = $f // Screen containing angle to center - .label SCREEN_ANGLE = $d + .label SCREEN_ANGLE = $11 // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -5464,14 +6302,14 @@ b1_from_bbegin: // @1 b1: // [2] call malloc - // [190] phi from @1 to malloc [phi:@1->malloc] + // [191] phi from @1 to malloc [phi:@1->malloc] malloc_from_b1: - // [190] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + // [191] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + // [191] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 lda #<HEAP_TOP sta heap_head lda #>HEAP_TOP @@ -5486,14 +6324,14 @@ b3: lda malloc.mem+1 sta SCREEN_DIST+1 // [4] call malloc - // [190] phi from @3 to malloc [phi:@3->malloc] + // [191] phi from @3 to malloc [phi:@3->malloc] malloc_from_b3: - // [190] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + // [191] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + // [191] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy jsr malloc jmp b4 // @4 @@ -5517,15 +6355,15 @@ bend_from_b2: bend: // main main: { - .label dist = 9 - .label angle = $14 - .label fill = 7 - .label dist_angle = $1a - .label min_dist_angle = $16 - .label min_dist_angle_3 = $1a - .label min_fill = $18 - .label min_dist_angle_7 = $1a - .label min_dist_angle_8 = $1a + .label dist = $b + .label angle = $d + .label fill = 9 + .label dist_angle = 2 + .label min_dist_angle = $18 + .label min_dist_angle_3 = 2 + .label min_fill = $1a + .label min_dist_angle_7 = 2 + .label min_dist_angle_8 = 2 // [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST sta init_dist_screen.screen @@ -5703,19 +6541,19 @@ main: { // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage(7) screen) +// init_angle_screen(byte* zeropage(9) screen) init_angle_screen: { - .label _10 = $18 - .label screen = 7 - .label screen_topline = 9 - .label screen_bottomline = 7 - .label xw = $f - .label yw = $11 - .label angle_w = $18 - .label ang_w = $13 - .label x = 5 - .label xb = 6 - .label y = 2 + .label _10 = $1a + .label screen = 9 + .label screen_topline = $b + .label screen_bottomline = 9 + .label xw = $13 + .label yw = $16 + .label angle_w = $1a + .label ang_w = $15 + .label x = 7 + .label xb = 8 + .label y = 4 // [31] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen clc @@ -5871,18 +6709,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($f) x, signed word zeropage($11) y) +// atan2_16(signed word zeropage($13) x, signed word zeropage($16) y) atan2_16: { - .label _2 = $14 - .label _7 = $16 - .label yi = $14 - .label xi = $16 - .label angle = $18 - .label xd = 3 - .label yd = $1a - .label return = $18 - .label x = $f - .label y = $11 + .label _2 = $d + .label _7 = $18 + .label yi = $d + .label xi = $18 + .label angle = $1a + .label xd = 5 + .label yd = 2 + .label return = $1a + .label x = $13 + .label y = $16 // [62] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bpl b1 @@ -6185,19 +7023,19 @@ atan2_16: { // init_dist_screen // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision -// init_dist_screen(byte* zeropage(3) screen) +// init_dist_screen(byte* zeropage(5) screen) init_dist_screen: { - .label screen = 3 - .label screen_bottomline = 7 - .label yds = $14 - .label xds = $16 - .label ds = $16 - .label x = 5 - .label xb = 6 - .label screen_topline = 3 - .label y = 2 + .label screen = 5 + .label screen_bottomline = 9 + .label yds = $16 + .label xds = $18 + .label ds = $18 + .label x = 7 + .label xb = 8 + .label screen_topline = 5 + .label y = 4 // [106] call init_squares - // [177] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [178] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares jmp b10 @@ -6249,9 +7087,9 @@ init_dist_screen: { b4: // [113] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [114] call sqr - // [173] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [174] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - // [173] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [174] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // [115] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return @@ -6300,9 +7138,9 @@ init_dist_screen: { b8: // [122] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [123] call sqr - // [173] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [174] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - // [173] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [174] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // [124] (word) sqr::return#3 ← (word) sqr::return#0 jmp b12 @@ -6392,18 +7230,18 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($16) val) +// sqrt(word zeropage($18) val) sqrt: { - .label _1 = 9 - .label _3 = 9 - .label found = 9 - .label val = $16 + .label _1 = $d + .label _3 = $d + .label found = $d + .label val = $18 // [145] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [146] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [147] call bsearch16u // [154] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: @@ -6438,29 +7276,105 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($16) key, word* zeropage(9) items, byte register(X) num) +// bsearch16u(word zeropage($18) key, word* zeropage($d) items, byte register(X) num) bsearch16u: { - .label _2 = 9 - .label pivot = $18 + .label _2 = $d + .label pivot = $d .label result = $1a - .label return = 9 - .label items = 9 - .label key = $16 - // [155] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - b3_from_bsearch16u: - // [155] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [155] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + .label return = $d + .label items = $d + .label key = $18 + .label items_1 = $b + .label items_10 = $b + .label items_16 = $b + // [155] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + b4_from_bsearch16u: + // [155] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [155] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES + jmp b4 + // bsearch16u::@4 + b4: + // [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + txa + lsr + // [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + // [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + clc + adc items_10 + sta pivot + lda #0 + adc items_10+1 + sta pivot+1 + // [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + // [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + // [161] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + breturn_from_b2: + breturn_from_b4: + // [161] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + jmp breturn + // bsearch16u::@return + breturn: + // [162] return + rts + // bsearch16u::@6 + b6: + // [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b10 + bne !+ + lda result + beq b10 + !: + jmp b8 + // bsearch16u::@8 + b8: + // [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc items + sta items + bcc !+ + inc items+1 + !: + // [165] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx + dex + // [166] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + b7_from_b10: + b7_from_b8: + // [166] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [166] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy + jmp b7 + // bsearch16u::@7 + b7: + // [167] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + txa + lsr + tax jmp b3 // bsearch16u::@3 b3: - // [156] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + // [168] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 cpx #0 - bne b4 + bne b9 jmp b5 // bsearch16u::@5 b5: - // [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + // [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -6474,7 +7388,7 @@ bsearch16u: { jmp b1 // bsearch16u::@1 b1: - // [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + // [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -6482,110 +7396,45 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - // [159] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [171] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - // [159] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // [171] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 // bsearch16u::@2 b2: - // [160] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - breturn_from_b2: - breturn_from_b8: - // [160] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - jmp breturn - // bsearch16u::@return - breturn: - // [161] return - rts - // bsearch16u::@4 - b4: - // [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 - txa - lsr - // [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 - asl - // [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa - clc - adc items - sta pivot - lda #0 - adc items+1 - sta pivot+1 - // [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 - sec - lda key - ldy #0 - sbc (pivot),y - sta result - lda key+1 - iny - sbc (pivot),y - sta result+1 - // [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 - lda result+1 - bne b6 - lda result - bne b6 - jmp b8 - // bsearch16u::@8 - b8: - // [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 - jmp breturn_from_b8 - // bsearch16u::@6 - b6: - // [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 - lda result+1 - bmi b7_from_b6 - bne !+ - lda result - beq b7_from_b6 - !: - jmp b9 + jmp breturn_from_b2 // bsearch16u::@9 b9: - // [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 - lda #1*SIZEOF_WORD - clc - adc pivot + // [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [155] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + b4_from_b9: + // [155] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [155] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 sta items - lda #0 - adc pivot+1 + lda items_10+1 sta items+1 - // [170] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx - dex - // [171] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - b7_from_b6: - b7_from_b9: - // [171] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [171] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - jmp b7 - // bsearch16u::@7 - b7: - // [172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 - txa - lsr - tax - // [155] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - b3_from_b7: - // [155] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [155] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + jmp b7_from_b10 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $16 - .label return_2 = $14 - // [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $18 + .label return_2 = $16 + // [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + // [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa tay lda (SQUARES),y sta return @@ -6595,61 +7444,61 @@ sqr: { jmp breturn // sqr::@return breturn: - // [176] return + // [177] return rts } // init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = 9 - .label sqr = 7 - // [178] call malloc - // [190] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $b + .label sqr = 9 + // [179] call malloc + // [191] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: - // [190] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + // [191] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + // [191] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc jmp b2 // init_squares::@2 b2: - // [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 - // [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + // [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [182] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] b1_from_b2: - // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + // [182] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [182] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [182] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 lda #<0 sta sqr lda #>0 sta sqr+1 jmp b1 - // [181] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [182] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [182] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [182] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [182] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 // init_squares::@1 b1: - // [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - // [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -6657,38 +7506,38 @@ init_squares: { bcc !+ inc squares+1 !: - // [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [186] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - // [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [188] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [189] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1_from_b1 jmp breturn // init_squares::@return breturn: - // [189] return + // [190] return rts } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($11) size) +// malloc(word zeropage($13) size) malloc: { - .label mem = $11 - .label size = $11 - // [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 + .label mem = $13 + .label size = $13 + // [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 lda heap_head sec sbc mem @@ -6696,7 +7545,7 @@ malloc: { lda heap_head+1 sbc mem+1 sta mem+1 - // [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 + // [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 lda mem sta heap_head lda mem+1 @@ -6704,7 +7553,7 @@ malloc: { jmp breturn // malloc::@return breturn: - // [193] return + // [194] return rts } // File Data @@ -6764,15 +7613,15 @@ Removing instruction jmp b9 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b8 +Removing instruction jmp b7 Removing instruction jmp b3 Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp breturn -Removing instruction jmp b8 -Removing instruction jmp b9 -Removing instruction jmp b7 -Removing instruction jmp breturn Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn @@ -6809,9 +7658,8 @@ Replacing label b8_from_b6 with b8 Replacing label b4_from_b2 with b4 Replacing label b2_from_b5 with b2 Replacing label b2_from_b5 with b2 -Replacing label breturn_from_b8 with b2 -Replacing label b7_from_b6 with b7 -Replacing label b7_from_b6 with b7 +Replacing label breturn_from_b2 with breturn +Replacing label b7_from_b10 with b7 Replacing label b1_from_b1 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: @@ -6851,13 +7699,12 @@ Removing instruction b5_from_b13: Removing instruction b8_from_b6: Removing instruction b8_from_b7: Removing instruction sqr_from_b8: +Removing instruction breturn_from_b2: +Removing instruction breturn_from_b4: +Removing instruction b7_from_b10: +Removing instruction b7_from_b8: Removing instruction b2_from_b1: Removing instruction b2_from_b5: -Removing instruction breturn_from_b2: -Removing instruction breturn_from_b8: -Removing instruction breturn: -Removing instruction b7_from_b6: -Removing instruction b7_from_b9: Removing instruction b1_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction b3: @@ -6898,12 +7745,12 @@ Removing instruction breturn: Removing instruction bsearch16u_from_sqrt: Removing instruction b1: Removing instruction breturn: -Removing instruction b3_from_bsearch16u: +Removing instruction b4_from_bsearch16u: +Removing instruction b8: +Removing instruction b3: Removing instruction b5: Removing instruction b1: -Removing instruction b8: -Removing instruction b9: -Removing instruction b3_from_b7: +Removing instruction b4_from_b9: Removing instruction breturn: Removing instruction malloc_from_init_squares: Removing instruction b2: @@ -6911,7 +7758,9 @@ Removing instruction b1_from_b2: Removing instruction breturn: Removing instruction breturn: Succesful ASM optimization Pass5UnusedLabelElimination -Replacing jump to rts with rts in jmp b2 +Skipping double jump to breturn in beq b2 +Skipping double jump to breturn in bcc b2 +Replacing jump to rts with rts in jmp breturn Succesful ASM optimization Pass5DoubleJumpElimination Adding RTS to root block Succesful ASM optimization Pass5AddMainRts @@ -6923,6 +7772,8 @@ Removing instruction jmp b1 Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination +Removing instruction b2: +Succesful ASM optimization Pass5UnusedLabelElimination Fixing long branch [382] beq b12 to bne Fixing long branch [276] bpl b1 to bmi Fixing long branch [288] bpl b4 to bmi @@ -6951,19 +7802,19 @@ FINAL SYMBOL TABLE (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10 (const byte) RADIX::OCTAL OCTAL = (number) 8 (byte*) SCREEN_ANGLE -(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:13 0.08695652173913043 +(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:17 0.08695652173913043 (byte*) SCREEN_DIST -(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:11 0.08 +(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:15 0.08 (byte*) SCREEN_FILL (const byte*) SCREEN_FILL#0 SCREEN_FILL = (byte*) 1024 (const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2 (word*) SQUARES -(void*) SQUARES#1 SQUARES zp ZP_WORD:17 0.03225806451612903 +(void*) SQUARES#1 SQUARES zp ZP_WORD:19 0.03225806451612903 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:20 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:13 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:22 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:24 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -6987,60 +7838,61 @@ FINAL SYMBOL TABLE (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:24 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:24 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:24 190.66666666666666 -(word) atan2_16::angle#13 angle zp ZP_WORD:24 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:24 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:24 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:24 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:24 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:24 2004.0 +(word) atan2_16::angle#1 angle zp ZP_WORD:26 3.0 +(word) atan2_16::angle#11 angle zp ZP_WORD:26 4.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:26 190.66666666666666 +(word) atan2_16::angle#13 angle zp ZP_WORD:26 1334.6666666666667 +(word) atan2_16::angle#2 angle zp ZP_WORD:26 2002.0 +(word) atan2_16::angle#3 angle zp ZP_WORD:26 2002.0 +(word) atan2_16::angle#4 angle zp ZP_WORD:26 4.0 +(word) atan2_16::angle#5 angle zp ZP_WORD:26 4.0 +(word) atan2_16::angle#6 angle zp ZP_WORD:26 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 reg byte x 1501.5 (byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:24 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:24 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:26 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:26 202.0 (byte) atan2_16::shift (byte) atan2_16::shift#1 reg byte y 20002.0 (byte) atan2_16::shift#2 reg byte y 8001.25 (byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:15 2.8684210526315796 +(signed word) atan2_16::x#0 x zp ZP_WORD:19 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#1 xd zp ZP_WORD:3 6667.333333333333 -(signed word~) atan2_16::xd#10 xd zp ZP_WORD:3 1001.0 -(signed word) atan2_16::xd#2 xd zp ZP_WORD:3 1001.0 -(signed word) atan2_16::xd#3 xd zp ZP_WORD:3 7668.333333333332 -(signed word) atan2_16::xd#5 xd zp ZP_WORD:3 1001.0 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:5 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:5 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:5 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:5 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:5 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:22 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:22 500.5 -(signed word~) atan2_16::xi#13 xi zp ZP_WORD:22 4.0 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:22 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:22 267.0666666666667 -(signed word) atan2_16::xi#8 xi zp ZP_WORD:22 1001.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:24 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:24 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:24 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:24 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:24 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:24 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:17 2.724999999999999 +(signed word) atan2_16::y#0 y zp ZP_WORD:22 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#1 yd zp ZP_WORD:26 10001.0 -(signed word~) atan2_16::yd#10 yd zp ZP_WORD:26 2002.0 -(signed word) atan2_16::yd#2 yd zp ZP_WORD:26 2002.0 -(signed word) atan2_16::yd#3 yd zp ZP_WORD:26 4601.0 -(signed word) atan2_16::yd#5 yd zp ZP_WORD:26 2002.0 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:2 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:2 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:2 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:2 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:2 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:20 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:20 667.3333333333334 -(signed word~) atan2_16::yi#16 yi zp ZP_WORD:20 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:20 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:20 353.4117647058823 -(signed word) atan2_16::yi#8 yi zp ZP_WORD:20 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:13 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:13 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:13 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:13 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:13 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:13 1001.0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:9 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:13 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -7051,31 +7903,32 @@ FINAL SYMBOL TABLE (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:9 1001.0 -(word*) bsearch16u::items#1 items zp ZP_WORD:9 2.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:9 334.5555555555556 -(word*) bsearch16u::items#8 items zp ZP_WORD:9 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:13 1001.0 +(word*) bsearch16u::items#1 items#1 zp ZP_WORD:11 2.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:11 429.2857142857143 +(word*) bsearch16u::items#11 items zp ZP_WORD:13 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:11 2002.0 +(word*~) bsearch16u::items#19 items zp ZP_WORD:13 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:22 0.26666666666666666 +(word) bsearch16u::key#0 key zp ZP_WORD:24 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:24 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:13 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 result zp ZP_WORD:26 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:9 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:9 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:9 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:9 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:13 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:13 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:13 4.0 (byte*) heap_head -(byte*) heap_head#1 heap_head zp ZP_WORD:15 0.6000000000000001 -(byte*) heap_head#12 heap_head zp ZP_WORD:15 6.0 +(byte*) heap_head#1 heap_head zp ZP_WORD:13 0.6000000000000001 +(byte*) heap_head#12 heap_head zp ZP_WORD:13 6.0 (void()) init_angle_screen((byte*) init_angle_screen::screen) -(word~) init_angle_screen::$10 $10 zp ZP_WORD:24 202.0 +(word~) init_angle_screen::$10 $10 zp ZP_WORD:26 202.0 (byte~) init_angle_screen::$12 reg byte a 202.0 (byte~) init_angle_screen::$13 reg byte a 202.0 (byte~) init_angle_screen::$14 reg byte a 202.0 @@ -7088,32 +7941,32 @@ FINAL SYMBOL TABLE (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:19 84.16666666666666 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:21 84.16666666666666 (word) init_angle_screen::angle_w -(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:24 202.0 +(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:26 202.0 (byte*) init_angle_screen::screen -(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:7 3.0 +(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:9 3.0 (byte*) init_angle_screen::screen_bottomline -(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:7 4.0 -(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:7 7.333333333333333 -(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:7 9.040000000000001 +(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:9 4.0 +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:9 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:9 9.040000000000001 (byte*) init_angle_screen::screen_topline -(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:9 2.0 -(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:9 5.5 -(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:9 9.416666666666666 +(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:11 2.0 +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:11 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:11 9.416666666666666 (byte) init_angle_screen::x -(byte) init_angle_screen::x#1 x zp ZP_BYTE:5 101.0 -(byte) init_angle_screen::x#2 x zp ZP_BYTE:5 25.25 +(byte) init_angle_screen::x#1 x zp ZP_BYTE:7 101.0 +(byte) init_angle_screen::x#2 x zp ZP_BYTE:7 25.25 (byte) init_angle_screen::xb -(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:6 101.0 -(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:6 19.238095238095237 +(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:8 101.0 +(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:8 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:15 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:19 33.666666666666664 (byte) init_angle_screen::y -(byte) init_angle_screen::y#1 y zp ZP_BYTE:2 16.5 -(byte) init_angle_screen::y#4 y zp ZP_BYTE:2 4.730769230769231 +(byte) init_angle_screen::y#1 y zp ZP_BYTE:4 16.5 +(byte) init_angle_screen::y#4 y zp ZP_BYTE:4 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:17 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:22 50.5 (void()) init_dist_screen((byte*) init_dist_screen::screen) (byte~) init_dist_screen::$13 reg byte a 202.0 (byte~) init_dist_screen::$15 reg byte a 202.0 @@ -7136,37 +7989,37 @@ FINAL SYMBOL TABLE (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:22 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:24 202.0 (byte*) init_dist_screen::screen -(byte*) init_dist_screen::screen#0 screen zp ZP_WORD:3 1.5 +(byte*) init_dist_screen::screen#0 screen zp ZP_WORD:5 1.5 (byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:7 4.0 -(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:7 7.333333333333333 -(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:7 6.848484848484849 +(byte*) init_dist_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:9 4.0 +(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:9 7.333333333333333 +(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:9 6.848484848484849 (byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:3 5.5 -(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:3 7.0625 +(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:5 5.5 +(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:5 7.0625 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:5 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:5 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:7 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:7 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:6 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:6 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:8 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:8 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:22 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:24 202.0 (byte) init_dist_screen::y -(byte) init_dist_screen::y#1 y zp ZP_BYTE:2 16.5 -(byte) init_dist_screen::y#10 y zp ZP_BYTE:2 0.9705882352941178 +(byte) init_dist_screen::y#1 y zp ZP_BYTE:4 16.5 +(byte) init_dist_screen::y#10 y zp ZP_BYTE:4 0.9705882352941178 (byte) init_dist_screen::y2 (byte) init_dist_screen::y2#0 reg byte a 22.0 (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:20 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:22 4.869565217391305 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -7177,12 +8030,12 @@ FINAL SYMBOL TABLE (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:7 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:7 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:9 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:9 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#0 squares zp ZP_WORD:9 4.0 -(word*) init_squares::squares#1 squares zp ZP_WORD:9 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:9 17.5 +(word*) init_squares::squares#0 squares zp ZP_WORD:11 4.0 +(word*) init_squares::squares#1 squares zp ZP_WORD:11 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:11 17.5 (void()) main() (label) main::@1 (label) main::@10 @@ -7197,104 +8050,104 @@ FINAL SYMBOL TABLE (label) main::@9 (label) main::@return (byte*) main::angle -(byte*) main::angle#0 angle zp ZP_WORD:20 22.0 -(byte*) main::angle#1 angle zp ZP_WORD:20 50.5 -(byte*) main::angle#2 angle zp ZP_WORD:20 34.888888888888886 +(byte*) main::angle#0 angle zp ZP_WORD:13 22.0 +(byte*) main::angle#1 angle zp ZP_WORD:13 50.5 +(byte*) main::angle#2 angle zp ZP_WORD:13 34.888888888888886 (byte*) main::dist -(byte*) main::dist#0 dist zp ZP_WORD:9 11.0 -(byte*) main::dist#1 dist zp ZP_WORD:9 40.4 -(byte*) main::dist#2 dist zp ZP_WORD:9 39.25 +(byte*) main::dist#0 dist zp ZP_WORD:11 11.0 +(byte*) main::dist#1 dist zp ZP_WORD:11 40.4 +(byte*) main::dist#2 dist zp ZP_WORD:11 39.25 (word) main::dist_angle -(word) main::dist_angle#0 dist_angle zp ZP_WORD:26 101.0 +(word) main::dist_angle#0 dist_angle zp ZP_WORD:2 101.0 (byte*) main::fill -(byte*) main::fill#1 fill zp ZP_WORD:7 101.0 -(byte*) main::fill#2 fill zp ZP_WORD:7 40.4 +(byte*) main::fill#1 fill zp ZP_WORD:9 101.0 +(byte*) main::fill#2 fill zp ZP_WORD:9 40.4 (word) main::min_dist_angle -(word) main::min_dist_angle#2 min_dist_angle zp ZP_WORD:22 101.0 -(word) main::min_dist_angle#3 min_dist_angle#3 zp ZP_WORD:26 83.0 -(word~) main::min_dist_angle#6 min_dist_angle zp ZP_WORD:22 202.0 -(word~) main::min_dist_angle#7 min_dist_angle#7 zp ZP_WORD:26 202.0 -(word~) main::min_dist_angle#8 min_dist_angle#8 zp ZP_WORD:26 202.0 +(word) main::min_dist_angle#2 min_dist_angle zp ZP_WORD:24 101.0 +(word) main::min_dist_angle#3 min_dist_angle#3 zp ZP_WORD:2 83.0 +(word~) main::min_dist_angle#6 min_dist_angle zp ZP_WORD:24 202.0 +(word~) main::min_dist_angle#7 min_dist_angle#7 zp ZP_WORD:2 202.0 +(word~) main::min_dist_angle#8 min_dist_angle#8 zp ZP_WORD:2 202.0 (byte*) main::min_fill -(byte*~) main::min_fill#10 min_fill zp ZP_WORD:24 202.0 -(byte*) main::min_fill#2 min_fill zp ZP_WORD:24 59.285714285714285 -(byte*) main::min_fill#5 min_fill zp ZP_WORD:24 50.5 +(byte*~) main::min_fill#10 min_fill zp ZP_WORD:26 202.0 +(byte*) main::min_fill#2 min_fill zp ZP_WORD:26 59.285714285714285 +(byte*) main::min_fill#5 min_fill zp ZP_WORD:26 50.5 (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem -(byte*) malloc::mem#0 mem zp ZP_WORD:17 0.6666666666666666 +(byte*) malloc::mem#0 mem zp ZP_WORD:19 0.6666666666666666 (void*) malloc::return (word) malloc::size -(word) malloc::size#3 size zp ZP_WORD:17 2.0 +(word) malloc::size#3 size zp ZP_WORD:19 2.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:22 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:20 22.0 -(word) sqr::return#3 return zp ZP_WORD:22 202.0 +(word) sqr::return#0 return zp ZP_WORD:24 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:22 22.0 +(word) sqr::return#3 return zp ZP_WORD:24 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:9 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:9 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:13 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:13 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:9 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:13 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:22 103.0 +(word) sqrt::val#0 val zp ZP_WORD:24 103.0 reg byte x [ atan2_16::i#2 atan2_16::i#1 ] reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] -zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::y#4 init_angle_screen::y#1 ] -zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:2 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] +zp ZP_BYTE:4 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::y#4 init_angle_screen::y#1 ] +zp ZP_WORD:5 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -zp ZP_BYTE:5 [ init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_BYTE:6 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] +zp ZP_BYTE:7 [ init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ] +zp ZP_BYTE:8 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] -zp ZP_WORD:7 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] -zp ZP_WORD:9 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] +zp ZP_WORD:9 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] +zp ZP_WORD:11 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:11 [ SCREEN_DIST#0 ] -zp ZP_WORD:13 [ SCREEN_ANGLE#0 ] +zp ZP_WORD:13 [ heap_head#12 heap_head#1 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] +zp ZP_WORD:15 [ SCREEN_DIST#0 ] +zp ZP_WORD:17 [ SCREEN_ANGLE#0 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] -zp ZP_WORD:15 [ init_angle_screen::xw#0 atan2_16::x#0 heap_head#12 heap_head#1 ] +zp ZP_WORD:19 [ init_angle_screen::xw#0 atan2_16::x#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_WORD:17 [ init_angle_screen::yw#0 atan2_16::y#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] -zp ZP_BYTE:19 [ init_angle_screen::ang_w#0 ] +zp ZP_BYTE:21 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:20 [ sqr::return#2 init_dist_screen::yds#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] +zp ZP_WORD:22 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::yw#0 atan2_16::y#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:22 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] +zp ZP_WORD:24 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:24 [ bsearch16u::pivot#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] -zp ZP_WORD:26 [ bsearch16u::result#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] +zp ZP_WORD:26 [ bsearch16u::result#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] FINAL ASSEMBLER -Score: 1112146 +Score: 1138688 // File Comments // Fill screen using a spiral based on distance-to-center / angle-to-center @@ -7313,25 +8166,25 @@ Score: 1112146 // Char to fill with .const FILL_CHAR = '@' .const NUM_SQUARES = $30 - .label heap_head = $f - .label SQUARES = $11 + .label heap_head = $d + .label SQUARES = $13 // Screen containing distance to center - .label SCREEN_DIST = $b + .label SCREEN_DIST = $f // Screen containing angle to center - .label SCREEN_ANGLE = $d + .label SCREEN_ANGLE = $11 // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] // @1 // malloc(1000) // [2] call malloc - // [190] phi from @1 to malloc [phi:@1->malloc] - // [190] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + // [191] phi from @1 to malloc [phi:@1->malloc] + // [191] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + // [191] phi (byte*) heap_head#12 = (const byte*) HEAP_TOP#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 lda #<HEAP_TOP sta heap_head lda #>HEAP_TOP @@ -7345,13 +8198,13 @@ bbegin: lda malloc.mem+1 sta SCREEN_DIST+1 // [4] call malloc - // [190] phi from @3 to malloc [phi:@3->malloc] - // [190] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + // [191] phi from @3 to malloc [phi:@3->malloc] + // [191] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 lda #<$3e8 sta malloc.size lda #>$3e8 sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + // [191] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy jsr malloc // @4 // malloc(1000) @@ -7369,15 +8222,15 @@ bbegin: // @end // main main: { - .label dist = 9 - .label angle = $14 - .label fill = 7 - .label dist_angle = $1a - .label min_dist_angle = $16 - .label min_dist_angle_3 = $1a - .label min_fill = $18 - .label min_dist_angle_7 = $1a - .label min_dist_angle_8 = $1a + .label dist = $b + .label angle = $d + .label fill = 9 + .label dist_angle = 2 + .label min_dist_angle = $18 + .label min_dist_angle_3 = 2 + .label min_fill = $1a + .label min_dist_angle_7 = 2 + .label min_dist_angle_8 = 2 // init_dist_screen(SCREEN_DIST) // [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 lda SCREEN_DIST @@ -7549,19 +8402,19 @@ main: { // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center -// init_angle_screen(byte* zeropage(7) screen) +// init_angle_screen(byte* zeropage(9) screen) init_angle_screen: { - .label _10 = $18 - .label screen = 7 - .label screen_topline = 9 - .label screen_bottomline = 7 - .label xw = $f - .label yw = $11 - .label angle_w = $18 - .label ang_w = $13 - .label x = 5 - .label xb = 6 - .label y = 2 + .label _10 = $1a + .label screen = 9 + .label screen_topline = $b + .label screen_bottomline = 9 + .label xw = $13 + .label yw = $16 + .label angle_w = $1a + .label ang_w = $15 + .label x = 7 + .label xb = 8 + .label y = 4 // screen_topline = screen+40*12 // [31] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 lda screen @@ -7721,18 +8574,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($f) x, signed word zeropage($11) y) +// atan2_16(signed word zeropage($13) x, signed word zeropage($16) y) atan2_16: { - .label _2 = $14 - .label _7 = $16 - .label yi = $14 - .label xi = $16 - .label angle = $18 - .label xd = 3 - .label yd = $1a - .label return = $18 - .label x = $f - .label y = $11 + .label _2 = $d + .label _7 = $18 + .label yi = $d + .label xi = $18 + .label angle = $1a + .label xd = 5 + .label yd = 2 + .label return = $1a + .label x = $13 + .label y = $16 // (y>=0)?y:-y // [62] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 @@ -8021,20 +8874,20 @@ atan2_16: { // init_dist_screen // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision -// init_dist_screen(byte* zeropage(3) screen) +// init_dist_screen(byte* zeropage(5) screen) init_dist_screen: { - .label screen = 3 - .label screen_bottomline = 7 - .label yds = $14 - .label xds = $16 - .label ds = $16 - .label x = 5 - .label xb = 6 - .label screen_topline = 3 - .label y = 2 + .label screen = 5 + .label screen_bottomline = 9 + .label yds = $16 + .label xds = $18 + .label ds = $18 + .label x = 7 + .label xb = 8 + .label screen_topline = 5 + .label y = 4 // init_squares() // [106] call init_squares - // [177] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + // [178] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] jsr init_squares // init_dist_screen::@10 // screen_bottomline = screen+40*24 @@ -8078,8 +8931,8 @@ init_dist_screen: { // sqr(yd) // [113] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 // [114] call sqr - // [173] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - // [173] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + // [174] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + // [174] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr // sqr(yd) // [115] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 @@ -8122,8 +8975,8 @@ init_dist_screen: { // sqr(xd) // [122] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 // [123] call sqr - // [173] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - // [173] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + // [174] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + // [174] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr // sqr(xd) // [124] (word) sqr::return#3 ← (word) sqr::return#0 @@ -8219,19 +9072,19 @@ init_dist_screen: { // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($16) val) +// sqrt(word zeropage($18) val) sqrt: { - .label _1 = 9 - .label _3 = 9 - .label found = 9 - .label val = $16 + .label _1 = $d + .label _3 = $d + .label found = $d + .label val = $18 // bsearch16u(val, SQUARES, NUM_SQUARES) // [145] (word) bsearch16u::key#0 ← (word) sqrt::val#0 // [146] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES - sta bsearch16u.items + sta bsearch16u.items_1 lda SQUARES+1 - sta bsearch16u.items+1 + sta bsearch16u.items_1+1 // [147] call bsearch16u // [154] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] jsr bsearch16u @@ -8266,74 +9119,39 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($16) key, word* zeropage(9) items, byte register(X) num) +// bsearch16u(word zeropage($18) key, word* zeropage($d) items, byte register(X) num) bsearch16u: { - .label _2 = 9 - .label pivot = $18 + .label _2 = $d + .label pivot = $d .label result = $1a - .label return = 9 - .label items = 9 - .label key = $16 - // [155] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - // [155] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy - // [155] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + .label return = $d + .label items = $d + .label key = $18 + .label items_1 = $b + .label items_10 = $b + .label items_16 = $b + // [155] phi from bsearch16u to bsearch16u::@4 [phi:bsearch16u->bsearch16u::@4] + // [155] phi (word*) bsearch16u::items#10 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@4#0] -- register_copy + // [155] phi (byte) bsearch16u::num#10 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@4#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES - // bsearch16u::@3 - b3: - // while (num > 0) - // [156] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 - cpx #0 - bne b4 - // bsearch16u::@5 - // *items<=key?items:items-1 - // [157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 - ldy #1 - lda (items),y - cmp key+1 - bne !+ - dey - lda (items),y - cmp key - beq b2 - !: - bcc b2 - // bsearch16u::@1 - // [158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 - lda _2 - sec - sbc #<1*SIZEOF_WORD - sta _2 - lda _2+1 - sbc #>1*SIZEOF_WORD - sta _2+1 - // [159] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - // [159] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - // bsearch16u::@2 - b2: - // [160] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - // [160] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - // bsearch16u::@return - // } - // [161] return - rts // bsearch16u::@4 b4: // num >> 1 - // [162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + // [156] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#10 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr // items + (num >> 1) - // [163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [157] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + // [158] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#10 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc - adc items + adc items_10 sta pivot lda #0 - adc items+1 + adc items_10+1 sta pivot+1 // result = (signed int)key-(signed int)*pivot - // [165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + // [159] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -8344,66 +9162,112 @@ bsearch16u: { sbc (pivot),y sta result+1 // if (result == 0) - // [166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + // [160] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 bne b6 lda result bne b6 - // bsearch16u::@8 - // [167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 - lda pivot - sta return - lda pivot+1 - sta return+1 + // [161] phi from bsearch16u::@2 bsearch16u::@4 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return] + // [161] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@4->bsearch16u::@return#0] -- register_copy + // bsearch16u::@return + breturn: + // } + // [162] return rts // bsearch16u::@6 b6: // if (result > 0) - // [168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + // [163] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -- vwsz1_le_0_then_la1 lda result+1 - bmi b7 + bmi b10 bne !+ lda result - beq b7 + beq b10 !: - // bsearch16u::@9 + // bsearch16u::@8 // items = pivot+1 - // [169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + // [164] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #1*SIZEOF_WORD clc - adc pivot + adc items sta items - lda #0 - adc pivot+1 - sta items+1 + bcc !+ + inc items+1 + !: // num--; - // [170] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + // [165] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#10 -- vbuxx=_dec_vbuxx dex - // [171] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - // [171] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - // [171] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + // [166] phi from bsearch16u::@10 bsearch16u::@8 to bsearch16u::@7 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7] + // [166] phi (word*) bsearch16u::items#11 = (word*~) bsearch16u::items#19 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#0] -- register_copy + // [166] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#10 [phi:bsearch16u::@10/bsearch16u::@8->bsearch16u::@7#1] -- register_copy // bsearch16u::@7 b7: // num >>= 1 - // [172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + // [167] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - // [155] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - // [155] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - // [155] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy - jmp b3 + // bsearch16u::@3 + // while (num > 0) + // [168] if((byte) bsearch16u::num#0>(byte) 0) goto bsearch16u::@9 -- vbuxx_gt_0_then_la1 + cpx #0 + bne b9 + // bsearch16u::@5 + // *items<=key?items:items-1 + // [169] if(*((word*) bsearch16u::items#11)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq breturn + !: + bcc breturn + // bsearch16u::@1 + // [170] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#11 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + // [171] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + // [171] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + // bsearch16u::@2 + rts + // bsearch16u::@9 + b9: + // [172] (word*~) bsearch16u::items#16 ← (word*) bsearch16u::items#11 -- pwuz1=pwuz2 + lda items + sta items_16 + lda items+1 + sta items_16+1 + // [155] phi from bsearch16u::@9 to bsearch16u::@4 [phi:bsearch16u::@9->bsearch16u::@4] + // [155] phi (word*) bsearch16u::items#10 = (word*~) bsearch16u::items#16 [phi:bsearch16u::@9->bsearch16u::@4#0] -- register_copy + // [155] phi (byte) bsearch16u::num#10 = (byte) bsearch16u::num#0 [phi:bsearch16u::@9->bsearch16u::@4#1] -- register_copy + jmp b4 + // bsearch16u::@10 + b10: + // [173] (word*~) bsearch16u::items#19 ← (word*) bsearch16u::items#10 -- pwuz1=pwuz2 + lda items_10 + sta items + lda items_10+1 + sta items+1 + jmp b7 } // sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $16 - .label return_2 = $14 + .label return = $18 + .label return_2 = $16 // return SQUARES[val]; - // [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [175] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + // [176] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa tay lda (SQUARES),y sta return @@ -8412,50 +9276,50 @@ sqr: { sta return+1 // sqr::@return // } - // [176] return + // [177] return rts } // init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = 9 - .label sqr = 7 + .label squares = $b + .label sqr = 9 // malloc(NUM_SQUARES*sizeof(word)) - // [178] call malloc - // [190] phi from init_squares to malloc [phi:init_squares->malloc] - // [190] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + // [179] call malloc + // [191] phi from init_squares to malloc [phi:init_squares->malloc] + // [191] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 lda #<NUM_SQUARES*SIZEOF_WORD sta malloc.size lda #>NUM_SQUARES*SIZEOF_WORD sta malloc.size+1 - // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + // [191] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc // init_squares::@2 // malloc(NUM_SQUARES*sizeof(word)) - // [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + // [180] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // squares = SQUARES - // [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + // [181] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda SQUARES sta squares lda SQUARES+1 sta squares+1 - // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + // [182] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + // [182] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + // [182] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [182] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 txa sta sqr sta sqr+1 - // [181] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [182] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + // [182] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + // [182] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + // [182] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy // init_squares::@1 b1: // *squares++ = sqr - // [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [183] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y @@ -8463,7 +9327,7 @@ init_squares: { lda sqr+1 sta (squares),y // *squares++ = sqr; - // [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [184] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -8472,15 +9336,15 @@ init_squares: { inc squares+1 !: // i*2 - // [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [185] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl // i*2+1 - // [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [186] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 // sqr += i*2+1 - // [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [187] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr @@ -8488,25 +9352,25 @@ init_squares: { inc sqr+1 !: // for( byte i: 0..NUM_SQUARES-1) - // [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [188] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + // [189] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1 // init_squares::@return // } - // [189] return + // [190] return rts } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. -// malloc(word zeropage($11) size) +// malloc(word zeropage($13) size) malloc: { - .label mem = $11 - .label size = $11 + .label mem = $13 + .label size = $13 // mem = heap_head-size - // [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 + // [192] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 -- pbuz1=pbuz2_minus_vwuz1 lda heap_head sec sbc mem @@ -8515,14 +9379,14 @@ malloc: { sbc mem+1 sta mem+1 // heap_head = mem - // [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 + // [193] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -- pbuz1=pbuz2 lda mem sta heap_head lda mem+1 sta heap_head+1 // malloc::@return // } - // [193] return + // [194] return rts } // File Data diff --git a/src/test/ref/screen-show-spiral.sym b/src/test/ref/screen-show-spiral.sym index 40e5dacee..cf30de36a 100644 --- a/src/test/ref/screen-show-spiral.sym +++ b/src/test/ref/screen-show-spiral.sym @@ -21,19 +21,19 @@ (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10 (const byte) RADIX::OCTAL OCTAL = (number) 8 (byte*) SCREEN_ANGLE -(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:13 0.08695652173913043 +(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:17 0.08695652173913043 (byte*) SCREEN_DIST -(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:11 0.08 +(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:15 0.08 (byte*) SCREEN_FILL (const byte*) SCREEN_FILL#0 SCREEN_FILL = (byte*) 1024 (const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2 (word*) SQUARES -(void*) SQUARES#1 SQUARES zp ZP_WORD:17 0.03225806451612903 +(void*) SQUARES#1 SQUARES zp ZP_WORD:19 0.03225806451612903 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:20 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:13 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:22 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:24 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -57,60 +57,61 @@ (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:24 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:24 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:24 190.66666666666666 -(word) atan2_16::angle#13 angle zp ZP_WORD:24 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:24 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:24 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:24 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:24 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:24 2004.0 +(word) atan2_16::angle#1 angle zp ZP_WORD:26 3.0 +(word) atan2_16::angle#11 angle zp ZP_WORD:26 4.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:26 190.66666666666666 +(word) atan2_16::angle#13 angle zp ZP_WORD:26 1334.6666666666667 +(word) atan2_16::angle#2 angle zp ZP_WORD:26 2002.0 +(word) atan2_16::angle#3 angle zp ZP_WORD:26 2002.0 +(word) atan2_16::angle#4 angle zp ZP_WORD:26 4.0 +(word) atan2_16::angle#5 angle zp ZP_WORD:26 4.0 +(word) atan2_16::angle#6 angle zp ZP_WORD:26 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 reg byte x 1501.5 (byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:24 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:24 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:26 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:26 202.0 (byte) atan2_16::shift (byte) atan2_16::shift#1 reg byte y 20002.0 (byte) atan2_16::shift#2 reg byte y 8001.25 (byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:15 2.8684210526315796 +(signed word) atan2_16::x#0 x zp ZP_WORD:19 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#1 xd zp ZP_WORD:3 6667.333333333333 -(signed word~) atan2_16::xd#10 xd zp ZP_WORD:3 1001.0 -(signed word) atan2_16::xd#2 xd zp ZP_WORD:3 1001.0 -(signed word) atan2_16::xd#3 xd zp ZP_WORD:3 7668.333333333332 -(signed word) atan2_16::xd#5 xd zp ZP_WORD:3 1001.0 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:5 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:5 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:5 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:5 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:5 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:22 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:22 500.5 -(signed word~) atan2_16::xi#13 xi zp ZP_WORD:22 4.0 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:22 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:22 267.0666666666667 -(signed word) atan2_16::xi#8 xi zp ZP_WORD:22 1001.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:24 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:24 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:24 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:24 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:24 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:24 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:17 2.724999999999999 +(signed word) atan2_16::y#0 y zp ZP_WORD:22 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#1 yd zp ZP_WORD:26 10001.0 -(signed word~) atan2_16::yd#10 yd zp ZP_WORD:26 2002.0 -(signed word) atan2_16::yd#2 yd zp ZP_WORD:26 2002.0 -(signed word) atan2_16::yd#3 yd zp ZP_WORD:26 4601.0 -(signed word) atan2_16::yd#5 yd zp ZP_WORD:26 2002.0 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:2 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:2 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:2 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:2 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:2 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:20 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:20 667.3333333333334 -(signed word~) atan2_16::yi#16 yi zp ZP_WORD:20 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:20 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:20 353.4117647058823 -(signed word) atan2_16::yi#8 yi zp ZP_WORD:20 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:13 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:13 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:13 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:13 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:13 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:13 1001.0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:9 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:13 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 +(label) bsearch16u::@10 (label) bsearch16u::@2 (label) bsearch16u::@3 (label) bsearch16u::@4 @@ -121,31 +122,32 @@ (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:9 1001.0 -(word*) bsearch16u::items#1 items zp ZP_WORD:9 2.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:9 334.5555555555556 -(word*) bsearch16u::items#8 items zp ZP_WORD:9 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:13 1001.0 +(word*) bsearch16u::items#1 items#1 zp ZP_WORD:11 2.0 +(word*) bsearch16u::items#10 items#10 zp ZP_WORD:11 429.2857142857143 +(word*) bsearch16u::items#11 items zp ZP_WORD:13 752.25 +(word*~) bsearch16u::items#16 items#16 zp ZP_WORD:11 2002.0 +(word*~) bsearch16u::items#19 items zp ZP_WORD:13 2002.0 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:22 0.26666666666666666 +(word) bsearch16u::key#0 key zp ZP_WORD:24 0.23529411764705882 (byte) bsearch16u::num -(byte) bsearch16u::num#0 reg byte x 2002.0 +(byte) bsearch16u::num#0 reg byte x 1001.0 (byte) bsearch16u::num#1 reg byte x 2002.0 -(byte) bsearch16u::num#3 reg byte x 556.1111111111111 +(byte) bsearch16u::num#10 reg byte x 444.8888888888889 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:24 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:13 750.75 (signed word) bsearch16u::result (signed word) bsearch16u::result#0 result zp ZP_WORD:26 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:9 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:9 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:9 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:9 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:13 335.00000000000006 +(word*) bsearch16u::return#2 return zp ZP_WORD:13 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:13 4.0 (byte*) heap_head -(byte*) heap_head#1 heap_head zp ZP_WORD:15 0.6000000000000001 -(byte*) heap_head#12 heap_head zp ZP_WORD:15 6.0 +(byte*) heap_head#1 heap_head zp ZP_WORD:13 0.6000000000000001 +(byte*) heap_head#12 heap_head zp ZP_WORD:13 6.0 (void()) init_angle_screen((byte*) init_angle_screen::screen) -(word~) init_angle_screen::$10 $10 zp ZP_WORD:24 202.0 +(word~) init_angle_screen::$10 $10 zp ZP_WORD:26 202.0 (byte~) init_angle_screen::$12 reg byte a 202.0 (byte~) init_angle_screen::$13 reg byte a 202.0 (byte~) init_angle_screen::$14 reg byte a 202.0 @@ -158,32 +160,32 @@ (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:19 84.16666666666666 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:21 84.16666666666666 (word) init_angle_screen::angle_w -(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:24 202.0 +(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:26 202.0 (byte*) init_angle_screen::screen -(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:7 3.0 +(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:9 3.0 (byte*) init_angle_screen::screen_bottomline -(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:7 4.0 -(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:7 7.333333333333333 -(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:7 9.040000000000001 +(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:9 4.0 +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:9 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:9 9.040000000000001 (byte*) init_angle_screen::screen_topline -(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:9 2.0 -(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:9 5.5 -(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:9 9.416666666666666 +(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:11 2.0 +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:11 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:11 9.416666666666666 (byte) init_angle_screen::x -(byte) init_angle_screen::x#1 x zp ZP_BYTE:5 101.0 -(byte) init_angle_screen::x#2 x zp ZP_BYTE:5 25.25 +(byte) init_angle_screen::x#1 x zp ZP_BYTE:7 101.0 +(byte) init_angle_screen::x#2 x zp ZP_BYTE:7 25.25 (byte) init_angle_screen::xb -(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:6 101.0 -(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:6 19.238095238095237 +(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:8 101.0 +(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:8 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:15 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:19 33.666666666666664 (byte) init_angle_screen::y -(byte) init_angle_screen::y#1 y zp ZP_BYTE:2 16.5 -(byte) init_angle_screen::y#4 y zp ZP_BYTE:2 4.730769230769231 +(byte) init_angle_screen::y#1 y zp ZP_BYTE:4 16.5 +(byte) init_angle_screen::y#4 y zp ZP_BYTE:4 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:17 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:22 50.5 (void()) init_dist_screen((byte*) init_dist_screen::screen) (byte~) init_dist_screen::$13 reg byte a 202.0 (byte~) init_dist_screen::$15 reg byte a 202.0 @@ -206,37 +208,37 @@ (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:22 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:24 202.0 (byte*) init_dist_screen::screen -(byte*) init_dist_screen::screen#0 screen zp ZP_WORD:3 1.5 +(byte*) init_dist_screen::screen#0 screen zp ZP_WORD:5 1.5 (byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:7 4.0 -(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:7 7.333333333333333 -(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:7 6.848484848484849 +(byte*) init_dist_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:9 4.0 +(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:9 7.333333333333333 +(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:9 6.848484848484849 (byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:3 5.5 -(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:3 7.0625 +(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:5 5.5 +(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:5 7.0625 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:5 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:5 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:7 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:7 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:6 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:6 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:8 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:8 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:22 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:24 202.0 (byte) init_dist_screen::y -(byte) init_dist_screen::y#1 y zp ZP_BYTE:2 16.5 -(byte) init_dist_screen::y#10 y zp ZP_BYTE:2 0.9705882352941178 +(byte) init_dist_screen::y#1 y zp ZP_BYTE:4 16.5 +(byte) init_dist_screen::y#10 y zp ZP_BYTE:4 0.9705882352941178 (byte) init_dist_screen::y2 (byte) init_dist_screen::y2#0 reg byte a 22.0 (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:20 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:22 4.869565217391305 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -247,12 +249,12 @@ (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:7 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:7 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:9 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:9 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#0 squares zp ZP_WORD:9 4.0 -(word*) init_squares::squares#1 squares zp ZP_WORD:9 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:9 17.5 +(word*) init_squares::squares#0 squares zp ZP_WORD:11 4.0 +(word*) init_squares::squares#1 squares zp ZP_WORD:11 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:11 17.5 (void()) main() (label) main::@1 (label) main::@10 @@ -267,97 +269,97 @@ (label) main::@9 (label) main::@return (byte*) main::angle -(byte*) main::angle#0 angle zp ZP_WORD:20 22.0 -(byte*) main::angle#1 angle zp ZP_WORD:20 50.5 -(byte*) main::angle#2 angle zp ZP_WORD:20 34.888888888888886 +(byte*) main::angle#0 angle zp ZP_WORD:13 22.0 +(byte*) main::angle#1 angle zp ZP_WORD:13 50.5 +(byte*) main::angle#2 angle zp ZP_WORD:13 34.888888888888886 (byte*) main::dist -(byte*) main::dist#0 dist zp ZP_WORD:9 11.0 -(byte*) main::dist#1 dist zp ZP_WORD:9 40.4 -(byte*) main::dist#2 dist zp ZP_WORD:9 39.25 +(byte*) main::dist#0 dist zp ZP_WORD:11 11.0 +(byte*) main::dist#1 dist zp ZP_WORD:11 40.4 +(byte*) main::dist#2 dist zp ZP_WORD:11 39.25 (word) main::dist_angle -(word) main::dist_angle#0 dist_angle zp ZP_WORD:26 101.0 +(word) main::dist_angle#0 dist_angle zp ZP_WORD:2 101.0 (byte*) main::fill -(byte*) main::fill#1 fill zp ZP_WORD:7 101.0 -(byte*) main::fill#2 fill zp ZP_WORD:7 40.4 +(byte*) main::fill#1 fill zp ZP_WORD:9 101.0 +(byte*) main::fill#2 fill zp ZP_WORD:9 40.4 (word) main::min_dist_angle -(word) main::min_dist_angle#2 min_dist_angle zp ZP_WORD:22 101.0 -(word) main::min_dist_angle#3 min_dist_angle#3 zp ZP_WORD:26 83.0 -(word~) main::min_dist_angle#6 min_dist_angle zp ZP_WORD:22 202.0 -(word~) main::min_dist_angle#7 min_dist_angle#7 zp ZP_WORD:26 202.0 -(word~) main::min_dist_angle#8 min_dist_angle#8 zp ZP_WORD:26 202.0 +(word) main::min_dist_angle#2 min_dist_angle zp ZP_WORD:24 101.0 +(word) main::min_dist_angle#3 min_dist_angle#3 zp ZP_WORD:2 83.0 +(word~) main::min_dist_angle#6 min_dist_angle zp ZP_WORD:24 202.0 +(word~) main::min_dist_angle#7 min_dist_angle#7 zp ZP_WORD:2 202.0 +(word~) main::min_dist_angle#8 min_dist_angle#8 zp ZP_WORD:2 202.0 (byte*) main::min_fill -(byte*~) main::min_fill#10 min_fill zp ZP_WORD:24 202.0 -(byte*) main::min_fill#2 min_fill zp ZP_WORD:24 59.285714285714285 -(byte*) main::min_fill#5 min_fill zp ZP_WORD:24 50.5 +(byte*~) main::min_fill#10 min_fill zp ZP_WORD:26 202.0 +(byte*) main::min_fill#2 min_fill zp ZP_WORD:26 59.285714285714285 +(byte*) main::min_fill#5 min_fill zp ZP_WORD:26 50.5 (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem -(byte*) malloc::mem#0 mem zp ZP_WORD:17 0.6666666666666666 +(byte*) malloc::mem#0 mem zp ZP_WORD:19 0.6666666666666666 (void*) malloc::return (word) malloc::size -(word) malloc::size#3 size zp ZP_WORD:17 2.0 +(word) malloc::size#3 size zp ZP_WORD:19 2.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:22 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:20 22.0 -(word) sqr::return#3 return zp ZP_WORD:22 202.0 +(word) sqr::return#0 return zp ZP_WORD:24 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:22 22.0 +(word) sqr::return#3 return zp ZP_WORD:24 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:9 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:9 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:13 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:13 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:9 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:13 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:22 103.0 +(word) sqrt::val#0 val zp ZP_WORD:24 103.0 reg byte x [ atan2_16::i#2 atan2_16::i#1 ] reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] -zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::y#4 init_angle_screen::y#1 ] -zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:2 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] +zp ZP_BYTE:4 [ init_dist_screen::y#10 init_dist_screen::y#1 init_angle_screen::y#4 init_angle_screen::y#1 ] +zp ZP_WORD:5 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -zp ZP_BYTE:5 [ init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_BYTE:6 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] +zp ZP_BYTE:7 [ init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ] +zp ZP_BYTE:8 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#10 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] -zp ZP_WORD:7 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] -zp ZP_WORD:9 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] +zp ZP_WORD:9 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::fill#2 main::fill#1 ] +zp ZP_WORD:11 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::items#10 bsearch16u::items#16 bsearch16u::items#1 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::dist#2 main::dist#0 main::dist#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:11 [ SCREEN_DIST#0 ] -zp ZP_WORD:13 [ SCREEN_ANGLE#0 ] +zp ZP_WORD:13 [ heap_head#12 heap_head#1 bsearch16u::return#1 bsearch16u::pivot#0 bsearch16u::return#2 bsearch16u::items#11 bsearch16u::items#0 bsearch16u::items#19 bsearch16u::$2 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] +zp ZP_WORD:15 [ SCREEN_DIST#0 ] +zp ZP_WORD:17 [ SCREEN_ANGLE#0 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] -zp ZP_WORD:15 [ init_angle_screen::xw#0 atan2_16::x#0 heap_head#12 heap_head#1 ] +zp ZP_WORD:19 [ init_angle_screen::xw#0 atan2_16::x#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_WORD:17 [ init_angle_screen::yw#0 atan2_16::y#0 malloc::size#3 malloc::mem#0 SQUARES#1 ] -zp ZP_BYTE:19 [ init_angle_screen::ang_w#0 ] +zp ZP_BYTE:21 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:20 [ sqr::return#2 init_dist_screen::yds#0 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] +zp ZP_WORD:22 [ sqr::return#2 init_dist_screen::yds#0 init_angle_screen::yw#0 atan2_16::y#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:22 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] +zp ZP_WORD:24 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:24 [ bsearch16u::pivot#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] -zp ZP_WORD:26 [ bsearch16u::result#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] +zp ZP_WORD:26 [ bsearch16u::result#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] diff --git a/src/test/ref/sequence-locality-0.asm b/src/test/ref/sequence-locality-0.asm index ae4c47c52..fe440b513 100644 --- a/src/test/ref/sequence-locality-0.asm +++ b/src/test/ref/sequence-locality-0.asm @@ -4,24 +4,26 @@ .pc = $80d "Program" main: { .label screen = $400 - ldy #0 ldx #0 - b1: - cpx #5+1 - bcs b2 - txa + ldy #0 + b4: + tya sec sbc #5 - sta screen,y - iny - b3: + sta screen,x inx - cpx #$b + b3: + iny + cpy #$b bne b1 rts + b1: + cpy #5+1 + bcs b2 + jmp b4 b2: - txa - sta screen,y - iny + tya + sta screen,x + inx jmp b3 } diff --git a/src/test/ref/sequence-locality-0.cfg b/src/test/ref/sequence-locality-0.cfg index 4e8a13740..874884416 100644 --- a/src/test/ref/sequence-locality-0.cfg +++ b/src/test/ref/sequence-locality-0.cfg @@ -9,26 +9,27 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::idx#3 ← phi( main/(byte) 0 main::@3/(byte) main::idx#6 ) - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@3/(byte) main::i#1 ) - [6] if((byte) main::i#2>=(byte) 5+(byte) 1) goto main::@2 to:main::@4 -main::@4: scope:[main] from main::@1 - [7] (byte~) main::$1 ← (byte) main::i#2 - (byte) 5 - [8] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte~) main::$1 - [9] (byte) main::idx#2 ← ++ (byte) main::idx#3 +main::@4: scope:[main] from main main::@1 + [5] (byte) main::idx#8 ← phi( main::@1/(byte) main::idx#3 main/(byte) 0 ) + [5] (byte) main::i#7 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) + [6] (byte~) main::$1 ← (byte) main::i#7 - (byte) 5 + [7] *((const byte*) main::screen#0 + (byte) main::idx#8) ← (byte~) main::$1 + [8] (byte) main::idx#2 ← ++ (byte) main::idx#8 to:main::@3 main::@3: scope:[main] from main::@2 main::@4 - [10] (byte) main::idx#6 ← phi( main::@2/(byte) main::idx#1 main::@4/(byte) main::idx#2 ) - [11] (byte) main::i#1 ← ++ (byte) main::i#2 - [12] if((byte) main::i#1!=(byte) $b) goto main::@1 + [9] (byte) main::i#8 ← phi( main::@2/(byte) main::i#1 main::@4/(byte) main::i#7 ) + [9] (byte) main::idx#3 ← phi( main::@2/(byte) main::idx#1 main::@4/(byte) main::idx#2 ) + [10] (byte) main::i#1 ← ++ (byte) main::i#8 + [11] if((byte) main::i#1!=(byte) $b) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [13] return + [12] return to:@return +main::@1: scope:[main] from main::@3 + [13] if((byte) main::i#1>=(byte) 5+(byte) 1) goto main::@2 + to:main::@4 main::@2: scope:[main] from main::@1 - [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#2 + [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#1 [15] (byte) main::idx#1 ← ++ (byte) main::idx#3 to:main::@3 diff --git a/src/test/ref/sequence-locality-0.log b/src/test/ref/sequence-locality-0.log index eedd03f78..8b1d9a7e1 100644 --- a/src/test/ref/sequence-locality-0.log +++ b/src/test/ref/sequence-locality-0.log @@ -110,6 +110,83 @@ Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [14] main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value [16] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Rewriting conditional comparison [5] if((byte) main::i#2>(byte) 5) goto main::@2 +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@3 + [0] (byte) main::idx#3 ← phi( main/(const byte) main::idx#0 main::@3/(byte) main::idx#6 ) + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@3/(byte) main::i#1 ) + [1] if((byte) main::i#2>=(byte) 5+(number) 1) goto main::@2 + to:main::@4 +main::@2: scope:[main] from main::@1 + (byte) main::i#6 ← phi( ) + [2] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#6 + [3] (byte) main::idx#1 ← ++ (byte) main::idx#3 + to:main::@3 +main::@4: scope:[main] from main::@1 + (byte) main::i#7 ← phi( ) + [4] (byte~) main::$1 ← (byte) main::i#7 - (byte) 5 + [5] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte~) main::$1 + [6] (byte) main::idx#2 ← ++ (byte) main::idx#3 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@4 + [7] (byte) main::i#8 ← phi( ) + [7] (byte) main::idx#6 ← phi( main::@2/(byte) main::idx#1 main::@4/(byte) main::idx#2 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#8 + [9] if((byte) main::i#1!=(number) $b) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@3 + [10] return + to:@return +@1: scope:[] from @begin + [11] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::idx#3) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@3 + [0] (byte) main::idx#3 ← phi( main/(const byte) main::idx#0 main::@3/(byte) main::idx#6 ) + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@3/(byte) main::i#1 ) + [1] if((byte) main::i#2>=(byte) 5+(number) 1) goto main::@2 + to:main::@4 +main::@2: scope:[main] from main::@1 + (byte) main::idx#7 ← phi( ) + (byte) main::i#6 ← phi( main::@1/(byte) main::i#2 ) + [2] *((const byte*) main::screen#0 + (byte) main::idx#7) ← (byte) main::i#6 + [3] (byte) main::idx#1 ← ++ (byte) main::idx#7 + to:main::@3 +main::@4: scope:[main] from main::@1 + (byte) main::idx#8 ← phi( ) + (byte) main::i#7 ← phi( main::@1/(byte) main::i#2 ) + [4] (byte~) main::$1 ← (byte) main::i#7 - (byte) 5 + [5] *((const byte*) main::screen#0 + (byte) main::idx#8) ← (byte~) main::$1 + [6] (byte) main::idx#2 ← ++ (byte) main::idx#8 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@4 + [7] (byte) main::i#8 ← phi( main::@2/(byte) main::i#6 main::@4/(byte) main::i#7 ) + [7] (byte) main::idx#6 ← phi( main::@2/(byte) main::idx#1 main::@4/(byte) main::idx#2 ) + [8] (byte) main::i#1 ← ++ (byte) main::i#8 + [9] if((byte) main::i#1!=(number) $b) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@3 + [10] return + to:@return +@1: scope:[] from @begin + [11] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 5+1 in if((byte) main::i#2>=(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) 1 in if((byte) main::i#2>=(unumber)(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 @@ -121,27 +198,44 @@ Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $b Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte) main::i#1 = (byte) main::i#2 +Alias (byte) main::idx#3 = (byte) main::idx#6 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#9 (const byte) main::i#0 +Identical Phi Values (byte) main::idx#9 (const byte) main::idx#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@2 +Removing PHI-reference to removed block (main::@1_1) in block main::@2 +if() condition always false - eliminating [15] if((const byte) main::i#0>=(byte) 5+(byte) 1) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Alias (byte) main::i#1 = (byte) main::i#6 +Alias (byte) main::idx#3 = (byte) main::idx#7 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::idx#0 Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::i#0 = (byte) 0 Constant inlined main::idx#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@7(between main::@3 and main::@1) +Added new block during phi lifting main::@7(between main::@1 and main::@4) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 -Created 3 initial phi equivalence classes -Coalesced [11] main::idx#9 ← main::idx#2 -Coalesced [16] main::i#6 ← main::i#1 -Coalesced [17] main::idx#7 ← main::idx#6 -Coalesced [20] main::idx#8 ← main::idx#1 +Created 4 initial phi equivalence classes +Coalesced [11] main::idx#12 ← main::idx#2 +Coalesced [12] main::i#12 ← main::i#7 +Coalesced [18] main::i#10 ← main::i#1 +Coalesced [19] main::idx#10 ← main::idx#3 +Coalesced [22] main::idx#11 ← main::idx#1 +Coalesced (already) [23] main::i#11 ← main::i#1 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@7 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 @@ -160,27 +254,28 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::idx#3 ← phi( main/(byte) 0 main::@3/(byte) main::idx#6 ) - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@3/(byte) main::i#1 ) - [6] if((byte) main::i#2>=(byte) 5+(byte) 1) goto main::@2 to:main::@4 -main::@4: scope:[main] from main::@1 - [7] (byte~) main::$1 ← (byte) main::i#2 - (byte) 5 - [8] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte~) main::$1 - [9] (byte) main::idx#2 ← ++ (byte) main::idx#3 +main::@4: scope:[main] from main main::@1 + [5] (byte) main::idx#8 ← phi( main::@1/(byte) main::idx#3 main/(byte) 0 ) + [5] (byte) main::i#7 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) + [6] (byte~) main::$1 ← (byte) main::i#7 - (byte) 5 + [7] *((const byte*) main::screen#0 + (byte) main::idx#8) ← (byte~) main::$1 + [8] (byte) main::idx#2 ← ++ (byte) main::idx#8 to:main::@3 main::@3: scope:[main] from main::@2 main::@4 - [10] (byte) main::idx#6 ← phi( main::@2/(byte) main::idx#1 main::@4/(byte) main::idx#2 ) - [11] (byte) main::i#1 ← ++ (byte) main::i#2 - [12] if((byte) main::i#1!=(byte) $b) goto main::@1 + [9] (byte) main::i#8 ← phi( main::@2/(byte) main::i#1 main::@4/(byte) main::i#7 ) + [9] (byte) main::idx#3 ← phi( main::@2/(byte) main::idx#1 main::@4/(byte) main::idx#2 ) + [10] (byte) main::i#1 ← ++ (byte) main::i#8 + [11] if((byte) main::i#1!=(byte) $b) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [13] return + [12] return to:@return +main::@1: scope:[main] from main::@3 + [13] if((byte) main::i#1>=(byte) 5+(byte) 1) goto main::@2 + to:main::@4 main::@2: scope:[main] from main::@1 - [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#2 + [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#1 [15] (byte) main::idx#1 ← ++ (byte) main::idx#3 to:main::@3 @@ -189,25 +284,26 @@ VARIABLE REGISTER WEIGHTS (void()) main() (byte~) main::$1 22.0 (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#2 6.875 +(byte) main::i#1 121.2 +(byte) main::i#7 30.75 +(byte) main::i#8 213.0 (byte) main::idx -(byte) main::idx#1 22.0 +(byte) main::idx#1 202.0 (byte) main::idx#2 22.0 -(byte) main::idx#3 11.0 -(byte) main::idx#6 11.0 +(byte) main::idx#3 83.0 +(byte) main::idx#8 40.99999999999999 (byte*) main::screen Initial phi equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] +[ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] +[ main::i#8 main::i#7 main::i#1 ] Added variable main::$1 to zero page equivalence class [ main::$1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -[ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] +[ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] +[ main::i#8 main::i#7 main::i#1 ] [ main::$1 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] +Allocated zp ZP_BYTE:2 [ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] +Allocated zp ZP_BYTE:3 [ main::i#8 main::i#7 main::i#1 ] Allocated zp ZP_BYTE:4 [ main::$1 ] INITIAL ASM @@ -239,62 +335,62 @@ bend: main: { .label screen = $400 .label _1 = 4 - .label idx = 3 - .label i = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::idx#3 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + .label idx = 2 + .label i = 3 + // [5] phi from main to main::@4 [phi:main->main::@4] + b4_from_main: + // [5] phi (byte) main::idx#8 = (byte) 0 [phi:main->main::@4#0] -- vbuz1=vbuc1 lda #0 sta idx - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@4#1] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::idx#3 = (byte) main::idx#6 [phi:main::@3->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2>=(byte) 5+(byte) 1) goto main::@2 -- vbuz1_ge_vbuc1_then_la1 - lda i - cmp #5+1 - bcs b2 jmp b4 // main::@4 b4: - // [7] (byte~) main::$1 ← (byte) main::i#2 - (byte) 5 -- vbuz1=vbuz2_minus_vbuc1 + // [6] (byte~) main::$1 ← (byte) main::i#7 - (byte) 5 -- vbuz1=vbuz2_minus_vbuc1 lax i axs #5 stx _1 - // [8] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte~) main::$1 -- pbuc1_derefidx_vbuz1=vbuz2 + // [7] *((const byte*) main::screen#0 + (byte) main::idx#8) ← (byte~) main::$1 -- pbuc1_derefidx_vbuz1=vbuz2 lda _1 ldy idx sta screen,y - // [9] (byte) main::idx#2 ← ++ (byte) main::idx#3 -- vbuz1=_inc_vbuz1 + // [8] (byte) main::idx#2 ← ++ (byte) main::idx#8 -- vbuz1=_inc_vbuz1 inc idx - // [10] phi from main::@2 main::@4 to main::@3 [phi:main::@2/main::@4->main::@3] + // [9] phi from main::@2 main::@4 to main::@3 [phi:main::@2/main::@4->main::@3] b3_from_b2: b3_from_b4: - // [10] phi (byte) main::idx#6 = (byte) main::idx#1 [phi:main::@2/main::@4->main::@3#0] -- register_copy + // [9] phi (byte) main::i#8 = (byte) main::i#1 [phi:main::@2/main::@4->main::@3#0] -- register_copy + // [9] phi (byte) main::idx#3 = (byte) main::idx#1 [phi:main::@2/main::@4->main::@3#1] -- register_copy jmp b3 // main::@3 b3: - // [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + // [10] (byte) main::i#1 ← ++ (byte) main::i#8 -- vbuz1=_inc_vbuz1 inc i - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + // [11] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$b cmp i - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [13] return + // [12] return rts + // main::@1 + b1: + // [13] if((byte) main::i#1>=(byte) 5+(byte) 1) goto main::@2 -- vbuz1_ge_vbuc1_then_la1 + lda i + cmp #5+1 + bcs b2 + // [5] phi from main::@1 to main::@4 [phi:main::@1->main::@4] + b4_from_b1: + // [5] phi (byte) main::idx#8 = (byte) main::idx#3 [phi:main::@1->main::@4#0] -- register_copy + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@4#1] -- register_copy + jmp b4 // main::@2 b2: - // [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#1 -- pbuc1_derefidx_vbuz1=vbuz2 lda i ldy idx sta screen,y @@ -305,16 +401,16 @@ main: { // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:2 [ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#8 main::i#7 main::i#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:4 [ main::$1 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 66: zp ZP_BYTE:3 [ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] 23.38: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 22: zp ZP_BYTE:4 [ main::$1 ] +Uplift Scope [main] 364.95: zp ZP_BYTE:3 [ main::i#8 main::i#7 main::i#1 ] 348: zp ZP_BYTE:2 [ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] 22: zp ZP_BYTE:4 [ main::$1 ] Uplift Scope [] -Uplifting [main] best 568 combination reg byte y [ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$1 ] -Uplifting [] best 568 combination +Uplifting [main] best 3148 combination reg byte y [ main::i#8 main::i#7 main::i#1 ] reg byte x [ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] reg byte a [ main::$1 ] +Uplifting [] best 3148 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -343,58 +439,58 @@ bend: // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::idx#3 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 - ldy #0 - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#1] -- vbuxx=vbuc1 + // [5] phi from main to main::@4 [phi:main->main::@4] + b4_from_main: + // [5] phi (byte) main::idx#8 = (byte) 0 [phi:main->main::@4#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::idx#3 = (byte) main::idx#6 [phi:main::@3->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2>=(byte) 5+(byte) 1) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 - cpx #5+1 - bcs b2 + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@4#1] -- vbuyy=vbuc1 + ldy #0 jmp b4 // main::@4 b4: - // [7] (byte~) main::$1 ← (byte) main::i#2 - (byte) 5 -- vbuaa=vbuxx_minus_vbuc1 - txa + // [6] (byte~) main::$1 ← (byte) main::i#7 - (byte) 5 -- vbuaa=vbuyy_minus_vbuc1 + tya sec sbc #5 - // [8] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte~) main::$1 -- pbuc1_derefidx_vbuyy=vbuaa - sta screen,y - // [9] (byte) main::idx#2 ← ++ (byte) main::idx#3 -- vbuyy=_inc_vbuyy - iny - // [10] phi from main::@2 main::@4 to main::@3 [phi:main::@2/main::@4->main::@3] + // [7] *((const byte*) main::screen#0 + (byte) main::idx#8) ← (byte~) main::$1 -- pbuc1_derefidx_vbuxx=vbuaa + sta screen,x + // [8] (byte) main::idx#2 ← ++ (byte) main::idx#8 -- vbuxx=_inc_vbuxx + inx + // [9] phi from main::@2 main::@4 to main::@3 [phi:main::@2/main::@4->main::@3] b3_from_b2: b3_from_b4: - // [10] phi (byte) main::idx#6 = (byte) main::idx#1 [phi:main::@2/main::@4->main::@3#0] -- register_copy + // [9] phi (byte) main::i#8 = (byte) main::i#1 [phi:main::@2/main::@4->main::@3#0] -- register_copy + // [9] phi (byte) main::idx#3 = (byte) main::idx#1 [phi:main::@2/main::@4->main::@3#1] -- register_copy jmp b3 // main::@3 b3: - // [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #$b - bne b1_from_b3 + // [10] (byte) main::i#1 ← ++ (byte) main::i#8 -- vbuyy=_inc_vbuyy + iny + // [11] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + cpy #$b + bne b1 jmp breturn // main::@return breturn: - // [13] return + // [12] return rts + // main::@1 + b1: + // [13] if((byte) main::i#1>=(byte) 5+(byte) 1) goto main::@2 -- vbuyy_ge_vbuc1_then_la1 + cpy #5+1 + bcs b2 + // [5] phi from main::@1 to main::@4 [phi:main::@1->main::@4] + b4_from_b1: + // [5] phi (byte) main::idx#8 = (byte) main::idx#3 [phi:main::@1->main::@4#0] -- register_copy + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@4#1] -- register_copy + jmp b4 // main::@2 b2: - // [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx - txa - sta screen,y - // [15] (byte) main::idx#1 ← ++ (byte) main::idx#3 -- vbuyy=_inc_vbuyy - iny + // [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#1 -- pbuc1_derefidx_vbuxx=vbuyy + tya + sta screen,x + // [15] (byte) main::idx#1 ← ++ (byte) main::idx#3 -- vbuxx=_inc_vbuxx + inx jmp b3_from_b2 } // File Data @@ -402,31 +498,26 @@ main: { ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 Removing instruction jmp b4 Removing instruction jmp b3 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination -Replacing label b1_from_b3 with b1 Replacing label b3_from_b2 with b3 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b3: Removing instruction b3_from_b2: Removing instruction b3_from_b4: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b4: +Removing instruction b4_from_main: Removing instruction breturn: +Removing instruction b4_from_b1: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 -Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -442,23 +533,24 @@ FINAL SYMBOL TABLE (label) main::@4 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 6.875 +(byte) main::i#1 reg byte y 121.2 +(byte) main::i#7 reg byte y 30.75 +(byte) main::i#8 reg byte y 213.0 (byte) main::idx -(byte) main::idx#1 reg byte y 22.0 -(byte) main::idx#2 reg byte y 22.0 -(byte) main::idx#3 reg byte y 11.0 -(byte) main::idx#6 reg byte y 11.0 +(byte) main::idx#1 reg byte x 202.0 +(byte) main::idx#2 reg byte x 22.0 +(byte) main::idx#3 reg byte x 83.0 +(byte) main::idx#8 reg byte x 40.99999999999999 (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] +reg byte x [ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] +reg byte y [ main::i#8 main::i#7 main::i#1 ] reg byte a [ main::$1 ] FINAL ASSEMBLER -Score: 406 +Score: 2506 // File Comments // Tests statement sequence locality of if(cond) { stmt1; } else { stmt2; } @@ -477,55 +569,58 @@ Score: 406 // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::idx#3 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 - ldy #0 - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#1] -- vbuxx=vbuc1 + // [5] phi from main to main::@4 [phi:main->main::@4] + // [5] phi (byte) main::idx#8 = (byte) 0 [phi:main->main::@4#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - // [5] phi (byte) main::idx#3 = (byte) main::idx#6 [phi:main::@3->main::@1#0] -- register_copy - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#1] -- register_copy - // main::@1 - b1: - // if(i>5) - // [6] if((byte) main::i#2>=(byte) 5+(byte) 1) goto main::@2 -- vbuxx_ge_vbuc1_then_la1 - cpx #5+1 - bcs b2 + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@4#1] -- vbuyy=vbuc1 + ldy #0 // main::@4 + b4: // i-5 - // [7] (byte~) main::$1 ← (byte) main::i#2 - (byte) 5 -- vbuaa=vbuxx_minus_vbuc1 - txa + // [6] (byte~) main::$1 ← (byte) main::i#7 - (byte) 5 -- vbuaa=vbuyy_minus_vbuc1 + tya sec sbc #5 // screen[idx++] = i-5 - // [8] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte~) main::$1 -- pbuc1_derefidx_vbuyy=vbuaa - sta screen,y + // [7] *((const byte*) main::screen#0 + (byte) main::idx#8) ← (byte~) main::$1 -- pbuc1_derefidx_vbuxx=vbuaa + sta screen,x // screen[idx++] = i-5; - // [9] (byte) main::idx#2 ← ++ (byte) main::idx#3 -- vbuyy=_inc_vbuyy - iny - // [10] phi from main::@2 main::@4 to main::@3 [phi:main::@2/main::@4->main::@3] - // [10] phi (byte) main::idx#6 = (byte) main::idx#1 [phi:main::@2/main::@4->main::@3#0] -- register_copy + // [8] (byte) main::idx#2 ← ++ (byte) main::idx#8 -- vbuxx=_inc_vbuxx + inx + // [9] phi from main::@2 main::@4 to main::@3 [phi:main::@2/main::@4->main::@3] + // [9] phi (byte) main::i#8 = (byte) main::i#1 [phi:main::@2/main::@4->main::@3#0] -- register_copy + // [9] phi (byte) main::idx#3 = (byte) main::idx#1 [phi:main::@2/main::@4->main::@3#1] -- register_copy // main::@3 b3: // for(byte i: 0..10) - // [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #$b + // [10] (byte) main::i#1 ← ++ (byte) main::i#8 -- vbuyy=_inc_vbuyy + iny + // [11] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + cpy #$b bne b1 // main::@return // } - // [13] return + // [12] return rts + // main::@1 + b1: + // if(i>5) + // [13] if((byte) main::i#1>=(byte) 5+(byte) 1) goto main::@2 -- vbuyy_ge_vbuc1_then_la1 + cpy #5+1 + bcs b2 + // [5] phi from main::@1 to main::@4 [phi:main::@1->main::@4] + // [5] phi (byte) main::idx#8 = (byte) main::idx#3 [phi:main::@1->main::@4#0] -- register_copy + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@4#1] -- register_copy + jmp b4 // main::@2 b2: // screen[idx++] = i - // [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx - txa - sta screen,y + // [14] *((const byte*) main::screen#0 + (byte) main::idx#3) ← (byte) main::i#1 -- pbuc1_derefidx_vbuxx=vbuyy + tya + sta screen,x // screen[idx++] = i; - // [15] (byte) main::idx#1 ← ++ (byte) main::idx#3 -- vbuyy=_inc_vbuyy - iny + // [15] (byte) main::idx#1 ← ++ (byte) main::idx#3 -- vbuxx=_inc_vbuxx + inx jmp b3 } // File Data diff --git a/src/test/ref/sequence-locality-0.sym b/src/test/ref/sequence-locality-0.sym index 68c1bbfaa..7434f4789 100644 --- a/src/test/ref/sequence-locality-0.sym +++ b/src/test/ref/sequence-locality-0.sym @@ -9,16 +9,17 @@ (label) main::@4 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 6.875 +(byte) main::i#1 reg byte y 121.2 +(byte) main::i#7 reg byte y 30.75 +(byte) main::i#8 reg byte y 213.0 (byte) main::idx -(byte) main::idx#1 reg byte y 22.0 -(byte) main::idx#2 reg byte y 22.0 -(byte) main::idx#3 reg byte y 11.0 -(byte) main::idx#6 reg byte y 11.0 +(byte) main::idx#1 reg byte x 202.0 +(byte) main::idx#2 reg byte x 22.0 +(byte) main::idx#3 reg byte x 83.0 +(byte) main::idx#8 reg byte x 40.99999999999999 (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::idx#3 main::idx#6 main::idx#1 main::idx#2 ] +reg byte x [ main::idx#8 main::idx#3 main::idx#1 main::idx#2 ] +reg byte y [ main::i#8 main::i#7 main::i#1 ] reg byte a [ main::$1 ] diff --git a/src/test/ref/sequence-locality-1.asm b/src/test/ref/sequence-locality-1.asm index eba966a73..73f5b6b13 100644 --- a/src/test/ref/sequence-locality-1.asm +++ b/src/test/ref/sequence-locality-1.asm @@ -6,11 +6,7 @@ main: { .label screen = $400 ldx #0 ldy #0 - b1: - cpy #5+1 - bcc b4 - tya - asl + txa b2: sta screen,x inx @@ -18,6 +14,12 @@ main: { cpy #$b bne b1 rts + b1: + cpy #5+1 + bcc b4 + tya + asl + jmp b2 b4: tya jmp b2 diff --git a/src/test/ref/sequence-locality-1.cfg b/src/test/ref/sequence-locality-1.cfg index 78aa952a3..8297f9f47 100644 --- a/src/test/ref/sequence-locality-1.cfg +++ b/src/test/ref/sequence-locality-1.cfg @@ -9,25 +9,25 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::idx#2 ← phi( main/(byte) 0 main::@2/(byte) main::idx#1 ) - [5] (byte) main::i#3 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#3<(byte) 5+(byte) 1) goto main::@4 - to:main::@3 -main::@3: scope:[main] from main::@1 - [7] (byte) main::j#1 ← (byte) main::i#3 + (byte) main::i#3 to:main::@2 -main::@2: scope:[main] from main::@3 main::@4 - [8] (byte) main::j#2 ← phi( main::@4/(byte~) main::j#4 main::@3/(byte) main::j#1 ) - [9] *((const byte*) main::screen#0 + (byte) main::idx#2) ← (byte) main::j#2 - [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 - [11] (byte) main::i#1 ← ++ (byte) main::i#3 - [12] if((byte) main::i#1!=(byte) $b) goto main::@1 +main::@2: scope:[main] from main main::@3 main::@4 + [5] (byte) main::idx#5 ← phi( main::@4/(byte) main::idx#1 main/(byte) 0 main::@3/(byte) main::idx#1 ) + [5] (byte) main::i#5 ← phi( main::@4/(byte) main::i#1 main/(byte) 0 main::@3/(byte) main::i#1 ) + [5] (byte) main::j#2 ← phi( main::@4/(byte~) main::j#4 main/(byte) 0 main::@3/(byte) main::j#1 ) + [6] *((const byte*) main::screen#0 + (byte) main::idx#5) ← (byte) main::j#2 + [7] (byte) main::idx#1 ← ++ (byte) main::idx#5 + [8] (byte) main::i#1 ← ++ (byte) main::i#5 + [9] if((byte) main::i#1!=(byte) $b) goto main::@1 to:main::@return main::@return: scope:[main] from main::@2 - [13] return + [10] return to:@return -main::@4: scope:[main] from main::@1 - [14] (byte~) main::j#4 ← (byte) main::i#3 +main::@1: scope:[main] from main::@2 + [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@4 + to:main::@3 +main::@3: scope:[main] from main::@1 + [12] (byte) main::j#1 ← (byte) main::i#1 + (byte) main::i#1 + to:main::@2 +main::@4: scope:[main] from main::@1 + [13] (byte~) main::j#4 ← (byte) main::i#1 to:main::@2 diff --git a/src/test/ref/sequence-locality-1.log b/src/test/ref/sequence-locality-1.log index 2039b4c40..5ac367504 100644 --- a/src/test/ref/sequence-locality-1.log +++ b/src/test/ref/sequence-locality-1.log @@ -106,6 +106,72 @@ Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [11] main::i#1 ← ++ main::i#3 to ++ Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Rewriting conditional comparison [7] if((byte) main::i#3<=(byte) 5) goto main::@2 +GRAPH (NEW VERSIONS for main::i#3) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::idx#2 ← phi( main/(const byte) main::idx#0 main::@2/(byte) main::idx#1 ) + [0] (byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#3<(byte) 5+(number) 1) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@3 + [2] (byte) main::i#5 ← phi( ) + [2] (byte) main::j#2 ← phi( main::@1/(byte) main::i#3 main::@3/(byte) main::j#1 ) + [3] *((const byte*) main::screen#0 + (byte) main::idx#2) ← (byte) main::j#2 + [4] (byte) main::idx#1 ← ++ (byte) main::idx#2 + [5] (byte) main::i#1 ← ++ (byte) main::i#5 + [6] if((byte) main::i#1!=(number) $b) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@1 + (byte) main::i#6 ← phi( ) + [7] (byte) main::j#1 ← (byte) main::i#6 + (byte) main::i#6 + to:main::@2 +main::@return: scope:[main] from main::@2 + [8] return + to:@return +@1: scope:[] from @begin + [9] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::idx#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::idx#2 ← phi( main/(const byte) main::idx#0 main::@2/(byte) main::idx#1 ) + [0] (byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] if((byte) main::i#3<(byte) 5+(number) 1) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@3 + [2] (byte) main::idx#5 ← phi( ) + [2] (byte) main::i#5 ← phi( main::@1/(byte) main::i#3 main::@3/(byte) main::i#6 ) + [2] (byte) main::j#2 ← phi( main::@1/(byte) main::i#3 main::@3/(byte) main::j#1 ) + [3] *((const byte*) main::screen#0 + (byte) main::idx#5) ← (byte) main::j#2 + [4] (byte) main::idx#1 ← ++ (byte) main::idx#5 + [5] (byte) main::i#1 ← ++ (byte) main::i#5 + [6] if((byte) main::i#1!=(number) $b) goto main::@1 + to:main::@return +main::@3: scope:[main] from main::@1 + (byte) main::i#6 ← phi( main::@1/(byte) main::i#3 ) + [7] (byte) main::j#1 ← (byte) main::i#6 + (byte) main::i#6 + to:main::@2 +main::@return: scope:[main] from main::@2 + [8] return + to:@return +@1: scope:[] from @begin + [9] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) 5+1 in if((byte) main::i#3<(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) 1 in if((byte) main::i#3<(unumber)(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 @@ -117,30 +183,45 @@ Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $b Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte) main::i#1 = (byte) main::i#3 +Alias (byte) main::idx#1 = (byte) main::idx#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#7 (const byte) main::i#0 +Identical Phi Values (byte) main::idx#7 (const byte) main::idx#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +if() condition always true - replacing block destination [12] if((const byte) main::i#0<(byte) 5+(byte) 1) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Alias (byte) main::i#1 = (byte) main::i#6 +Alias (byte) main::idx#1 = (byte) main::idx#6 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::idx#0 Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::i#0 = (byte) 0 Constant inlined main::idx#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@5(between main::@2 and main::@1) -Added new block during phi lifting main::@6(between main::@1 and main::@2) +Added new block during phi lifting main::@5(between main::@1 and main::@2) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 Created 3 initial phi equivalence classes -Coalesced [9] main::j#5 ← main::j#1 -Coalesced [16] main::i#5 ← main::i#1 -Coalesced [17] main::idx#5 ← main::idx#1 -Not coalescing [18] main::j#4 ← main::i#3 +Coalesced [15] main::j#5 ← main::j#1 +Coalesced [16] main::i#9 ← main::i#1 +Coalesced [17] main::idx#9 ← main::idx#1 +Not coalescing [18] main::j#4 ← main::i#1 +Coalesced (already) [19] main::i#8 ← main::i#1 +Coalesced (already) [20] main::idx#8 ← main::idx#1 Coalesced down to 3 phi equivalence classes Culled Empty Block (label) @2 -Culled Empty Block (label) main::@5 -Renumbering block main::@6 to main::@4 +Culled Empty Block (label) main::@1_1 +Renumbering block main::@5 to main::@4 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -158,38 +239,38 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::idx#2 ← phi( main/(byte) 0 main::@2/(byte) main::idx#1 ) - [5] (byte) main::i#3 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) - [6] if((byte) main::i#3<(byte) 5+(byte) 1) goto main::@4 - to:main::@3 -main::@3: scope:[main] from main::@1 - [7] (byte) main::j#1 ← (byte) main::i#3 + (byte) main::i#3 to:main::@2 -main::@2: scope:[main] from main::@3 main::@4 - [8] (byte) main::j#2 ← phi( main::@4/(byte~) main::j#4 main::@3/(byte) main::j#1 ) - [9] *((const byte*) main::screen#0 + (byte) main::idx#2) ← (byte) main::j#2 - [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 - [11] (byte) main::i#1 ← ++ (byte) main::i#3 - [12] if((byte) main::i#1!=(byte) $b) goto main::@1 +main::@2: scope:[main] from main main::@3 main::@4 + [5] (byte) main::idx#5 ← phi( main::@4/(byte) main::idx#1 main/(byte) 0 main::@3/(byte) main::idx#1 ) + [5] (byte) main::i#5 ← phi( main::@4/(byte) main::i#1 main/(byte) 0 main::@3/(byte) main::i#1 ) + [5] (byte) main::j#2 ← phi( main::@4/(byte~) main::j#4 main/(byte) 0 main::@3/(byte) main::j#1 ) + [6] *((const byte*) main::screen#0 + (byte) main::idx#5) ← (byte) main::j#2 + [7] (byte) main::idx#1 ← ++ (byte) main::idx#5 + [8] (byte) main::i#1 ← ++ (byte) main::i#5 + [9] if((byte) main::i#1!=(byte) $b) goto main::@1 to:main::@return main::@return: scope:[main] from main::@2 - [13] return + [10] return to:@return +main::@1: scope:[main] from main::@2 + [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@4 + to:main::@3 +main::@3: scope:[main] from main::@1 + [12] (byte) main::j#1 ← (byte) main::i#1 + (byte) main::i#1 + to:main::@2 main::@4: scope:[main] from main::@1 - [14] (byte~) main::j#4 ← (byte) main::i#3 + [13] (byte~) main::j#4 ← (byte) main::i#1 to:main::@2 VARIABLE REGISTER WEIGHTS (void()) main() (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#3 9.428571428571429 +(byte) main::i#1 17.599999999999998 +(byte) main::i#5 11.0 (byte) main::idx -(byte) main::idx#1 7.333333333333333 -(byte) main::idx#2 5.5 +(byte) main::idx#1 5.5 +(byte) main::idx#5 22.0 (byte) main::j (byte) main::j#1 22.0 (byte) main::j#2 33.0 @@ -197,16 +278,16 @@ VARIABLE REGISTER WEIGHTS (byte*) main::screen Initial phi equivalence classes -[ main::i#3 main::i#1 ] -[ main::idx#2 main::idx#1 ] [ main::j#2 main::j#4 main::j#1 ] +[ main::i#5 main::i#1 ] +[ main::idx#5 main::idx#1 ] Complete equivalence classes -[ main::i#3 main::i#1 ] -[ main::idx#2 main::idx#1 ] [ main::j#2 main::j#4 main::j#1 ] -Allocated zp ZP_BYTE:2 [ main::i#3 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] -Allocated zp ZP_BYTE:4 [ main::j#2 main::j#4 main::j#1 ] +[ main::i#5 main::i#1 ] +[ main::idx#5 main::idx#1 ] +Allocated zp ZP_BYTE:2 [ main::j#2 main::j#4 main::j#1 ] +Allocated zp ZP_BYTE:3 [ main::i#5 main::i#1 ] +Allocated zp ZP_BYTE:4 [ main::idx#5 main::idx#1 ] INITIAL ASM Target platform is c64basic @@ -236,63 +317,63 @@ bend: // main main: { .label screen = $400 - .label idx = 3 - .label i = 2 - .label j = 4 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + .label idx = 4 + .label i = 3 + .label j = 2 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::idx#5 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 sta idx - // [5] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 + // [5] phi (byte) main::i#5 = (byte) 0 [phi:main->main::@2#1] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 + // [5] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@2#2] -- vbuz1=vbuc1 + lda #0 + sta j + jmp b2 + // main::@2 + b2: + // [6] *((const byte*) main::screen#0 + (byte) main::idx#5) ← (byte) main::j#2 -- pbuc1_derefidx_vbuz1=vbuz2 + lda j + ldy idx + sta screen,y + // [7] (byte) main::idx#1 ← ++ (byte) main::idx#5 -- vbuz1=_inc_vbuz1 + inc idx + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuz1=_inc_vbuz1 + inc i + // [9] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$b + cmp i + bne b1 + jmp breturn + // main::@return + breturn: + // [10] return + rts // main::@1 b1: - // [6] if((byte) main::i#3<(byte) 5+(byte) 1) goto main::@4 -- vbuz1_lt_vbuc1_then_la1 + // [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@4 -- vbuz1_lt_vbuc1_then_la1 lda i cmp #5+1 bcc b4 jmp b3 // main::@3 b3: - // [7] (byte) main::j#1 ← (byte) main::i#3 + (byte) main::i#3 -- vbuz1=vbuz2_plus_vbuz2 + // [12] (byte) main::j#1 ← (byte) main::i#1 + (byte) main::i#1 -- vbuz1=vbuz2_plus_vbuz2 lda i asl sta j - // [8] phi from main::@3 main::@4 to main::@2 [phi:main::@3/main::@4->main::@2] + // [5] phi from main::@3 main::@4 to main::@2 [phi:main::@3/main::@4->main::@2] b2_from_b3: b2_from_b4: - // [8] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@3/main::@4->main::@2#0] -- register_copy + // [5] phi (byte) main::idx#5 = (byte) main::idx#1 [phi:main::@3/main::@4->main::@2#0] -- register_copy + // [5] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@4->main::@2#1] -- register_copy + // [5] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@3/main::@4->main::@2#2] -- register_copy jmp b2 - // main::@2 - b2: - // [9] *((const byte*) main::screen#0 + (byte) main::idx#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuz1=vbuz2 - lda j - ldy idx - sta screen,y - // [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuz1=_inc_vbuz1 - inc idx - // [11] (byte) main::i#1 ← ++ (byte) main::i#3 -- vbuz1=_inc_vbuz1 - inc i - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$b - cmp i - bne b1_from_b2 - jmp breturn - // main::@return - breturn: - // [13] return - rts // main::@4 b4: - // [14] (byte~) main::j#4 ← (byte) main::i#3 -- vbuz1=vbuz2 + // [13] (byte~) main::j#4 ← (byte) main::i#1 -- vbuz1=vbuz2 lda i sta j jmp b2_from_b4 @@ -300,20 +381,20 @@ main: { // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [7] (byte) main::j#1 ← (byte) main::i#3 + (byte) main::i#3 [ main::i#3 main::idx#2 main::j#1 ] ( main:2 [ main::i#3 main::idx#2 main::j#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#3 main::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] -Statement [7] (byte) main::j#1 ← (byte) main::i#3 + (byte) main::i#3 [ main::i#3 main::idx#2 main::j#1 ] ( main:2 [ main::i#3 main::idx#2 main::j#1 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#3 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:4 [ main::j#2 main::j#4 main::j#1 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , +Statement [12] (byte) main::j#1 ← (byte) main::i#1 + (byte) main::i#1 [ main::j#1 main::i#1 main::idx#1 ] ( main:2 [ main::j#1 main::i#1 main::idx#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::i#5 main::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::idx#5 main::idx#1 ] +Statement [12] (byte) main::j#1 ← (byte) main::i#1 + (byte) main::i#1 [ main::j#1 main::i#1 main::idx#1 ] ( main:2 [ main::j#1 main::i#1 main::idx#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::j#2 main::j#4 main::j#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#5 main::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:4 [ main::idx#5 main::idx#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 77: zp ZP_BYTE:4 [ main::j#2 main::j#4 main::j#1 ] 25.93: zp ZP_BYTE:2 [ main::i#3 main::i#1 ] 12.83: zp ZP_BYTE:3 [ main::idx#2 main::idx#1 ] +Uplift Scope [main] 77: zp ZP_BYTE:2 [ main::j#2 main::j#4 main::j#1 ] 28.6: zp ZP_BYTE:3 [ main::i#5 main::i#1 ] 27.5: zp ZP_BYTE:4 [ main::idx#5 main::idx#1 ] Uplift Scope [] -Uplifting [main] best 478 combination reg byte a [ main::j#2 main::j#4 main::j#1 ] reg byte y [ main::i#3 main::i#1 ] reg byte x [ main::idx#2 main::idx#1 ] -Uplifting [] best 478 combination +Uplifting [main] best 468 combination reg byte a [ main::j#2 main::j#4 main::j#1 ] reg byte y [ main::i#5 main::i#1 ] reg byte x [ main::idx#5 main::idx#1 ] +Uplifting [] best 468 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -342,53 +423,52 @@ bend: // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::idx#5 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#1] -- vbuyy=vbuc1 + // [5] phi (byte) main::i#5 = (byte) 0 [phi:main->main::@2#1] -- vbuyy=vbuc1 ldy #0 - jmp b1 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 + // [5] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@2#2] -- vbuaa=vbuc1 + lda #0 + jmp b2 + // main::@2 + b2: + // [6] *((const byte*) main::screen#0 + (byte) main::idx#5) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuaa + sta screen,x + // [7] (byte) main::idx#1 ← ++ (byte) main::idx#5 -- vbuxx=_inc_vbuxx + inx + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuyy=_inc_vbuyy + iny + // [9] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + cpy #$b + bne b1 + jmp breturn + // main::@return + breturn: + // [10] return + rts // main::@1 b1: - // [6] if((byte) main::i#3<(byte) 5+(byte) 1) goto main::@4 -- vbuyy_lt_vbuc1_then_la1 + // [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@4 -- vbuyy_lt_vbuc1_then_la1 cpy #5+1 bcc b4 jmp b3 // main::@3 b3: - // [7] (byte) main::j#1 ← (byte) main::i#3 + (byte) main::i#3 -- vbuaa=vbuyy_plus_vbuyy + // [12] (byte) main::j#1 ← (byte) main::i#1 + (byte) main::i#1 -- vbuaa=vbuyy_plus_vbuyy tya asl - // [8] phi from main::@3 main::@4 to main::@2 [phi:main::@3/main::@4->main::@2] + // [5] phi from main::@3 main::@4 to main::@2 [phi:main::@3/main::@4->main::@2] b2_from_b3: b2_from_b4: - // [8] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@3/main::@4->main::@2#0] -- register_copy + // [5] phi (byte) main::idx#5 = (byte) main::idx#1 [phi:main::@3/main::@4->main::@2#0] -- register_copy + // [5] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@4->main::@2#1] -- register_copy + // [5] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@3/main::@4->main::@2#2] -- register_copy jmp b2 - // main::@2 - b2: - // [9] *((const byte*) main::screen#0 + (byte) main::idx#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuaa - sta screen,x - // [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx - inx - // [11] (byte) main::i#1 ← ++ (byte) main::i#3 -- vbuyy=_inc_vbuyy - iny - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 - cpy #$b - bne b1_from_b2 - jmp breturn - // main::@return - breturn: - // [13] return - rts // main::@4 b4: - // [14] (byte~) main::j#4 ← (byte) main::i#3 -- vbuaa=vbuyy + // [13] (byte~) main::j#4 ← (byte) main::i#1 -- vbuaa=vbuyy tya jmp b2_from_b4 } @@ -397,32 +477,31 @@ main: { ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 -Removing instruction jmp b3 Removing instruction jmp b2 Removing instruction jmp breturn +Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination -Replacing label b1_from_b2 with b1 -Replacing label b2_from_b4 with b2 +Replacing instruction lda #0 with TXA Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b2: Removing instruction b2_from_b3: -Removing instruction b2_from_b4: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b3: +Removing instruction b2_from_main: Removing instruction breturn: +Removing instruction b3: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 -Succesful ASM optimization Pass5NextJumpElimination +Skipping double jump to b2 in jmp b2_from_b4 +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label b2_from_b4 to b3 +Succesful ASM optimization Pass5RelabelLongLabels Removing instruction bbegin: +Removing instruction b3: Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE @@ -436,11 +515,11 @@ FINAL SYMBOL TABLE (label) main::@4 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte y 16.5 -(byte) main::i#3 reg byte y 9.428571428571429 +(byte) main::i#1 reg byte y 17.599999999999998 +(byte) main::i#5 reg byte y 11.0 (byte) main::idx -(byte) main::idx#1 reg byte x 7.333333333333333 -(byte) main::idx#2 reg byte x 5.5 +(byte) main::idx#1 reg byte x 5.5 +(byte) main::idx#5 reg byte x 22.0 (byte) main::j (byte) main::j#1 reg byte a 22.0 (byte) main::j#2 reg byte a 33.0 @@ -448,13 +527,13 @@ FINAL SYMBOL TABLE (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte y [ main::i#3 main::i#1 ] -reg byte x [ main::idx#2 main::idx#1 ] reg byte a [ main::j#2 main::j#4 main::j#1 ] +reg byte y [ main::i#5 main::i#1 ] +reg byte x [ main::idx#5 main::idx#1 ] FINAL ASSEMBLER -Score: 316 +Score: 366 // File Comments // Tests statement sequence locality of if(cond) { stmt1; } else { stmt2; } @@ -473,48 +552,50 @@ Score: 316 // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::idx#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::idx#5 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#1] -- vbuyy=vbuc1 + // [5] phi (byte) main::i#5 = (byte) 0 [phi:main->main::@2#1] -- vbuyy=vbuc1 ldy #0 - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [5] phi (byte) main::idx#2 = (byte) main::idx#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - // main::@1 - b1: - // if(i>5) - // [6] if((byte) main::i#3<(byte) 5+(byte) 1) goto main::@4 -- vbuyy_lt_vbuc1_then_la1 - cpy #5+1 - bcc b4 - // main::@3 - // j += i - // [7] (byte) main::j#1 ← (byte) main::i#3 + (byte) main::i#3 -- vbuaa=vbuyy_plus_vbuyy - tya - asl - // [8] phi from main::@3 main::@4 to main::@2 [phi:main::@3/main::@4->main::@2] - // [8] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@3/main::@4->main::@2#0] -- register_copy + // [5] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@2#2] -- vbuaa=vbuc1 + txa // main::@2 b2: // screen[idx++] = j - // [9] *((const byte*) main::screen#0 + (byte) main::idx#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuaa + // [6] *((const byte*) main::screen#0 + (byte) main::idx#5) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuaa sta screen,x // screen[idx++] = j; - // [10] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx + // [7] (byte) main::idx#1 ← ++ (byte) main::idx#5 -- vbuxx=_inc_vbuxx inx // for(byte i: 0..10) - // [11] (byte) main::i#1 ← ++ (byte) main::i#3 -- vbuyy=_inc_vbuyy + // [8] (byte) main::i#1 ← ++ (byte) main::i#5 -- vbuyy=_inc_vbuyy iny - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + // [9] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #$b bne b1 // main::@return // } - // [13] return + // [10] return rts + // main::@1 + b1: + // if(i>5) + // [11] if((byte) main::i#1<(byte) 5+(byte) 1) goto main::@4 -- vbuyy_lt_vbuc1_then_la1 + cpy #5+1 + bcc b4 + // main::@3 + // j += i + // [12] (byte) main::j#1 ← (byte) main::i#1 + (byte) main::i#1 -- vbuaa=vbuyy_plus_vbuyy + tya + asl + // [5] phi from main::@3 main::@4 to main::@2 [phi:main::@3/main::@4->main::@2] + // [5] phi (byte) main::idx#5 = (byte) main::idx#1 [phi:main::@3/main::@4->main::@2#0] -- register_copy + // [5] phi (byte) main::i#5 = (byte) main::i#1 [phi:main::@3/main::@4->main::@2#1] -- register_copy + // [5] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@3/main::@4->main::@2#2] -- register_copy + jmp b2 // main::@4 b4: - // [14] (byte~) main::j#4 ← (byte) main::i#3 -- vbuaa=vbuyy + // [13] (byte~) main::j#4 ← (byte) main::i#1 -- vbuaa=vbuyy tya jmp b2 } diff --git a/src/test/ref/sequence-locality-1.sym b/src/test/ref/sequence-locality-1.sym index 450b6f3bd..ea8911ecd 100644 --- a/src/test/ref/sequence-locality-1.sym +++ b/src/test/ref/sequence-locality-1.sym @@ -8,11 +8,11 @@ (label) main::@4 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte y 16.5 -(byte) main::i#3 reg byte y 9.428571428571429 +(byte) main::i#1 reg byte y 17.599999999999998 +(byte) main::i#5 reg byte y 11.0 (byte) main::idx -(byte) main::idx#1 reg byte x 7.333333333333333 -(byte) main::idx#2 reg byte x 5.5 +(byte) main::idx#1 reg byte x 5.5 +(byte) main::idx#5 reg byte x 22.0 (byte) main::j (byte) main::j#1 reg byte a 22.0 (byte) main::j#2 reg byte a 33.0 @@ -20,6 +20,6 @@ (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte y [ main::i#3 main::i#1 ] -reg byte x [ main::idx#2 main::idx#1 ] reg byte a [ main::j#2 main::j#4 main::j#1 ] +reg byte y [ main::i#5 main::i#1 ] +reg byte x [ main::idx#5 main::idx#1 ] diff --git a/src/test/ref/sieve.asm b/src/test/ref/sieve.asm index d5adb99ae..cfce30041 100644 --- a/src/test/ref/sieve.asm +++ b/src/test/ref/sieve.asm @@ -29,25 +29,25 @@ .label sieve = $1000 // Clock cycles per second (on a C64 PAL) .const CLOCKS_PER_SEC = CLOCKS_PER_FRAME*FRAMES_PER_SEC - .label rem16u = $f - .label print_char_cursor = $11 - .label print_line_cursor = 6 - .label print_char_cursor_62 = 6 - .label print_char_cursor_99 = 6 + .label rem16u = $d + .label print_char_cursor = $f + .label print_line_cursor = 4 + .label print_char_cursor_62 = 4 + .label print_char_cursor_99 = 4 main: { .label toD0181_gfx = $1800 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>toD0181_gfx)/4&$f - .label _10 = 9 - .label _14 = $15 - .label cyclecount = 9 - .label sec100s = $d - .label i = $11 - .label sieve_i = $f - .label j = 2 - .label s = 4 - .label i_3 = $d - .label i_10 = $d - .label _38 = $13 + .label _10 = 7 + .label _14 = $13 + .label cyclecount = 7 + .label sec100s = $b + .label sieve_i = $d + .label j = $11 + .label s = 2 + .label i = $b + .label i_11 = $f + .label _38 = $17 + .label i_16 = $f //Show lower case font lda #toD0181_return sta D018 @@ -97,21 +97,56 @@ main: { lda #>sieve+2 sta sieve_i+1 lda #<2 - sta i + sta i_16 lda #>2 - sta i+1 - b1: - lda i+1 - cmp #>SQRT_COUNT - bcs !b2+ - jmp b2 - !b2: + sta i_16+1 + b2: + ldy #0 + lda (sieve_i),y + cmp #0 + bne b4 + lda i_16 + asl + sta j + lda i_16+1 + rol + sta j+1 + lda j + clc + adc #<sieve + sta s + lda j+1 + adc #>sieve + sta s+1 + b5: + lda j+1 + cmp #>COUNT + bcs !b6+ + jmp b6 + !b6: bne !+ - lda i + lda j + cmp #<COUNT + bcs !b6+ + jmp b6 + !b6: + !: + b4: + inc i_11 + bne !+ + inc i_11+1 + !: + inc sieve_i + bne !+ + inc sieve_i+1 + !: + lda i_11+1 + cmp #>SQRT_COUNT + bcc b2 + bne !+ + lda i_11 cmp #<SQRT_COUNT - bcs !b2+ - jmp b2 - !b2: + bcc b2 !: jsr clock lda cyclecount @@ -150,15 +185,15 @@ main: { jsr print_dword_decimal jsr print_ln lda #<2 - sta i_10 + sta i lda #>2 - sta i_10+1 + sta i+1 b8: - lda i_10 + lda i clc adc #<sieve sta _38 - lda i_10+1 + lda i+1 adc #>sieve sta _38+1 ldy #0 @@ -172,15 +207,15 @@ main: { jsr print_word_decimal jsr print_char b9: - inc i_3 + inc i bne !+ - inc i_3+1 + inc i+1 !: - lda i_3+1 + lda i+1 cmp #>$514 bcc b28 bne !+ - lda i_3 + lda i cmp #<$514 bcc b28 !: @@ -204,60 +239,23 @@ main: { lda print_char_cursor_62+1 sta print_char_cursor+1 jmp b9 - b2: - ldy #0 - lda (sieve_i),y - cmp #0 - bne b4 - lda i - asl - sta j - lda i+1 - rol - sta j+1 - lda j - clc - adc #<sieve - sta s - lda j+1 - adc #>sieve - sta s+1 - b5: - lda j+1 - cmp #>COUNT - bcc b6 - bne !+ - lda j - cmp #<COUNT - bcc b6 - !: - b4: - inc i - bne !+ - inc i+1 - !: - inc sieve_i - bne !+ - inc sieve_i+1 - !: - jmp b1 b6: lda #1 ldy #0 sta (s),y lda s clc - adc i + adc i_16 sta s lda s+1 - adc i+1 + adc i_16+1 sta s+1 lda j clc - adc i + adc i_16 sta j lda j+1 - adc i+1 + adc i_16+1 sta j+1 jmp b5 str: .text "Sieve benchmark - calculating primes@" @@ -267,9 +265,9 @@ main: { str4: .text "...@" } // Print a zero-terminated string -// print_str(byte* zeropage($f) str) +// print_str(byte* zeropage($d) str) print_str: { - .label str = $f + .label str = $d b1: ldy #0 lda (str),y @@ -303,9 +301,9 @@ print_char: { rts } // Print a word as DECIMAL -// print_word_decimal(word zeropage($d) w) +// print_word_decimal(word zeropage($b) w) print_word_decimal: { - .label w = $d + .label w = $b lda w sta utoa.value lda w+1 @@ -323,13 +321,17 @@ print_word_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// utoa(word zeropage(2) value, byte* zeropage(4) buffer) +// utoa(word zeropage($11) value, byte* zeropage(2) buffer) utoa: { .const max_digits = 5 - .label digit_value = $19 - .label digit = 8 - .label value = 2 - .label buffer = 4 + .label digit_value = $d + .label digit = 6 + .label value = $11 + .label buffer = 2 + lda RADIX_DECIMAL_VALUES + sta digit_value + lda RADIX_DECIMAL_VALUES+1 + sta digit_value+1 lda #<decimal_digits sta buffer lda #>decimal_digits @@ -337,16 +339,8 @@ utoa: { ldx #0 txa sta digit - b1: - lda digit - asl - tay - lda RADIX_DECIMAL_VALUES,y - sta digit_value - lda RADIX_DECIMAL_VALUES+1,y - sta digit_value+1 - cpx #0 - bne b3 + b6: + lda digit_value+1 cmp value+1 bne !+ lda digit_value @@ -372,6 +366,17 @@ utoa: { tay sta (buffer),y rts + b1: + lda digit + asl + tay + lda RADIX_DECIMAL_VALUES,y + sta digit_value + lda RADIX_DECIMAL_VALUES+1,y + sta digit_value+1 + cpx #0 + bne b3 + jmp b6 b3: jsr utoa_append inc buffer @@ -389,12 +394,12 @@ utoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// utoa_append(byte* zeropage(4) buffer, word zeropage(2) value, word zeropage($19) sub) +// utoa_append(byte* zeropage(2) buffer, word zeropage($11) value, word zeropage($d) sub) utoa_append: { - .label buffer = 4 - .label value = 2 - .label sub = $19 - .label return = 2 + .label buffer = 2 + .label value = $11 + .label sub = $d + .label return = $11 ldx #0 b1: lda sub+1 @@ -441,9 +446,9 @@ print_ln: { rts } // Print a dword as DECIMAL -// print_dword_decimal(dword zeropage(9) w) +// print_dword_decimal(dword zeropage(7) w) print_dword_decimal: { - .label w = 9 + .label w = 7 jsr ultoa lda #<decimal_digits_long sta print_str.str @@ -457,13 +462,21 @@ print_dword_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// ultoa(dword zeropage(9) value, byte* zeropage($d) buffer) +// ultoa(dword zeropage(7) value, byte* zeropage($b) buffer) ultoa: { .const max_digits = $a - .label digit_value = $15 - .label digit = 8 - .label value = 9 - .label buffer = $d + .label digit_value = $13 + .label digit = 6 + .label value = 7 + .label buffer = $b + lda RADIX_DECIMAL_VALUES_LONG + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1 + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2 + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3 + sta digit_value+3 lda #<decimal_digits_long sta buffer lda #>decimal_digits_long @@ -471,21 +484,7 @@ ultoa: { ldx #0 txa sta digit - b1: - lda digit - asl - asl - tay - lda RADIX_DECIMAL_VALUES_LONG,y - sta digit_value - lda RADIX_DECIMAL_VALUES_LONG+1,y - sta digit_value+1 - lda RADIX_DECIMAL_VALUES_LONG+2,y - sta digit_value+2 - lda RADIX_DECIMAL_VALUES_LONG+3,y - sta digit_value+3 - cpx #0 - bne b3 + b6: lda value+3 cmp digit_value+3 bcc !+ @@ -520,6 +519,22 @@ ultoa: { tay sta (buffer),y rts + b1: + lda digit + asl + asl + tay + lda RADIX_DECIMAL_VALUES_LONG,y + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1,y + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2,y + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3,y + sta digit_value+3 + cpx #0 + bne b3 + jmp b6 b3: jsr ultoa_append inc buffer @@ -537,12 +552,12 @@ ultoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// ultoa_append(byte* zeropage($d) buffer, dword zeropage(9) value, dword zeropage($15) sub) +// ultoa_append(byte* zeropage($b) buffer, dword zeropage(7) value, dword zeropage($13) sub) ultoa_append: { - .label buffer = $d - .label value = 9 - .label sub = $15 - .label return = 9 + .label buffer = $b + .label value = 7 + .label sub = $13 + .label return = 7 ldx #0 b1: lda value+3 @@ -584,13 +599,13 @@ ultoa_append: { } // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division -// div32u16u(dword zeropage(9) dividend) +// div32u16u(dword zeropage(7) dividend) div32u16u: { .label divisor = CLOCKS_PER_SEC/$64 - .label quotient_hi = $19 - .label quotient_lo = $13 - .label return = $15 - .label dividend = 9 + .label quotient_hi = $17 + .label quotient_lo = $11 + .label return = $13 + .label dividend = 7 lda dividend+2 sta divr16u.dividend lda dividend+3 @@ -622,12 +637,12 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($11) dividend, word zeropage($f) rem) +// divr16u(word zeropage($f) dividend, word zeropage($d) rem) divr16u: { - .label rem = $f - .label dividend = $11 - .label quotient = $13 - .label return = $13 + .label rem = $d + .label dividend = $f + .label quotient = $11 + .label return = $11 ldx #0 txa sta quotient @@ -675,7 +690,7 @@ divr16u: { // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { - .label return = 9 + .label return = 7 lda #<$ffffffff sec sbc CIA2_TIMER_AB diff --git a/src/test/ref/sieve.cfg b/src/test/ref/sieve.cfg index ac18bba5a..bb86f49f6 100644 --- a/src/test/ref/sieve.cfg +++ b/src/test/ref/sieve.cfg @@ -44,99 +44,99 @@ main::@19: scope:[main] from main::@18 main::@20: scope:[main] from main::@19 [20] phi() [21] call clock_start - to:main::@1 -main::@1: scope:[main] from main::@20 main::@4 - [22] (byte*) main::sieve_i#2 ← phi( main::@20/(const byte*) sieve#0+(byte) 2 main::@4/(byte*) main::sieve_i#1 ) - [22] (word) main::i#11 ← phi( main::@20/(byte) 2 main::@4/(word) main::i#2 ) - [23] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 - to:main::@3 -main::@3: scope:[main] from main::@1 - [24] phi() - [25] call clock - [26] (dword) clock::return#2 ← (dword) clock::return#0 - to:main::@21 -main::@21: scope:[main] from main::@3 - [27] (dword~) main::$10 ← (dword) clock::return#2 - [28] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 - [29] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 - [30] call div32u16u - [31] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 - to:main::@22 -main::@22: scope:[main] from main::@21 - [32] (dword~) main::$14 ← (dword) div32u16u::return#2 - [33] (word) main::sec100s#0 ← (word)(dword~) main::$14 - [34] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 - [35] call print_str - to:main::@23 -main::@23: scope:[main] from main::@22 - [36] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 - [37] call print_word_decimal - to:main::@24 -main::@24: scope:[main] from main::@23 - [38] phi() - [39] call print_str - to:main::@25 -main::@25: scope:[main] from main::@24 - [40] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 - [41] call print_dword_decimal - to:main::@26 -main::@26: scope:[main] from main::@25 - [42] phi() - [43] call print_ln - to:main::@8 -main::@8: scope:[main] from main::@26 main::@28 - [44] (byte*) print_char_cursor#62 ← phi( main::@28/(byte*~) print_char_cursor#99 main::@26/(byte*) print_line_cursor#1 ) - [44] (word) main::i#10 ← phi( main::@28/(word) main::i#3 main::@26/(byte) 2 ) - [45] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 - [46] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 - to:main::@10 -main::@10: scope:[main] from main::@8 - [47] (word) print_word_decimal::w#2 ← (word) main::i#10 - [48] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 - [49] call print_word_decimal - to:main::@27 -main::@27: scope:[main] from main::@10 - [50] phi() - [51] call print_char - to:main::@9 -main::@9: scope:[main] from main::@27 main::@29 - [52] (byte*) print_char_cursor#63 ← phi( main::@29/(byte*~) print_char_cursor#101 main::@27/(byte*) print_char_cursor#10 ) - [53] (word) main::i#3 ← ++ (word) main::i#10 - [54] if((word) main::i#3<(word) $514) goto main::@28 - to:main::@11 -main::@11: scope:[main] from main::@9 - [55] phi() - [56] call print_str - to:main::@12 -main::@12: scope:[main] from main::@11 main::@12 - [57] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) - to:main::@12 -main::@28: scope:[main] from main::@9 - [58] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 - to:main::@8 -main::@29: scope:[main] from main::@8 - [59] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 - to:main::@9 -main::@2: scope:[main] from main::@1 - [60] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@20 + [22] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@20/(const byte*) sieve#0+(byte) 2 ) + [22] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@20/(byte) 2 ) + [23] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 to:main::@7 main::@7: scope:[main] from main::@2 - [61] (word) main::j#0 ← (word) main::i#11 << (byte) 1 - [62] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + [24] (word) main::j#0 ← (word) main::i#16 << (byte) 1 + [25] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 to:main::@5 main::@5: scope:[main] from main::@6 main::@7 - [63] (byte*) main::s#2 ← phi( main::@7/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) - [63] (word) main::j#2 ← phi( main::@7/(word) main::j#0 main::@6/(word) main::j#1 ) - [64] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + [26] (byte*) main::s#2 ← phi( main::@7/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [26] (word) main::j#2 ← phi( main::@7/(word) main::j#0 main::@6/(word) main::j#1 ) + [27] if((word) main::j#2<(const word) COUNT#0) goto main::@6 to:main::@4 main::@4: scope:[main] from main::@2 main::@5 - [65] (word) main::i#2 ← ++ (word) main::i#11 - [66] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#2 + [28] (word) main::i#11 ← ++ (word) main::i#16 + [29] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 to:main::@1 +main::@1: scope:[main] from main::@4 + [30] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@1 + [31] phi() + [32] call clock + [33] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@21 +main::@21: scope:[main] from main::@3 + [34] (dword~) main::$10 ← (dword) clock::return#2 + [35] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [36] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [37] call div32u16u + [38] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@22 +main::@22: scope:[main] from main::@21 + [39] (dword~) main::$14 ← (dword) div32u16u::return#2 + [40] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [41] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 + [42] call print_str + to:main::@23 +main::@23: scope:[main] from main::@22 + [43] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [44] call print_word_decimal + to:main::@24 +main::@24: scope:[main] from main::@23 + [45] phi() + [46] call print_str + to:main::@25 +main::@25: scope:[main] from main::@24 + [47] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [48] call print_dword_decimal + to:main::@26 +main::@26: scope:[main] from main::@25 + [49] phi() + [50] call print_ln + to:main::@8 +main::@8: scope:[main] from main::@26 main::@28 + [51] (byte*) print_char_cursor#62 ← phi( main::@28/(byte*~) print_char_cursor#99 main::@26/(byte*) print_line_cursor#1 ) + [51] (word) main::i#10 ← phi( main::@28/(word) main::i#3 main::@26/(byte) 2 ) + [52] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [53] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 + to:main::@10 +main::@10: scope:[main] from main::@8 + [54] (word) print_word_decimal::w#2 ← (word) main::i#10 + [55] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 + [56] call print_word_decimal + to:main::@27 +main::@27: scope:[main] from main::@10 + [57] phi() + [58] call print_char + to:main::@9 +main::@9: scope:[main] from main::@27 main::@29 + [59] (byte*) print_char_cursor#63 ← phi( main::@29/(byte*~) print_char_cursor#101 main::@27/(byte*) print_char_cursor#10 ) + [60] (word) main::i#3 ← ++ (word) main::i#10 + [61] if((word) main::i#3<(word) $514) goto main::@28 + to:main::@11 +main::@11: scope:[main] from main::@9 + [62] phi() + [63] call print_str + to:main::@12 +main::@12: scope:[main] from main::@11 main::@12 + [64] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) + to:main::@12 +main::@28: scope:[main] from main::@9 + [65] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 + to:main::@8 +main::@29: scope:[main] from main::@8 + [66] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 + to:main::@9 main::@6: scope:[main] from main::@5 [67] *((byte*) main::s#2) ← (byte) 1 - [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#11 - [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#11 + [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 to:main::@5 print_str: scope:[print_str] from main::@11 main::@14 main::@16 main::@22 main::@24 print_dword_decimal::@1 print_word_decimal::@1 [70] (byte*) print_char_cursor#66 ← phi( main::@11/(byte*) print_char_cursor#63 main::@14/(byte*) 1024 main::@16/(byte*~) print_char_cursor#89 main::@22/(byte*~) print_char_cursor#90 main::@24/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) @@ -177,243 +177,261 @@ print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal to:@return utoa: scope:[utoa] from print_word_decimal [86] phi() - to:utoa::@1 -utoa::@1: scope:[utoa] from utoa utoa::@2 - [87] (byte*) utoa::buffer#11 ← phi( utoa::@2/(byte*) utoa::buffer#12 utoa/(const byte[6]) decimal_digits#0 ) - [87] (byte) utoa::started#2 ← phi( utoa::@2/(byte) utoa::started#3 utoa/(byte) 0 ) - [87] (word) utoa::value#2 ← phi( utoa::@2/(word) utoa::value#4 utoa/(word) utoa::value#1 ) - [87] (byte) utoa::digit#2 ← phi( utoa::@2/(byte) utoa::digit#1 utoa/(byte) 0 ) - [88] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 - [89] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) - [90] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 + to:utoa::@18_1 +utoa::@18_1: scope:[utoa] from utoa + [87] (word) utoa::digit_value#4 ← *((const word[]) RADIX_DECIMAL_VALUES#0) to:utoa::@6 -utoa::@6: scope:[utoa] from utoa::@1 - [91] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@3 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@18_1 + [88] (word) utoa::digit_value#3 ← phi( utoa::@1/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 ) + [88] (byte*) utoa::buffer#21 ← phi( utoa::@1/(byte*) utoa::buffer#11 utoa::@18_1/(const byte[6]) decimal_digits#0 ) + [88] (byte) utoa::started#4 ← phi( utoa::@1/(byte) utoa::started#2 utoa::@18_1/(byte) 0 ) + [88] (word) utoa::value#15 ← phi( utoa::@1/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#1 ) + [88] (byte) utoa::digit#8 ← phi( utoa::@1/(byte) utoa::digit#1 utoa::@18_1/(byte) 0 ) + [89] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@3 to:utoa::@2 utoa::@2: scope:[utoa] from utoa::@5 utoa::@6 - [92] (byte*) utoa::buffer#12 ← phi( utoa::@6/(byte*) utoa::buffer#11 utoa::@5/(byte*) utoa::buffer#3 ) - [92] (byte) utoa::started#3 ← phi( utoa::@6/(byte) utoa::started#2 utoa::@5/(byte) 1 ) - [92] (word) utoa::value#4 ← phi( utoa::@6/(word) utoa::value#2 utoa::@5/(word) utoa::value#0 ) - [93] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 - [94] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 + [90] (byte) utoa::digit#6 ← phi( utoa::@5/(byte) utoa::digit#7 utoa::@6/(byte) utoa::digit#8 ) + [90] (byte*) utoa::buffer#11 ← phi( utoa::@6/(byte*) utoa::buffer#21 utoa::@5/(byte*) utoa::buffer#3 ) + [90] (byte) utoa::started#2 ← phi( utoa::@6/(byte) utoa::started#4 utoa::@5/(byte) 1 ) + [90] (word) utoa::value#2 ← phi( utoa::@6/(word) utoa::value#15 utoa::@5/(word) utoa::value#0 ) + [91] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [92] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 to:utoa::@4 utoa::@4: scope:[utoa] from utoa::@2 - [95] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 - [96] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) - [97] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 - [98] *((byte*) utoa::buffer#4) ← (byte) 0 + [93] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 + [94] *((byte*) utoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [95] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 + [96] *((byte*) utoa::buffer#4) ← (byte) 0 to:utoa::@return utoa::@return: scope:[utoa] from utoa::@4 - [99] return + [97] return to:@return +utoa::@1: scope:[utoa] from utoa::@2 + [98] (byte~) utoa::$11 ← (byte) utoa::digit#1 << (byte) 1 + [99] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) + [100] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 + to:utoa::@6 utoa::@3: scope:[utoa] from utoa::@1 utoa::@6 - [100] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 - [101] (word) utoa_append::value#0 ← (word) utoa::value#2 - [102] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 - [103] call utoa_append - [104] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + [101] (word) utoa::digit_value#2 ← phi( utoa::@1/(word) utoa::digit_value#0 utoa::@6/(word) utoa::digit_value#3 ) + [101] (byte*) utoa::buffer#22 ← phi( utoa::@1/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#21 ) + [101] (word) utoa::value#16 ← phi( utoa::@1/(word) utoa::value#2 utoa::@6/(word) utoa::value#15 ) + [101] (byte) utoa::digit#7 ← phi( utoa::@1/(byte) utoa::digit#1 utoa::@6/(byte) utoa::digit#8 ) + [102] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [103] (word) utoa_append::value#0 ← (word) utoa::value#16 + [104] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [105] call utoa_append + [106] (word) utoa_append::return#0 ← (word) utoa_append::value#2 to:utoa::@5 utoa::@5: scope:[utoa] from utoa::@3 - [105] (word) utoa::value#0 ← (word) utoa_append::return#0 - [106] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 + [107] (word) utoa::value#0 ← (word) utoa_append::return#0 + [108] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#22 to:utoa::@2 utoa_append: scope:[utoa_append] from utoa::@3 - [107] phi() + [109] phi() to:utoa_append::@1 utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 - [108] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 ) - [108] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) - [109] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + [110] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [110] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [111] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 to:utoa_append::@3 utoa_append::@3: scope:[utoa_append] from utoa_append::@1 - [110] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + [112] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) to:utoa_append::@return utoa_append::@return: scope:[utoa_append] from utoa_append::@3 - [111] return + [113] return to:@return utoa_append::@2: scope:[utoa_append] from utoa_append::@1 - [112] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 - [113] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + [114] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [115] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 to:utoa_append::@1 print_ln: scope:[print_ln] from main::@15 main::@18 main::@26 - [114] (byte*) print_line_cursor#21 ← phi( main::@15/(byte*) 1024 main::@18/(byte*) print_line_cursor#1 main::@26/(byte*) print_line_cursor#1 ) + [116] (byte*) print_line_cursor#21 ← phi( main::@15/(byte*) 1024 main::@18/(byte*) print_line_cursor#1 main::@26/(byte*) print_line_cursor#1 ) to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 - [115] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) - [116] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 - [117] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + [117] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [118] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [119] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 to:print_ln::@return print_ln::@return: scope:[print_ln] from print_ln::@1 - [118] return + [120] return to:@return print_dword_decimal: scope:[print_dword_decimal] from main::@25 - [119] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 - [120] call ultoa + [121] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [122] call ultoa to:print_dword_decimal::@1 print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal - [121] phi() - [122] call print_str + [123] phi() + [124] call print_str to:print_dword_decimal::@return print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@1 - [123] return + [125] return to:@return ultoa: scope:[ultoa] from print_dword_decimal - [124] phi() - to:ultoa::@1 -ultoa::@1: scope:[ultoa] from ultoa ultoa::@2 - [125] (byte*) ultoa::buffer#11 ← phi( ultoa::@2/(byte*) ultoa::buffer#12 ultoa/(const byte[$b]) decimal_digits_long#0 ) - [125] (byte) ultoa::started#2 ← phi( ultoa::@2/(byte) ultoa::started#3 ultoa/(byte) 0 ) - [125] (dword) ultoa::value#2 ← phi( ultoa::@2/(dword) ultoa::value#4 ultoa/(dword) ultoa::value#1 ) - [125] (byte) ultoa::digit#2 ← phi( ultoa::@2/(byte) ultoa::digit#1 ultoa/(byte) 0 ) - [126] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 << (byte) 2 - [127] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) - [128] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 + [126] phi() + to:ultoa::@18_1 +ultoa::@18_1: scope:[ultoa] from ultoa + [127] (dword) ultoa::digit_value#4 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0) to:ultoa::@6 -ultoa::@6: scope:[ultoa] from ultoa::@1 - [129] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@3 +ultoa::@6: scope:[ultoa] from ultoa::@1 ultoa::@18_1 + [128] (dword) ultoa::digit_value#3 ← phi( ultoa::@1/(dword) ultoa::digit_value#0 ultoa::@18_1/(dword) ultoa::digit_value#4 ) + [128] (byte*) ultoa::buffer#21 ← phi( ultoa::@1/(byte*) ultoa::buffer#11 ultoa::@18_1/(const byte[$b]) decimal_digits_long#0 ) + [128] (byte) ultoa::started#4 ← phi( ultoa::@1/(byte) ultoa::started#2 ultoa::@18_1/(byte) 0 ) + [128] (dword) ultoa::value#15 ← phi( ultoa::@1/(dword) ultoa::value#2 ultoa::@18_1/(dword) ultoa::value#1 ) + [128] (byte) ultoa::digit#8 ← phi( ultoa::@1/(byte) ultoa::digit#1 ultoa::@18_1/(byte) 0 ) + [129] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@3 to:ultoa::@2 ultoa::@2: scope:[ultoa] from ultoa::@5 ultoa::@6 - [130] (byte*) ultoa::buffer#12 ← phi( ultoa::@6/(byte*) ultoa::buffer#11 ultoa::@5/(byte*) ultoa::buffer#3 ) - [130] (byte) ultoa::started#3 ← phi( ultoa::@6/(byte) ultoa::started#2 ultoa::@5/(byte) 1 ) - [130] (dword) ultoa::value#4 ← phi( ultoa::@6/(dword) ultoa::value#2 ultoa::@5/(dword) ultoa::value#0 ) - [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [130] (byte) ultoa::digit#6 ← phi( ultoa::@5/(byte) ultoa::digit#7 ultoa::@6/(byte) ultoa::digit#8 ) + [130] (byte*) ultoa::buffer#11 ← phi( ultoa::@6/(byte*) ultoa::buffer#21 ultoa::@5/(byte*) ultoa::buffer#3 ) + [130] (byte) ultoa::started#2 ← phi( ultoa::@6/(byte) ultoa::started#4 ultoa::@5/(byte) 1 ) + [130] (dword) ultoa::value#2 ← phi( ultoa::@6/(dword) ultoa::value#15 ultoa::@5/(dword) ultoa::value#0 ) + [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 [132] if((byte) ultoa::digit#1<(const byte) ultoa::max_digits#1-(byte) 1) goto ultoa::@1 to:ultoa::@4 ultoa::@4: scope:[ultoa] from ultoa::@2 - [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 - [134] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) - [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#2 + [134] *((byte*) ultoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 [136] *((byte*) ultoa::buffer#4) ← (byte) 0 to:ultoa::@return ultoa::@return: scope:[ultoa] from ultoa::@4 [137] return to:@return +ultoa::@1: scope:[ultoa] from ultoa::@2 + [138] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 << (byte) 2 + [139] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) + [140] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 + to:ultoa::@6 ultoa::@3: scope:[ultoa] from ultoa::@1 ultoa::@6 - [138] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 - [139] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 - [140] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 - [141] call ultoa_append - [142] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + [141] (dword) ultoa::digit_value#2 ← phi( ultoa::@1/(dword) ultoa::digit_value#0 ultoa::@6/(dword) ultoa::digit_value#3 ) + [141] (byte*) ultoa::buffer#22 ← phi( ultoa::@1/(byte*) ultoa::buffer#11 ultoa::@6/(byte*) ultoa::buffer#21 ) + [141] (dword) ultoa::value#16 ← phi( ultoa::@1/(dword) ultoa::value#2 ultoa::@6/(dword) ultoa::value#15 ) + [141] (byte) ultoa::digit#7 ← phi( ultoa::@1/(byte) ultoa::digit#1 ultoa::@6/(byte) ultoa::digit#8 ) + [142] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 + [143] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + [144] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 + [145] call ultoa_append + [146] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 to:ultoa::@5 ultoa::@5: scope:[ultoa] from ultoa::@3 - [143] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 - [144] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + [147] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [148] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#22 to:ultoa::@2 ultoa_append: scope:[ultoa_append] from ultoa::@3 - [145] phi() + [149] phi() to:ultoa_append::@1 ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 - [146] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(byte) 0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) - [146] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) - [147] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + [150] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(byte) 0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [150] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [151] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 to:ultoa_append::@3 ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 - [148] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + [152] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) to:ultoa_append::@return ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 - [149] return + [153] return to:@return ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 - [150] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 - [151] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + [154] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [155] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 to:ultoa_append::@1 div32u16u: scope:[div32u16u] from main::@21 - [152] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 - [153] call divr16u - [154] (word) divr16u::return#2 ← (word) divr16u::return#0 + [156] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [157] call divr16u + [158] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [155] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [156] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 - [157] (word) divr16u::rem#4 ← (word) rem16u#1 - [158] call divr16u - [159] (word) divr16u::return#3 ← (word) divr16u::return#0 + [159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [160] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [161] (word) divr16u::rem#4 ← (word) rem16u#1 + [162] call divr16u + [163] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [160] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [161] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [162] return + [166] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [163] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@1/(word) divr16u::dividend#2 ) - [163] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [167] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@1/(word) divr16u::dividend#2 ) + [167] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [164] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [164] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [164] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [164] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [165] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [166] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [167] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [168] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [168] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [168] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [168] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [168] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [169] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [170] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [171] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [172] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [173] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 + [174] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [177] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [174] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [175] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 + [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [176] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [176] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [177] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [178] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [180] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [180] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [179] (word) rem16u#1 ← (word) divr16u::rem#11 + [183] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [180] return + [184] return to:@return clock: scope:[clock] from main::@3 - [181] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + [185] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock - [182] return + [186] return to:@return clock_start: scope:[clock_start] from main::@20 - [183] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [184] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [185] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [186] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [188] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [189] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [190] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [191] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start - [188] return + [192] return to:@return memset: scope:[memset] from main::@19 print_cls - [189] (byte) memset::c#3 ← phi( main::@19/(byte) 0 print_cls/(byte) ' ' ) - [189] (void*) memset::str#3 ← phi( main::@19/(void*)(const byte*) sieve#0 print_cls/(void*)(byte*) 1024 ) - [189] (word) memset::num#2 ← phi( main::@19/(const word) COUNT#0 print_cls/(word) $3e8 ) - [190] if((word) memset::num#2<=(byte) 0) goto memset::@return + [193] (byte) memset::c#3 ← phi( main::@19/(byte) 0 print_cls/(byte) ' ' ) + [193] (void*) memset::str#3 ← phi( main::@19/(void*)(const byte*) sieve#0 print_cls/(void*)(byte*) 1024 ) + [193] (word) memset::num#2 ← phi( main::@19/(const word) COUNT#0 print_cls/(word) $3e8 ) + [194] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 memset::@1: scope:[memset] from memset - [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 - [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + [195] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [196] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 to:memset::@2 memset::@2: scope:[memset] from memset::@1 memset::@2 - [193] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) - [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 + [197] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [198] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [199] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [200] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return memset::@return: scope:[memset] from memset memset::@2 - [197] return + [201] return to:@return print_cls: scope:[print_cls] from main::@13 - [198] phi() - [199] call memset + [202] phi() + [203] call memset to:print_cls::@return print_cls::@return: scope:[print_cls] from print_cls - [200] return + [204] return to:@return diff --git a/src/test/ref/sieve.log b/src/test/ref/sieve.log index 187f82751..2f504ce8a 100644 --- a/src/test/ref/sieve.log +++ b/src/test/ref/sieve.log @@ -2919,6 +2919,971 @@ Removing unused block ultoa::@4 Removing unused block ultoa::@12 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks +GRAPH (NEW VERSIONS for main::i#11) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(void*) memset::str#1 print_cls/(void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + [10] (dword) CLOCKS_PER_SEC#0 ← (const word) CLOCKS_PER_FRAME#0 * (const byte) FRAMES_PER_SEC#0 + to:@12 +clock: scope:[clock] from main::@3 + [11] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [12] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [13] (byte~) clock_start::$0 ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [14] (byte~) clock_start::$1 ← (byte~) clock_start::$0 + [15] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$1 + [16] (byte~) clock_start::$2 ← (byte~) clock_start::$0 + [17] (byte~) clock_start::$3 ← (byte~) clock_start::$2 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [18] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [19] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [20] (byte~) clock_start::$4 ← (const byte) CIA_TIMER_CONTROL_START#0 + [21] (byte~) clock_start::$5 ← (byte~) clock_start::$4 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [22] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [23] (byte~) clock_start::$6 ← (byte~) clock_start::$4 + [24] (byte~) clock_start::$7 ← (byte~) clock_start::$6 + [25] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$7 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [26] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [27] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [27] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [27] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [28] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [28] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [28] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [28] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [29] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [30] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [31] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [32] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [33] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [34] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [35] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [36] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [37] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [38] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [38] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [39] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [40] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [41] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [42] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [43] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [44] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [45] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [46] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [47] call divr16u + [48] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [49] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [50] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [51] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [52] (word) divr16u::rem#4 ← (word) rem16u#1 + [53] call divr16u + [54] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [55] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [56] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [57] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [58] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + [59] (byte) utoa::max_digits#8 ← phi( utoa::@1/(const byte) utoa::max_digits#1 ) + [59] (word*) utoa::digit_values#7 ← phi( utoa::@1/(const word*) utoa::digit_values#1 ) + to:utoa::@18 +utoa::@18: scope:[utoa] from utoa::@19 utoa::@8 + [60] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@8/(const byte*) utoa::buffer#5 ) + [60] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 utoa::@8/(const byte) utoa::started#0 ) + [60] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 utoa::@8/(word) utoa::value#1 ) + [60] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 utoa::@8/(const byte) utoa::digit#0 ) + [61] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [62] (word) utoa::digit_value#0 ← *((word*) utoa::digit_values#7 + (byte~) utoa::$11) + [63] (bool~) utoa::$5 ← (word) utoa::value#2 >= (word) utoa::digit_value#0 + [64] (bool~) utoa::$12 ← (number) 0 != (byte) utoa::started#2 + [65] if((bool~) utoa::$12) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [66] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#11 utoa::@22/(byte*) utoa::buffer#3 ) + [66] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#2 utoa::@22/(const byte) utoa::started#1 ) + [66] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#2 utoa::@22/(word) utoa::value#0 ) + [67] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 + [68] (byte~) utoa::$9 ← (byte) utoa::max_digits#8 - (byte) 1 + [69] if((byte) utoa::digit#1<(byte~) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@23 + [70] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 + [71] (word) utoa_append::value#0 ← (word) utoa::value#2 + [72] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 + [73] call utoa_append + [74] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + [75] (word) utoa::value#0 ← (word) utoa_append::return#0 + [76] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [77] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [78] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [79] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [80] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [81] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [81] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [82] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [83] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [84] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [85] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [86] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [87] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + [88] (byte) ultoa::max_digits#8 ← phi( ultoa::@1/(const byte) ultoa::max_digits#1 ) + [88] (dword*) ultoa::digit_values#7 ← phi( ultoa::@1/(const dword*) ultoa::digit_values#1 ) + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [89] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [89] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [89] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [89] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [90] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [91] (dword) ultoa::digit_value#0 ← *((dword*) ultoa::digit_values#7 + (byte~) ultoa::$11) + [92] (bool~) ultoa::$5 ← (dword) ultoa::value#2 >= (dword) ultoa::digit_value#0 + [93] (bool~) ultoa::$12 ← (number) 0 != (byte) ultoa::started#2 + [94] if((bool~) ultoa::$12) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [95] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [95] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [95] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [96] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [97] (byte~) ultoa::$9 ← (byte) ultoa::max_digits#8 - (byte) 1 + [98] if((byte) ultoa::digit#1<(byte~) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [99] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [100] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [101] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [102] call ultoa_append + [103] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [104] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [105] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [106] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [107] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [108] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [109] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [110] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [110] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [111] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [112] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [113] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [114] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [115] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [116] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [116] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [117] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [117] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [118] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [119] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [120] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [121] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [122] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [123] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [124] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [125] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [126] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [127] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [128] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [128] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [129] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [130] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [131] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [132] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [133] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [134] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [135] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [136] return + to:@return +print_char: scope:[print_char] from main::@41 + [137] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [138] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [139] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [140] (void*) memset::str#0 ← (void*)(const byte*) print_line_cursor#0 + [141] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [142] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [143] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 + [144] (word~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff + [145] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [146] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [147] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 + [148] (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + [149] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [150] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [151] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [152] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [153] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [154] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [155] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [156] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [157] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [158] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [159] (void*) memset::str#1 ← (void*)(const byte*) sieve#0 + [160] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [161] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + [162] (byte*) main::sieve_i#0 ← (const byte*) sieve#0 + (const word) main::i#0 + to:main::@1 +main::@1: scope:[main] from main::@33 main::@4 + [163] (byte*) main::sieve_i#2 ← phi( main::@33/(byte*) main::sieve_i#0 main::@4/(byte*) main::sieve_i#1 ) + [163] (word) main::i#11 ← phi( main::@33/(const word) main::i#0 main::@4/(word) main::i#2 ) + [164] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + [165] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [166] call clock + [167] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [168] (dword~) main::$10 ← (dword) clock::return#2 + [169] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [170] (dword~) main::$12 ← (dword) CLOCKS_PER_SEC#0 / (byte) $64 + [171] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [172] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [173] call div32u16u + [174] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [175] (dword~) main::$14 ← (dword) div32u16u::return#2 + [176] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [177] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [178] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [179] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [180] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [181] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [182] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [183] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + (word) main::i#15 ← phi( ) + [184] (word) main::i#2 ← ++ (word) main::i#15 + [185] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#2 + to:main::@1 +main::@13: scope:[main] from main::@2 + (word) main::i#16 ← phi( ) + [186] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [187] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [188] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [188] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [189] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + (word) main::i#17 ← phi( ) + [190] *((byte*) main::s#2) ← (byte) 1 + [191] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#17 + [192] (word) main::j#1 ← (word) main::j#2 + (word) main::i#17 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [193] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [193] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [194] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [195] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [196] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [197] (word) main::i#3 ← ++ (word) main::i#10 + [198] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [199] (word) print_word_decimal::w#2 ← (word) main::i#10 + [200] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [201] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [202] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [203] (byte*~) main::$35 ← (const byte*) SCREEN#0 + (word) $3e7 + [204] *((byte*~) main::$35) ← ++ *((byte*~) main::$35) + to:main::@19 +@51: scope:[] from @50 + [205] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 + [206] if((bool~) utoa::$5) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [207] if((bool~) ultoa::$5) goto ultoa::@20 + to:ultoa::@19 + +GRAPH (NEW VERSIONS for main::sieve_i#2) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(void*) memset::str#1 print_cls/(void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + [10] (dword) CLOCKS_PER_SEC#0 ← (const word) CLOCKS_PER_FRAME#0 * (const byte) FRAMES_PER_SEC#0 + to:@12 +clock: scope:[clock] from main::@3 + [11] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [12] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [13] (byte~) clock_start::$0 ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [14] (byte~) clock_start::$1 ← (byte~) clock_start::$0 + [15] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$1 + [16] (byte~) clock_start::$2 ← (byte~) clock_start::$0 + [17] (byte~) clock_start::$3 ← (byte~) clock_start::$2 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [18] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [19] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [20] (byte~) clock_start::$4 ← (const byte) CIA_TIMER_CONTROL_START#0 + [21] (byte~) clock_start::$5 ← (byte~) clock_start::$4 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [22] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [23] (byte~) clock_start::$6 ← (byte~) clock_start::$4 + [24] (byte~) clock_start::$7 ← (byte~) clock_start::$6 + [25] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$7 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [26] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [27] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [27] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [27] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [28] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [28] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [28] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [28] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [29] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [30] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [31] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [32] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [33] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [34] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [35] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [36] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [37] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [38] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [38] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [39] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [40] if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [41] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [42] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [43] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [44] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [45] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [46] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [47] call divr16u + [48] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [49] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [50] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [51] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [52] (word) divr16u::rem#4 ← (word) rem16u#1 + [53] call divr16u + [54] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [55] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [56] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [57] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [58] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + [59] (byte) utoa::max_digits#8 ← phi( utoa::@1/(const byte) utoa::max_digits#1 ) + [59] (word*) utoa::digit_values#7 ← phi( utoa::@1/(const word*) utoa::digit_values#1 ) + to:utoa::@18 +utoa::@18: scope:[utoa] from utoa::@19 utoa::@8 + [60] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@8/(const byte*) utoa::buffer#5 ) + [60] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 utoa::@8/(const byte) utoa::started#0 ) + [60] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 utoa::@8/(word) utoa::value#1 ) + [60] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 utoa::@8/(const byte) utoa::digit#0 ) + [61] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [62] (word) utoa::digit_value#0 ← *((word*) utoa::digit_values#7 + (byte~) utoa::$11) + [63] (bool~) utoa::$5 ← (word) utoa::value#2 >= (word) utoa::digit_value#0 + [64] (bool~) utoa::$12 ← (number) 0 != (byte) utoa::started#2 + [65] if((bool~) utoa::$12) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [66] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#11 utoa::@22/(byte*) utoa::buffer#3 ) + [66] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#2 utoa::@22/(const byte) utoa::started#1 ) + [66] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#2 utoa::@22/(word) utoa::value#0 ) + [67] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 + [68] (byte~) utoa::$9 ← (byte) utoa::max_digits#8 - (byte) 1 + [69] if((byte) utoa::digit#1<(byte~) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@23 + [70] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 + [71] (word) utoa_append::value#0 ← (word) utoa::value#2 + [72] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 + [73] call utoa_append + [74] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + [75] (word) utoa::value#0 ← (word) utoa_append::return#0 + [76] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [77] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [78] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [79] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [80] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [81] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [81] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [82] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [83] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [84] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [85] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [86] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [87] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + [88] (byte) ultoa::max_digits#8 ← phi( ultoa::@1/(const byte) ultoa::max_digits#1 ) + [88] (dword*) ultoa::digit_values#7 ← phi( ultoa::@1/(const dword*) ultoa::digit_values#1 ) + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [89] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [89] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [89] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [89] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [90] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [91] (dword) ultoa::digit_value#0 ← *((dword*) ultoa::digit_values#7 + (byte~) ultoa::$11) + [92] (bool~) ultoa::$5 ← (dword) ultoa::value#2 >= (dword) ultoa::digit_value#0 + [93] (bool~) ultoa::$12 ← (number) 0 != (byte) ultoa::started#2 + [94] if((bool~) ultoa::$12) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [95] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [95] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [95] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [96] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [97] (byte~) ultoa::$9 ← (byte) ultoa::max_digits#8 - (byte) 1 + [98] if((byte) ultoa::digit#1<(byte~) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [99] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [100] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [101] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [102] call ultoa_append + [103] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [104] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [105] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [106] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [107] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [108] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [109] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [110] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [110] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [111] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [112] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [113] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [114] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [115] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [116] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [116] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [117] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [117] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [118] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [119] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [120] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [121] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [122] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [123] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [124] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [125] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [126] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [127] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [128] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [128] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [129] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [130] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [131] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [132] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [133] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [134] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [135] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [136] return + to:@return +print_char: scope:[print_char] from main::@41 + [137] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [138] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [139] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [140] (void*) memset::str#0 ← (void*)(const byte*) print_line_cursor#0 + [141] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [142] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [143] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 + [144] (word~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff + [145] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [146] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [147] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 + [148] (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + [149] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [150] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [151] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [152] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [153] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [154] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [155] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [156] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [157] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [158] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [159] (void*) memset::str#1 ← (void*)(const byte*) sieve#0 + [160] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [161] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + [162] (byte*) main::sieve_i#0 ← (const byte*) sieve#0 + (const word) main::i#0 + to:main::@1 +main::@1: scope:[main] from main::@33 main::@4 + [163] (byte*) main::sieve_i#2 ← phi( main::@33/(byte*) main::sieve_i#0 main::@4/(byte*) main::sieve_i#1 ) + [163] (word) main::i#11 ← phi( main::@33/(const word) main::i#0 main::@4/(word) main::i#2 ) + [164] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte*) main::sieve_i#8 ← phi( ) + (word) main::i#18 ← phi( main::@1/(word) main::i#11 ) + [165] if((byte) 0!=*((byte*) main::sieve_i#8)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [166] call clock + [167] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [168] (dword~) main::$10 ← (dword) clock::return#2 + [169] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [170] (dword~) main::$12 ← (dword) CLOCKS_PER_SEC#0 / (byte) $64 + [171] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [172] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [173] call div32u16u + [174] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [175] (dword~) main::$14 ← (dword) div32u16u::return#2 + [176] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [177] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [178] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [179] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [180] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [181] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [182] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [183] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + (byte*) main::sieve_i#9 ← phi( ) + (word) main::i#15 ← phi( main::@2/(word) main::i#18 main::@5/(word) main::i#19 ) + [184] (word) main::i#2 ← ++ (word) main::i#15 + [185] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#9 + to:main::@1 +main::@13: scope:[main] from main::@2 + (word) main::i#16 ← phi( main::@2/(word) main::i#18 ) + [186] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [187] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [188] (word) main::i#19 ← phi( main::@13/(word) main::i#16 main::@6/(word) main::i#17 ) + [188] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [188] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [189] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + (word) main::i#17 ← phi( main::@5/(word) main::i#19 ) + [190] *((byte*) main::s#2) ← (byte) 1 + [191] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#17 + [192] (word) main::j#1 ← (word) main::j#2 + (word) main::i#17 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [193] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [193] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [194] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [195] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [196] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [197] (word) main::i#3 ← ++ (word) main::i#10 + [198] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [199] (word) print_word_decimal::w#2 ← (word) main::i#10 + [200] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [201] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [202] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [203] (byte*~) main::$35 ← (const byte*) SCREEN#0 + (word) $3e7 + [204] *((byte*~) main::$35) ← ++ *((byte*~) main::$35) + to:main::@19 +@51: scope:[] from @50 + [205] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 + [206] if((bool~) utoa::$5) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [207] if((bool~) ultoa::$5) goto ultoa::@20 + to:ultoa::@19 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 Adding number conversion cast (unumber) 0 in (bool~) utoa::$12 ← (number) 0 != (byte) utoa::started#2 Adding number conversion cast (unumber) 0 in (bool~) ultoa::$12 ← (number) 0 != (byte) ultoa::started#2 @@ -2933,22 +3898,35 @@ Finalized unsigned number type (byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) clock_start::$1 = (byte~) clock_start::$0 (byte~) clock_start::$2 Alias (byte~) clock_start::$6 = (byte~) clock_start::$4 (byte~) clock_start::$7 +Alias (word) main::i#11 = (word) main::i#2 +Alias (byte*) main::sieve_i#1 = (byte*) main::sieve_i#2 +Alias (word) main::i#16 = (word) main::i#18 +Alias (byte*) main::sieve_i#11 = (byte*) main::sieve_i#8 +Alias (word) main::i#17 = (word) main::i#19 +Alias (byte*) main::sieve_i#10 = (byte*) main::sieve_i#12 +Alias (byte*) main::sieve_i#0 = (byte*) main::sieve_i#13 Successful SSA optimization Pass2AliasElimination Identical Phi Values (word*) utoa::digit_values#7 (const word*) utoa::digit_values#1 Identical Phi Values (byte) utoa::max_digits#8 (const byte) utoa::max_digits#1 Identical Phi Values (dword*) ultoa::digit_values#7 (const dword*) ultoa::digit_values#1 Identical Phi Values (byte) ultoa::max_digits#8 (const byte) ultoa::max_digits#1 +Identical Phi Values (word) main::i#17 (word) main::i#16 +Identical Phi Values (byte*) main::sieve_i#10 (byte*) main::sieve_i#11 +Identical Phi Values (word) main::i#20 (const word) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values (word) main::i#15 (word) main::i#16 +Identical Phi Values (byte*) main::sieve_i#9 (byte*) main::sieve_i#11 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) utoa::$12 [65] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 Simple Condition (bool~) ultoa::$12 [94] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 -Simple Condition (bool~) utoa::$5 [206] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@20 -Simple Condition (bool~) ultoa::$5 [207] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 +Simple Condition (bool~) utoa::$5 [211] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@20 +Simple Condition (bool~) ultoa::$5 [212] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [10] (dword) CLOCKS_PER_SEC#0 ← (const word) CLOCKS_PER_FRAME#0 * (const byte) FRAMES_PER_SEC#0 Constant right-side identified [68] (byte~) utoa::$9 ← (const byte) utoa::max_digits#1 - (byte) 1 Constant right-side identified [97] (byte~) ultoa::$9 ← (const byte) ultoa::max_digits#1 - (byte) 1 Constant right-side identified [162] (byte*) main::sieve_i#0 ← (const byte*) sieve#0 + (const word) main::i#0 -Constant right-side identified [203] (byte*~) main::$35 ← (const byte*) SCREEN#0 + (word) $3e7 +Constant right-side identified [208] (byte*~) main::$35 ← (const byte*) SCREEN#0 + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const dword) CLOCKS_PER_SEC#0 = CLOCKS_PER_FRAME#0*FRAMES_PER_SEC#0 Constant (const byte) clock_start::$1 = CIA_TIMER_CONTROL_CONTINUOUS#0 @@ -2962,6 +3940,8 @@ Constant (const void*) memset::str#1 = (void*)sieve#0 Constant (const byte*) main::sieve_i#0 = sieve#0+main::i#0 Constant (const byte*) main::$35 = SCREEN#0+$3e7 Successful SSA optimization Pass2ConstantIdentification +if() condition always true - replacing block destination [214] if((const word) main::i#0<(const byte) SQRT_COUNT#0) goto main::@2 +Successful SSA optimization Pass2ConstantIfs Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 in [17] (byte~) clock_start::$3 ← (const byte) clock_start::$1 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) utoa::max_digits#2 @@ -2984,19 +3964,4804 @@ Eliminating unused constant (const dword[]) RADIX_BINARY_VALUES_LONG#0 Eliminating unused constant (const dword[]) RADIX_OCTAL_VALUES_LONG#0 Eliminating unused constant (const dword[]) RADIX_HEXADECIMAL_VALUES_LONG#0 Successful SSA optimization PassNEliminateUnusedVars +GRAPH (NEW VERSIONS for utoa::digit#2) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18 +utoa::@18: scope:[utoa] from utoa::@19 utoa::@8 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@8/(const byte*) utoa::buffer#5 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 utoa::@8/(const byte) utoa::started#0 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 utoa::@8/(word) utoa::value#1 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 utoa::@8/(const byte) utoa::digit#0 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#11 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#2 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#2 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@23 + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 + [60] (word) utoa_append::value#0 ← (word) utoa::value#2 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 + [185] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [186] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 + +GRAPH (NEW VERSIONS for utoa::value#2) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18 +utoa::@18: scope:[utoa] from utoa::@19 utoa::@8 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@8/(const byte*) utoa::buffer#5 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 utoa::@8/(const byte) utoa::started#0 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 utoa::@8/(word) utoa::value#1 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 utoa::@8/(const byte) utoa::digit#0 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#11 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#2 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@23 + (word) utoa::value#16 ← phi( ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 + (word) utoa::value#15 ← phi( ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#0) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [186] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 + +GRAPH (NEW VERSIONS for utoa::started#2) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18 +utoa::@18: scope:[utoa] from utoa::@19 utoa::@8 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@8/(const byte*) utoa::buffer#5 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 utoa::@8/(const byte) utoa::started#0 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 utoa::@8/(word) utoa::value#1 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 utoa::@8/(const byte) utoa::digit#0 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#11 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@23 + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 + (byte) utoa::started#4 ← phi( ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#0) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [186] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 + +GRAPH (NEW VERSIONS for utoa::buffer#11) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18 +utoa::@18: scope:[utoa] from utoa::@19 utoa::@8 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@8/(const byte*) utoa::buffer#5 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 utoa::@8/(const byte) utoa::started#0 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 utoa::@8/(word) utoa::value#1 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 utoa::@8/(const byte) utoa::digit#0 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#21 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@23 + (byte*) utoa::buffer#22 ← phi( ) + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte*) utoa::buffer#23 ← phi( ) + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#23 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 + (byte*) utoa::buffer#21 ← phi( ) + (byte) utoa::started#4 ← phi( utoa::@18/(byte) utoa::started#2 ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#0) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [186] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 + +GRAPH (NEW VERSIONS for utoa::digit_value#0) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18 +utoa::@18: scope:[utoa] from utoa::@19 utoa::@8 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@8/(const byte*) utoa::buffer#5 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 utoa::@8/(const byte) utoa::started#0 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 utoa::@8/(word) utoa::value#1 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 utoa::@8/(const byte) utoa::digit#0 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#21 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@23 + (word) utoa::digit_value#2 ← phi( ) + (byte*) utoa::buffer#22 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@23/(byte*) utoa::buffer#21 ) + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte*) utoa::buffer#23 ← phi( utoa::@20/(byte*) utoa::buffer#22 ) + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#23 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 + (word) utoa::digit_value#3 ← phi( ) + (byte*) utoa::buffer#21 ← phi( utoa::@18/(byte*) utoa::buffer#11 ) + (byte) utoa::started#4 ← phi( utoa::@18/(byte) utoa::started#2 ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [186] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +GRAPH (NEW VERSIONS for ultoa::digit#2) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18_1 +utoa::@18: scope:[utoa] from utoa::@19 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#21 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@18_1 utoa::@23 + (word) utoa::digit_value#2 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 utoa::@23/(word) utoa::digit_value#3 ) + (byte*) utoa::buffer#22 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 utoa::@23/(byte*) utoa::buffer#21 ) + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte*) utoa::buffer#23 ← phi( utoa::@20/(byte*) utoa::buffer#22 ) + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#23 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte) ultoa::digit#6 ← phi( ) + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#2 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 utoa::@18_1 + (word) utoa::digit_value#3 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 ) + (byte*) utoa::buffer#21 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 ) + (byte) utoa::started#4 ← phi( utoa::@18/(byte) utoa::started#2 utoa::@18_1/(byte) utoa::started#5 ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + [186] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 +utoa::@18_1: scope:[utoa] from utoa::@8 + (byte*) utoa::buffer#24 ← phi( utoa::@8/(const byte*) utoa::buffer#5 ) + (byte) utoa::started#5 ← phi( utoa::@8/(const byte) utoa::started#0 ) + (word) utoa::value#17 ← phi( utoa::@8/(word) utoa::value#1 ) + (byte) utoa::digit#10 ← phi( utoa::@8/(const byte) utoa::digit#0 ) + (byte~) utoa::$13 ← (byte) utoa::digit#10 * (const byte) SIZEOF_WORD + (word) utoa::digit_value#4 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$13) + if((byte) 0!=(byte) utoa::started#5) goto utoa::@20 + to:utoa::@23 + +GRAPH (NEW VERSIONS for ultoa::value#2) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18_1 +utoa::@18: scope:[utoa] from utoa::@19 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#21 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@18_1 utoa::@23 + (word) utoa::digit_value#2 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 utoa::@23/(word) utoa::digit_value#3 ) + (byte*) utoa::buffer#22 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 utoa::@23/(byte*) utoa::buffer#21 ) + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte*) utoa::buffer#23 ← phi( utoa::@20/(byte*) utoa::buffer#22 ) + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#23 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte) ultoa::digit#6 ← phi( ultoa::@22/(byte) ultoa::digit#7 ultoa::@23/(byte) ultoa::digit#8 ) + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#2 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#15 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + (dword) ultoa::value#16 ← phi( ) + (byte) ultoa::digit#9 ← phi( ultoa::@18/(byte) ultoa::digit#2 ultoa::@23/(byte) ultoa::digit#8 ) + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + (byte) ultoa::digit#7 ← phi( ultoa::@20/(byte) ultoa::digit#9 ) + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 utoa::@18_1 + (word) utoa::digit_value#3 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 ) + (byte*) utoa::buffer#21 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 ) + (byte) utoa::started#4 ← phi( utoa::@18/(byte) utoa::started#2 utoa::@18_1/(byte) utoa::started#5 ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + (dword) ultoa::value#15 ← phi( ) + (byte) ultoa::digit#8 ← phi( ultoa::@18/(byte) ultoa::digit#2 ) + [186] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 +utoa::@18_1: scope:[utoa] from utoa::@8 + (byte*) utoa::buffer#24 ← phi( utoa::@8/(const byte*) utoa::buffer#5 ) + (byte) utoa::started#5 ← phi( utoa::@8/(const byte) utoa::started#0 ) + (word) utoa::value#17 ← phi( utoa::@8/(word) utoa::value#1 ) + (byte) utoa::digit#10 ← phi( utoa::@8/(const byte) utoa::digit#0 ) + (byte~) utoa::$13 ← (byte) utoa::digit#10 * (const byte) SIZEOF_WORD + (word) utoa::digit_value#4 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$13) + if((byte) 0!=(byte) utoa::started#5) goto utoa::@20 + to:utoa::@23 + +GRAPH (NEW VERSIONS for ultoa::started#2) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18_1 +utoa::@18: scope:[utoa] from utoa::@19 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#21 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@18_1 utoa::@23 + (word) utoa::digit_value#2 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 utoa::@23/(word) utoa::digit_value#3 ) + (byte*) utoa::buffer#22 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 utoa::@23/(byte*) utoa::buffer#21 ) + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte*) utoa::buffer#23 ← phi( utoa::@20/(byte*) utoa::buffer#22 ) + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#23 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte) ultoa::digit#6 ← phi( ultoa::@22/(byte) ultoa::digit#7 ultoa::@23/(byte) ultoa::digit#8 ) + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#11 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#4 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#15 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + (dword) ultoa::value#16 ← phi( ultoa::@18/(dword) ultoa::value#2 ultoa::@23/(dword) ultoa::value#15 ) + (byte) ultoa::digit#9 ← phi( ultoa::@18/(byte) ultoa::digit#2 ultoa::@23/(byte) ultoa::digit#8 ) + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + (byte) ultoa::digit#7 ← phi( ultoa::@20/(byte) ultoa::digit#9 ) + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 utoa::@18_1 + (word) utoa::digit_value#3 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 ) + (byte*) utoa::buffer#21 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 ) + (byte) utoa::started#4 ← phi( utoa::@18/(byte) utoa::started#2 utoa::@18_1/(byte) utoa::started#5 ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + (byte) ultoa::started#4 ← phi( ) + (dword) ultoa::value#15 ← phi( ultoa::@18/(dword) ultoa::value#2 ) + (byte) ultoa::digit#8 ← phi( ultoa::@18/(byte) ultoa::digit#2 ) + [186] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 +utoa::@18_1: scope:[utoa] from utoa::@8 + (byte*) utoa::buffer#24 ← phi( utoa::@8/(const byte*) utoa::buffer#5 ) + (byte) utoa::started#5 ← phi( utoa::@8/(const byte) utoa::started#0 ) + (word) utoa::value#17 ← phi( utoa::@8/(word) utoa::value#1 ) + (byte) utoa::digit#10 ← phi( utoa::@8/(const byte) utoa::digit#0 ) + (byte~) utoa::$13 ← (byte) utoa::digit#10 * (const byte) SIZEOF_WORD + (word) utoa::digit_value#4 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$13) + if((byte) 0!=(byte) utoa::started#5) goto utoa::@20 + to:utoa::@23 + +GRAPH (NEW VERSIONS for ultoa::buffer#11) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18_1 +utoa::@18: scope:[utoa] from utoa::@19 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#21 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@18_1 utoa::@23 + (word) utoa::digit_value#2 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 utoa::@23/(word) utoa::digit_value#3 ) + (byte*) utoa::buffer#22 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 utoa::@23/(byte*) utoa::buffer#21 ) + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte*) utoa::buffer#23 ← phi( utoa::@20/(byte*) utoa::buffer#22 ) + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#23 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte) ultoa::digit#6 ← phi( ultoa::@22/(byte) ultoa::digit#7 ultoa::@23/(byte) ultoa::digit#8 ) + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#21 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#4 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#15 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + (byte*) ultoa::buffer#22 ← phi( ) + (dword) ultoa::value#16 ← phi( ultoa::@18/(dword) ultoa::value#2 ultoa::@23/(dword) ultoa::value#15 ) + (byte) ultoa::digit#9 ← phi( ultoa::@18/(byte) ultoa::digit#2 ultoa::@23/(byte) ultoa::digit#8 ) + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + (byte*) ultoa::buffer#23 ← phi( ) + (byte) ultoa::digit#7 ← phi( ultoa::@20/(byte) ultoa::digit#9 ) + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#23 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 utoa::@18_1 + (word) utoa::digit_value#3 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 ) + (byte*) utoa::buffer#21 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 ) + (byte) utoa::started#4 ← phi( utoa::@18/(byte) utoa::started#2 utoa::@18_1/(byte) utoa::started#5 ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + (byte*) ultoa::buffer#21 ← phi( ) + (byte) ultoa::started#4 ← phi( ultoa::@18/(byte) ultoa::started#2 ) + (dword) ultoa::value#15 ← phi( ultoa::@18/(dword) ultoa::value#2 ) + (byte) ultoa::digit#8 ← phi( ultoa::@18/(byte) ultoa::digit#2 ) + [186] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#0) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 +utoa::@18_1: scope:[utoa] from utoa::@8 + (byte*) utoa::buffer#24 ← phi( utoa::@8/(const byte*) utoa::buffer#5 ) + (byte) utoa::started#5 ← phi( utoa::@8/(const byte) utoa::started#0 ) + (word) utoa::value#17 ← phi( utoa::@8/(word) utoa::value#1 ) + (byte) utoa::digit#10 ← phi( utoa::@8/(const byte) utoa::digit#0 ) + (byte~) utoa::$13 ← (byte) utoa::digit#10 * (const byte) SIZEOF_WORD + (word) utoa::digit_value#4 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$13) + if((byte) 0!=(byte) utoa::started#5) goto utoa::@20 + to:utoa::@23 + +GRAPH (NEW VERSIONS for ultoa::digit_value#0) +@begin: scope:[] from + to:@4 +memset: scope:[memset] from main::@31 print_cls + [0] (byte) memset::c#3 ← phi( main::@31/(const byte) memset::c#1 print_cls/(const byte) memset::c#0 ) + [0] (void*) memset::str#3 ← phi( main::@31/(const void*) memset::str#1 print_cls/(const void*) memset::str#0 ) + [0] (word) memset::num#2 ← phi( main::@31/(const word) memset::num#1 print_cls/(const word) memset::num#0 ) + [1] if((word) memset::num#2<=(byte) 0) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + to:memset::@return +memset::@2: scope:[memset] from memset + [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 + [3] (byte*) memset::end#0 ← (byte*~) memset::$2 + (word) memset::num#2 + [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + [5] (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + [6] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [7] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [8] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + [9] return + to:@return +@4: scope:[] from @begin + to:@8 +@8: scope:[] from @4 + to:@12 +clock: scope:[clock] from main::@3 + [10] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [11] return + to:@return +clock_start: scope:[clock_start] from main::@32 + [12] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$1 + [13] (byte~) clock_start::$3 ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [14] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + [15] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [17] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + [18] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) clock_start::$6 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [19] return + to:@return +@12: scope:[] from @8 + to:@22 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + [20] (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + [20] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + [20] (word) divr16u::rem#10 ← phi( div32u16u/(const word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [21] (byte) divr16u::i#2 ← phi( divr16u/(const byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + [21] (word) divr16u::quotient#3 ← phi( divr16u/(const word) divr16u::quotient#0 divr16u::@3/(word) divr16u::return#0 ) + [21] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [21] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [22] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [23] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [24] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [25] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [26] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [27] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [28] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [29] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [30] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [31] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [31] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [32] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [33] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [34] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [35] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (word) divr16u::divisor#6 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [36] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [37] return + to:@return +div32u16u: scope:[div32u16u] from main::@34 + [38] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [39] (word) divr16u::divisor#0 ← (word) div32u16u::divisor#0 + [40] call divr16u + [41] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + [42] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [43] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [44] (word) divr16u::divisor#1 ← (word) div32u16u::divisor#0 + [45] (word) divr16u::rem#4 ← (word) rem16u#1 + [46] call divr16u + [47] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + [48] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [49] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + [50] return + to:@return +@22: scope:[] from @12 + to:@24 +utoa: scope:[utoa] from print_word_decimal + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa + to:utoa::@8 +utoa::@return: scope:[utoa] from utoa::@21 + [51] return + to:@return +utoa::@8: scope:[utoa] from utoa::@1 + to:utoa::@18_1 +utoa::@18: scope:[utoa] from utoa::@19 + [52] (byte*) utoa::buffer#11 ← phi( utoa::@19/(byte*) utoa::buffer#12 ) + [52] (byte) utoa::started#2 ← phi( utoa::@19/(byte) utoa::started#3 ) + [52] (word) utoa::value#2 ← phi( utoa::@19/(word) utoa::value#4 ) + [52] (byte) utoa::digit#2 ← phi( utoa::@19/(byte) utoa::digit#1 ) + [53] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD + [54] (word) utoa::digit_value#0 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$11) + [55] if((byte) 0!=(byte) utoa::started#2) goto utoa::@20 + to:utoa::@23 +utoa::@19: scope:[utoa] from utoa::@22 utoa::@23 + [56] (byte) utoa::digit#6 ← phi( utoa::@22/(byte) utoa::digit#7 utoa::@23/(byte) utoa::digit#8 ) + [56] (byte*) utoa::buffer#12 ← phi( utoa::@23/(byte*) utoa::buffer#21 utoa::@22/(byte*) utoa::buffer#3 ) + [56] (byte) utoa::started#3 ← phi( utoa::@23/(byte) utoa::started#4 utoa::@22/(const byte) utoa::started#1 ) + [56] (word) utoa::value#4 ← phi( utoa::@23/(word) utoa::value#15 utoa::@22/(word) utoa::value#0 ) + [57] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [58] if((byte) utoa::digit#1<(const byte) utoa::$9) goto utoa::@18 + to:utoa::@21 +utoa::@20: scope:[utoa] from utoa::@18 utoa::@18_1 utoa::@23 + (word) utoa::digit_value#2 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 utoa::@23/(word) utoa::digit_value#3 ) + (byte*) utoa::buffer#22 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 utoa::@23/(byte*) utoa::buffer#21 ) + (word) utoa::value#16 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 utoa::@23/(word) utoa::value#15 ) + (byte) utoa::digit#9 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 utoa::@23/(byte) utoa::digit#8 ) + [59] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [60] (word) utoa_append::value#0 ← (word) utoa::value#16 + [61] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [62] call utoa_append + [63] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + to:utoa::@22 +utoa::@22: scope:[utoa] from utoa::@20 + (byte*) utoa::buffer#23 ← phi( utoa::@20/(byte*) utoa::buffer#22 ) + (byte) utoa::digit#7 ← phi( utoa::@20/(byte) utoa::digit#9 ) + [64] (word) utoa::value#0 ← (word) utoa_append::return#0 + [65] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#23 + to:utoa::@19 +utoa::@21: scope:[utoa] from utoa::@19 + [66] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 + [67] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [68] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 + [69] *((byte*) utoa::buffer#4) ← (byte) 0 + to:utoa::@return +utoa_append: scope:[utoa_append] from utoa::@20 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [70] (byte) utoa_append::digit#2 ← phi( utoa_append/(const byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [70] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [72] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [73] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [74] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [75] return + to:@return +@24: scope:[] from @22 + to:@26 +ultoa: scope:[ultoa] from print_dword_decimal + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa + to:ultoa::@8 +ultoa::@return: scope:[ultoa] from ultoa::@21 + [76] return + to:@return +ultoa::@8: scope:[ultoa] from ultoa::@1 + to:ultoa::@18 +ultoa::@18: scope:[ultoa] from ultoa::@19 ultoa::@8 + [77] (byte*) ultoa::buffer#11 ← phi( ultoa::@19/(byte*) ultoa::buffer#12 ultoa::@8/(const byte*) ultoa::buffer#5 ) + [77] (byte) ultoa::started#2 ← phi( ultoa::@19/(byte) ultoa::started#3 ultoa::@8/(const byte) ultoa::started#0 ) + [77] (dword) ultoa::value#2 ← phi( ultoa::@19/(dword) ultoa::value#4 ultoa::@8/(dword) ultoa::value#1 ) + [77] (byte) ultoa::digit#2 ← phi( ultoa::@19/(byte) ultoa::digit#1 ultoa::@8/(const byte) ultoa::digit#0 ) + [78] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD + [79] (dword) ultoa::digit_value#0 ← *((const dword*) ultoa::digit_values#1 + (byte~) ultoa::$11) + [80] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@20 + to:ultoa::@23 +ultoa::@19: scope:[ultoa] from ultoa::@22 ultoa::@23 + [81] (byte) ultoa::digit#6 ← phi( ultoa::@22/(byte) ultoa::digit#7 ultoa::@23/(byte) ultoa::digit#8 ) + [81] (byte*) ultoa::buffer#12 ← phi( ultoa::@23/(byte*) ultoa::buffer#21 ultoa::@22/(byte*) ultoa::buffer#3 ) + [81] (byte) ultoa::started#3 ← phi( ultoa::@23/(byte) ultoa::started#4 ultoa::@22/(const byte) ultoa::started#1 ) + [81] (dword) ultoa::value#4 ← phi( ultoa::@23/(dword) ultoa::value#15 ultoa::@22/(dword) ultoa::value#0 ) + [82] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 + [83] if((byte) ultoa::digit#1<(const byte) ultoa::$9) goto ultoa::@18 + to:ultoa::@21 +ultoa::@20: scope:[ultoa] from ultoa::@18 ultoa::@23 + (dword) ultoa::digit_value#2 ← phi( ) + (byte*) ultoa::buffer#22 ← phi( ultoa::@18/(byte*) ultoa::buffer#11 ultoa::@23/(byte*) ultoa::buffer#21 ) + (dword) ultoa::value#16 ← phi( ultoa::@18/(dword) ultoa::value#2 ultoa::@23/(dword) ultoa::value#15 ) + (byte) ultoa::digit#9 ← phi( ultoa::@18/(byte) ultoa::digit#2 ultoa::@23/(byte) ultoa::digit#8 ) + [84] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 + [85] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + [86] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 + [87] call ultoa_append + [88] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + to:ultoa::@22 +ultoa::@22: scope:[ultoa] from ultoa::@20 + (byte*) ultoa::buffer#23 ← phi( ultoa::@20/(byte*) ultoa::buffer#22 ) + (byte) ultoa::digit#7 ← phi( ultoa::@20/(byte) ultoa::digit#9 ) + [89] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [90] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#23 + to:ultoa::@19 +ultoa::@21: scope:[ultoa] from ultoa::@19 + [91] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 + [92] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [93] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [94] *((byte*) ultoa::buffer#4) ← (byte) 0 + to:ultoa::@return +ultoa_append: scope:[ultoa_append] from ultoa::@20 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + [95] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(const byte) ultoa_append::digit#0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [95] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [96] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [97] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [98] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [99] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [100] return + to:@return +@26: scope:[] from @24 + to:@36 +print_str: scope:[print_str] from main::@18 main::@26 main::@28 main::@35 main::@37 print_dword_decimal::@1 print_word_decimal::@1 + [101] (byte*) print_char_cursor#66 ← phi( main::@18/(byte*) print_char_cursor#63 main::@26/(const byte*) print_line_cursor#0 main::@28/(byte*) print_line_cursor#1 main::@35/(byte*) print_line_cursor#1 main::@37/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) + [101] (byte*) print_str::str#10 ← phi( main::@18/(const byte*) print_str::str#7 main::@26/(const byte*) print_str::str#3 main::@28/(const byte*) print_str::str#4 main::@35/(const byte*) print_str::str#5 main::@37/(const byte*) print_str::str#6 print_dword_decimal::@1/(const byte*) print_str::str#2 print_word_decimal::@1/(const byte*) print_str::str#1 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [102] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [102] (byte*) print_str::str#8 ← phi( print_str/(byte*) print_str::str#10 print_str::@2/(byte*) print_str::str#0 ) + [103] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + [104] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) + [105] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [106] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + [107] return + to:@return +print_ln: scope:[print_ln] from main::@27 main::@30 main::@39 + [108] (byte*) print_line_cursor#21 ← phi( main::@27/(const byte*) print_line_cursor#0 main::@30/(byte*) print_line_cursor#1 main::@39/(byte*) print_line_cursor#1 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [109] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [110] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [111] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + [112] return + to:@return +@36: scope:[] from @26 + to:@40 +print_word_decimal: scope:[print_word_decimal] from main::@17 main::@29 main::@36 + [113] (byte*) print_char_cursor#58 ← phi( main::@17/(byte*) print_char_cursor#62 main::@29/(byte*) print_char_cursor#2 main::@36/(byte*) print_char_cursor#2 ) + [113] (word) print_word_decimal::w#3 ← phi( main::@17/(word) print_word_decimal::w#2 main::@29/(const word) print_word_decimal::w#0 main::@36/(word) print_word_decimal::w#1 ) + [114] (word) utoa::value#1 ← (word) print_word_decimal::w#3 + [115] call utoa + to:print_word_decimal::@1 +print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal + [116] call print_str + to:print_word_decimal::@2 +print_word_decimal::@2: scope:[print_word_decimal] from print_word_decimal::@1 + to:print_word_decimal::@return +print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@2 + [117] return + to:@return +@40: scope:[] from @36 + to:@50 +print_dword_decimal: scope:[print_dword_decimal] from main::@38 + [118] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [119] call ultoa + to:print_dword_decimal::@1 +print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal + [120] call print_str + to:print_dword_decimal::@2 +print_dword_decimal::@2: scope:[print_dword_decimal] from print_dword_decimal::@1 + to:print_dword_decimal::@return +print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@2 + [121] return + to:@return +print_char: scope:[print_char] from main::@41 + [122] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 + [123] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [124] return + to:@return +print_cls: scope:[print_cls] from main::@25 + [125] call memset + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [126] return + to:@return +@50: scope:[] from @40 + to:@51 +main: scope:[main] from @51 + to:main::toD0181 +main::toD0181: scope:[main] from main + [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff + [128] (word~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 + [129] (byte~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 + [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 + [131] (byte~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 + [132] (byte~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f + [133] (byte) main::toD0181_return#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + to:main::@25 +main::@25: scope:[main] from main::toD0181_@return + [134] *((const byte*) D018#0) ← (byte) main::toD0181_return#0 + [135] call print_cls + to:main::@26 +main::@26: scope:[main] from main::@25 + [136] call print_str + to:main::@27 +main::@27: scope:[main] from main::@26 + [137] call print_ln + to:main::@28 +main::@28: scope:[main] from main::@27 + [138] call print_str + to:main::@29 +main::@29: scope:[main] from main::@28 + [139] call print_word_decimal + to:main::@30 +main::@30: scope:[main] from main::@29 + [140] call print_ln + to:main::@31 +main::@31: scope:[main] from main::@30 + [141] call memset + to:main::@32 +main::@32: scope:[main] from main::@31 + [142] call clock_start + to:main::@33 +main::@33: scope:[main] from main::@32 + to:main::@1_1 +main::@1: scope:[main] from main::@4 + [143] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 main::@1_1 + [144] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@1_1/(const byte*) main::sieve_i#0 ) + [144] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@1_1/(const word) main::i#0 ) + [145] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 + to:main::@13 +main::@3: scope:[main] from main::@1 + [146] call clock + [147] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@34 +main::@34: scope:[main] from main::@3 + [148] (dword~) main::$10 ← (dword) clock::return#2 + [149] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 + [151] (word) div32u16u::divisor#0 ← (word)(dword~) main::$12 + [152] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [153] call div32u16u + [154] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@35 +main::@35: scope:[main] from main::@34 + [155] (dword~) main::$14 ← (dword) div32u16u::return#2 + [156] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [157] call print_str + to:main::@36 +main::@36: scope:[main] from main::@35 + [158] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [159] call print_word_decimal + to:main::@37 +main::@37: scope:[main] from main::@36 + [160] call print_str + to:main::@38 +main::@38: scope:[main] from main::@37 + [161] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [162] call print_dword_decimal + to:main::@39 +main::@39: scope:[main] from main::@38 + [163] call print_ln + to:main::@40 +main::@40: scope:[main] from main::@39 + to:main::@15 +main::@4: scope:[main] from main::@2 main::@5 + [164] (word) main::i#11 ← ++ (word) main::i#16 + [165] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 + to:main::@1 +main::@13: scope:[main] from main::@2 + [166] (word) main::j#0 ← (word) main::i#16 * (byte) 2 + [167] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@6 + [168] (byte*) main::s#2 ← phi( main::@13/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [168] (word) main::j#2 ← phi( main::@13/(word) main::j#0 main::@6/(word) main::j#1 ) + [169] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + to:main::@4 +main::@6: scope:[main] from main::@5 + [170] *((byte*) main::s#2) ← (byte) 1 + [171] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [172] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 + to:main::@5 +main::@15: scope:[main] from main::@16 main::@40 + [173] (byte*) print_char_cursor#62 ← phi( main::@16/(byte*) print_char_cursor#63 main::@40/(byte*) print_line_cursor#1 ) + [173] (word) main::i#10 ← phi( main::@16/(word) main::i#3 main::@40/(const word) main::i#1 ) + [174] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [175] if((byte) 0!=*((byte*~) main::$38)) goto main::@16 + to:main::@17 +main::@16: scope:[main] from main::@15 main::@42 + [176] (byte*) print_char_cursor#63 ← phi( main::@15/(byte*) print_char_cursor#62 main::@42/(byte*) print_char_cursor#10 ) + [177] (word) main::i#3 ← ++ (word) main::i#10 + [178] if((word) main::i#3<(word) $514) goto main::@15 + to:main::@18 +main::@17: scope:[main] from main::@15 + [179] (word) print_word_decimal::w#2 ← (word) main::i#10 + [180] call print_word_decimal + to:main::@41 +main::@41: scope:[main] from main::@17 + [181] call print_char + to:main::@42 +main::@42: scope:[main] from main::@41 + to:main::@16 +main::@18: scope:[main] from main::@16 + [182] call print_str + to:main::@43 +main::@43: scope:[main] from main::@18 + to:main::@19 +main::@19: scope:[main] from main::@20 main::@43 + to:main::@20 +main::@20: scope:[main] from main::@19 + [183] *((const byte*) main::$35) ← ++ *((const byte*) main::$35) + to:main::@19 +@51: scope:[] from @50 + [184] call main + to:@52 +@52: scope:[] from @51 + to:@end +@end: scope:[] from @52 +utoa::@23: scope:[utoa] from utoa::@18 utoa::@18_1 + (word) utoa::digit_value#3 ← phi( utoa::@18/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 ) + (byte*) utoa::buffer#21 ← phi( utoa::@18/(byte*) utoa::buffer#11 utoa::@18_1/(byte*) utoa::buffer#24 ) + (byte) utoa::started#4 ← phi( utoa::@18/(byte) utoa::started#2 utoa::@18_1/(byte) utoa::started#5 ) + (word) utoa::value#15 ← phi( utoa::@18/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#17 ) + (byte) utoa::digit#8 ← phi( utoa::@18/(byte) utoa::digit#2 utoa::@18_1/(byte) utoa::digit#10 ) + [185] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@20 + to:utoa::@19 +ultoa::@23: scope:[ultoa] from ultoa::@18 + (dword) ultoa::digit_value#3 ← phi( ) + (byte*) ultoa::buffer#21 ← phi( ultoa::@18/(byte*) ultoa::buffer#11 ) + (byte) ultoa::started#4 ← phi( ultoa::@18/(byte) ultoa::started#2 ) + (dword) ultoa::value#15 ← phi( ultoa::@18/(dword) ultoa::value#2 ) + (byte) ultoa::digit#8 ← phi( ultoa::@18/(byte) ultoa::digit#2 ) + [186] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@20 + to:ultoa::@19 +main::@1_1: scope:[main] from main::@33 + to:main::@2 +utoa::@18_1: scope:[utoa] from utoa::@8 + (byte*) utoa::buffer#24 ← phi( utoa::@8/(const byte*) utoa::buffer#5 ) + (byte) utoa::started#5 ← phi( utoa::@8/(const byte) utoa::started#0 ) + (word) utoa::value#17 ← phi( utoa::@8/(word) utoa::value#1 ) + (byte) utoa::digit#10 ← phi( utoa::@8/(const byte) utoa::digit#0 ) + (byte~) utoa::$13 ← (byte) utoa::digit#10 * (const byte) SIZEOF_WORD + (word) utoa::digit_value#4 ← *((const word*) utoa::digit_values#1 + (byte~) utoa::$13) + if((byte) 0!=(byte) utoa::started#5) goto utoa::@20 + to:utoa::@23 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) utoa::digit#1 = (byte) utoa::digit#2 +Alias (word) utoa::value#2 = (word) utoa::value#4 +Alias (byte) utoa::started#2 = (byte) utoa::started#3 +Alias (byte*) utoa::buffer#11 = (byte*) utoa::buffer#12 +Alias (byte) utoa::digit#7 = (byte) utoa::digit#9 +Alias (byte*) utoa::buffer#22 = (byte*) utoa::buffer#23 +Alias (byte) ultoa::digit#1 = (byte) ultoa::digit#2 +Alias (dword) ultoa::value#2 = (dword) ultoa::value#4 +Alias (byte) ultoa::started#2 = (byte) ultoa::started#3 +Alias (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#12 +Alias (byte) ultoa::digit#7 = (byte) ultoa::digit#9 +Alias (byte*) ultoa::buffer#22 = (byte*) ultoa::buffer#23 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) utoa::digit#10 (const byte) utoa::digit#0 +Identical Phi Values (word) utoa::value#17 (word) utoa::value#1 +Identical Phi Values (byte) utoa::started#5 (const byte) utoa::started#0 +Identical Phi Values (byte*) utoa::buffer#24 (const byte*) utoa::buffer#5 +Identical Phi Values (byte) ultoa::digit#10 (const byte) ultoa::digit#0 +Identical Phi Values (dword) ultoa::value#17 (dword) ultoa::value#1 +Identical Phi Values (byte) ultoa::started#5 (const byte) ultoa::started#0 +Identical Phi Values (byte*) ultoa::buffer#24 (const byte*) ultoa::buffer#5 +Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [16] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -Constant right-side identified [127] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [130] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 -Constant right-side identified [150] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 +Constant right-side identified [131] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [134] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [154] (dword~) main::$12 ← (const dword) CLOCKS_PER_SEC#0 / (byte) $64 +Constant right-side identified [194] (byte~) utoa::$13 ← (const byte) utoa::digit#0 * (const byte) SIZEOF_WORD +Constant right-side identified [198] (byte~) ultoa::$13 ← (const byte) ultoa::digit#0 * (const byte) SIZEOF_DWORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) clock_start::$3 = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Constant (const byte) clock_start::$5 = clock_start::$6|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Constant (const dword) main::$12 = CLOCKS_PER_SEC#0/$64 +Constant (const byte) utoa::$13 = utoa::digit#0*SIZEOF_WORD +Constant (const byte) ultoa::$13 = ultoa::digit#0*SIZEOF_DWORD Successful SSA optimization Pass2ConstantIdentification -Constant value identified (word)main::$12 in [151] (word) div32u16u::divisor#0 ← (word)(const dword) main::$12 +Constant value identified (word)main::$12 in [155] (word) div32u16u::divisor#0 ← (word)(const dword) main::$12 Successful SSA optimization Pass2ConstantValues +Removing PHI-reference to removed block (utoa::@18_1) in block utoa::@20 +Removing PHI-reference to removed block (utoa::@18_1) in block utoa::@20 +Removing PHI-reference to removed block (utoa::@18_1) in block utoa::@20 +Removing PHI-reference to removed block (utoa::@18_1) in block utoa::@20 +if() condition always false - eliminating [196] if((byte) 0!=(const byte) utoa::started#0) goto utoa::@20 +Removing PHI-reference to removed block (ultoa::@18_1) in block ultoa::@20 +Removing PHI-reference to removed block (ultoa::@18_1) in block ultoa::@20 +Removing PHI-reference to removed block (ultoa::@18_1) in block ultoa::@20 +Removing PHI-reference to removed block (ultoa::@18_1) in block ultoa::@20 +if() condition always false - eliminating [200] if((byte) 0!=(const byte) ultoa::started#0) goto ultoa::@20 +Successful SSA optimization Pass2ConstantIfs +Simplifying constant evaluating to zero (const byte) utoa::digit#0*(const byte) SIZEOF_WORD in +Simplifying constant evaluating to zero (const byte) ultoa::digit#0*(const byte) SIZEOF_DWORD in +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero utoa::digit_values#1 in [195] (word) utoa::digit_value#4 ← *((const word*) utoa::digit_values#1 + (const byte) utoa::$13) +Simplifying expression containing zero ultoa::digit_values#1 in [199] (dword) ultoa::digit_value#4 ← *((const dword*) ultoa::digit_values#1 + (const byte) ultoa::$13) +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused constant (const byte) utoa::$13 +Eliminating unused constant (const byte) ultoa::$13 +Successful SSA optimization PassNEliminateUnusedVars Constant right-side identified [125] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 Constant right-side identified [127] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation @@ -3020,9 +8785,9 @@ Successful SSA optimization Pass2ConstantIdentification Inlining Noop Cast [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Inlining Noop Cast [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [49] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [74] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 * (const byte) SIZEOF_DWORD -Rewriting multiplication to use shift [153] (word) main::j#0 ← (word) main::i#11 * (byte) 2 +Rewriting multiplication to use shift [48] (byte~) utoa::$11 ← (byte) utoa::digit#1 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [73] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 * (const byte) SIZEOF_DWORD +Rewriting multiplication to use shift [153] (word) main::j#0 ← (word) main::i#16 * (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) memset::c#0 Inlining constant with var siblings (const word) memset::num#0 @@ -3120,13 +8885,18 @@ Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting divr16u::@8(between divr16u::@3 and divr16u::@1) Added new block during phi lifting divr16u::@9(between divr16u::@1 and divr16u::@2) Added new block during phi lifting divr16u::@10(between divr16u::@2 and divr16u::@3) -Added new block during phi lifting utoa::@24(between utoa::@19 and utoa::@18) -Added new block during phi lifting utoa::@25(between utoa::@23 and utoa::@19) -Added new block during phi lifting ultoa::@24(between ultoa::@19 and ultoa::@18) -Added new block during phi lifting ultoa::@25(between ultoa::@23 and ultoa::@19) +Added new block during phi lifting utoa::@24(between utoa::@23 and utoa::@19) +Added new block during phi lifting utoa::@25(between utoa::@18 and utoa::@20) +Added new block during phi lifting utoa::@26(between utoa::@23 and utoa::@20) +Added new block during phi lifting ultoa::@24(between ultoa::@23 and ultoa::@19) +Added new block during phi lifting ultoa::@25(between ultoa::@18 and ultoa::@20) +Added new block during phi lifting ultoa::@26(between ultoa::@23 and ultoa::@20) Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1) -Added new block during phi lifting main::@44(between main::@16 and main::@15) -Added new block during phi lifting main::@45(between main::@15 and main::@16) +Added new block during phi lifting main::@44(between main::@1 and main::@2) +Added new block during phi lifting main::@45(between main::@16 and main::@15) +Added new block during phi lifting main::@46(between main::@15 and main::@16) +Added new block during phi lifting utoa::@27(between utoa::@18 and utoa::@23) +Added new block during phi lifting ultoa::@27(between ultoa::@18 and ultoa::@23) Adding NOP phi() at start of @begin Adding NOP phi() at start of @4 Adding NOP phi() at start of @8 @@ -3148,6 +8918,7 @@ Adding NOP phi() at start of main::@27 Adding NOP phi() at start of main::@31 Adding NOP phi() at start of main::@32 Adding NOP phi() at start of main::@33 +Adding NOP phi() at start of main::@1_1 Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::@41 Adding NOP phi() at start of main::@43 @@ -3155,97 +8926,123 @@ Adding NOP phi() at start of main::@19 Adding NOP phi() at start of print_word_decimal::@2 Adding NOP phi() at start of utoa Adding NOP phi() at start of utoa::@1 +Adding NOP phi() at start of utoa::@8 Adding NOP phi() at start of print_ln::@2 Adding NOP phi() at start of print_dword_decimal::@2 Adding NOP phi() at start of ultoa Adding NOP phi() at start of ultoa::@1 +Adding NOP phi() at start of ultoa::@8 Adding NOP phi() at start of memset::@1 Adding NOP phi() at start of print_cls Adding NOP phi() at start of print_cls::@1 CALL GRAPH Calls in [] to main:11 -Calls in [main] to print_cls:18 print_str:20 print_ln:22 print_str:24 print_word_decimal:26 print_ln:28 memset:30 clock_start:32 clock:37 div32u16u:42 print_str:47 print_word_decimal:51 print_str:53 print_dword_decimal:55 print_ln:57 print_word_decimal:65 print_char:67 print_str:73 -Calls in [print_word_decimal] to utoa:112 print_str:114 -Calls in [utoa] to utoa_append:143 -Calls in [print_dword_decimal] to ultoa:167 print_str:169 -Calls in [ultoa] to ultoa_append:198 -Calls in [div32u16u] to divr16u:215 divr16u:222 -Calls in [print_cls] to memset:277 +Calls in [main] to print_cls:18 print_str:20 print_ln:22 print_str:24 print_word_decimal:26 print_ln:28 memset:30 clock_start:32 clock:47 div32u16u:52 print_str:57 print_word_decimal:61 print_str:63 print_dword_decimal:65 print_ln:67 print_word_decimal:75 print_char:77 print_str:83 +Calls in [print_word_decimal] to utoa:113 print_str:115 +Calls in [utoa] to utoa_append:154 +Calls in [print_dword_decimal] to ultoa:183 print_str:185 +Calls in [ultoa] to ultoa_append:224 +Calls in [div32u16u] to divr16u:246 divr16u:253 +Calls in [print_cls] to memset:308 -Created 46 initial phi equivalence classes +Created 58 initial phi equivalence classes Not coalescing [23] print_char_cursor#89 ← print_line_cursor#1 Coalesced [25] print_char_cursor#97 ← print_char_cursor#2 Coalesced [27] print_line_cursor#57 ← print_line_cursor#1 -Not coalescing [46] print_char_cursor#90 ← print_line_cursor#1 -Coalesced [49] print_word_decimal::w#5 ← print_word_decimal::w#1 -Coalesced (already) [50] print_char_cursor#98 ← print_char_cursor#2 -Coalesced [52] print_char_cursor#91 ← print_char_cursor#2 -Coalesced (already) [56] print_line_cursor#58 ← print_line_cursor#1 -Coalesced [58] print_char_cursor#100 ← print_line_cursor#1 -Coalesced [63] print_word_decimal::w#4 ← print_word_decimal::w#2 -Not coalescing [64] print_char_cursor#96 ← print_char_cursor#62 -Coalesced [68] print_char_cursor#102 ← print_char_cursor#10 -Coalesced [72] print_char_cursor#88 ← print_char_cursor#63 -Coalesced [77] main::i#16 ← main::i#3 -Not coalescing [78] print_char_cursor#99 ← print_char_cursor#63 -Not coalescing [79] print_char_cursor#101 ← print_char_cursor#62 -Coalesced [83] main::j#4 ← main::j#0 -Coalesced [84] main::s#4 ← main::s#0 -Coalesced [89] main::i#15 ← main::i#2 -Coalesced [90] main::sieve_i#8 ← main::sieve_i#1 -Coalesced [94] main::j#5 ← main::j#1 -Coalesced [95] main::s#5 ← main::s#1 -Coalesced [97] print_str::str#11 ← print_str::str#10 -Coalesced (already) [98] print_char_cursor#94 ← print_char_cursor#66 -Coalesced [105] print_str::str#12 ← print_str::str#0 -Coalesced [106] print_char_cursor#95 ← print_char_cursor#1 -Coalesced (already) [113] print_char_cursor#93 ← print_char_cursor#58 -Coalesced [119] utoa::value#16 ← utoa::value#1 -Coalesced [125] utoa::value#17 ← utoa::value#2 -Coalesced [126] utoa::started#5 ← utoa::started#2 -Coalesced [127] utoa::buffer#22 ← utoa::buffer#11 -Coalesced [136] utoa::digit#6 ← utoa::digit#1 -Coalesced (already) [137] utoa::value#15 ← utoa::value#4 -Coalesced (already) [138] utoa::started#4 ← utoa::started#3 -Coalesced (already) [139] utoa::buffer#21 ← utoa::buffer#12 -Coalesced [147] utoa::value#18 ← utoa::value#0 -Coalesced [148] utoa::buffer#23 ← utoa::buffer#3 -Coalesced [149] utoa_append::value#6 ← utoa_append::value#0 -Coalesced [156] utoa_append::value#7 ← utoa_append::value#1 -Coalesced [157] utoa_append::digit#5 ← utoa_append::digit#1 -Coalesced [159] print_line_cursor#59 ← print_line_cursor#21 -Coalesced (already) [165] print_line_cursor#60 ← print_line_cursor#1 -Coalesced (already) [168] print_char_cursor#92 ← print_char_cursor#2 -Coalesced [174] ultoa::value#16 ← ultoa::value#1 -Coalesced [180] ultoa::value#17 ← ultoa::value#2 -Coalesced [181] ultoa::started#5 ← ultoa::started#2 -Coalesced [182] ultoa::buffer#22 ← ultoa::buffer#11 -Coalesced [191] ultoa::digit#6 ← ultoa::digit#1 -Coalesced (already) [192] ultoa::value#15 ← ultoa::value#4 -Coalesced (already) [193] ultoa::started#4 ← ultoa::started#3 -Coalesced (already) [194] ultoa::buffer#21 ← ultoa::buffer#12 -Coalesced [202] ultoa::value#18 ← ultoa::value#0 -Coalesced [203] ultoa::buffer#23 ← ultoa::buffer#3 -Coalesced [204] ultoa_append::value#6 ← ultoa_append::value#0 -Coalesced [211] ultoa_append::value#7 ← ultoa_append::value#1 -Coalesced [212] ultoa_append::digit#5 ← ultoa_append::digit#1 -Coalesced [214] divr16u::dividend#9 ← divr16u::dividend#1 -Coalesced [220] divr16u::rem#12 ← divr16u::rem#4 -Coalesced [221] divr16u::dividend#10 ← divr16u::dividend#2 -Coalesced [228] divr16u::rem#13 ← divr16u::rem#10 -Coalesced [229] divr16u::dividend#11 ← divr16u::dividend#5 -Coalesced [236] divr16u::rem#16 ← divr16u::rem#1 -Coalesced [243] divr16u::rem#18 ← divr16u::rem#2 -Coalesced [244] divr16u::return#8 ← divr16u::quotient#2 -Coalesced [250] divr16u::rem#14 ← divr16u::rem#11 -Coalesced [251] divr16u::dividend#12 ← divr16u::dividend#0 -Coalesced [252] divr16u::quotient#9 ← divr16u::return#0 -Coalesced [253] divr16u::i#7 ← divr16u::i#1 -Coalesced [254] divr16u::rem#17 ← divr16u::rem#6 -Coalesced [255] divr16u::return#7 ← divr16u::quotient#1 -Coalesced [256] divr16u::rem#15 ← divr16u::rem#0 -Coalesced [275] memset::dst#4 ← memset::dst#1 -Coalesced down to 29 phi equivalence classes +Coalesced [39] main::j#4 ← main::j#0 +Coalesced [40] main::s#4 ← main::s#0 +Not coalescing [56] print_char_cursor#90 ← print_line_cursor#1 +Coalesced [59] print_word_decimal::w#5 ← print_word_decimal::w#1 +Coalesced (already) [60] print_char_cursor#98 ← print_char_cursor#2 +Coalesced [62] print_char_cursor#91 ← print_char_cursor#2 +Coalesced (already) [66] print_line_cursor#58 ← print_line_cursor#1 +Coalesced [68] print_char_cursor#100 ← print_line_cursor#1 +Coalesced [73] print_word_decimal::w#4 ← print_word_decimal::w#2 +Not coalescing [74] print_char_cursor#96 ← print_char_cursor#62 +Coalesced [78] print_char_cursor#102 ← print_char_cursor#10 +Coalesced [82] print_char_cursor#88 ← print_char_cursor#63 +Coalesced [87] main::i#22 ← main::i#3 +Not coalescing [88] print_char_cursor#99 ← print_char_cursor#63 +Not coalescing [89] print_char_cursor#101 ← print_char_cursor#62 +Coalesced [90] main::i#21 ← main::i#11 +Coalesced [91] main::sieve_i#14 ← main::sieve_i#1 +Coalesced [95] main::j#5 ← main::j#1 +Coalesced [96] main::s#5 ← main::s#1 +Coalesced [98] print_str::str#11 ← print_str::str#10 +Coalesced (already) [99] print_char_cursor#94 ← print_char_cursor#66 +Coalesced [106] print_str::str#12 ← print_str::str#0 +Coalesced [107] print_char_cursor#95 ← print_char_cursor#1 +Coalesced (already) [114] print_char_cursor#93 ← print_char_cursor#58 +Coalesced [122] utoa::value#23 ← utoa::value#1 +Coalesced [123] utoa::digit_value#8 ← utoa::digit_value#4 +Coalesced [126] utoa::value#18 ← utoa::value#15 +Coalesced [127] utoa::started#6 ← utoa::started#4 +Coalesced [128] utoa::buffer#25 ← utoa::buffer#21 +Coalesced [129] utoa::digit#12 ← utoa::digit#8 +Coalesced [141] utoa::digit#15 ← utoa::digit#1 +Coalesced (already) [142] utoa::value#22 ← utoa::value#2 +Coalesced (already) [143] utoa::started#7 ← utoa::started#2 +Coalesced (already) [144] utoa::buffer#29 ← utoa::buffer#11 +Coalesced [145] utoa::digit_value#7 ← utoa::digit_value#0 +Coalesced [146] utoa::digit#13 ← utoa::digit#1 +Coalesced [147] utoa::value#20 ← utoa::value#2 +Coalesced [148] utoa::buffer#27 ← utoa::buffer#11 +Coalesced [149] utoa::digit_value#5 ← utoa::digit_value#0 +Coalesced [158] utoa::value#19 ← utoa::value#0 +Coalesced [159] utoa::buffer#26 ← utoa::buffer#3 +Coalesced (already) [160] utoa::digit#11 ← utoa::digit#7 +Coalesced (already) [161] utoa::digit#14 ← utoa::digit#8 +Coalesced (already) [162] utoa::value#21 ← utoa::value#15 +Coalesced (already) [163] utoa::buffer#28 ← utoa::buffer#21 +Coalesced (already) [164] utoa::digit_value#6 ← utoa::digit_value#3 +Coalesced [165] utoa_append::value#6 ← utoa_append::value#0 +Coalesced [172] utoa_append::value#7 ← utoa_append::value#1 +Coalesced [173] utoa_append::digit#5 ← utoa_append::digit#1 +Coalesced [175] print_line_cursor#59 ← print_line_cursor#21 +Coalesced (already) [181] print_line_cursor#60 ← print_line_cursor#1 +Coalesced (already) [184] print_char_cursor#92 ← print_char_cursor#2 +Coalesced [192] ultoa::value#23 ← ultoa::value#1 +Coalesced [193] ultoa::digit_value#8 ← ultoa::digit_value#4 +Coalesced [196] ultoa::value#18 ← ultoa::value#15 +Coalesced [197] ultoa::started#6 ← ultoa::started#4 +Coalesced [198] ultoa::buffer#25 ← ultoa::buffer#21 +Coalesced [199] ultoa::digit#12 ← ultoa::digit#8 +Coalesced [211] ultoa::digit#15 ← ultoa::digit#1 +Coalesced (already) [212] ultoa::value#22 ← ultoa::value#2 +Coalesced (already) [213] ultoa::started#7 ← ultoa::started#2 +Coalesced (already) [214] ultoa::buffer#29 ← ultoa::buffer#11 +Coalesced [215] ultoa::digit_value#7 ← ultoa::digit_value#0 +Coalesced [216] ultoa::digit#13 ← ultoa::digit#1 +Coalesced [217] ultoa::value#20 ← ultoa::value#2 +Coalesced [218] ultoa::buffer#27 ← ultoa::buffer#11 +Coalesced [219] ultoa::digit_value#5 ← ultoa::digit_value#0 +Coalesced [228] ultoa::value#19 ← ultoa::value#0 +Coalesced [229] ultoa::buffer#26 ← ultoa::buffer#3 +Coalesced (already) [230] ultoa::digit#11 ← ultoa::digit#7 +Coalesced (already) [231] ultoa::digit#14 ← ultoa::digit#8 +Coalesced (already) [232] ultoa::value#21 ← ultoa::value#15 +Coalesced (already) [233] ultoa::buffer#28 ← ultoa::buffer#21 +Coalesced (already) [234] ultoa::digit_value#6 ← ultoa::digit_value#3 +Coalesced [235] ultoa_append::value#6 ← ultoa_append::value#0 +Coalesced [242] ultoa_append::value#7 ← ultoa_append::value#1 +Coalesced [243] ultoa_append::digit#5 ← ultoa_append::digit#1 +Coalesced [245] divr16u::dividend#9 ← divr16u::dividend#1 +Coalesced [251] divr16u::rem#12 ← divr16u::rem#4 +Coalesced [252] divr16u::dividend#10 ← divr16u::dividend#2 +Coalesced [259] divr16u::rem#13 ← divr16u::rem#10 +Coalesced [260] divr16u::dividend#11 ← divr16u::dividend#5 +Coalesced [267] divr16u::rem#16 ← divr16u::rem#1 +Coalesced [274] divr16u::rem#18 ← divr16u::rem#2 +Coalesced [275] divr16u::return#8 ← divr16u::quotient#2 +Coalesced [281] divr16u::rem#14 ← divr16u::rem#11 +Coalesced [282] divr16u::dividend#12 ← divr16u::dividend#0 +Coalesced [283] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [284] divr16u::i#7 ← divr16u::i#1 +Coalesced [285] divr16u::rem#17 ← divr16u::rem#6 +Coalesced [286] divr16u::return#7 ← divr16u::quotient#1 +Coalesced [287] divr16u::rem#15 ← divr16u::rem#0 +Coalesced [306] memset::dst#4 ← memset::dst#1 +Coalesced down to 31 phi equivalence classes Culled Empty Block (label) @4 Culled Empty Block (label) @8 Culled Empty Block (label) @12 @@ -3258,22 +9055,28 @@ Culled Empty Block (label) @50 Culled Empty Block (label) @52 Culled Empty Block (label) main::toD0181_@return Culled Empty Block (label) main::@33 +Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@40 Culled Empty Block (label) main::@42 Culled Empty Block (label) main::@43 Culled Empty Block (label) main::@19 +Culled Empty Block (label) main::@44 Culled Empty Block (label) print_word_decimal::@2 Culled Empty Block (label) utoa::@1 Culled Empty Block (label) utoa::@8 -Culled Empty Block (label) utoa::@25 Culled Empty Block (label) utoa::@24 +Culled Empty Block (label) utoa::@27 +Culled Empty Block (label) utoa::@25 +Culled Empty Block (label) utoa::@26 Culled Empty Block (label) print_ln::@2 Culled Empty Block (label) print_ln::@3 Culled Empty Block (label) print_dword_decimal::@2 Culled Empty Block (label) ultoa::@1 Culled Empty Block (label) ultoa::@8 -Culled Empty Block (label) ultoa::@25 Culled Empty Block (label) ultoa::@24 +Culled Empty Block (label) ultoa::@27 +Culled Empty Block (label) ultoa::@25 +Culled Empty Block (label) ultoa::@26 Culled Empty Block (label) divr16u::@8 Culled Empty Block (label) divr16u::@10 Culled Empty Block (label) divr16u::@9 @@ -3318,8 +9121,8 @@ Renumbering block main::@37 to main::@24 Renumbering block main::@38 to main::@25 Renumbering block main::@39 to main::@26 Renumbering block main::@41 to main::@27 -Renumbering block main::@44 to main::@28 -Renumbering block main::@45 to main::@29 +Renumbering block main::@45 to main::@28 +Renumbering block main::@46 to main::@29 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -3391,99 +9194,99 @@ main::@19: scope:[main] from main::@18 main::@20: scope:[main] from main::@19 [20] phi() [21] call clock_start - to:main::@1 -main::@1: scope:[main] from main::@20 main::@4 - [22] (byte*) main::sieve_i#2 ← phi( main::@20/(const byte*) sieve#0+(byte) 2 main::@4/(byte*) main::sieve_i#1 ) - [22] (word) main::i#11 ← phi( main::@20/(byte) 2 main::@4/(word) main::i#2 ) - [23] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 - to:main::@3 -main::@3: scope:[main] from main::@1 - [24] phi() - [25] call clock - [26] (dword) clock::return#2 ← (dword) clock::return#0 - to:main::@21 -main::@21: scope:[main] from main::@3 - [27] (dword~) main::$10 ← (dword) clock::return#2 - [28] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 - [29] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 - [30] call div32u16u - [31] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 - to:main::@22 -main::@22: scope:[main] from main::@21 - [32] (dword~) main::$14 ← (dword) div32u16u::return#2 - [33] (word) main::sec100s#0 ← (word)(dword~) main::$14 - [34] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 - [35] call print_str - to:main::@23 -main::@23: scope:[main] from main::@22 - [36] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 - [37] call print_word_decimal - to:main::@24 -main::@24: scope:[main] from main::@23 - [38] phi() - [39] call print_str - to:main::@25 -main::@25: scope:[main] from main::@24 - [40] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 - [41] call print_dword_decimal - to:main::@26 -main::@26: scope:[main] from main::@25 - [42] phi() - [43] call print_ln - to:main::@8 -main::@8: scope:[main] from main::@26 main::@28 - [44] (byte*) print_char_cursor#62 ← phi( main::@28/(byte*~) print_char_cursor#99 main::@26/(byte*) print_line_cursor#1 ) - [44] (word) main::i#10 ← phi( main::@28/(word) main::i#3 main::@26/(byte) 2 ) - [45] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 - [46] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 - to:main::@10 -main::@10: scope:[main] from main::@8 - [47] (word) print_word_decimal::w#2 ← (word) main::i#10 - [48] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 - [49] call print_word_decimal - to:main::@27 -main::@27: scope:[main] from main::@10 - [50] phi() - [51] call print_char - to:main::@9 -main::@9: scope:[main] from main::@27 main::@29 - [52] (byte*) print_char_cursor#63 ← phi( main::@29/(byte*~) print_char_cursor#101 main::@27/(byte*) print_char_cursor#10 ) - [53] (word) main::i#3 ← ++ (word) main::i#10 - [54] if((word) main::i#3<(word) $514) goto main::@28 - to:main::@11 -main::@11: scope:[main] from main::@9 - [55] phi() - [56] call print_str - to:main::@12 -main::@12: scope:[main] from main::@11 main::@12 - [57] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) - to:main::@12 -main::@28: scope:[main] from main::@9 - [58] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 - to:main::@8 -main::@29: scope:[main] from main::@8 - [59] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 - to:main::@9 -main::@2: scope:[main] from main::@1 - [60] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@20 + [22] (byte*) main::sieve_i#11 ← phi( main::@1/(byte*) main::sieve_i#1 main::@20/(const byte*) sieve#0+(byte) 2 ) + [22] (word) main::i#16 ← phi( main::@1/(word) main::i#11 main::@20/(byte) 2 ) + [23] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 to:main::@7 main::@7: scope:[main] from main::@2 - [61] (word) main::j#0 ← (word) main::i#11 << (byte) 1 - [62] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 + [24] (word) main::j#0 ← (word) main::i#16 << (byte) 1 + [25] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 to:main::@5 main::@5: scope:[main] from main::@6 main::@7 - [63] (byte*) main::s#2 ← phi( main::@7/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) - [63] (word) main::j#2 ← phi( main::@7/(word) main::j#0 main::@6/(word) main::j#1 ) - [64] if((word) main::j#2<(const word) COUNT#0) goto main::@6 + [26] (byte*) main::s#2 ← phi( main::@7/(byte*) main::s#0 main::@6/(byte*) main::s#1 ) + [26] (word) main::j#2 ← phi( main::@7/(word) main::j#0 main::@6/(word) main::j#1 ) + [27] if((word) main::j#2<(const word) COUNT#0) goto main::@6 to:main::@4 main::@4: scope:[main] from main::@2 main::@5 - [65] (word) main::i#2 ← ++ (word) main::i#11 - [66] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#2 + [28] (word) main::i#11 ← ++ (word) main::i#16 + [29] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 to:main::@1 +main::@1: scope:[main] from main::@4 + [30] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@1 + [31] phi() + [32] call clock + [33] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@21 +main::@21: scope:[main] from main::@3 + [34] (dword~) main::$10 ← (dword) clock::return#2 + [35] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 + [36] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + [37] call div32u16u + [38] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:main::@22 +main::@22: scope:[main] from main::@21 + [39] (dword~) main::$14 ← (dword) div32u16u::return#2 + [40] (word) main::sec100s#0 ← (word)(dword~) main::$14 + [41] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 + [42] call print_str + to:main::@23 +main::@23: scope:[main] from main::@22 + [43] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + [44] call print_word_decimal + to:main::@24 +main::@24: scope:[main] from main::@23 + [45] phi() + [46] call print_str + to:main::@25 +main::@25: scope:[main] from main::@24 + [47] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + [48] call print_dword_decimal + to:main::@26 +main::@26: scope:[main] from main::@25 + [49] phi() + [50] call print_ln + to:main::@8 +main::@8: scope:[main] from main::@26 main::@28 + [51] (byte*) print_char_cursor#62 ← phi( main::@28/(byte*~) print_char_cursor#99 main::@26/(byte*) print_line_cursor#1 ) + [51] (word) main::i#10 ← phi( main::@28/(word) main::i#3 main::@26/(byte) 2 ) + [52] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 + [53] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 + to:main::@10 +main::@10: scope:[main] from main::@8 + [54] (word) print_word_decimal::w#2 ← (word) main::i#10 + [55] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 + [56] call print_word_decimal + to:main::@27 +main::@27: scope:[main] from main::@10 + [57] phi() + [58] call print_char + to:main::@9 +main::@9: scope:[main] from main::@27 main::@29 + [59] (byte*) print_char_cursor#63 ← phi( main::@29/(byte*~) print_char_cursor#101 main::@27/(byte*) print_char_cursor#10 ) + [60] (word) main::i#3 ← ++ (word) main::i#10 + [61] if((word) main::i#3<(word) $514) goto main::@28 + to:main::@11 +main::@11: scope:[main] from main::@9 + [62] phi() + [63] call print_str + to:main::@12 +main::@12: scope:[main] from main::@11 main::@12 + [64] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) + to:main::@12 +main::@28: scope:[main] from main::@9 + [65] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 + to:main::@8 +main::@29: scope:[main] from main::@8 + [66] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 + to:main::@9 main::@6: scope:[main] from main::@5 [67] *((byte*) main::s#2) ← (byte) 1 - [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#11 - [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#11 + [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 + [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 to:main::@5 print_str: scope:[print_str] from main::@11 main::@14 main::@16 main::@22 main::@24 print_dword_decimal::@1 print_word_decimal::@1 [70] (byte*) print_char_cursor#66 ← phi( main::@11/(byte*) print_char_cursor#63 main::@14/(byte*) 1024 main::@16/(byte*~) print_char_cursor#89 main::@22/(byte*~) print_char_cursor#90 main::@24/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) @@ -3524,245 +9327,263 @@ print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal to:@return utoa: scope:[utoa] from print_word_decimal [86] phi() - to:utoa::@1 -utoa::@1: scope:[utoa] from utoa utoa::@2 - [87] (byte*) utoa::buffer#11 ← phi( utoa::@2/(byte*) utoa::buffer#12 utoa/(const byte[6]) decimal_digits#0 ) - [87] (byte) utoa::started#2 ← phi( utoa::@2/(byte) utoa::started#3 utoa/(byte) 0 ) - [87] (word) utoa::value#2 ← phi( utoa::@2/(word) utoa::value#4 utoa/(word) utoa::value#1 ) - [87] (byte) utoa::digit#2 ← phi( utoa::@2/(byte) utoa::digit#1 utoa/(byte) 0 ) - [88] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 - [89] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) - [90] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 + to:utoa::@18_1 +utoa::@18_1: scope:[utoa] from utoa + [87] (word) utoa::digit_value#4 ← *((const word[]) RADIX_DECIMAL_VALUES#0) to:utoa::@6 -utoa::@6: scope:[utoa] from utoa::@1 - [91] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@3 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@18_1 + [88] (word) utoa::digit_value#3 ← phi( utoa::@1/(word) utoa::digit_value#0 utoa::@18_1/(word) utoa::digit_value#4 ) + [88] (byte*) utoa::buffer#21 ← phi( utoa::@1/(byte*) utoa::buffer#11 utoa::@18_1/(const byte[6]) decimal_digits#0 ) + [88] (byte) utoa::started#4 ← phi( utoa::@1/(byte) utoa::started#2 utoa::@18_1/(byte) 0 ) + [88] (word) utoa::value#15 ← phi( utoa::@1/(word) utoa::value#2 utoa::@18_1/(word) utoa::value#1 ) + [88] (byte) utoa::digit#8 ← phi( utoa::@1/(byte) utoa::digit#1 utoa::@18_1/(byte) 0 ) + [89] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@3 to:utoa::@2 utoa::@2: scope:[utoa] from utoa::@5 utoa::@6 - [92] (byte*) utoa::buffer#12 ← phi( utoa::@6/(byte*) utoa::buffer#11 utoa::@5/(byte*) utoa::buffer#3 ) - [92] (byte) utoa::started#3 ← phi( utoa::@6/(byte) utoa::started#2 utoa::@5/(byte) 1 ) - [92] (word) utoa::value#4 ← phi( utoa::@6/(word) utoa::value#2 utoa::@5/(word) utoa::value#0 ) - [93] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 - [94] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 + [90] (byte) utoa::digit#6 ← phi( utoa::@5/(byte) utoa::digit#7 utoa::@6/(byte) utoa::digit#8 ) + [90] (byte*) utoa::buffer#11 ← phi( utoa::@6/(byte*) utoa::buffer#21 utoa::@5/(byte*) utoa::buffer#3 ) + [90] (byte) utoa::started#2 ← phi( utoa::@6/(byte) utoa::started#4 utoa::@5/(byte) 1 ) + [90] (word) utoa::value#2 ← phi( utoa::@6/(word) utoa::value#15 utoa::@5/(word) utoa::value#0 ) + [91] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 + [92] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 to:utoa::@4 utoa::@4: scope:[utoa] from utoa::@2 - [95] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 - [96] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) - [97] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 - [98] *((byte*) utoa::buffer#4) ← (byte) 0 + [93] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 + [94] *((byte*) utoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) + [95] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 + [96] *((byte*) utoa::buffer#4) ← (byte) 0 to:utoa::@return utoa::@return: scope:[utoa] from utoa::@4 - [99] return + [97] return to:@return +utoa::@1: scope:[utoa] from utoa::@2 + [98] (byte~) utoa::$11 ← (byte) utoa::digit#1 << (byte) 1 + [99] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) + [100] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 + to:utoa::@6 utoa::@3: scope:[utoa] from utoa::@1 utoa::@6 - [100] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 - [101] (word) utoa_append::value#0 ← (word) utoa::value#2 - [102] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 - [103] call utoa_append - [104] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + [101] (word) utoa::digit_value#2 ← phi( utoa::@1/(word) utoa::digit_value#0 utoa::@6/(word) utoa::digit_value#3 ) + [101] (byte*) utoa::buffer#22 ← phi( utoa::@1/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#21 ) + [101] (word) utoa::value#16 ← phi( utoa::@1/(word) utoa::value#2 utoa::@6/(word) utoa::value#15 ) + [101] (byte) utoa::digit#7 ← phi( utoa::@1/(byte) utoa::digit#1 utoa::@6/(byte) utoa::digit#8 ) + [102] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + [103] (word) utoa_append::value#0 ← (word) utoa::value#16 + [104] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + [105] call utoa_append + [106] (word) utoa_append::return#0 ← (word) utoa_append::value#2 to:utoa::@5 utoa::@5: scope:[utoa] from utoa::@3 - [105] (word) utoa::value#0 ← (word) utoa_append::return#0 - [106] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 + [107] (word) utoa::value#0 ← (word) utoa_append::return#0 + [108] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#22 to:utoa::@2 utoa_append: scope:[utoa_append] from utoa::@3 - [107] phi() + [109] phi() to:utoa_append::@1 utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 - [108] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 ) - [108] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) - [109] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 + [110] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 ) + [110] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 ) + [111] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 to:utoa_append::@3 utoa_append::@3: scope:[utoa_append] from utoa_append::@1 - [110] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) + [112] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) to:utoa_append::@return utoa_append::@return: scope:[utoa_append] from utoa_append::@3 - [111] return + [113] return to:@return utoa_append::@2: scope:[utoa_append] from utoa_append::@1 - [112] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 - [113] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 + [114] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 + [115] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 to:utoa_append::@1 print_ln: scope:[print_ln] from main::@15 main::@18 main::@26 - [114] (byte*) print_line_cursor#21 ← phi( main::@15/(byte*) 1024 main::@18/(byte*) print_line_cursor#1 main::@26/(byte*) print_line_cursor#1 ) + [116] (byte*) print_line_cursor#21 ← phi( main::@15/(byte*) 1024 main::@18/(byte*) print_line_cursor#1 main::@26/(byte*) print_line_cursor#1 ) to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 - [115] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) - [116] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 - [117] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + [117] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 ) + [118] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 + [119] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 to:print_ln::@return print_ln::@return: scope:[print_ln] from print_ln::@1 - [118] return + [120] return to:@return print_dword_decimal: scope:[print_dword_decimal] from main::@25 - [119] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 - [120] call ultoa + [121] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + [122] call ultoa to:print_dword_decimal::@1 print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal - [121] phi() - [122] call print_str + [123] phi() + [124] call print_str to:print_dword_decimal::@return print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@1 - [123] return + [125] return to:@return ultoa: scope:[ultoa] from print_dword_decimal - [124] phi() - to:ultoa::@1 -ultoa::@1: scope:[ultoa] from ultoa ultoa::@2 - [125] (byte*) ultoa::buffer#11 ← phi( ultoa::@2/(byte*) ultoa::buffer#12 ultoa/(const byte[$b]) decimal_digits_long#0 ) - [125] (byte) ultoa::started#2 ← phi( ultoa::@2/(byte) ultoa::started#3 ultoa/(byte) 0 ) - [125] (dword) ultoa::value#2 ← phi( ultoa::@2/(dword) ultoa::value#4 ultoa/(dword) ultoa::value#1 ) - [125] (byte) ultoa::digit#2 ← phi( ultoa::@2/(byte) ultoa::digit#1 ultoa/(byte) 0 ) - [126] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 << (byte) 2 - [127] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) - [128] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 + [126] phi() + to:ultoa::@18_1 +ultoa::@18_1: scope:[ultoa] from ultoa + [127] (dword) ultoa::digit_value#4 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0) to:ultoa::@6 -ultoa::@6: scope:[ultoa] from ultoa::@1 - [129] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@3 +ultoa::@6: scope:[ultoa] from ultoa::@1 ultoa::@18_1 + [128] (dword) ultoa::digit_value#3 ← phi( ultoa::@1/(dword) ultoa::digit_value#0 ultoa::@18_1/(dword) ultoa::digit_value#4 ) + [128] (byte*) ultoa::buffer#21 ← phi( ultoa::@1/(byte*) ultoa::buffer#11 ultoa::@18_1/(const byte[$b]) decimal_digits_long#0 ) + [128] (byte) ultoa::started#4 ← phi( ultoa::@1/(byte) ultoa::started#2 ultoa::@18_1/(byte) 0 ) + [128] (dword) ultoa::value#15 ← phi( ultoa::@1/(dword) ultoa::value#2 ultoa::@18_1/(dword) ultoa::value#1 ) + [128] (byte) ultoa::digit#8 ← phi( ultoa::@1/(byte) ultoa::digit#1 ultoa::@18_1/(byte) 0 ) + [129] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@3 to:ultoa::@2 ultoa::@2: scope:[ultoa] from ultoa::@5 ultoa::@6 - [130] (byte*) ultoa::buffer#12 ← phi( ultoa::@6/(byte*) ultoa::buffer#11 ultoa::@5/(byte*) ultoa::buffer#3 ) - [130] (byte) ultoa::started#3 ← phi( ultoa::@6/(byte) ultoa::started#2 ultoa::@5/(byte) 1 ) - [130] (dword) ultoa::value#4 ← phi( ultoa::@6/(dword) ultoa::value#2 ultoa::@5/(dword) ultoa::value#0 ) - [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 + [130] (byte) ultoa::digit#6 ← phi( ultoa::@5/(byte) ultoa::digit#7 ultoa::@6/(byte) ultoa::digit#8 ) + [130] (byte*) ultoa::buffer#11 ← phi( ultoa::@6/(byte*) ultoa::buffer#21 ultoa::@5/(byte*) ultoa::buffer#3 ) + [130] (byte) ultoa::started#2 ← phi( ultoa::@6/(byte) ultoa::started#4 ultoa::@5/(byte) 1 ) + [130] (dword) ultoa::value#2 ← phi( ultoa::@6/(dword) ultoa::value#15 ultoa::@5/(dword) ultoa::value#0 ) + [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 [132] if((byte) ultoa::digit#1<(const byte) ultoa::max_digits#1-(byte) 1) goto ultoa::@1 to:ultoa::@4 ultoa::@4: scope:[ultoa] from ultoa::@2 - [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 - [134] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) - [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 + [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#2 + [134] *((byte*) ultoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) + [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 [136] *((byte*) ultoa::buffer#4) ← (byte) 0 to:ultoa::@return ultoa::@return: scope:[ultoa] from ultoa::@4 [137] return to:@return +ultoa::@1: scope:[ultoa] from ultoa::@2 + [138] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 << (byte) 2 + [139] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) + [140] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 + to:ultoa::@6 ultoa::@3: scope:[ultoa] from ultoa::@1 ultoa::@6 - [138] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 - [139] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 - [140] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 - [141] call ultoa_append - [142] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + [141] (dword) ultoa::digit_value#2 ← phi( ultoa::@1/(dword) ultoa::digit_value#0 ultoa::@6/(dword) ultoa::digit_value#3 ) + [141] (byte*) ultoa::buffer#22 ← phi( ultoa::@1/(byte*) ultoa::buffer#11 ultoa::@6/(byte*) ultoa::buffer#21 ) + [141] (dword) ultoa::value#16 ← phi( ultoa::@1/(dword) ultoa::value#2 ultoa::@6/(dword) ultoa::value#15 ) + [141] (byte) ultoa::digit#7 ← phi( ultoa::@1/(byte) ultoa::digit#1 ultoa::@6/(byte) ultoa::digit#8 ) + [142] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 + [143] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + [144] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 + [145] call ultoa_append + [146] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 to:ultoa::@5 ultoa::@5: scope:[ultoa] from ultoa::@3 - [143] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 - [144] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 + [147] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + [148] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#22 to:ultoa::@2 ultoa_append: scope:[ultoa_append] from ultoa::@3 - [145] phi() + [149] phi() to:ultoa_append::@1 ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 - [146] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(byte) 0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) - [146] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) - [147] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 + [150] (byte) ultoa_append::digit#2 ← phi( ultoa_append/(byte) 0 ultoa_append::@2/(byte) ultoa_append::digit#1 ) + [150] (dword) ultoa_append::value#2 ← phi( ultoa_append/(dword) ultoa_append::value#0 ultoa_append::@2/(dword) ultoa_append::value#1 ) + [151] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 to:ultoa_append::@3 ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 - [148] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) + [152] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) to:ultoa_append::@return ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 - [149] return + [153] return to:@return ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 - [150] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 - [151] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 + [154] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 + [155] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 to:ultoa_append::@1 div32u16u: scope:[div32u16u] from main::@21 - [152] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 - [153] call divr16u - [154] (word) divr16u::return#2 ← (word) divr16u::return#0 + [156] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 + [157] call divr16u + [158] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [155] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [156] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 - [157] (word) divr16u::rem#4 ← (word) rem16u#1 - [158] call divr16u - [159] (word) divr16u::return#3 ← (word) divr16u::return#0 + [159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [160] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 + [161] (word) divr16u::rem#4 ← (word) rem16u#1 + [162] call divr16u + [163] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [160] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [161] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [162] return + [166] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [163] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@1/(word) divr16u::dividend#2 ) - [163] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [167] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@1/(word) divr16u::dividend#2 ) + [167] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [164] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [164] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [164] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [164] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [165] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [166] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [167] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [168] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [168] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [168] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [168] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [168] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [169] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [170] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [171] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [172] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [173] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 + [174] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [177] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [174] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [175] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 + [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [176] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [176] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [177] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [178] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [180] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [180] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [179] (word) rem16u#1 ← (word) divr16u::rem#11 + [183] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [180] return + [184] return to:@return clock: scope:[clock] from main::@3 - [181] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + [185] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock - [182] return + [186] return to:@return clock_start: scope:[clock_start] from main::@20 - [183] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [184] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [185] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [186] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [188] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [189] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [190] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [191] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start - [188] return + [192] return to:@return memset: scope:[memset] from main::@19 print_cls - [189] (byte) memset::c#3 ← phi( main::@19/(byte) 0 print_cls/(byte) ' ' ) - [189] (void*) memset::str#3 ← phi( main::@19/(void*)(const byte*) sieve#0 print_cls/(void*)(byte*) 1024 ) - [189] (word) memset::num#2 ← phi( main::@19/(const word) COUNT#0 print_cls/(word) $3e8 ) - [190] if((word) memset::num#2<=(byte) 0) goto memset::@return + [193] (byte) memset::c#3 ← phi( main::@19/(byte) 0 print_cls/(byte) ' ' ) + [193] (void*) memset::str#3 ← phi( main::@19/(void*)(const byte*) sieve#0 print_cls/(void*)(byte*) 1024 ) + [193] (word) memset::num#2 ← phi( main::@19/(const word) COUNT#0 print_cls/(word) $3e8 ) + [194] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 memset::@1: scope:[memset] from memset - [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 - [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + [195] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [196] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 to:memset::@2 memset::@2: scope:[memset] from memset::@1 memset::@2 - [193] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) - [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 + [197] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [198] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [199] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [200] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return memset::@return: scope:[memset] from memset memset::@2 - [197] return + [201] return to:@return print_cls: scope:[print_cls] from main::@13 - [198] phi() - [199] call memset + [202] phi() + [203] call memset to:print_cls::@return print_cls::@return: scope:[print_cls] from print_cls - [200] return + [204] return to:@return @@ -3849,8 +9670,8 @@ VARIABLE REGISTER WEIGHTS (dword) main::cyclecount#0 0.5 (word) main::i (word) main::i#10 4.4 -(word) main::i#11 24.6 -(word) main::i#2 11.0 +(word) main::i#11 11.0 +(word) main::i#16 26.11111111111111 (word) main::i#3 11.0 (word) main::j (word) main::j#0 16.5 @@ -3863,8 +9684,8 @@ VARIABLE REGISTER WEIGHTS (word) main::sec100s (word) main::sec100s#0 1.3333333333333333 (byte*) main::sieve_i -(byte*) main::sieve_i#1 22.0 -(byte*) main::sieve_i#2 3.0 +(byte*) main::sieve_i#1 11.0 +(byte*) main::sieve_i#11 3.3000000000000003 (word~) main::toD0181_$0 (number~) main::toD0181_$1 (number~) main::toD0181_$2 @@ -3933,26 +9754,33 @@ VARIABLE REGISTER WEIGHTS (byte~) ultoa::$11 22.0 (byte~) ultoa::$4 4.0 (byte*) ultoa::buffer -(byte*) ultoa::buffer#11 4.0 -(byte*) ultoa::buffer#12 7.400000000000001 +(byte*) ultoa::buffer#11 6.0 +(byte*) ultoa::buffer#21 16.5 +(byte*) ultoa::buffer#22 6.285714285714286 (byte*) ultoa::buffer#3 22.0 (byte*) ultoa::buffer#4 4.0 (byte) ultoa::digit -(byte) ultoa::digit#1 16.5 -(byte) ultoa::digit#2 2.5384615384615383 +(byte) ultoa::digit#1 11.0 +(byte) ultoa::digit#6 33.0 +(byte) ultoa::digit#7 4.125 +(byte) ultoa::digit#8 16.5 (dword) ultoa::digit_value -(dword) ultoa::digit_value#0 6.6000000000000005 +(dword) ultoa::digit_value#0 16.5 +(dword) ultoa::digit_value#2 11.0 +(dword) ultoa::digit_value#3 17.5 +(dword) ultoa::digit_value#4 4.0 (dword*) ultoa::digit_values (byte) ultoa::max_digits (byte) ultoa::radix (byte) ultoa::started -(byte) ultoa::started#2 6.6000000000000005 -(byte) ultoa::started#3 7.333333333333333 +(byte) ultoa::started#2 5.5 +(byte) ultoa::started#4 11.0 (dword) ultoa::value (dword) ultoa::value#0 11.0 -(dword) ultoa::value#1 2.0 -(dword) ultoa::value#2 7.666666666666666 -(dword) ultoa::value#4 11.0 +(dword) ultoa::value#1 1.3333333333333333 +(dword) ultoa::value#15 23.0 +(dword) ultoa::value#16 16.5 +(dword) ultoa::value#2 7.333333333333333 (dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) (byte*) ultoa_append::buffer (byte*) ultoa_append::buffer#0 1.625 @@ -3971,26 +9799,33 @@ VARIABLE REGISTER WEIGHTS (byte~) utoa::$11 202.0 (byte~) utoa::$4 4.0 (byte*) utoa::buffer -(byte*) utoa::buffer#11 36.72727272727273 -(byte*) utoa::buffer#12 61.39999999999999 +(byte*) utoa::buffer#11 51.0 +(byte*) utoa::buffer#21 151.5 +(byte*) utoa::buffer#22 57.714285714285715 (byte*) utoa::buffer#3 202.0 (byte*) utoa::buffer#4 4.0 (byte) utoa::digit -(byte) utoa::digit#1 151.5 -(byte) utoa::digit#2 23.307692307692307 +(byte) utoa::digit#1 101.0 +(byte) utoa::digit#6 303.0 +(byte) utoa::digit#7 37.875 +(byte) utoa::digit#8 151.5 (word) utoa::digit_value -(word) utoa::digit_value#0 60.599999999999994 +(word) utoa::digit_value#0 151.5 +(word) utoa::digit_value#2 101.0 +(word) utoa::digit_value#3 152.5 +(word) utoa::digit_value#4 4.0 (word*) utoa::digit_values (byte) utoa::max_digits (byte) utoa::radix (byte) utoa::started -(byte) utoa::started#2 60.599999999999994 -(byte) utoa::started#3 67.33333333333333 +(byte) utoa::started#2 50.5 +(byte) utoa::started#4 101.0 (word) utoa::value (word) utoa::value#0 101.0 -(word) utoa::value#1 2.0 -(word) utoa::value#2 67.66666666666666 -(word) utoa::value#4 101.0 +(word) utoa::value#1 1.3333333333333333 +(word) utoa::value#15 203.0 +(word) utoa::value#16 151.5 +(word) utoa::value#2 67.33333333333333 (word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub) (byte*) utoa_append::buffer (byte*) utoa_append::buffer#0 12.875 @@ -4007,25 +9842,27 @@ VARIABLE REGISTER WEIGHTS (word) utoa_append::value#2 517.6666666666667 Initial phi equivalence classes -[ main::i#11 main::i#2 ] -[ main::sieve_i#2 main::sieve_i#1 ] -[ main::i#10 main::i#3 ] +[ main::i#16 main::i#11 ] +[ main::sieve_i#11 main::sieve_i#1 ] [ main::j#2 main::j#0 main::j#1 ] [ main::s#2 main::s#0 main::s#1 ] +[ main::i#10 main::i#3 ] [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] [ print_str::str#8 print_str::str#10 print_str::str#0 ] [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] -[ utoa::digit#2 utoa::digit#1 ] -[ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 ] -[ utoa::started#2 utoa::started#3 ] -[ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 ] +[ utoa::started#4 utoa::started#2 ] +[ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +[ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 ] +[ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 ] +[ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 ] [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] [ utoa_append::digit#2 utoa_append::digit#1 ] [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] -[ ultoa::digit#2 ultoa::digit#1 ] -[ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ] -[ ultoa::started#2 ultoa::started#3 ] -[ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ] +[ ultoa::started#4 ultoa::started#2 ] +[ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] +[ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ] +[ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ] +[ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ] [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] [ ultoa_append::digit#2 ultoa_append::digit#1 ] [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] @@ -4045,17 +9882,15 @@ Added variable main::$14 to zero page equivalence class [ main::$14 ] Added variable main::sec100s#0 to zero page equivalence class [ main::sec100s#0 ] Added variable print_dword_decimal::w#0 to zero page equivalence class [ print_dword_decimal::w#0 ] Added variable main::$38 to zero page equivalence class [ main::$38 ] -Added variable utoa::$11 to zero page equivalence class [ utoa::$11 ] -Added variable utoa::digit_value#0 to zero page equivalence class [ utoa::digit_value#0 ] Added variable utoa::$4 to zero page equivalence class [ utoa::$4 ] Added variable utoa::buffer#4 to zero page equivalence class [ utoa::buffer#4 ] +Added variable utoa::$11 to zero page equivalence class [ utoa::$11 ] Added variable utoa_append::buffer#0 to zero page equivalence class [ utoa_append::buffer#0 ] Added variable utoa_append::sub#0 to zero page equivalence class [ utoa_append::sub#0 ] Added variable utoa_append::return#0 to zero page equivalence class [ utoa_append::return#0 ] -Added variable ultoa::$11 to zero page equivalence class [ ultoa::$11 ] -Added variable ultoa::digit_value#0 to zero page equivalence class [ ultoa::digit_value#0 ] Added variable ultoa::$4 to zero page equivalence class [ ultoa::$4 ] Added variable ultoa::buffer#4 to zero page equivalence class [ ultoa::buffer#4 ] +Added variable ultoa::$11 to zero page equivalence class [ ultoa::$11 ] Added variable ultoa_append::buffer#0 to zero page equivalence class [ ultoa_append::buffer#0 ] Added variable ultoa_append::sub#0 to zero page equivalence class [ ultoa_append::sub#0 ] Added variable ultoa_append::return#0 to zero page equivalence class [ ultoa_append::return#0 ] @@ -4070,25 +9905,27 @@ Added variable rem16u#1 to zero page equivalence class [ rem16u#1 ] Added variable clock::return#0 to zero page equivalence class [ clock::return#0 ] Added variable memset::end#0 to zero page equivalence class [ memset::end#0 ] Complete equivalence classes -[ main::i#11 main::i#2 ] -[ main::sieve_i#2 main::sieve_i#1 ] -[ main::i#10 main::i#3 ] +[ main::i#16 main::i#11 ] +[ main::sieve_i#11 main::sieve_i#1 ] [ main::j#2 main::j#0 main::j#1 ] [ main::s#2 main::s#0 main::s#1 ] +[ main::i#10 main::i#3 ] [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] [ print_str::str#8 print_str::str#10 print_str::str#0 ] [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] -[ utoa::digit#2 utoa::digit#1 ] -[ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 ] -[ utoa::started#2 utoa::started#3 ] -[ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 ] +[ utoa::started#4 utoa::started#2 ] +[ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +[ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 ] +[ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 ] +[ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 ] [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] [ utoa_append::digit#2 utoa_append::digit#1 ] [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] -[ ultoa::digit#2 ultoa::digit#1 ] -[ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ] -[ ultoa::started#2 ultoa::started#3 ] -[ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ] +[ ultoa::started#4 ultoa::started#2 ] +[ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] +[ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ] +[ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ] +[ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ] [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] [ ultoa_append::digit#2 ultoa_append::digit#1 ] [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] @@ -4108,17 +9945,15 @@ Complete equivalence classes [ main::sec100s#0 ] [ print_dword_decimal::w#0 ] [ main::$38 ] -[ utoa::$11 ] -[ utoa::digit_value#0 ] [ utoa::$4 ] [ utoa::buffer#4 ] +[ utoa::$11 ] [ utoa_append::buffer#0 ] [ utoa_append::sub#0 ] [ utoa_append::return#0 ] -[ ultoa::$11 ] -[ ultoa::digit_value#0 ] [ ultoa::$4 ] [ ultoa::buffer#4 ] +[ ultoa::$11 ] [ ultoa_append::buffer#0 ] [ ultoa_append::sub#0 ] [ ultoa_append::return#0 ] @@ -4132,55 +9967,55 @@ Complete equivalence classes [ rem16u#1 ] [ clock::return#0 ] [ memset::end#0 ] -Allocated zp ZP_WORD:2 [ main::i#11 main::i#2 ] -Allocated zp ZP_WORD:4 [ main::sieve_i#2 main::sieve_i#1 ] -Allocated zp ZP_WORD:6 [ main::i#10 main::i#3 ] -Allocated zp ZP_WORD:8 [ main::j#2 main::j#0 main::j#1 ] -Allocated zp ZP_WORD:10 [ main::s#2 main::s#0 main::s#1 ] +Allocated zp ZP_WORD:2 [ main::i#16 main::i#11 ] +Allocated zp ZP_WORD:4 [ main::sieve_i#11 main::sieve_i#1 ] +Allocated zp ZP_WORD:6 [ main::j#2 main::j#0 main::j#1 ] +Allocated zp ZP_WORD:8 [ main::s#2 main::s#0 main::s#1 ] +Allocated zp ZP_WORD:10 [ main::i#10 main::i#3 ] Allocated zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] Allocated zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 ] Allocated zp ZP_WORD:16 [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] -Allocated zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] -Allocated zp ZP_WORD:19 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 ] -Allocated zp ZP_BYTE:21 [ utoa::started#2 utoa::started#3 ] -Allocated zp ZP_WORD:22 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 ] -Allocated zp ZP_WORD:24 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] -Allocated zp ZP_BYTE:26 [ utoa_append::digit#2 utoa_append::digit#1 ] -Allocated zp ZP_WORD:27 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] -Allocated zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] -Allocated zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ] -Allocated zp ZP_BYTE:34 [ ultoa::started#2 ultoa::started#3 ] -Allocated zp ZP_WORD:35 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ] -Allocated zp ZP_DWORD:37 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] -Allocated zp ZP_BYTE:41 [ ultoa_append::digit#2 ultoa_append::digit#1 ] -Allocated zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] -Allocated zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] -Allocated zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] -Allocated zp ZP_BYTE:48 [ divr16u::i#2 divr16u::i#1 ] -Allocated zp ZP_WORD:49 [ memset::num#2 ] -Allocated zp ZP_WORD:51 [ memset::str#3 ] -Allocated zp ZP_BYTE:53 [ memset::c#3 ] -Allocated zp ZP_WORD:54 [ memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated zp ZP_DWORD:56 [ clock::return#2 ] -Allocated zp ZP_DWORD:60 [ main::$10 ] -Allocated zp ZP_DWORD:64 [ main::cyclecount#0 ] -Allocated zp ZP_DWORD:68 [ div32u16u::dividend#0 ] -Allocated zp ZP_DWORD:72 [ div32u16u::return#2 ] -Allocated zp ZP_DWORD:76 [ main::$14 ] -Allocated zp ZP_WORD:80 [ main::sec100s#0 ] -Allocated zp ZP_DWORD:82 [ print_dword_decimal::w#0 ] -Allocated zp ZP_WORD:86 [ main::$38 ] -Allocated zp ZP_BYTE:88 [ utoa::$11 ] -Allocated zp ZP_WORD:89 [ utoa::digit_value#0 ] -Allocated zp ZP_BYTE:91 [ utoa::$4 ] -Allocated zp ZP_WORD:92 [ utoa::buffer#4 ] -Allocated zp ZP_WORD:94 [ utoa_append::buffer#0 ] -Allocated zp ZP_WORD:96 [ utoa_append::sub#0 ] -Allocated zp ZP_WORD:98 [ utoa_append::return#0 ] -Allocated zp ZP_BYTE:100 [ ultoa::$11 ] -Allocated zp ZP_DWORD:101 [ ultoa::digit_value#0 ] -Allocated zp ZP_BYTE:105 [ ultoa::$4 ] -Allocated zp ZP_WORD:106 [ ultoa::buffer#4 ] +Allocated zp ZP_BYTE:18 [ utoa::started#4 utoa::started#2 ] +Allocated zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +Allocated zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 ] +Allocated zp ZP_WORD:22 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 ] +Allocated zp ZP_WORD:24 [ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 ] +Allocated zp ZP_WORD:26 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] +Allocated zp ZP_BYTE:28 [ utoa_append::digit#2 utoa_append::digit#1 ] +Allocated zp ZP_WORD:29 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] +Allocated zp ZP_BYTE:31 [ ultoa::started#4 ultoa::started#2 ] +Allocated zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] +Allocated zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ] +Allocated zp ZP_WORD:37 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ] +Allocated zp ZP_DWORD:39 [ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ] +Allocated zp ZP_DWORD:43 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] +Allocated zp ZP_BYTE:47 [ ultoa_append::digit#2 ultoa_append::digit#1 ] +Allocated zp ZP_WORD:48 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +Allocated zp ZP_WORD:50 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] +Allocated zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +Allocated zp ZP_BYTE:54 [ divr16u::i#2 divr16u::i#1 ] +Allocated zp ZP_WORD:55 [ memset::num#2 ] +Allocated zp ZP_WORD:57 [ memset::str#3 ] +Allocated zp ZP_BYTE:59 [ memset::c#3 ] +Allocated zp ZP_WORD:60 [ memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated zp ZP_DWORD:62 [ clock::return#2 ] +Allocated zp ZP_DWORD:66 [ main::$10 ] +Allocated zp ZP_DWORD:70 [ main::cyclecount#0 ] +Allocated zp ZP_DWORD:74 [ div32u16u::dividend#0 ] +Allocated zp ZP_DWORD:78 [ div32u16u::return#2 ] +Allocated zp ZP_DWORD:82 [ main::$14 ] +Allocated zp ZP_WORD:86 [ main::sec100s#0 ] +Allocated zp ZP_DWORD:88 [ print_dword_decimal::w#0 ] +Allocated zp ZP_WORD:92 [ main::$38 ] +Allocated zp ZP_BYTE:94 [ utoa::$4 ] +Allocated zp ZP_WORD:95 [ utoa::buffer#4 ] +Allocated zp ZP_BYTE:97 [ utoa::$11 ] +Allocated zp ZP_WORD:98 [ utoa_append::buffer#0 ] +Allocated zp ZP_WORD:100 [ utoa_append::sub#0 ] +Allocated zp ZP_WORD:102 [ utoa_append::return#0 ] +Allocated zp ZP_BYTE:104 [ ultoa::$4 ] +Allocated zp ZP_WORD:105 [ ultoa::buffer#4 ] +Allocated zp ZP_BYTE:107 [ ultoa::$11 ] Allocated zp ZP_WORD:108 [ ultoa_append::buffer#0 ] Allocated zp ZP_DWORD:110 [ ultoa_append::sub#0 ] Allocated zp ZP_DWORD:114 [ ultoa_append::return#0 ] @@ -4233,9 +10068,9 @@ Target platform is c64basic .const CLOCKS_PER_SEC = CLOCKS_PER_FRAME*FRAMES_PER_SEC .label rem16u = $84 .label print_char_cursor = $c - .label print_line_cursor = $1b - .label print_char_cursor_62 = $1b - .label print_char_cursor_99 = $1b + .label print_line_cursor = $1d + .label print_char_cursor_62 = $1d + .label print_char_cursor_99 = $1d // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -4256,17 +10091,17 @@ bend: main: { .label toD0181_gfx = $1800 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>toD0181_gfx)/4&$f - .label _10 = $3c - .label _14 = $4c - .label cyclecount = $40 - .label sec100s = $50 - .label i = 2 + .label _10 = $42 + .label _14 = $52 + .label cyclecount = $46 + .label sec100s = $56 .label sieve_i = 4 - .label j = 8 - .label s = $a - .label i_3 = 6 - .label i_10 = 6 - .label _38 = $56 + .label j = 6 + .label s = 8 + .label i = $a + .label i_11 = 2 + .label _38 = $5c + .label i_16 = 2 // [5] phi from main to main::toD0181 [phi:main->main::toD0181] toD0181_from_main: jmp toD0181 @@ -4280,7 +10115,7 @@ main: { lda #toD0181_return sta D018 // [7] call print_cls - // [198] phi from main::@13 to print_cls [phi:main::@13->print_cls] + // [202] phi from main::@13 to print_cls [phi:main::@13->print_cls] print_cls_from_b13: jsr print_cls // [8] phi from main::@13 to main::@14 [phi:main::@13->main::@14] @@ -4308,9 +10143,9 @@ main: { // main::@15 b15: // [11] call print_ln - // [114] phi from main::@15 to print_ln [phi:main::@15->print_ln] + // [116] phi from main::@15 to print_ln [phi:main::@15->print_ln] print_ln_from_b15: - // [114] phi (byte*) print_line_cursor#21 = (byte*) 1024 [phi:main::@15->print_ln#0] -- pbuz1=pbuc1 + // [116] phi (byte*) print_line_cursor#21 = (byte*) 1024 [phi:main::@15->print_ln#0] -- pbuz1=pbuc1 lda #<$400 sta print_line_cursor lda #>$400 @@ -4355,9 +10190,9 @@ main: { // main::@18 b18: // [17] call print_ln - // [114] phi from main::@18 to print_ln [phi:main::@18->print_ln] + // [116] phi from main::@18 to print_ln [phi:main::@18->print_ln] print_ln_from_b18: - // [114] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@18->print_ln#0] -- register_copy + // [116] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@18->print_ln#0] -- register_copy jsr print_ln // [18] phi from main::@18 to main::@19 [phi:main::@18->main::@19] b19_from_b18: @@ -4365,17 +10200,17 @@ main: { // main::@19 b19: // [19] call memset - // [189] phi from main::@19 to memset [phi:main::@19->memset] + // [193] phi from main::@19 to memset [phi:main::@19->memset] memset_from_b19: - // [189] phi (byte) memset::c#3 = (byte) 0 [phi:main::@19->memset#0] -- vbuz1=vbuc1 + // [193] phi (byte) memset::c#3 = (byte) 0 [phi:main::@19->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - // [189] phi (void*) memset::str#3 = (void*)(const byte*) sieve#0 [phi:main::@19->memset#1] -- pvoz1=pvoc1 + // [193] phi (void*) memset::str#3 = (void*)(const byte*) sieve#0 [phi:main::@19->memset#1] -- pvoz1=pvoc1 lda #<sieve sta memset.str lda #>sieve sta memset.str+1 - // [189] phi (word) memset::num#2 = (const word) COUNT#0 [phi:main::@19->memset#2] -- vwuz1=vwuc1 + // [193] phi (word) memset::num#2 = (const word) COUNT#0 [phi:main::@19->memset#2] -- vwuz1=vwuc1 lda #<COUNT sta memset.num lda #>COUNT @@ -4388,38 +10223,99 @@ main: { b20: // [21] call clock_start jsr clock_start - // [22] phi from main::@20 to main::@1 [phi:main::@20->main::@1] - b1_from_b20: - // [22] phi (byte*) main::sieve_i#2 = (const byte*) sieve#0+(byte) 2 [phi:main::@20->main::@1#0] -- pbuz1=pbuc1 + // [22] phi from main::@20 to main::@2 [phi:main::@20->main::@2] + b2_from_b20: + // [22] phi (byte*) main::sieve_i#11 = (const byte*) sieve#0+(byte) 2 [phi:main::@20->main::@2#0] -- pbuz1=pbuc1 lda #<sieve+2 sta sieve_i lda #>sieve+2 sta sieve_i+1 - // [22] phi (word) main::i#11 = (byte) 2 [phi:main::@20->main::@1#1] -- vwuz1=vbuc1 + // [22] phi (word) main::i#16 = (byte) 2 [phi:main::@20->main::@2#1] -- vwuz1=vbuc1 lda #<2 - sta i + sta i_16 lda #>2 - sta i+1 + sta i_16+1 + jmp b2 + // [22] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [22] phi (byte*) main::sieve_i#11 = (byte*) main::sieve_i#1 [phi:main::@1->main::@2#0] -- register_copy + // [22] phi (word) main::i#16 = (word) main::i#11 [phi:main::@1->main::@2#1] -- register_copy + jmp b2 + // main::@2 + b2: + // [23] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 -- vbuc1_neq__deref_pbuz1_then_la1 + ldy #0 + lda (sieve_i),y + cmp #0 + bne b4 + jmp b7 + // main::@7 + b7: + // [24] (word) main::j#0 ← (word) main::i#16 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda i_16 + asl + sta j + lda i_16+1 + rol + sta j+1 + // [25] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 -- pbuz1=pbuc1_plus_vwuz2 + lda j + clc + adc #<sieve + sta s + lda j+1 + adc #>sieve + sta s+1 + // [26] phi from main::@6 main::@7 to main::@5 [phi:main::@6/main::@7->main::@5] + b5_from_b6: + b5_from_b7: + // [26] phi (byte*) main::s#2 = (byte*) main::s#1 [phi:main::@6/main::@7->main::@5#0] -- register_copy + // [26] phi (word) main::j#2 = (word) main::j#1 [phi:main::@6/main::@7->main::@5#1] -- register_copy + jmp b5 + // main::@5 + b5: + // [27] if((word) main::j#2<(const word) COUNT#0) goto main::@6 -- vwuz1_lt_vwuc1_then_la1 + lda j+1 + cmp #>COUNT + bcc b6 + bne !+ + lda j + cmp #<COUNT + bcc b6 + !: + jmp b4 + // main::@4 + b4: + // [28] (word) main::i#11 ← ++ (word) main::i#16 -- vwuz1=_inc_vwuz1 + inc i_11 + bne !+ + inc i_11+1 + !: + // [29] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 -- pbuz1=_inc_pbuz1 + inc sieve_i + bne !+ + inc sieve_i+1 + !: jmp b1 // main::@1 b1: - // [23] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 - lda i+1 + // [30] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 + lda i_11+1 cmp #>SQRT_COUNT - bcc b2 + bcc b2_from_b1 bne !+ - lda i + lda i_11 cmp #<SQRT_COUNT - bcc b2 + bcc b2_from_b1 !: - // [24] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [31] phi from main::@1 to main::@3 [phi:main::@1->main::@3] b3_from_b1: jmp b3 // main::@3 b3: - // [25] call clock + // [32] call clock jsr clock - // [26] (dword) clock::return#2 ← (dword) clock::return#0 -- vduz1=vduz2 + // [33] (dword) clock::return#2 ← (dword) clock::return#0 -- vduz1=vduz2 lda clock.return sta clock.return_2 lda clock.return+1 @@ -4431,7 +10327,7 @@ main: { jmp b21 // main::@21 b21: - // [27] (dword~) main::$10 ← (dword) clock::return#2 -- vduz1=vduz2 + // [34] (dword~) main::$10 ← (dword) clock::return#2 -- vduz1=vduz2 lda clock.return_2 sta _10 lda clock.return_2+1 @@ -4440,7 +10336,7 @@ main: { sta _10+2 lda clock.return_2+3 sta _10+3 - // [28] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz2_minus_vduc1 + // [35] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz2_minus_vduc1 lda _10 sec sbc #<CLOCKS_PER_INIT @@ -4454,7 +10350,7 @@ main: { lda _10+3 sbc #>CLOCKS_PER_INIT>>$10 sta cyclecount+3 - // [29] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 -- vduz1=vduz2 + // [36] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 -- vduz1=vduz2 lda cyclecount sta div32u16u.dividend lda cyclecount+1 @@ -4463,9 +10359,9 @@ main: { sta div32u16u.dividend+2 lda cyclecount+3 sta div32u16u.dividend+3 - // [30] call div32u16u + // [37] call div32u16u jsr div32u16u - // [31] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 + // [38] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 lda div32u16u.return sta div32u16u.return_2 lda div32u16u.return+1 @@ -4477,7 +10373,7 @@ main: { jmp b22 // main::@22 b22: - // [32] (dword~) main::$14 ← (dword) div32u16u::return#2 -- vduz1=vduz2 + // [39] (dword~) main::$14 ← (dword) div32u16u::return#2 -- vduz1=vduz2 lda div32u16u.return_2 sta _14 lda div32u16u.return_2+1 @@ -4486,17 +10382,17 @@ main: { sta _14+2 lda div32u16u.return_2+3 sta _14+3 - // [33] (word) main::sec100s#0 ← (word)(dword~) main::$14 -- vwuz1=_word_vduz2 + // [40] (word) main::sec100s#0 ← (word)(dword~) main::$14 -- vwuz1=_word_vduz2 lda _14 sta sec100s lda _14+1 sta sec100s+1 - // [34] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 + // [41] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 lda print_line_cursor sta print_char_cursor lda print_line_cursor+1 sta print_char_cursor+1 - // [35] call print_str + // [42] call print_str // [70] phi from main::@22 to print_str [phi:main::@22->print_str] print_str_from_b22: // [70] phi (byte*) print_char_cursor#66 = (byte*~) print_char_cursor#90 [phi:main::@22->print_str#0] -- register_copy @@ -4509,23 +10405,23 @@ main: { jmp b23 // main::@23 b23: - // [36] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 -- vwuz1=vwuz2 + // [43] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 -- vwuz1=vwuz2 lda sec100s sta print_word_decimal.w lda sec100s+1 sta print_word_decimal.w+1 - // [37] call print_word_decimal + // [44] call print_word_decimal // [80] phi from main::@23 to print_word_decimal [phi:main::@23->print_word_decimal] print_word_decimal_from_b23: // [80] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#2 [phi:main::@23->print_word_decimal#0] -- register_copy // [80] phi (word) print_word_decimal::w#3 = (word) print_word_decimal::w#1 [phi:main::@23->print_word_decimal#1] -- register_copy jsr print_word_decimal - // [38] phi from main::@23 to main::@24 [phi:main::@23->main::@24] + // [45] phi from main::@23 to main::@24 [phi:main::@23->main::@24] b24_from_b23: jmp b24 // main::@24 b24: - // [39] call print_str + // [46] call print_str // [70] phi from main::@24 to print_str [phi:main::@24->print_str] print_str_from_b24: // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:main::@24->print_str#0] -- register_copy @@ -4538,7 +10434,7 @@ main: { jmp b25 // main::@25 b25: - // [40] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 -- vduz1=vduz2 + // [47] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 -- vduz1=vduz2 lda cyclecount sta print_dword_decimal.w lda cyclecount+1 @@ -4547,38 +10443,38 @@ main: { sta print_dword_decimal.w+2 lda cyclecount+3 sta print_dword_decimal.w+3 - // [41] call print_dword_decimal + // [48] call print_dword_decimal jsr print_dword_decimal - // [42] phi from main::@25 to main::@26 [phi:main::@25->main::@26] + // [49] phi from main::@25 to main::@26 [phi:main::@25->main::@26] b26_from_b25: jmp b26 // main::@26 b26: - // [43] call print_ln - // [114] phi from main::@26 to print_ln [phi:main::@26->print_ln] + // [50] call print_ln + // [116] phi from main::@26 to print_ln [phi:main::@26->print_ln] print_ln_from_b26: - // [114] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@26->print_ln#0] -- register_copy + // [116] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@26->print_ln#0] -- register_copy jsr print_ln - // [44] phi from main::@26 to main::@8 [phi:main::@26->main::@8] + // [51] phi from main::@26 to main::@8 [phi:main::@26->main::@8] b8_from_b26: - // [44] phi (byte*) print_char_cursor#62 = (byte*) print_line_cursor#1 [phi:main::@26->main::@8#0] -- register_copy - // [44] phi (word) main::i#10 = (byte) 2 [phi:main::@26->main::@8#1] -- vwuz1=vbuc1 + // [51] phi (byte*) print_char_cursor#62 = (byte*) print_line_cursor#1 [phi:main::@26->main::@8#0] -- register_copy + // [51] phi (word) main::i#10 = (byte) 2 [phi:main::@26->main::@8#1] -- vwuz1=vbuc1 lda #<2 - sta i_10 + sta i lda #>2 - sta i_10+1 + sta i+1 jmp b8 // main::@8 b8: - // [45] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 -- pbuz1=pbuc1_plus_vwuz2 - lda i_10 + // [52] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 -- pbuz1=pbuc1_plus_vwuz2 + lda i clc adc #<sieve sta _38 - lda i_10+1 + lda i+1 adc #>sieve sta _38+1 - // [46] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 -- vbuc1_neq__deref_pbuz1_then_la1 + // [53] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 -- vbuc1_neq__deref_pbuz1_then_la1 ldy #0 lda (_38),y cmp #0 @@ -4586,56 +10482,56 @@ main: { jmp b10 // main::@10 b10: - // [47] (word) print_word_decimal::w#2 ← (word) main::i#10 -- vwuz1=vwuz2 - lda i_10 + // [54] (word) print_word_decimal::w#2 ← (word) main::i#10 -- vwuz1=vwuz2 + lda i sta print_word_decimal.w - lda i_10+1 + lda i+1 sta print_word_decimal.w+1 - // [48] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 + // [55] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 lda print_char_cursor_62 sta print_char_cursor lda print_char_cursor_62+1 sta print_char_cursor+1 - // [49] call print_word_decimal + // [56] call print_word_decimal // [80] phi from main::@10 to print_word_decimal [phi:main::@10->print_word_decimal] print_word_decimal_from_b10: // [80] phi (byte*) print_char_cursor#58 = (byte*~) print_char_cursor#96 [phi:main::@10->print_word_decimal#0] -- register_copy // [80] phi (word) print_word_decimal::w#3 = (word) print_word_decimal::w#2 [phi:main::@10->print_word_decimal#1] -- register_copy jsr print_word_decimal - // [50] phi from main::@10 to main::@27 [phi:main::@10->main::@27] + // [57] phi from main::@10 to main::@27 [phi:main::@10->main::@27] b27_from_b10: jmp b27 // main::@27 b27: - // [51] call print_char + // [58] call print_char jsr print_char - // [52] phi from main::@27 main::@29 to main::@9 [phi:main::@27/main::@29->main::@9] + // [59] phi from main::@27 main::@29 to main::@9 [phi:main::@27/main::@29->main::@9] b9_from_b27: b9_from_b29: - // [52] phi (byte*) print_char_cursor#63 = (byte*) print_char_cursor#10 [phi:main::@27/main::@29->main::@9#0] -- register_copy + // [59] phi (byte*) print_char_cursor#63 = (byte*) print_char_cursor#10 [phi:main::@27/main::@29->main::@9#0] -- register_copy jmp b9 // main::@9 b9: - // [53] (word) main::i#3 ← ++ (word) main::i#10 -- vwuz1=_inc_vwuz1 - inc i_3 + // [60] (word) main::i#3 ← ++ (word) main::i#10 -- vwuz1=_inc_vwuz1 + inc i bne !+ - inc i_3+1 + inc i+1 !: - // [54] if((word) main::i#3<(word) $514) goto main::@28 -- vwuz1_lt_vwuc1_then_la1 - lda i_3+1 + // [61] if((word) main::i#3<(word) $514) goto main::@28 -- vwuz1_lt_vwuc1_then_la1 + lda i+1 cmp #>$514 bcc b28 bne !+ - lda i_3 + lda i cmp #<$514 bcc b28 !: - // [55] phi from main::@9 to main::@11 [phi:main::@9->main::@11] + // [62] phi from main::@9 to main::@11 [phi:main::@9->main::@11] b11_from_b9: jmp b11 // main::@11 b11: - // [56] call print_str + // [63] call print_str // [70] phi from main::@11 to print_str [phi:main::@11->print_str] print_str_from_b11: // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#63 [phi:main::@11->print_str#0] -- register_copy @@ -4648,110 +10544,50 @@ main: { jmp b12 // main::@12 b12: - // [57] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 + // [64] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 inc SCREEN+$3e7 jmp b12 // main::@28 b28: - // [58] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 -- pbuz1=pbuz2 + // [65] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 -- pbuz1=pbuz2 lda print_char_cursor sta print_char_cursor_99 lda print_char_cursor+1 sta print_char_cursor_99+1 - // [44] phi from main::@28 to main::@8 [phi:main::@28->main::@8] + // [51] phi from main::@28 to main::@8 [phi:main::@28->main::@8] b8_from_b28: - // [44] phi (byte*) print_char_cursor#62 = (byte*~) print_char_cursor#99 [phi:main::@28->main::@8#0] -- register_copy - // [44] phi (word) main::i#10 = (word) main::i#3 [phi:main::@28->main::@8#1] -- register_copy + // [51] phi (byte*) print_char_cursor#62 = (byte*~) print_char_cursor#99 [phi:main::@28->main::@8#0] -- register_copy + // [51] phi (word) main::i#10 = (word) main::i#3 [phi:main::@28->main::@8#1] -- register_copy jmp b8 // main::@29 b29: - // [59] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 + // [66] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 lda print_char_cursor_62 sta print_char_cursor lda print_char_cursor_62+1 sta print_char_cursor+1 jmp b9_from_b29 - // main::@2 - b2: - // [60] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 -- vbuc1_neq__deref_pbuz1_then_la1 - ldy #0 - lda (sieve_i),y - cmp #0 - bne b4 - jmp b7 - // main::@7 - b7: - // [61] (word) main::j#0 ← (word) main::i#11 << (byte) 1 -- vwuz1=vwuz2_rol_1 - lda i - asl - sta j - lda i+1 - rol - sta j+1 - // [62] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 -- pbuz1=pbuc1_plus_vwuz2 - lda j - clc - adc #<sieve - sta s - lda j+1 - adc #>sieve - sta s+1 - // [63] phi from main::@6 main::@7 to main::@5 [phi:main::@6/main::@7->main::@5] - b5_from_b6: - b5_from_b7: - // [63] phi (byte*) main::s#2 = (byte*) main::s#1 [phi:main::@6/main::@7->main::@5#0] -- register_copy - // [63] phi (word) main::j#2 = (word) main::j#1 [phi:main::@6/main::@7->main::@5#1] -- register_copy - jmp b5 - // main::@5 - b5: - // [64] if((word) main::j#2<(const word) COUNT#0) goto main::@6 -- vwuz1_lt_vwuc1_then_la1 - lda j+1 - cmp #>COUNT - bcc b6 - bne !+ - lda j - cmp #<COUNT - bcc b6 - !: - jmp b4 - // main::@4 - b4: - // [65] (word) main::i#2 ← ++ (word) main::i#11 -- vwuz1=_inc_vwuz1 - inc i - bne !+ - inc i+1 - !: - // [66] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#2 -- pbuz1=_inc_pbuz1 - inc sieve_i - bne !+ - inc sieve_i+1 - !: - // [22] phi from main::@4 to main::@1 [phi:main::@4->main::@1] - b1_from_b4: - // [22] phi (byte*) main::sieve_i#2 = (byte*) main::sieve_i#1 [phi:main::@4->main::@1#0] -- register_copy - // [22] phi (word) main::i#11 = (word) main::i#2 [phi:main::@4->main::@1#1] -- register_copy - jmp b1 // main::@6 b6: // [67] *((byte*) main::s#2) ← (byte) 1 -- _deref_pbuz1=vbuc1 lda #1 ldy #0 sta (s),y - // [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#11 -- pbuz1=pbuz1_plus_vwuz2 + // [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 -- pbuz1=pbuz1_plus_vwuz2 lda s clc - adc i + adc i_16 sta s lda s+1 - adc i+1 + adc i_16+1 sta s+1 - // [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#11 -- vwuz1=vwuz1_plus_vwuz2 + // [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 -- vwuz1=vwuz1_plus_vwuz2 lda j clc - adc i + adc i_16 sta j lda j+1 - adc i+1 + adc i_16+1 sta j+1 jmp b5_from_b6 str: .text "Sieve benchmark - calculating primes@" @@ -4862,93 +10698,79 @@ print_word_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// utoa(word zeropage($13) value, byte* zeropage($16) buffer) +// utoa(word zeropage($14) value, byte* zeropage($16) buffer) utoa: { .const max_digits = 5 - .label _4 = $5b - .label _11 = $58 - .label digit_value = $59 - .label digit = $12 - .label value = $13 + .label _4 = $5e + .label _11 = $61 + .label digit_value = $18 + .label digit = $13 + .label value = $14 .label buffer = $16 - .label buffer_4 = $5c - .label started = $15 - // [87] phi from utoa to utoa::@1 [phi:utoa->utoa::@1] - b1_from_utoa: - // [87] phi (byte*) utoa::buffer#11 = (const byte[6]) decimal_digits#0 [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 + .label buffer_4 = $5f + .label started = $12 + jmp b18_1 + // utoa::@18_1 + b18_1: + // [87] (word) utoa::digit_value#4 ← *((const word[]) RADIX_DECIMAL_VALUES#0) -- vwuz1=_deref_pwuc1 + lda RADIX_DECIMAL_VALUES + sta digit_value + lda RADIX_DECIMAL_VALUES+1 + sta digit_value+1 + // [88] phi from utoa::@18_1 to utoa::@6 [phi:utoa::@18_1->utoa::@6] + b6_from_b18_1: + // [88] phi (word) utoa::digit_value#3 = (word) utoa::digit_value#4 [phi:utoa::@18_1->utoa::@6#0] -- register_copy + // [88] phi (byte*) utoa::buffer#21 = (const byte[6]) decimal_digits#0 [phi:utoa::@18_1->utoa::@6#1] -- pbuz1=pbuc1 lda #<decimal_digits sta buffer lda #>decimal_digits sta buffer+1 - // [87] phi (byte) utoa::started#2 = (byte) 0 [phi:utoa->utoa::@1#1] -- vbuz1=vbuc1 + // [88] phi (byte) utoa::started#4 = (byte) 0 [phi:utoa::@18_1->utoa::@6#2] -- vbuz1=vbuc1 lda #0 sta started - // [87] phi (word) utoa::value#2 = (word) utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy - // [87] phi (byte) utoa::digit#2 = (byte) 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 + // [88] phi (word) utoa::value#15 = (word) utoa::value#1 [phi:utoa::@18_1->utoa::@6#3] -- register_copy + // [88] phi (byte) utoa::digit#8 = (byte) 0 [phi:utoa::@18_1->utoa::@6#4] -- vbuz1=vbuc1 lda #0 sta digit - jmp b1 - // [87] phi from utoa::@2 to utoa::@1 [phi:utoa::@2->utoa::@1] - b1_from_b2: - // [87] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#12 [phi:utoa::@2->utoa::@1#0] -- register_copy - // [87] phi (byte) utoa::started#2 = (byte) utoa::started#3 [phi:utoa::@2->utoa::@1#1] -- register_copy - // [87] phi (word) utoa::value#2 = (word) utoa::value#4 [phi:utoa::@2->utoa::@1#2] -- register_copy - // [87] phi (byte) utoa::digit#2 = (byte) utoa::digit#1 [phi:utoa::@2->utoa::@1#3] -- register_copy - jmp b1 - // utoa::@1 - b1: - // [88] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 - lda digit - asl - sta _11 - // [89] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuz2 - ldy _11 - lda RADIX_DECIMAL_VALUES,y - sta digit_value - lda RADIX_DECIMAL_VALUES+1,y - sta digit_value+1 - // [90] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 -- vbuc1_neq_vbuz1_then_la1 - lda #0 - cmp started - bne b3 jmp b6 // utoa::@6 b6: - // [91] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@3 -- vwuz1_ge_vwuz2_then_la1 + // [89] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@3 -- vwuz1_ge_vwuz2_then_la1 lda digit_value+1 cmp value+1 bne !+ lda digit_value cmp value - beq b3 + beq b3_from_b6 !: - bcc b3 - // [92] phi from utoa::@6 to utoa::@2 [phi:utoa::@6->utoa::@2] + bcc b3_from_b6 + // [90] phi from utoa::@6 to utoa::@2 [phi:utoa::@6->utoa::@2] b2_from_b6: - // [92] phi (byte*) utoa::buffer#12 = (byte*) utoa::buffer#11 [phi:utoa::@6->utoa::@2#0] -- register_copy - // [92] phi (byte) utoa::started#3 = (byte) utoa::started#2 [phi:utoa::@6->utoa::@2#1] -- register_copy - // [92] phi (word) utoa::value#4 = (word) utoa::value#2 [phi:utoa::@6->utoa::@2#2] -- register_copy + // [90] phi (byte) utoa::digit#6 = (byte) utoa::digit#8 [phi:utoa::@6->utoa::@2#0] -- register_copy + // [90] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#21 [phi:utoa::@6->utoa::@2#1] -- register_copy + // [90] phi (byte) utoa::started#2 = (byte) utoa::started#4 [phi:utoa::@6->utoa::@2#2] -- register_copy + // [90] phi (word) utoa::value#2 = (word) utoa::value#15 [phi:utoa::@6->utoa::@2#3] -- register_copy jmp b2 // utoa::@2 b2: - // [93] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 -- vbuz1=_inc_vbuz1 + // [91] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 -- vbuz1=_inc_vbuz1 inc digit - // [94] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 -- vbuz1_lt_vbuc1_then_la1 + // [92] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 -- vbuz1_lt_vbuc1_then_la1 lda digit cmp #max_digits-1 - bcc b1_from_b2 + bcc b1 jmp b4 // utoa::@4 b4: - // [95] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 -- vbuz1=_byte_vwuz2 + // [93] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 -- vbuz1=_byte_vwuz2 lda value sta _4 - // [96] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [94] *((byte*) utoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy _4 lda DIGITS,y ldy #0 sta (buffer),y - // [97] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 -- pbuz1=_inc_pbuz2 + // [95] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz2 lda buffer clc adc #1 @@ -4956,37 +10778,69 @@ utoa: { lda buffer+1 adc #0 sta buffer_4+1 - // [98] *((byte*) utoa::buffer#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [96] *((byte*) utoa::buffer#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (buffer_4),y jmp breturn // utoa::@return breturn: - // [99] return + // [97] return rts + // utoa::@1 + b1: + // [98] (byte~) utoa::$11 ← (byte) utoa::digit#1 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda digit + asl + sta _11 + // [99] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuz2 + ldy _11 + lda RADIX_DECIMAL_VALUES,y + sta digit_value + lda RADIX_DECIMAL_VALUES+1,y + sta digit_value+1 + // [100] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp started + bne b3_from_b1 + // [88] phi from utoa::@1 to utoa::@6 [phi:utoa::@1->utoa::@6] + b6_from_b1: + // [88] phi (word) utoa::digit_value#3 = (word) utoa::digit_value#0 [phi:utoa::@1->utoa::@6#0] -- register_copy + // [88] phi (byte*) utoa::buffer#21 = (byte*) utoa::buffer#11 [phi:utoa::@1->utoa::@6#1] -- register_copy + // [88] phi (byte) utoa::started#4 = (byte) utoa::started#2 [phi:utoa::@1->utoa::@6#2] -- register_copy + // [88] phi (word) utoa::value#15 = (word) utoa::value#2 [phi:utoa::@1->utoa::@6#3] -- register_copy + // [88] phi (byte) utoa::digit#8 = (byte) utoa::digit#1 [phi:utoa::@1->utoa::@6#4] -- register_copy + jmp b6 + // [101] phi from utoa::@1 utoa::@6 to utoa::@3 [phi:utoa::@1/utoa::@6->utoa::@3] + b3_from_b1: + b3_from_b6: + // [101] phi (word) utoa::digit_value#2 = (word) utoa::digit_value#0 [phi:utoa::@1/utoa::@6->utoa::@3#0] -- register_copy + // [101] phi (byte*) utoa::buffer#22 = (byte*) utoa::buffer#11 [phi:utoa::@1/utoa::@6->utoa::@3#1] -- register_copy + // [101] phi (word) utoa::value#16 = (word) utoa::value#2 [phi:utoa::@1/utoa::@6->utoa::@3#2] -- register_copy + // [101] phi (byte) utoa::digit#7 = (byte) utoa::digit#1 [phi:utoa::@1/utoa::@6->utoa::@3#3] -- register_copy + jmp b3 // utoa::@3 b3: - // [100] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 -- pbuz1=pbuz2 + // [102] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 -- pbuz1=pbuz2 lda buffer sta utoa_append.buffer lda buffer+1 sta utoa_append.buffer+1 - // [101] (word) utoa_append::value#0 ← (word) utoa::value#2 -- vwuz1=vwuz2 + // [103] (word) utoa_append::value#0 ← (word) utoa::value#16 -- vwuz1=vwuz2 lda value sta utoa_append.value lda value+1 sta utoa_append.value+1 - // [102] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 -- vwuz1=vwuz2 + // [104] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 -- vwuz1=vwuz2 lda digit_value sta utoa_append.sub lda digit_value+1 sta utoa_append.sub+1 - // [103] call utoa_append - // [107] phi from utoa::@3 to utoa_append [phi:utoa::@3->utoa_append] + // [105] call utoa_append + // [109] phi from utoa::@3 to utoa_append [phi:utoa::@3->utoa_append] utoa_append_from_b3: jsr utoa_append - // [104] (word) utoa_append::return#0 ← (word) utoa_append::value#2 -- vwuz1=vwuz2 + // [106] (word) utoa_append::return#0 ← (word) utoa_append::value#2 -- vwuz1=vwuz2 lda utoa_append.value sta utoa_append.return lda utoa_append.value+1 @@ -4994,23 +10848,24 @@ utoa: { jmp b5 // utoa::@5 b5: - // [105] (word) utoa::value#0 ← (word) utoa_append::return#0 -- vwuz1=vwuz2 + // [107] (word) utoa::value#0 ← (word) utoa_append::return#0 -- vwuz1=vwuz2 lda utoa_append.return sta value lda utoa_append.return+1 sta value+1 - // [106] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [108] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#22 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - // [92] phi from utoa::@5 to utoa::@2 [phi:utoa::@5->utoa::@2] + // [90] phi from utoa::@5 to utoa::@2 [phi:utoa::@5->utoa::@2] b2_from_b5: - // [92] phi (byte*) utoa::buffer#12 = (byte*) utoa::buffer#3 [phi:utoa::@5->utoa::@2#0] -- register_copy - // [92] phi (byte) utoa::started#3 = (byte) 1 [phi:utoa::@5->utoa::@2#1] -- vbuz1=vbuc1 + // [90] phi (byte) utoa::digit#6 = (byte) utoa::digit#7 [phi:utoa::@5->utoa::@2#0] -- register_copy + // [90] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#3 [phi:utoa::@5->utoa::@2#1] -- register_copy + // [90] phi (byte) utoa::started#2 = (byte) 1 [phi:utoa::@5->utoa::@2#2] -- vbuz1=vbuc1 lda #1 sta started - // [92] phi (word) utoa::value#4 = (word) utoa::value#0 [phi:utoa::@5->utoa::@2#2] -- register_copy + // [90] phi (word) utoa::value#2 = (word) utoa::value#0 [phi:utoa::@5->utoa::@2#3] -- register_copy jmp b2 } // utoa_append @@ -5022,23 +10877,23 @@ utoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// utoa_append(byte* zeropage($5e) buffer, word zeropage($18) value, word zeropage($60) sub) +// utoa_append(byte* zeropage($62) buffer, word zeropage($1a) value, word zeropage($64) sub) utoa_append: { - .label buffer = $5e - .label value = $18 - .label sub = $60 - .label return = $62 - .label digit = $1a - // [108] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] + .label buffer = $62 + .label value = $1a + .label sub = $64 + .label return = $66 + .label digit = $1c + // [110] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] b1_from_utoa_append: - // [108] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuz1=vbuc1 + // [110] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuz1=vbuc1 lda #0 sta digit - // [108] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy + // [110] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy jmp b1 // utoa_append::@1 b1: - // [109] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 + // [111] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 lda sub+1 cmp value+1 bne !+ @@ -5050,7 +10905,7 @@ utoa_append: { jmp b3 // utoa_append::@3 b3: - // [110] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [112] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy digit lda DIGITS,y ldy #0 @@ -5058,13 +10913,13 @@ utoa_append: { jmp breturn // utoa_append::@return breturn: - // [111] return + // [113] return rts // utoa_append::@2 b2: - // [112] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuz1=_inc_vbuz1 + // [114] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuz1=_inc_vbuz1 inc digit - // [113] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 + // [115] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 lda value sec sbc sub @@ -5072,23 +10927,23 @@ utoa_append: { lda value+1 sbc sub+1 sta value+1 - // [108] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] + // [110] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] b1_from_b2: - // [108] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy - // [108] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy + // [110] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy + // [110] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy jmp b1 } // print_ln // Print a newline print_ln: { - // [115] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + // [117] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] b1_from_print_ln: b1_from_b1: - // [115] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + // [117] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy jmp b1 // print_ln::@1 b1: - // [116] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [118] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc print_line_cursor @@ -5096,7 +10951,7 @@ print_ln: { bcc !+ inc print_line_cursor+1 !: - // [117] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + // [119] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 lda print_line_cursor+1 cmp print_char_cursor+1 bcc b1_from_b1 @@ -5108,15 +10963,15 @@ print_ln: { jmp breturn // print_ln::@return breturn: - // [118] return + // [120] return rts } // print_dword_decimal // Print a dword as DECIMAL -// print_dword_decimal(dword zeropage($52) w) +// print_dword_decimal(dword zeropage($58) w) print_dword_decimal: { - .label w = $52 - // [119] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 -- vduz1=vduz2 + .label w = $58 + // [121] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 -- vduz1=vduz2 lda w sta ultoa.value lda w+1 @@ -5125,16 +10980,16 @@ print_dword_decimal: { sta ultoa.value+2 lda w+3 sta ultoa.value+3 - // [120] call ultoa - // [124] phi from print_dword_decimal to ultoa [phi:print_dword_decimal->ultoa] + // [122] call ultoa + // [126] phi from print_dword_decimal to ultoa [phi:print_dword_decimal->ultoa] ultoa_from_print_dword_decimal: jsr ultoa - // [121] phi from print_dword_decimal to print_dword_decimal::@1 [phi:print_dword_decimal->print_dword_decimal::@1] + // [123] phi from print_dword_decimal to print_dword_decimal::@1 [phi:print_dword_decimal->print_dword_decimal::@1] b1_from_print_dword_decimal: jmp b1 // print_dword_decimal::@1 b1: - // [122] call print_str + // [124] call print_str // [70] phi from print_dword_decimal::@1 to print_str [phi:print_dword_decimal::@1->print_str] print_str_from_b1: // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:print_dword_decimal::@1->print_str#0] -- register_copy @@ -5147,7 +11002,7 @@ print_dword_decimal: { jmp breturn // print_dword_decimal::@return breturn: - // [123] return + // [125] return rts } // ultoa @@ -5156,106 +11011,91 @@ print_dword_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// ultoa(dword zeropage($1e) value, byte* zeropage($23) buffer) +// ultoa(dword zeropage($21) value, byte* zeropage($25) buffer) ultoa: { .const max_digits = $a - .label _4 = $69 - .label _11 = $64 - .label digit_value = $65 - .label digit = $1d - .label value = $1e - .label buffer = $23 - .label buffer_4 = $6a - .label started = $22 - // [125] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] - b1_from_ultoa: - // [125] phi (byte*) ultoa::buffer#11 = (const byte[$b]) decimal_digits_long#0 [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 + .label _4 = $68 + .label _11 = $6b + .label digit_value = $27 + .label digit = $20 + .label value = $21 + .label buffer = $25 + .label buffer_4 = $69 + .label started = $1f + jmp b18_1 + // ultoa::@18_1 + b18_1: + // [127] (dword) ultoa::digit_value#4 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0) -- vduz1=_deref_pduc1 + lda RADIX_DECIMAL_VALUES_LONG + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1 + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2 + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3 + sta digit_value+3 + // [128] phi from ultoa::@18_1 to ultoa::@6 [phi:ultoa::@18_1->ultoa::@6] + b6_from_b18_1: + // [128] phi (dword) ultoa::digit_value#3 = (dword) ultoa::digit_value#4 [phi:ultoa::@18_1->ultoa::@6#0] -- register_copy + // [128] phi (byte*) ultoa::buffer#21 = (const byte[$b]) decimal_digits_long#0 [phi:ultoa::@18_1->ultoa::@6#1] -- pbuz1=pbuc1 lda #<decimal_digits_long sta buffer lda #>decimal_digits_long sta buffer+1 - // [125] phi (byte) ultoa::started#2 = (byte) 0 [phi:ultoa->ultoa::@1#1] -- vbuz1=vbuc1 + // [128] phi (byte) ultoa::started#4 = (byte) 0 [phi:ultoa::@18_1->ultoa::@6#2] -- vbuz1=vbuc1 lda #0 sta started - // [125] phi (dword) ultoa::value#2 = (dword) ultoa::value#1 [phi:ultoa->ultoa::@1#2] -- register_copy - // [125] phi (byte) ultoa::digit#2 = (byte) 0 [phi:ultoa->ultoa::@1#3] -- vbuz1=vbuc1 + // [128] phi (dword) ultoa::value#15 = (dword) ultoa::value#1 [phi:ultoa::@18_1->ultoa::@6#3] -- register_copy + // [128] phi (byte) ultoa::digit#8 = (byte) 0 [phi:ultoa::@18_1->ultoa::@6#4] -- vbuz1=vbuc1 lda #0 sta digit - jmp b1 - // [125] phi from ultoa::@2 to ultoa::@1 [phi:ultoa::@2->ultoa::@1] - b1_from_b2: - // [125] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#12 [phi:ultoa::@2->ultoa::@1#0] -- register_copy - // [125] phi (byte) ultoa::started#2 = (byte) ultoa::started#3 [phi:ultoa::@2->ultoa::@1#1] -- register_copy - // [125] phi (dword) ultoa::value#2 = (dword) ultoa::value#4 [phi:ultoa::@2->ultoa::@1#2] -- register_copy - // [125] phi (byte) ultoa::digit#2 = (byte) ultoa::digit#1 [phi:ultoa::@2->ultoa::@1#3] -- register_copy - jmp b1 - // ultoa::@1 - b1: - // [126] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 - lda digit - asl - asl - sta _11 - // [127] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) -- vduz1=pduc1_derefidx_vbuz2 - ldy _11 - lda RADIX_DECIMAL_VALUES_LONG,y - sta digit_value - lda RADIX_DECIMAL_VALUES_LONG+1,y - sta digit_value+1 - lda RADIX_DECIMAL_VALUES_LONG+2,y - sta digit_value+2 - lda RADIX_DECIMAL_VALUES_LONG+3,y - sta digit_value+3 - // [128] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 -- vbuc1_neq_vbuz1_then_la1 - lda #0 - cmp started - bne b3 jmp b6 // ultoa::@6 b6: - // [129] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@3 -- vduz1_ge_vduz2_then_la1 + // [129] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@3 -- vduz1_ge_vduz2_then_la1 lda value+3 cmp digit_value+3 bcc !+ - bne b3 + bne b3_from_b6 lda value+2 cmp digit_value+2 bcc !+ - bne b3 + bne b3_from_b6 lda value+1 cmp digit_value+1 bcc !+ - bne b3 + bne b3_from_b6 lda value cmp digit_value - bcs b3 + bcs b3_from_b6 !: // [130] phi from ultoa::@6 to ultoa::@2 [phi:ultoa::@6->ultoa::@2] b2_from_b6: - // [130] phi (byte*) ultoa::buffer#12 = (byte*) ultoa::buffer#11 [phi:ultoa::@6->ultoa::@2#0] -- register_copy - // [130] phi (byte) ultoa::started#3 = (byte) ultoa::started#2 [phi:ultoa::@6->ultoa::@2#1] -- register_copy - // [130] phi (dword) ultoa::value#4 = (dword) ultoa::value#2 [phi:ultoa::@6->ultoa::@2#2] -- register_copy + // [130] phi (byte) ultoa::digit#6 = (byte) ultoa::digit#8 [phi:ultoa::@6->ultoa::@2#0] -- register_copy + // [130] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#21 [phi:ultoa::@6->ultoa::@2#1] -- register_copy + // [130] phi (byte) ultoa::started#2 = (byte) ultoa::started#4 [phi:ultoa::@6->ultoa::@2#2] -- register_copy + // [130] phi (dword) ultoa::value#2 = (dword) ultoa::value#15 [phi:ultoa::@6->ultoa::@2#3] -- register_copy jmp b2 // ultoa::@2 b2: - // [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 -- vbuz1=_inc_vbuz1 + // [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 -- vbuz1=_inc_vbuz1 inc digit // [132] if((byte) ultoa::digit#1<(const byte) ultoa::max_digits#1-(byte) 1) goto ultoa::@1 -- vbuz1_lt_vbuc1_then_la1 lda digit cmp #max_digits-1 - bcc b1_from_b2 + bcc b1 jmp b4 // ultoa::@4 b4: - // [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 -- vbuz1=_byte_vduz2 + // [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#2 -- vbuz1=_byte_vduz2 lda value sta _4 - // [134] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [134] *((byte*) ultoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy _4 lda DIGITS,y ldy #0 sta (buffer),y - // [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 -- pbuz1=_inc_pbuz2 + // [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 -- pbuz1=_inc_pbuz2 lda buffer clc adc #1 @@ -5272,14 +11112,51 @@ ultoa: { breturn: // [137] return rts + // ultoa::@1 + b1: + // [138] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 << (byte) 2 -- vbuz1=vbuz2_rol_2 + lda digit + asl + asl + sta _11 + // [139] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) -- vduz1=pduc1_derefidx_vbuz2 + ldy _11 + lda RADIX_DECIMAL_VALUES_LONG,y + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1,y + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2,y + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3,y + sta digit_value+3 + // [140] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp started + bne b3_from_b1 + // [128] phi from ultoa::@1 to ultoa::@6 [phi:ultoa::@1->ultoa::@6] + b6_from_b1: + // [128] phi (dword) ultoa::digit_value#3 = (dword) ultoa::digit_value#0 [phi:ultoa::@1->ultoa::@6#0] -- register_copy + // [128] phi (byte*) ultoa::buffer#21 = (byte*) ultoa::buffer#11 [phi:ultoa::@1->ultoa::@6#1] -- register_copy + // [128] phi (byte) ultoa::started#4 = (byte) ultoa::started#2 [phi:ultoa::@1->ultoa::@6#2] -- register_copy + // [128] phi (dword) ultoa::value#15 = (dword) ultoa::value#2 [phi:ultoa::@1->ultoa::@6#3] -- register_copy + // [128] phi (byte) ultoa::digit#8 = (byte) ultoa::digit#1 [phi:ultoa::@1->ultoa::@6#4] -- register_copy + jmp b6 + // [141] phi from ultoa::@1 ultoa::@6 to ultoa::@3 [phi:ultoa::@1/ultoa::@6->ultoa::@3] + b3_from_b1: + b3_from_b6: + // [141] phi (dword) ultoa::digit_value#2 = (dword) ultoa::digit_value#0 [phi:ultoa::@1/ultoa::@6->ultoa::@3#0] -- register_copy + // [141] phi (byte*) ultoa::buffer#22 = (byte*) ultoa::buffer#11 [phi:ultoa::@1/ultoa::@6->ultoa::@3#1] -- register_copy + // [141] phi (dword) ultoa::value#16 = (dword) ultoa::value#2 [phi:ultoa::@1/ultoa::@6->ultoa::@3#2] -- register_copy + // [141] phi (byte) ultoa::digit#7 = (byte) ultoa::digit#1 [phi:ultoa::@1/ultoa::@6->ultoa::@3#3] -- register_copy + jmp b3 // ultoa::@3 b3: - // [138] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 -- pbuz1=pbuz2 + // [142] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 -- pbuz1=pbuz2 lda buffer sta ultoa_append.buffer lda buffer+1 sta ultoa_append.buffer+1 - // [139] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 -- vduz1=vduz2 + // [143] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 -- vduz1=vduz2 lda value sta ultoa_append.value lda value+1 @@ -5288,7 +11165,7 @@ ultoa: { sta ultoa_append.value+2 lda value+3 sta ultoa_append.value+3 - // [140] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 -- vduz1=vduz2 + // [144] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 -- vduz1=vduz2 lda digit_value sta ultoa_append.sub lda digit_value+1 @@ -5297,11 +11174,11 @@ ultoa: { sta ultoa_append.sub+2 lda digit_value+3 sta ultoa_append.sub+3 - // [141] call ultoa_append - // [145] phi from ultoa::@3 to ultoa_append [phi:ultoa::@3->ultoa_append] + // [145] call ultoa_append + // [149] phi from ultoa::@3 to ultoa_append [phi:ultoa::@3->ultoa_append] ultoa_append_from_b3: jsr ultoa_append - // [142] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 -- vduz1=vduz2 + // [146] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 -- vduz1=vduz2 lda ultoa_append.value sta ultoa_append.return lda ultoa_append.value+1 @@ -5313,7 +11190,7 @@ ultoa: { jmp b5 // ultoa::@5 b5: - // [143] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 -- vduz1=vduz2 + // [147] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 -- vduz1=vduz2 lda ultoa_append.return sta value lda ultoa_append.return+1 @@ -5322,18 +11199,19 @@ ultoa: { sta value+2 lda ultoa_append.return+3 sta value+3 - // [144] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [148] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#22 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: // [130] phi from ultoa::@5 to ultoa::@2 [phi:ultoa::@5->ultoa::@2] b2_from_b5: - // [130] phi (byte*) ultoa::buffer#12 = (byte*) ultoa::buffer#3 [phi:ultoa::@5->ultoa::@2#0] -- register_copy - // [130] phi (byte) ultoa::started#3 = (byte) 1 [phi:ultoa::@5->ultoa::@2#1] -- vbuz1=vbuc1 + // [130] phi (byte) ultoa::digit#6 = (byte) ultoa::digit#7 [phi:ultoa::@5->ultoa::@2#0] -- register_copy + // [130] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#3 [phi:ultoa::@5->ultoa::@2#1] -- register_copy + // [130] phi (byte) ultoa::started#2 = (byte) 1 [phi:ultoa::@5->ultoa::@2#2] -- vbuz1=vbuc1 lda #1 sta started - // [130] phi (dword) ultoa::value#4 = (dword) ultoa::value#0 [phi:ultoa::@5->ultoa::@2#2] -- register_copy + // [130] phi (dword) ultoa::value#2 = (dword) ultoa::value#0 [phi:ultoa::@5->ultoa::@2#3] -- register_copy jmp b2 } // ultoa_append @@ -5345,23 +11223,23 @@ ultoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// ultoa_append(byte* zeropage($6c) buffer, dword zeropage($25) value, dword zeropage($6e) sub) +// ultoa_append(byte* zeropage($6c) buffer, dword zeropage($2b) value, dword zeropage($6e) sub) ultoa_append: { .label buffer = $6c - .label value = $25 + .label value = $2b .label sub = $6e .label return = $72 - .label digit = $29 - // [146] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] + .label digit = $2f + // [150] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] b1_from_ultoa_append: - // [146] phi (byte) ultoa_append::digit#2 = (byte) 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuz1=vbuc1 + // [150] phi (byte) ultoa_append::digit#2 = (byte) 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuz1=vbuc1 lda #0 sta digit - // [146] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy + // [150] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy jmp b1 // ultoa_append::@1 b1: - // [147] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 + // [151] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 lda value+3 cmp sub+3 bcc !+ @@ -5381,7 +11259,7 @@ ultoa_append: { jmp b3 // ultoa_append::@3 b3: - // [148] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [152] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy digit lda DIGITS,y ldy #0 @@ -5389,13 +11267,13 @@ ultoa_append: { jmp breturn // ultoa_append::@return breturn: - // [149] return + // [153] return rts // ultoa_append::@2 b2: - // [150] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 -- vbuz1=_inc_vbuz1 + // [154] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 -- vbuz1=_inc_vbuz1 inc digit - // [151] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 + // [155] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 lda value sec sbc sub @@ -5409,39 +11287,39 @@ ultoa_append: { lda value+3 sbc sub+3 sta value+3 - // [146] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] + // [150] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] b1_from_b2: - // [146] phi (byte) ultoa_append::digit#2 = (byte) ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy - // [146] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy + // [150] phi (byte) ultoa_append::digit#2 = (byte) ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy + // [150] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy jmp b1 } // div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division -// div32u16u(dword zeropage($44) dividend) +// div32u16u(dword zeropage($4a) dividend) div32u16u: { .label divisor = CLOCKS_PER_SEC/$64 .label quotient_hi = $78 .label quotient_lo = $7c .label return = $7e - .label dividend = $44 - .label return_2 = $48 - // [152] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 -- vwuz1=_hi_vduz2 + .label dividend = $4a + .label return_2 = $4e + // [156] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 -- vwuz1=_hi_vduz2 lda dividend+2 sta divr16u.dividend lda dividend+3 sta divr16u.dividend+1 - // [153] call divr16u - // [163] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [157] call divr16u + // [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - // [163] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#1 [phi:div32u16u->divr16u#0] -- register_copy - // [163] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [167] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#1 [phi:div32u16u->divr16u#0] -- register_copy + // [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem lda #>0 sta divr16u.rem+1 jsr divr16u - // [154] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + // [158] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_2 lda divr16u.return+1 @@ -5449,28 +11327,28 @@ div32u16u: { jmp b1 // div32u16u::@1 b1: - // [155] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return_2 sta quotient_hi lda divr16u.return_2+1 sta quotient_hi+1 - // [156] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 -- vwuz1=_lo_vduz2 + // [160] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 -- vwuz1=_lo_vduz2 lda dividend sta divr16u.dividend lda dividend+1 sta divr16u.dividend+1 - // [157] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 + // [161] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 lda rem16u sta divr16u.rem lda rem16u+1 sta divr16u.rem+1 - // [158] call divr16u - // [163] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [162] call divr16u + // [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - // [163] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#2 [phi:div32u16u::@1->divr16u#0] -- register_copy - // [163] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [167] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#2 [phi:div32u16u::@1->divr16u#0] -- register_copy + // [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - // [159] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + // [163] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_3 lda divr16u.return+1 @@ -5478,12 +11356,12 @@ div32u16u: { jmp b2 // div32u16u::@2 b2: - // [160] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 + // [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 lda divr16u.return_3 sta quotient_lo lda divr16u.return_3+1 sta quotient_lo+1 - // [161] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -5495,7 +11373,7 @@ div32u16u: { jmp breturn // div32u16u::@return breturn: - // [162] return + // [166] return rts } // divr16u @@ -5503,74 +11381,74 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($2c) dividend, word zeropage($2a) rem) +// divr16u(word zeropage($32) dividend, word zeropage($30) rem) divr16u: { .label _1 = $82 .label _2 = $83 - .label rem = $2a - .label dividend = $2c - .label quotient = $2e - .label i = $30 - .label return = $2e + .label rem = $30 + .label dividend = $32 + .label quotient = $34 + .label i = $36 + .label return = $34 .label return_2 = $76 .label return_3 = $7a - // [164] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [164] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + // [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [164] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [168] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [164] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [164] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - // [164] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [164] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [164] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [164] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [164] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [165] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [166] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 + // [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 lda dividend+1 sta _1 - // [167] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + // [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and _1 sta _2 - // [168] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + // [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 lda _2 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [169] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [170] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [170] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [171] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [172] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [173] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [177] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>div32u16u.divisor bcc b3_from_b2 @@ -5582,12 +11460,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [174] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [175] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 + // [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<div32u16u.divisor @@ -5595,24 +11473,24 @@ divr16u: { lda rem+1 sbc #>div32u16u.divisor sta rem+1 - // [176] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [176] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [176] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [177] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + // [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 inc i - // [178] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + // [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp i bne b1_from_b3 jmp b6 // divr16u::@6 b6: - // [179] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 + // [183] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 lda rem sta rem16u lda rem+1 @@ -5620,7 +11498,7 @@ divr16u: { jmp breturn // divr16u::@return breturn: - // [180] return + // [184] return rts } // clock @@ -5628,8 +11506,8 @@ divr16u: { // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = $86 - .label return_2 = $38 - // [181] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 + .label return_2 = $3e + // [185] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -5646,21 +11524,21 @@ clock: { jmp breturn // clock::@return breturn: - // [182] return + // [186] return rts } // clock_start // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { - // [183] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #CIA_TIMER_CONTROL_CONTINUOUS sta CIA2_TIMER_A_CONTROL - // [184] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [188] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [185] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + // [189] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -5669,28 +11547,28 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - // [186] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [190] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + // [191] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL jmp breturn // clock_start::@return breturn: - // [188] return + // [192] return rts } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($33) str, byte zeropage($35) c, word zeropage($31) num) +// memset(void* zeropage($39) str, byte zeropage($3b) c, word zeropage($37) num) memset: { .label end = $8a - .label dst = $36 - .label num = $31 - .label str = $33 - .label c = $35 - // [190] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + .label dst = $3c + .label num = $37 + .label str = $39 + .label c = $3b + // [194] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 lda num bne !+ lda num+1 @@ -5699,7 +11577,7 @@ memset: { jmp b1 // memset::@1 b1: - // [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + // [195] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -5707,28 +11585,28 @@ memset: { lda str+1 adc num+1 sta end+1 - // [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 + // [196] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [193] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [197] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] b2_from_b1: b2_from_b2: - // [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // [197] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy jmp b2 // memset::@2 b2: - // [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + // [198] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - // [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [199] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 + // [200] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 bne b2_from_b2 @@ -5738,24 +11616,24 @@ memset: { jmp breturn // memset::@return breturn: - // [197] return + // [201] return rts } // print_cls // Clear the screen. Also resets current line/char cursor. print_cls: { - // [199] call memset - // [189] phi from print_cls to memset [phi:print_cls->memset] + // [203] call memset + // [193] phi from print_cls to memset [phi:print_cls->memset] memset_from_print_cls: - // [189] phi (byte) memset::c#3 = (byte) ' ' [phi:print_cls->memset#0] -- vbuz1=vbuc1 + // [193] phi (byte) memset::c#3 = (byte) ' ' [phi:print_cls->memset#0] -- vbuz1=vbuc1 lda #' ' sta memset.c - // [189] phi (void*) memset::str#3 = (void*)(byte*) 1024 [phi:print_cls->memset#1] -- pvoz1=pvoc1 + // [193] phi (void*) memset::str#3 = (void*)(byte*) 1024 [phi:print_cls->memset#1] -- pvoz1=pvoc1 lda #<$400 sta memset.str lda #>$400 sta memset.str+1 - // [189] phi (word) memset::num#2 = (word) $3e8 [phi:print_cls->memset#2] -- vwuz1=vwuc1 + // [193] phi (word) memset::num#2 = (word) $3e8 [phi:print_cls->memset#2] -- vwuz1=vwuc1 lda #<$3e8 sta memset.num lda #>$3e8 @@ -5764,7 +11642,7 @@ print_cls: { jmp breturn // print_cls::@return breturn: - // [200] return + // [204] return rts } // File Data @@ -5782,240 +11660,244 @@ print_cls: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [12] (byte*~) print_char_cursor#89 ← (byte*) print_line_cursor#1 [ print_char_cursor#89 print_line_cursor#1 ] ( main:2 [ print_char_cursor#89 print_line_cursor#1 ] ) always clobbers reg byte a -Statement [23] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ) always clobbers reg byte a -Statement [26] (dword) clock::return#2 ← (dword) clock::return#0 [ print_line_cursor#1 clock::return#2 ] ( main:2 [ print_line_cursor#1 clock::return#2 ] ) always clobbers reg byte a -Statement [27] (dword~) main::$10 ← (dword) clock::return#2 [ print_line_cursor#1 main::$10 ] ( main:2 [ print_line_cursor#1 main::$10 ] ) always clobbers reg byte a -Statement [28] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 [ print_line_cursor#1 main::cyclecount#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 ] ) always clobbers reg byte a -Statement [29] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ) always clobbers reg byte a -Statement [31] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [32] (dword~) main::$14 ← (dword) div32u16u::return#2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ) always clobbers reg byte a -Statement [33] (word) main::sec100s#0 ← (word)(dword~) main::$14 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ) always clobbers reg byte a -Statement [34] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ) always clobbers reg byte a -Statement [36] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [40] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [45] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 [ main::i#10 print_char_cursor#62 main::$38 ] ( main:2 [ main::i#10 print_char_cursor#62 main::$38 ] ) always clobbers reg byte a -Statement [46] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 [ main::i#10 print_char_cursor#62 ] ( main:2 [ main::i#10 print_char_cursor#62 ] ) always clobbers reg byte a reg byte y -Statement [47] (word) print_word_decimal::w#2 ← (word) main::i#10 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ( main:2 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ) always clobbers reg byte a -Statement [48] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ( main:2 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ) always clobbers reg byte a -Statement [54] if((word) main::i#3<(word) $514) goto main::@28 [ main::i#3 print_char_cursor#63 ] ( main:2 [ main::i#3 print_char_cursor#63 ] ) always clobbers reg byte a -Statement [58] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 [ main::i#3 print_char_cursor#99 ] ( main:2 [ main::i#3 print_char_cursor#99 ] ) always clobbers reg byte a -Statement [59] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 [ main::i#10 print_char_cursor#101 ] ( main:2 [ main::i#10 print_char_cursor#101 ] ) always clobbers reg byte a -Statement [60] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ) always clobbers reg byte a reg byte y -Statement [61] (word) main::j#0 ← (word) main::i#11 << (byte) 1 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 ] ) always clobbers reg byte a -Statement [62] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 main::s#0 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 main::s#0 ] ) always clobbers reg byte a -Statement [64] if((word) main::j#2<(const word) COUNT#0) goto main::@6 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ) always clobbers reg byte a -Statement [67] *((byte*) main::s#2) ← (byte) 1 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ) always clobbers reg byte a reg byte y -Statement [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#11 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#1 ] ) always clobbers reg byte a -Statement [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#11 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#1 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#1 main::s#1 ] ) always clobbers reg byte a -Statement [72] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:35 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:39 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:56 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:37::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:49::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:41::print_str:122 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y -Statement [74] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:35 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:39 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:56 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:37::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:49::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:41::print_str:122 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y -Statement [77] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 [ print_char_cursor#2 ] ( main:2::print_char:51 [ main::i#10 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y -Statement [81] (word) utoa::value#1 ← (word) print_word_decimal::w#3 [ print_char_cursor#58 utoa::value#1 ] ( main:2::print_word_decimal:15 [ print_line_cursor#1 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:37 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:49 [ main::i#10 print_char_cursor#58 utoa::value#1 ] ) always clobbers reg byte a -Statement [88] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ utoa::started#2 utoa::started#3 ] -Statement [89] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a -Statement [91] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@3 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a -Statement [95] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 [ utoa::buffer#12 utoa::$4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#12 utoa::$4 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#12 utoa::$4 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#12 utoa::$4 ] ) always clobbers reg byte a -Statement [96] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) [ utoa::buffer#12 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#12 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#12 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#12 ] ) always clobbers reg byte a reg byte y -Statement [97] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 [ utoa::buffer#4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#4 ] ) always clobbers reg byte a -Statement [98] *((byte*) utoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 ] ) always clobbers reg byte a reg byte y -Statement [100] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 [ utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ) always clobbers reg byte a -Statement [101] (word) utoa_append::value#0 ← (word) utoa::value#2 [ utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ) always clobbers reg byte a -Statement [102] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 [ utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ) always clobbers reg byte a -Statement [104] (word) utoa_append::return#0 ← (word) utoa_append::value#2 [ utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ) always clobbers reg byte a -Statement [105] (word) utoa::value#0 ← (word) utoa_append::return#0 [ utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ) always clobbers reg byte a -Statement [109] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:103 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:37::utoa:82::utoa_append:103 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:49::utoa:82::utoa_append:103 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:26 [ utoa_append::digit#2 utoa_append::digit#1 ] -Statement [110] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) [ utoa_append::value#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:103 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] main:2::print_word_decimal:37::utoa:82::utoa_append:103 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] main:2::print_word_decimal:49::utoa:82::utoa_append:103 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] -Statement [113] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:103 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:37::utoa:82::utoa_append:103 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:49::utoa:82::utoa_append:103 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ) always clobbers reg byte a -Statement [116] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:43 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [117] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:43 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [119] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [ print_char_cursor#2 ultoa::value#1 ] ( main:2::print_dword_decimal:41 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#1 ] ) always clobbers reg byte a -Statement [126] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 << (byte) 2 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ ultoa::started#2 ultoa::started#3 ] -Statement [127] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ) always clobbers reg byte a -Statement [129] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@3 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ) always clobbers reg byte a -Statement [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 [ ultoa::buffer#12 ultoa::$4 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#12 ultoa::$4 ] ) always clobbers reg byte a -Statement [134] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) [ ultoa::buffer#12 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#12 ] ) always clobbers reg byte a reg byte y -Statement [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 [ ultoa::buffer#4 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#4 ] ) always clobbers reg byte a -Statement [136] *((byte*) ultoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y -Statement [138] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 [ ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ) always clobbers reg byte a -Statement [139] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ) always clobbers reg byte a -Statement [140] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ) always clobbers reg byte a -Statement [142] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ) always clobbers reg byte a -Statement [143] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] ) always clobbers reg byte a -Statement [147] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( main:2::print_dword_decimal:41::ultoa:120::ultoa_append:141 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:41 [ ultoa_append::digit#2 ultoa_append::digit#1 ] -Statement [148] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) [ ultoa_append::value#2 ] ( main:2::print_dword_decimal:41::ultoa:120::ultoa_append:141 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] -Statement [151] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( main:2::print_dword_decimal:41::ultoa:120::ultoa_append:141 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ) always clobbers reg byte a -Statement [152] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 [ div32u16u::dividend#0 divr16u::dividend#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#1 ] ) always clobbers reg byte a -Statement [154] (word) divr16u::return#2 ← (word) divr16u::return#0 [ div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [155] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [156] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 [ div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ) always clobbers reg byte a -Statement [157] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [159] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [160] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [161] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [166] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ divr16u::i#2 divr16u::i#1 ] -Statement [169] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [173] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [175] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [179] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#0 rem16u#1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [181] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:25 [ print_line_cursor#1 clock::return#0 ] ) always clobbers reg byte a -Statement [183] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [184] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [185] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [186] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [190] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::num#2 memset::str#3 memset::c#3 ] main:2::print_cls:7::memset:199 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:53 [ memset::c#3 ] -Statement [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::memset:19 [ print_line_cursor#1 memset::str#3 memset::c#3 memset::end#0 ] main:2::print_cls:7::memset:199 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#3 ] main:2::print_cls:7::memset:199 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#2 ] main:2::print_cls:7::memset:199 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:53 [ memset::c#3 ] -Statement [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#1 ] main:2::print_cls:7::memset:199 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [23] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 [ print_line_cursor#1 main::i#16 main::sieve_i#11 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 ] ) always clobbers reg byte a reg byte y +Statement [24] (word) main::j#0 ← (word) main::i#16 << (byte) 1 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 ] ) always clobbers reg byte a +Statement [25] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 main::s#0 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 main::s#0 ] ) always clobbers reg byte a +Statement [27] if((word) main::j#2<(const word) COUNT#0) goto main::@6 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ) always clobbers reg byte a +Statement [30] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 [ print_line_cursor#1 main::i#11 main::sieve_i#1 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#1 ] ) always clobbers reg byte a +Statement [33] (dword) clock::return#2 ← (dword) clock::return#0 [ print_line_cursor#1 clock::return#2 ] ( main:2 [ print_line_cursor#1 clock::return#2 ] ) always clobbers reg byte a +Statement [34] (dword~) main::$10 ← (dword) clock::return#2 [ print_line_cursor#1 main::$10 ] ( main:2 [ print_line_cursor#1 main::$10 ] ) always clobbers reg byte a +Statement [35] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 [ print_line_cursor#1 main::cyclecount#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 ] ) always clobbers reg byte a +Statement [36] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ) always clobbers reg byte a +Statement [38] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [39] (dword~) main::$14 ← (dword) div32u16u::return#2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ) always clobbers reg byte a +Statement [40] (word) main::sec100s#0 ← (word)(dword~) main::$14 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ) always clobbers reg byte a +Statement [41] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ) always clobbers reg byte a +Statement [43] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [47] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [52] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 [ main::i#10 print_char_cursor#62 main::$38 ] ( main:2 [ main::i#10 print_char_cursor#62 main::$38 ] ) always clobbers reg byte a +Statement [53] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 [ main::i#10 print_char_cursor#62 ] ( main:2 [ main::i#10 print_char_cursor#62 ] ) always clobbers reg byte a reg byte y +Statement [54] (word) print_word_decimal::w#2 ← (word) main::i#10 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ( main:2 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ) always clobbers reg byte a +Statement [55] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ( main:2 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ) always clobbers reg byte a +Statement [61] if((word) main::i#3<(word) $514) goto main::@28 [ main::i#3 print_char_cursor#63 ] ( main:2 [ main::i#3 print_char_cursor#63 ] ) always clobbers reg byte a +Statement [65] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 [ main::i#3 print_char_cursor#99 ] ( main:2 [ main::i#3 print_char_cursor#99 ] ) always clobbers reg byte a +Statement [66] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 [ main::i#10 print_char_cursor#101 ] ( main:2 [ main::i#10 print_char_cursor#101 ] ) always clobbers reg byte a +Statement [67] *((byte*) main::s#2) ← (byte) 1 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ) always clobbers reg byte a reg byte y +Statement [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#1 ] ) always clobbers reg byte a +Statement [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#1 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#1 main::s#1 ] ) always clobbers reg byte a +Statement [72] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:42 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:46 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:63 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:44::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:56::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:48::print_str:124 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y +Statement [74] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:42 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:46 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:63 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:44::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:56::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:48::print_str:124 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y +Statement [77] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 [ print_char_cursor#2 ] ( main:2::print_char:58 [ main::i#10 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [81] (word) utoa::value#1 ← (word) print_word_decimal::w#3 [ print_char_cursor#58 utoa::value#1 ] ( main:2::print_word_decimal:15 [ print_line_cursor#1 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:44 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:56 [ main::i#10 print_char_cursor#58 utoa::value#1 ] ) always clobbers reg byte a +Statement [87] (word) utoa::digit_value#4 ← *((const word[]) RADIX_DECIMAL_VALUES#0) [ utoa::value#1 utoa::digit_value#4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::value#1 utoa::digit_value#4 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#1 utoa::digit_value#4 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::value#1 utoa::digit_value#4 ] ) always clobbers reg byte a +Statement [89] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@3 [ utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ utoa::started#4 utoa::started#2 ] +Statement [93] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 [ utoa::buffer#11 utoa::$4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#11 utoa::$4 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#11 utoa::$4 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#11 utoa::$4 ] ) always clobbers reg byte a +Statement [94] *((byte*) utoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) [ utoa::buffer#11 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#11 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#11 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#11 ] ) always clobbers reg byte a reg byte y +Statement [95] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 [ utoa::buffer#4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#4 ] ) always clobbers reg byte a +Statement [96] *((byte*) utoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 ] ) always clobbers reg byte a reg byte y +Statement [98] (byte~) utoa::$11 ← (byte) utoa::digit#1 << (byte) 1 [ utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ) always clobbers reg byte a +Statement [99] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) [ utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a +Statement [102] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 [ utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] ) always clobbers reg byte a +Statement [103] (word) utoa_append::value#0 ← (word) utoa::value#16 [ utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] ) always clobbers reg byte a +Statement [104] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 [ utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ) always clobbers reg byte a +Statement [106] (word) utoa_append::return#0 ← (word) utoa_append::value#2 [ utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] ) always clobbers reg byte a +Statement [107] (word) utoa::value#0 ← (word) utoa_append::return#0 [ utoa::value#0 utoa::digit#7 utoa::buffer#22 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::value#0 utoa::digit#7 utoa::buffer#22 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#0 utoa::digit#7 utoa::buffer#22 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::value#0 utoa::digit#7 utoa::buffer#22 ] ) always clobbers reg byte a +Statement [111] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:105 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:44::utoa:82::utoa_append:105 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:56::utoa:82::utoa_append:105 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ utoa_append::digit#2 utoa_append::digit#1 ] +Statement [112] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) [ utoa_append::value#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:105 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::value#2 ] main:2::print_word_decimal:44::utoa:82::utoa_append:105 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::value#2 ] main:2::print_word_decimal:56::utoa:82::utoa_append:105 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::value#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +Statement [115] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:105 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:44::utoa:82::utoa_append:105 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:56::utoa:82::utoa_append:105 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ) always clobbers reg byte a +Statement [118] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:50 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [119] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:50 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [121] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [ print_char_cursor#2 ultoa::value#1 ] ( main:2::print_dword_decimal:48 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#1 ] ) always clobbers reg byte a +Statement [127] (dword) ultoa::digit_value#4 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0) [ ultoa::value#1 ultoa::digit_value#4 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#1 ultoa::digit_value#4 ] ) always clobbers reg byte a +Statement [129] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@3 [ ultoa::digit#8 ultoa::value#15 ultoa::started#4 ultoa::buffer#21 ultoa::digit_value#3 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#8 ultoa::value#15 ultoa::started#4 ultoa::buffer#21 ultoa::digit_value#3 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:31 [ ultoa::started#4 ultoa::started#2 ] +Statement [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#2 [ ultoa::buffer#11 ultoa::$4 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#11 ultoa::$4 ] ) always clobbers reg byte a +Statement [134] *((byte*) ultoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) [ ultoa::buffer#11 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#11 ] ) always clobbers reg byte a reg byte y +Statement [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 [ ultoa::buffer#4 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#4 ] ) always clobbers reg byte a +Statement [136] *((byte*) ultoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [138] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 << (byte) 2 [ ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ) always clobbers reg byte a +Statement [139] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) [ ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ) always clobbers reg byte a +Statement [142] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 [ ultoa::digit#7 ultoa::value#16 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::value#16 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ] ) always clobbers reg byte a +Statement [143] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 [ ultoa::digit#7 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ultoa_append::value#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ultoa_append::value#0 ] ) always clobbers reg byte a +Statement [144] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 [ ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ) always clobbers reg byte a +Statement [146] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 [ ultoa::digit#7 ultoa::buffer#22 ultoa_append::return#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::return#0 ] ) always clobbers reg byte a +Statement [147] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [ ultoa::value#0 ultoa::digit#7 ultoa::buffer#22 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#0 ultoa::digit#7 ultoa::buffer#22 ] ) always clobbers reg byte a +Statement [151] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( main:2::print_dword_decimal:48::ultoa:122::ultoa_append:145 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:47 [ ultoa_append::digit#2 ultoa_append::digit#1 ] +Statement [152] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) [ ultoa_append::value#2 ] ( main:2::print_dword_decimal:48::ultoa:122::ultoa_append:145 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::value#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] +Statement [155] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( main:2::print_dword_decimal:48::ultoa:122::ultoa_append:145 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ) always clobbers reg byte a +Statement [156] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 [ div32u16u::dividend#0 divr16u::dividend#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#1 ] ) always clobbers reg byte a +Statement [158] (word) divr16u::return#2 ← (word) divr16u::return#0 [ div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [160] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 [ div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ) always clobbers reg byte a +Statement [161] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [163] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:54 [ divr16u::i#2 divr16u::i#1 ] +Statement [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [177] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [183] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#0 rem16u#1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [185] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:32 [ print_line_cursor#1 clock::return#0 ] ) always clobbers reg byte a +Statement [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [188] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [189] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [190] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [191] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [194] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::num#2 memset::str#3 memset::c#3 ] main:2::print_cls:7::memset:203 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ memset::c#3 ] +Statement [195] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::memset:19 [ print_line_cursor#1 memset::str#3 memset::c#3 memset::end#0 ] main:2::print_cls:7::memset:203 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [196] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#3 ] main:2::print_cls:7::memset:203 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [198] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#2 ] main:2::print_cls:7::memset:203 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:59 [ memset::c#3 ] +Statement [200] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#1 ] main:2::print_cls:7::memset:203 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Statement [6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [12] (byte*~) print_char_cursor#89 ← (byte*) print_line_cursor#1 [ print_char_cursor#89 print_line_cursor#1 ] ( main:2 [ print_char_cursor#89 print_line_cursor#1 ] ) always clobbers reg byte a -Statement [23] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ) always clobbers reg byte a -Statement [26] (dword) clock::return#2 ← (dword) clock::return#0 [ print_line_cursor#1 clock::return#2 ] ( main:2 [ print_line_cursor#1 clock::return#2 ] ) always clobbers reg byte a -Statement [27] (dword~) main::$10 ← (dword) clock::return#2 [ print_line_cursor#1 main::$10 ] ( main:2 [ print_line_cursor#1 main::$10 ] ) always clobbers reg byte a -Statement [28] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 [ print_line_cursor#1 main::cyclecount#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 ] ) always clobbers reg byte a -Statement [29] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ) always clobbers reg byte a -Statement [31] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [32] (dword~) main::$14 ← (dword) div32u16u::return#2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ) always clobbers reg byte a -Statement [33] (word) main::sec100s#0 ← (word)(dword~) main::$14 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ) always clobbers reg byte a -Statement [34] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ) always clobbers reg byte a -Statement [36] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [40] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [45] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 [ main::i#10 print_char_cursor#62 main::$38 ] ( main:2 [ main::i#10 print_char_cursor#62 main::$38 ] ) always clobbers reg byte a -Statement [46] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 [ main::i#10 print_char_cursor#62 ] ( main:2 [ main::i#10 print_char_cursor#62 ] ) always clobbers reg byte a reg byte y -Statement [47] (word) print_word_decimal::w#2 ← (word) main::i#10 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ( main:2 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ) always clobbers reg byte a -Statement [48] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ( main:2 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ) always clobbers reg byte a -Statement [54] if((word) main::i#3<(word) $514) goto main::@28 [ main::i#3 print_char_cursor#63 ] ( main:2 [ main::i#3 print_char_cursor#63 ] ) always clobbers reg byte a -Statement [58] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 [ main::i#3 print_char_cursor#99 ] ( main:2 [ main::i#3 print_char_cursor#99 ] ) always clobbers reg byte a -Statement [59] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 [ main::i#10 print_char_cursor#101 ] ( main:2 [ main::i#10 print_char_cursor#101 ] ) always clobbers reg byte a -Statement [60] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 ] ) always clobbers reg byte a reg byte y -Statement [61] (word) main::j#0 ← (word) main::i#11 << (byte) 1 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 ] ) always clobbers reg byte a -Statement [62] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 main::s#0 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#0 main::s#0 ] ) always clobbers reg byte a -Statement [64] if((word) main::j#2<(const word) COUNT#0) goto main::@6 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ) always clobbers reg byte a -Statement [67] *((byte*) main::s#2) ← (byte) 1 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#2 ] ) always clobbers reg byte a reg byte y -Statement [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#11 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#2 main::s#1 ] ) always clobbers reg byte a -Statement [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#11 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#1 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#2 main::j#1 main::s#1 ] ) always clobbers reg byte a -Statement [72] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:35 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:39 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:56 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:37::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:49::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:41::print_str:122 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y -Statement [74] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:35 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:39 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:56 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:37::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:49::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:41::print_str:122 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y -Statement [77] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 [ print_char_cursor#2 ] ( main:2::print_char:51 [ main::i#10 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y -Statement [81] (word) utoa::value#1 ← (word) print_word_decimal::w#3 [ print_char_cursor#58 utoa::value#1 ] ( main:2::print_word_decimal:15 [ print_line_cursor#1 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:37 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:49 [ main::i#10 print_char_cursor#58 utoa::value#1 ] ) always clobbers reg byte a -Statement [88] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ) always clobbers reg byte a -Statement [89] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a -Statement [91] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@3 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a -Statement [95] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 [ utoa::buffer#12 utoa::$4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#12 utoa::$4 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#12 utoa::$4 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#12 utoa::$4 ] ) always clobbers reg byte a -Statement [96] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) [ utoa::buffer#12 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#12 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#12 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#12 ] ) always clobbers reg byte a reg byte y -Statement [97] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 [ utoa::buffer#4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#4 ] ) always clobbers reg byte a -Statement [98] *((byte*) utoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 ] ) always clobbers reg byte a reg byte y -Statement [100] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 [ utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ) always clobbers reg byte a -Statement [101] (word) utoa_append::value#0 ← (word) utoa::value#2 [ utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ) always clobbers reg byte a -Statement [102] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 [ utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ) always clobbers reg byte a -Statement [104] (word) utoa_append::return#0 ← (word) utoa_append::value#2 [ utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ) always clobbers reg byte a -Statement [105] (word) utoa::value#0 ← (word) utoa_append::return#0 [ utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] main:2::print_word_decimal:37::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] main:2::print_word_decimal:49::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ) always clobbers reg byte a -Statement [109] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:103 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:37::utoa:82::utoa_append:103 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:49::utoa:82::utoa_append:103 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ) always clobbers reg byte a -Statement [110] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) [ utoa_append::value#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:103 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] main:2::print_word_decimal:37::utoa:82::utoa_append:103 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] main:2::print_word_decimal:49::utoa:82::utoa_append:103 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] ) always clobbers reg byte a reg byte y -Statement [113] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:103 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:37::utoa:82::utoa_append:103 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:49::utoa:82::utoa_append:103 [ main::i#10 print_char_cursor#58 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ) always clobbers reg byte a -Statement [116] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:43 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [117] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:43 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a -Statement [119] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [ print_char_cursor#2 ultoa::value#1 ] ( main:2::print_dword_decimal:41 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#1 ] ) always clobbers reg byte a -Statement [126] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 << (byte) 2 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ) always clobbers reg byte a -Statement [127] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ) always clobbers reg byte a -Statement [129] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@3 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ) always clobbers reg byte a -Statement [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 [ ultoa::buffer#12 ultoa::$4 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#12 ultoa::$4 ] ) always clobbers reg byte a -Statement [134] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) [ ultoa::buffer#12 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#12 ] ) always clobbers reg byte a reg byte y -Statement [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 [ ultoa::buffer#4 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#4 ] ) always clobbers reg byte a -Statement [136] *((byte*) ultoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y -Statement [138] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 [ ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ) always clobbers reg byte a -Statement [139] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ) always clobbers reg byte a -Statement [140] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ) always clobbers reg byte a -Statement [142] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ) always clobbers reg byte a -Statement [143] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] ( main:2::print_dword_decimal:41::ultoa:120 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] ) always clobbers reg byte a -Statement [147] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( main:2::print_dword_decimal:41::ultoa:120::ultoa_append:141 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ) always clobbers reg byte a -Statement [148] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) [ ultoa_append::value#2 ] ( main:2::print_dword_decimal:41::ultoa:120::ultoa_append:141 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] ) always clobbers reg byte a reg byte y -Statement [151] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( main:2::print_dword_decimal:41::ultoa:120::ultoa_append:141 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ) always clobbers reg byte a -Statement [152] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 [ div32u16u::dividend#0 divr16u::dividend#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#1 ] ) always clobbers reg byte a -Statement [154] (word) divr16u::return#2 ← (word) divr16u::return#0 [ div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [155] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [156] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 [ div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ) always clobbers reg byte a -Statement [157] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [159] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [160] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [161] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:2::div32u16u:30 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [166] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Statement [169] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [173] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [175] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [179] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::div32u16u:30::divr16u:153 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#0 rem16u#1 ] main:2::div32u16u:30::divr16u:158 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [181] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:25 [ print_line_cursor#1 clock::return#0 ] ) always clobbers reg byte a -Statement [183] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [184] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [185] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [186] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a -Statement [190] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::num#2 memset::str#3 memset::c#3 ] main:2::print_cls:7::memset:199 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a -Statement [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::memset:19 [ print_line_cursor#1 memset::str#3 memset::c#3 memset::end#0 ] main:2::print_cls:7::memset:199 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#3 ] main:2::print_cls:7::memset:199 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#2 ] main:2::print_cls:7::memset:199 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#1 ] main:2::print_cls:7::memset:199 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Potential registers zp ZP_WORD:2 [ main::i#11 main::i#2 ] : zp ZP_WORD:2 , -Potential registers zp ZP_WORD:4 [ main::sieve_i#2 main::sieve_i#1 ] : zp ZP_WORD:4 , -Potential registers zp ZP_WORD:6 [ main::i#10 main::i#3 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ main::j#2 main::j#0 main::j#1 ] : zp ZP_WORD:8 , -Potential registers zp ZP_WORD:10 [ main::s#2 main::s#0 main::s#1 ] : zp ZP_WORD:10 , +Statement [23] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 [ print_line_cursor#1 main::i#16 main::sieve_i#11 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 ] ) always clobbers reg byte a reg byte y +Statement [24] (word) main::j#0 ← (word) main::i#16 << (byte) 1 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 ] ) always clobbers reg byte a +Statement [25] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 main::s#0 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#0 main::s#0 ] ) always clobbers reg byte a +Statement [27] if((word) main::j#2<(const word) COUNT#0) goto main::@6 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ) always clobbers reg byte a +Statement [30] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 [ print_line_cursor#1 main::i#11 main::sieve_i#1 ] ( main:2 [ print_line_cursor#1 main::i#11 main::sieve_i#1 ] ) always clobbers reg byte a +Statement [33] (dword) clock::return#2 ← (dword) clock::return#0 [ print_line_cursor#1 clock::return#2 ] ( main:2 [ print_line_cursor#1 clock::return#2 ] ) always clobbers reg byte a +Statement [34] (dword~) main::$10 ← (dword) clock::return#2 [ print_line_cursor#1 main::$10 ] ( main:2 [ print_line_cursor#1 main::$10 ] ) always clobbers reg byte a +Statement [35] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 [ print_line_cursor#1 main::cyclecount#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 ] ) always clobbers reg byte a +Statement [36] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 ] ) always clobbers reg byte a +Statement [38] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [39] (dword~) main::$14 ← (dword) div32u16u::return#2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::$14 ] ) always clobbers reg byte a +Statement [40] (word) main::sec100s#0 ← (word)(dword~) main::$14 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 ] ) always clobbers reg byte a +Statement [41] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#90 ] ) always clobbers reg byte a +Statement [43] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 main::cyclecount#0 print_word_decimal::w#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [47] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ( main:2 [ print_line_cursor#1 print_dword_decimal::w#0 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [52] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 [ main::i#10 print_char_cursor#62 main::$38 ] ( main:2 [ main::i#10 print_char_cursor#62 main::$38 ] ) always clobbers reg byte a +Statement [53] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 [ main::i#10 print_char_cursor#62 ] ( main:2 [ main::i#10 print_char_cursor#62 ] ) always clobbers reg byte a reg byte y +Statement [54] (word) print_word_decimal::w#2 ← (word) main::i#10 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ( main:2 [ main::i#10 print_char_cursor#62 print_word_decimal::w#2 ] ) always clobbers reg byte a +Statement [55] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ( main:2 [ main::i#10 print_word_decimal::w#2 print_char_cursor#96 ] ) always clobbers reg byte a +Statement [61] if((word) main::i#3<(word) $514) goto main::@28 [ main::i#3 print_char_cursor#63 ] ( main:2 [ main::i#3 print_char_cursor#63 ] ) always clobbers reg byte a +Statement [65] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 [ main::i#3 print_char_cursor#99 ] ( main:2 [ main::i#3 print_char_cursor#99 ] ) always clobbers reg byte a +Statement [66] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 [ main::i#10 print_char_cursor#101 ] ( main:2 [ main::i#10 print_char_cursor#101 ] ) always clobbers reg byte a +Statement [67] *((byte*) main::s#2) ← (byte) 1 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#2 ] ) always clobbers reg byte a reg byte y +Statement [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#2 main::s#1 ] ) always clobbers reg byte a +Statement [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#1 main::s#1 ] ( main:2 [ print_line_cursor#1 main::i#16 main::sieve_i#11 main::j#1 main::s#1 ] ) always clobbers reg byte a +Statement [72] if(*((byte*) print_str::str#8)!=(byte) '@') goto print_str::@2 [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:42 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:46 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:63 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:44::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:56::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:48::print_str:124 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y +Statement [74] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#8) [ print_char_cursor#2 print_str::str#8 ] ( main:2::print_str:9 [ print_char_cursor#2 print_str::str#8 ] main:2::print_str:13 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_str:42 [ print_line_cursor#1 main::cyclecount#0 main::sec100s#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:46 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_str:63 [ print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:15::print_str:84 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:44::print_str:84 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#2 print_str::str#8 ] main:2::print_word_decimal:56::print_str:84 [ main::i#10 print_char_cursor#2 print_str::str#8 ] main:2::print_dword_decimal:48::print_str:124 [ print_line_cursor#1 print_char_cursor#2 print_str::str#8 ] ) always clobbers reg byte a reg byte y +Statement [77] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 [ print_char_cursor#2 ] ( main:2::print_char:58 [ main::i#10 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [81] (word) utoa::value#1 ← (word) print_word_decimal::w#3 [ print_char_cursor#58 utoa::value#1 ] ( main:2::print_word_decimal:15 [ print_line_cursor#1 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:44 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#1 ] main:2::print_word_decimal:56 [ main::i#10 print_char_cursor#58 utoa::value#1 ] ) always clobbers reg byte a +Statement [87] (word) utoa::digit_value#4 ← *((const word[]) RADIX_DECIMAL_VALUES#0) [ utoa::value#1 utoa::digit_value#4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::value#1 utoa::digit_value#4 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#1 utoa::digit_value#4 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::value#1 utoa::digit_value#4 ] ) always clobbers reg byte a +Statement [89] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@3 [ utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#8 utoa::value#15 utoa::started#4 utoa::buffer#21 utoa::digit_value#3 ] ) always clobbers reg byte a +Statement [93] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 [ utoa::buffer#11 utoa::$4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#11 utoa::$4 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#11 utoa::$4 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#11 utoa::$4 ] ) always clobbers reg byte a +Statement [94] *((byte*) utoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) [ utoa::buffer#11 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#11 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#11 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#11 ] ) always clobbers reg byte a reg byte y +Statement [95] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 [ utoa::buffer#4 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::buffer#4 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::buffer#4 ] ) always clobbers reg byte a +Statement [96] *((byte*) utoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 ] ) always clobbers reg byte a reg byte y +Statement [98] (byte~) utoa::$11 ← (byte) utoa::digit#1 << (byte) 1 [ utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ) always clobbers reg byte a +Statement [99] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) [ utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#1 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a +Statement [102] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 [ utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::value#16 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 ] ) always clobbers reg byte a +Statement [103] (word) utoa_append::value#0 ← (word) utoa::value#16 [ utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa::digit_value#2 utoa_append::buffer#0 utoa_append::value#0 ] ) always clobbers reg byte a +Statement [104] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 [ utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ) always clobbers reg byte a +Statement [106] (word) utoa_append::return#0 ← (word) utoa_append::value#2 [ utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::return#0 ] ) always clobbers reg byte a +Statement [107] (word) utoa::value#0 ← (word) utoa_append::return#0 [ utoa::value#0 utoa::digit#7 utoa::buffer#22 ] ( main:2::print_word_decimal:15::utoa:82 [ print_line_cursor#1 print_char_cursor#58 utoa::value#0 utoa::digit#7 utoa::buffer#22 ] main:2::print_word_decimal:44::utoa:82 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::value#0 utoa::digit#7 utoa::buffer#22 ] main:2::print_word_decimal:56::utoa:82 [ main::i#10 print_char_cursor#58 utoa::value#0 utoa::digit#7 utoa::buffer#22 ] ) always clobbers reg byte a +Statement [111] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:105 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:44::utoa:82::utoa_append:105 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] main:2::print_word_decimal:56::utoa:82::utoa_append:105 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ) always clobbers reg byte a +Statement [112] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) [ utoa_append::value#2 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:105 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::value#2 ] main:2::print_word_decimal:44::utoa:82::utoa_append:105 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::value#2 ] main:2::print_word_decimal:56::utoa:82::utoa_append:105 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::value#2 ] ) always clobbers reg byte a reg byte y +Statement [115] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:2::print_word_decimal:15::utoa:82::utoa_append:105 [ print_line_cursor#1 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:44::utoa:82::utoa_append:105 [ print_line_cursor#1 main::cyclecount#0 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] main:2::print_word_decimal:56::utoa:82::utoa_append:105 [ main::i#10 print_char_cursor#58 utoa::digit#7 utoa::buffer#22 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ) always clobbers reg byte a +Statement [118] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:50 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [119] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:11 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:17 [ print_line_cursor#1 print_char_cursor#2 ] main:2::print_ln:50 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [121] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [ print_char_cursor#2 ultoa::value#1 ] ( main:2::print_dword_decimal:48 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#1 ] ) always clobbers reg byte a +Statement [127] (dword) ultoa::digit_value#4 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0) [ ultoa::value#1 ultoa::digit_value#4 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#1 ultoa::digit_value#4 ] ) always clobbers reg byte a +Statement [129] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@3 [ ultoa::digit#8 ultoa::value#15 ultoa::started#4 ultoa::buffer#21 ultoa::digit_value#3 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#8 ultoa::value#15 ultoa::started#4 ultoa::buffer#21 ultoa::digit_value#3 ] ) always clobbers reg byte a +Statement [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#2 [ ultoa::buffer#11 ultoa::$4 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#11 ultoa::$4 ] ) always clobbers reg byte a +Statement [134] *((byte*) ultoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) [ ultoa::buffer#11 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#11 ] ) always clobbers reg byte a reg byte y +Statement [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 [ ultoa::buffer#4 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::buffer#4 ] ) always clobbers reg byte a +Statement [136] *((byte*) ultoa::buffer#4) ← (byte) 0 [ ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [138] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 << (byte) 2 [ ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$11 ] ) always clobbers reg byte a +Statement [139] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) [ ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#1 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ) always clobbers reg byte a +Statement [142] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 [ ultoa::digit#7 ultoa::value#16 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::value#16 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ] ) always clobbers reg byte a +Statement [143] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 [ ultoa::digit#7 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ultoa_append::value#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa::digit_value#2 ultoa_append::buffer#0 ultoa_append::value#0 ] ) always clobbers reg byte a +Statement [144] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 [ ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ) always clobbers reg byte a +Statement [146] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 [ ultoa::digit#7 ultoa::buffer#22 ultoa_append::return#0 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::return#0 ] ) always clobbers reg byte a +Statement [147] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [ ultoa::value#0 ultoa::digit#7 ultoa::buffer#22 ] ( main:2::print_dword_decimal:48::ultoa:122 [ print_line_cursor#1 print_char_cursor#2 ultoa::value#0 ultoa::digit#7 ultoa::buffer#22 ] ) always clobbers reg byte a +Statement [151] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( main:2::print_dword_decimal:48::ultoa:122::ultoa_append:145 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ) always clobbers reg byte a +Statement [152] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) [ ultoa_append::value#2 ] ( main:2::print_dword_decimal:48::ultoa:122::ultoa_append:145 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::value#2 ] ) always clobbers reg byte a reg byte y +Statement [155] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( main:2::print_dword_decimal:48::ultoa:122::ultoa_append:145 [ print_line_cursor#1 print_char_cursor#2 ultoa::digit#7 ultoa::buffer#22 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ) always clobbers reg byte a +Statement [156] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 [ div32u16u::dividend#0 divr16u::dividend#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#1 ] ) always clobbers reg byte a +Statement [158] (word) divr16u::return#2 ← (word) divr16u::return#0 [ div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [160] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 [ div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 rem16u#1 ] ) always clobbers reg byte a +Statement [161] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#2 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [163] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:2::div32u16u:37 [ print_line_cursor#1 main::cyclecount#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [177] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [183] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::div32u16u:37::divr16u:157 [ print_line_cursor#1 main::cyclecount#0 div32u16u::dividend#0 divr16u::return#0 rem16u#1 ] main:2::div32u16u:37::divr16u:162 [ print_line_cursor#1 main::cyclecount#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [185] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:32 [ print_line_cursor#1 clock::return#0 ] ) always clobbers reg byte a +Statement [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [188] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [189] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [190] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [191] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:21 [ print_line_cursor#1 ] ) always clobbers reg byte a +Statement [194] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::num#2 memset::str#3 memset::c#3 ] main:2::print_cls:7::memset:203 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [195] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::memset:19 [ print_line_cursor#1 memset::str#3 memset::c#3 memset::end#0 ] main:2::print_cls:7::memset:203 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [196] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#3 ] main:2::print_cls:7::memset:203 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [198] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#2 ] main:2::print_cls:7::memset:203 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [200] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::memset:19 [ print_line_cursor#1 memset::c#3 memset::end#0 memset::dst#1 ] main:2::print_cls:7::memset:203 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ main::i#16 main::i#11 ] : zp ZP_WORD:2 , +Potential registers zp ZP_WORD:4 [ main::sieve_i#11 main::sieve_i#1 ] : zp ZP_WORD:4 , +Potential registers zp ZP_WORD:6 [ main::j#2 main::j#0 main::j#1 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ main::s#2 main::s#0 main::s#1 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:10 [ main::i#10 main::i#3 ] : zp ZP_WORD:10 , Potential registers zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] : zp ZP_WORD:12 , Potential registers zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 ] : zp ZP_WORD:14 , Potential registers zp ZP_WORD:16 [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] : zp ZP_WORD:16 , -Potential registers zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] : zp ZP_BYTE:18 , reg byte x , -Potential registers zp ZP_WORD:19 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 ] : zp ZP_WORD:19 , -Potential registers zp ZP_BYTE:21 [ utoa::started#2 utoa::started#3 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:22 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 ] : zp ZP_WORD:22 , -Potential registers zp ZP_WORD:24 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] : zp ZP_WORD:24 , -Potential registers zp ZP_BYTE:26 [ utoa_append::digit#2 utoa_append::digit#1 ] : zp ZP_BYTE:26 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:27 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] : zp ZP_WORD:27 , -Potential registers zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] : zp ZP_BYTE:29 , reg byte x , -Potential registers zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ] : zp ZP_DWORD:30 , -Potential registers zp ZP_BYTE:34 [ ultoa::started#2 ultoa::started#3 ] : zp ZP_BYTE:34 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:35 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ] : zp ZP_WORD:35 , -Potential registers zp ZP_DWORD:37 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] : zp ZP_DWORD:37 , -Potential registers zp ZP_BYTE:41 [ ultoa_append::digit#2 ultoa_append::digit#1 ] : zp ZP_BYTE:41 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] : zp ZP_WORD:42 , -Potential registers zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] : zp ZP_WORD:44 , -Potential registers zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:46 , -Potential registers zp ZP_BYTE:48 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:48 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:49 [ memset::num#2 ] : zp ZP_WORD:49 , -Potential registers zp ZP_WORD:51 [ memset::str#3 ] : zp ZP_WORD:51 , -Potential registers zp ZP_BYTE:53 [ memset::c#3 ] : zp ZP_BYTE:53 , reg byte x , -Potential registers zp ZP_WORD:54 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:54 , -Potential registers zp ZP_DWORD:56 [ clock::return#2 ] : zp ZP_DWORD:56 , -Potential registers zp ZP_DWORD:60 [ main::$10 ] : zp ZP_DWORD:60 , -Potential registers zp ZP_DWORD:64 [ main::cyclecount#0 ] : zp ZP_DWORD:64 , -Potential registers zp ZP_DWORD:68 [ div32u16u::dividend#0 ] : zp ZP_DWORD:68 , -Potential registers zp ZP_DWORD:72 [ div32u16u::return#2 ] : zp ZP_DWORD:72 , -Potential registers zp ZP_DWORD:76 [ main::$14 ] : zp ZP_DWORD:76 , -Potential registers zp ZP_WORD:80 [ main::sec100s#0 ] : zp ZP_WORD:80 , -Potential registers zp ZP_DWORD:82 [ print_dword_decimal::w#0 ] : zp ZP_DWORD:82 , -Potential registers zp ZP_WORD:86 [ main::$38 ] : zp ZP_WORD:86 , -Potential registers zp ZP_BYTE:88 [ utoa::$11 ] : zp ZP_BYTE:88 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:89 [ utoa::digit_value#0 ] : zp ZP_WORD:89 , -Potential registers zp ZP_BYTE:91 [ utoa::$4 ] : zp ZP_BYTE:91 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:92 [ utoa::buffer#4 ] : zp ZP_WORD:92 , -Potential registers zp ZP_WORD:94 [ utoa_append::buffer#0 ] : zp ZP_WORD:94 , -Potential registers zp ZP_WORD:96 [ utoa_append::sub#0 ] : zp ZP_WORD:96 , -Potential registers zp ZP_WORD:98 [ utoa_append::return#0 ] : zp ZP_WORD:98 , -Potential registers zp ZP_BYTE:100 [ ultoa::$11 ] : zp ZP_BYTE:100 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:101 [ ultoa::digit_value#0 ] : zp ZP_DWORD:101 , -Potential registers zp ZP_BYTE:105 [ ultoa::$4 ] : zp ZP_BYTE:105 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:106 [ ultoa::buffer#4 ] : zp ZP_WORD:106 , +Potential registers zp ZP_BYTE:18 [ utoa::started#4 utoa::started#2 ] : zp ZP_BYTE:18 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] : zp ZP_BYTE:19 , reg byte x , +Potential registers zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 ] : zp ZP_WORD:20 , +Potential registers zp ZP_WORD:22 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 ] : zp ZP_WORD:22 , +Potential registers zp ZP_WORD:24 [ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 ] : zp ZP_WORD:24 , +Potential registers zp ZP_WORD:26 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] : zp ZP_WORD:26 , +Potential registers zp ZP_BYTE:28 [ utoa_append::digit#2 utoa_append::digit#1 ] : zp ZP_BYTE:28 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:29 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] : zp ZP_WORD:29 , +Potential registers zp ZP_BYTE:31 [ ultoa::started#4 ultoa::started#2 ] : zp ZP_BYTE:31 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] : zp ZP_BYTE:32 , reg byte x , +Potential registers zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ] : zp ZP_DWORD:33 , +Potential registers zp ZP_WORD:37 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ] : zp ZP_WORD:37 , +Potential registers zp ZP_DWORD:39 [ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ] : zp ZP_DWORD:39 , +Potential registers zp ZP_DWORD:43 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] : zp ZP_DWORD:43 , +Potential registers zp ZP_BYTE:47 [ ultoa_append::digit#2 ultoa_append::digit#1 ] : zp ZP_BYTE:47 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:48 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] : zp ZP_WORD:48 , +Potential registers zp ZP_WORD:50 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] : zp ZP_WORD:50 , +Potential registers zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:52 , +Potential registers zp ZP_BYTE:54 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:54 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:55 [ memset::num#2 ] : zp ZP_WORD:55 , +Potential registers zp ZP_WORD:57 [ memset::str#3 ] : zp ZP_WORD:57 , +Potential registers zp ZP_BYTE:59 [ memset::c#3 ] : zp ZP_BYTE:59 , reg byte x , +Potential registers zp ZP_WORD:60 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:60 , +Potential registers zp ZP_DWORD:62 [ clock::return#2 ] : zp ZP_DWORD:62 , +Potential registers zp ZP_DWORD:66 [ main::$10 ] : zp ZP_DWORD:66 , +Potential registers zp ZP_DWORD:70 [ main::cyclecount#0 ] : zp ZP_DWORD:70 , +Potential registers zp ZP_DWORD:74 [ div32u16u::dividend#0 ] : zp ZP_DWORD:74 , +Potential registers zp ZP_DWORD:78 [ div32u16u::return#2 ] : zp ZP_DWORD:78 , +Potential registers zp ZP_DWORD:82 [ main::$14 ] : zp ZP_DWORD:82 , +Potential registers zp ZP_WORD:86 [ main::sec100s#0 ] : zp ZP_WORD:86 , +Potential registers zp ZP_DWORD:88 [ print_dword_decimal::w#0 ] : zp ZP_DWORD:88 , +Potential registers zp ZP_WORD:92 [ main::$38 ] : zp ZP_WORD:92 , +Potential registers zp ZP_BYTE:94 [ utoa::$4 ] : zp ZP_BYTE:94 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:95 [ utoa::buffer#4 ] : zp ZP_WORD:95 , +Potential registers zp ZP_BYTE:97 [ utoa::$11 ] : zp ZP_BYTE:97 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:98 [ utoa_append::buffer#0 ] : zp ZP_WORD:98 , +Potential registers zp ZP_WORD:100 [ utoa_append::sub#0 ] : zp ZP_WORD:100 , +Potential registers zp ZP_WORD:102 [ utoa_append::return#0 ] : zp ZP_WORD:102 , +Potential registers zp ZP_BYTE:104 [ ultoa::$4 ] : zp ZP_BYTE:104 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:105 [ ultoa::buffer#4 ] : zp ZP_WORD:105 , +Potential registers zp ZP_BYTE:107 [ ultoa::$11 ] : zp ZP_BYTE:107 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:108 [ ultoa_append::buffer#0 ] : zp ZP_WORD:108 , Potential registers zp ZP_DWORD:110 [ ultoa_append::sub#0 ] : zp ZP_DWORD:110 , Potential registers zp ZP_DWORD:114 [ ultoa_append::return#0 ] : zp ZP_DWORD:114 , @@ -6031,97 +11913,97 @@ Potential registers zp ZP_DWORD:134 [ clock::return#0 ] : zp ZP_DWORD:134 , Potential registers zp ZP_WORD:138 [ memset::end#0 ] : zp ZP_WORD:138 , REGISTER UPLIFT SCOPES -Uplift Scope [utoa_append] 2,554: zp ZP_WORD:24 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] 2,003: zp ZP_BYTE:26 [ utoa_append::digit#2 utoa_append::digit#1 ] 350.5: zp ZP_WORD:96 [ utoa_append::sub#0 ] 202: zp ZP_WORD:98 [ utoa_append::return#0 ] 12.88: zp ZP_WORD:94 [ utoa_append::buffer#0 ] -Uplift Scope [utoa] 300.13: zp ZP_WORD:22 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 ] 271.67: zp ZP_WORD:19 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 ] 202: zp ZP_BYTE:88 [ utoa::$11 ] 174.81: zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] 127.93: zp ZP_BYTE:21 [ utoa::started#2 utoa::started#3 ] 60.6: zp ZP_WORD:89 [ utoa::digit_value#0 ] 4: zp ZP_BYTE:91 [ utoa::$4 ] 4: zp ZP_WORD:92 [ utoa::buffer#4 ] -Uplift Scope [main] 297: zp ZP_WORD:8 [ main::j#2 main::j#0 main::j#1 ] 227.67: zp ZP_WORD:10 [ main::s#2 main::s#0 main::s#1 ] 35.6: zp ZP_WORD:2 [ main::i#11 main::i#2 ] 25: zp ZP_WORD:4 [ main::sieve_i#2 main::sieve_i#1 ] 22: zp ZP_WORD:86 [ main::$38 ] 15.4: zp ZP_WORD:6 [ main::i#10 main::i#3 ] 4: zp ZP_DWORD:60 [ main::$10 ] 2: zp ZP_DWORD:76 [ main::$14 ] 1.33: zp ZP_WORD:80 [ main::sec100s#0 ] 0.5: zp ZP_DWORD:64 [ main::cyclecount#0 ] -Uplift Scope [ultoa_append] 259: zp ZP_DWORD:37 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] 203: zp ZP_BYTE:41 [ ultoa_append::digit#2 ultoa_append::digit#1 ] 35.5: zp ZP_DWORD:110 [ ultoa_append::sub#0 ] 22: zp ZP_DWORD:114 [ ultoa_append::return#0 ] 1.62: zp ZP_WORD:108 [ ultoa_append::buffer#0 ] +Uplift Scope [utoa_append] 2,554: zp ZP_WORD:26 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] 2,003: zp ZP_BYTE:28 [ utoa_append::digit#2 utoa_append::digit#1 ] 350.5: zp ZP_WORD:100 [ utoa_append::sub#0 ] 202: zp ZP_WORD:102 [ utoa_append::return#0 ] 12.88: zp ZP_WORD:98 [ utoa_append::buffer#0 ] +Uplift Scope [utoa] 593.38: zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] 524.17: zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 ] 462.21: zp ZP_WORD:22 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 ] 409: zp ZP_WORD:24 [ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 ] 202: zp ZP_BYTE:97 [ utoa::$11 ] 151.5: zp ZP_BYTE:18 [ utoa::started#4 utoa::started#2 ] 4: zp ZP_BYTE:94 [ utoa::$4 ] 4: zp ZP_WORD:95 [ utoa::buffer#4 ] +Uplift Scope [main] 297: zp ZP_WORD:6 [ main::j#2 main::j#0 main::j#1 ] 227.67: zp ZP_WORD:8 [ main::s#2 main::s#0 main::s#1 ] 37.11: zp ZP_WORD:2 [ main::i#16 main::i#11 ] 22: zp ZP_WORD:92 [ main::$38 ] 15.4: zp ZP_WORD:10 [ main::i#10 main::i#3 ] 14.3: zp ZP_WORD:4 [ main::sieve_i#11 main::sieve_i#1 ] 4: zp ZP_DWORD:66 [ main::$10 ] 2: zp ZP_DWORD:82 [ main::$14 ] 1.33: zp ZP_WORD:86 [ main::sec100s#0 ] 0.5: zp ZP_DWORD:70 [ main::cyclecount#0 ] +Uplift Scope [ultoa_append] 259: zp ZP_DWORD:43 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] 203: zp ZP_BYTE:47 [ ultoa_append::digit#2 ultoa_append::digit#1 ] 35.5: zp ZP_DWORD:110 [ ultoa_append::sub#0 ] 22: zp ZP_DWORD:114 [ ultoa_append::return#0 ] 1.62: zp ZP_WORD:108 [ ultoa_append::buffer#0 ] Uplift Scope [print_str] 305.5: zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 ] -Uplift Scope [] 194.58: zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] 61.68: zp ZP_WORD:27 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] 0.67: zp ZP_WORD:132 [ rem16u#1 ] -Uplift Scope [divr16u] 106.92: zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp ZP_BYTE:130 [ divr16u::$1 ] 22: zp ZP_BYTE:131 [ divr16u::$2 ] 19.75: zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] 18.19: zp ZP_BYTE:48 [ divr16u::i#2 divr16u::i#1 ] 4: zp ZP_WORD:118 [ divr16u::return#2 ] 4: zp ZP_WORD:122 [ divr16u::return#3 ] -Uplift Scope [ultoa] 33.4: zp ZP_WORD:35 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ] 31.67: zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ] 22: zp ZP_BYTE:100 [ ultoa::$11 ] 19.04: zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] 13.93: zp ZP_BYTE:34 [ ultoa::started#2 ultoa::started#3 ] 6.6: zp ZP_DWORD:101 [ ultoa::digit_value#0 ] 4: zp ZP_BYTE:105 [ ultoa::$4 ] 4: zp ZP_WORD:106 [ ultoa::buffer#4 ] -Uplift Scope [memset] 38: zp ZP_WORD:54 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:138 [ memset::end#0 ] 2: zp ZP_WORD:49 [ memset::num#2 ] 1.38: zp ZP_BYTE:53 [ memset::c#3 ] 0: zp ZP_WORD:51 [ memset::str#3 ] +Uplift Scope [ultoa] 64.62: zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] 59.17: zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ] 50.79: zp ZP_WORD:37 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ] 49: zp ZP_DWORD:39 [ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ] 22: zp ZP_BYTE:107 [ ultoa::$11 ] 16.5: zp ZP_BYTE:31 [ ultoa::started#4 ultoa::started#2 ] 4: zp ZP_BYTE:104 [ ultoa::$4 ] 4: zp ZP_WORD:105 [ ultoa::buffer#4 ] +Uplift Scope [] 194.58: zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] 61.68: zp ZP_WORD:29 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] 0.67: zp ZP_WORD:132 [ rem16u#1 ] +Uplift Scope [divr16u] 106.92: zp ZP_WORD:48 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp ZP_BYTE:130 [ divr16u::$1 ] 22: zp ZP_BYTE:131 [ divr16u::$2 ] 19.75: zp ZP_WORD:50 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] 18.19: zp ZP_BYTE:54 [ divr16u::i#2 divr16u::i#1 ] 4: zp ZP_WORD:118 [ divr16u::return#2 ] 4: zp ZP_WORD:122 [ divr16u::return#3 ] +Uplift Scope [memset] 38: zp ZP_WORD:60 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:138 [ memset::end#0 ] 2: zp ZP_WORD:55 [ memset::num#2 ] 1.38: zp ZP_BYTE:59 [ memset::c#3 ] 0: zp ZP_WORD:57 [ memset::str#3 ] Uplift Scope [print_word_decimal] 30: zp ZP_WORD:16 [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] -Uplift Scope [div32u16u] 4: zp ZP_DWORD:72 [ div32u16u::return#2 ] 4: zp ZP_WORD:124 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:126 [ div32u16u::return#0 ] 1.2: zp ZP_DWORD:68 [ div32u16u::dividend#0 ] 0.67: zp ZP_WORD:120 [ div32u16u::quotient_hi#0 ] -Uplift Scope [clock] 4: zp ZP_DWORD:56 [ clock::return#2 ] 1.33: zp ZP_DWORD:134 [ clock::return#0 ] -Uplift Scope [print_dword_decimal] 4: zp ZP_DWORD:82 [ print_dword_decimal::w#0 ] +Uplift Scope [div32u16u] 4: zp ZP_DWORD:78 [ div32u16u::return#2 ] 4: zp ZP_WORD:124 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:126 [ div32u16u::return#0 ] 1.2: zp ZP_DWORD:74 [ div32u16u::dividend#0 ] 0.67: zp ZP_WORD:120 [ div32u16u::quotient_hi#0 ] +Uplift Scope [clock] 4: zp ZP_DWORD:62 [ clock::return#2 ] 1.33: zp ZP_DWORD:134 [ clock::return#0 ] +Uplift Scope [print_dword_decimal] 4: zp ZP_DWORD:88 [ print_dword_decimal::w#0 ] Uplift Scope [clock_start] Uplift Scope [RADIX] Uplift Scope [print_ln] Uplift Scope [print_char] Uplift Scope [print_cls] -Uplifting [utoa_append] best 103614 combination zp ZP_WORD:24 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ] zp ZP_WORD:96 [ utoa_append::sub#0 ] zp ZP_WORD:98 [ utoa_append::return#0 ] zp ZP_WORD:94 [ utoa_append::buffer#0 ] -Uplifting [utoa] best 102310 combination zp ZP_WORD:22 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 ] zp ZP_WORD:19 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 ] reg byte a [ utoa::$11 ] zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] reg byte x [ utoa::started#2 utoa::started#3 ] zp ZP_WORD:89 [ utoa::digit_value#0 ] reg byte a [ utoa::$4 ] zp ZP_WORD:92 [ utoa::buffer#4 ] -Uplifting [main] best 102310 combination zp ZP_WORD:8 [ main::j#2 main::j#0 main::j#1 ] zp ZP_WORD:10 [ main::s#2 main::s#0 main::s#1 ] zp ZP_WORD:2 [ main::i#11 main::i#2 ] zp ZP_WORD:4 [ main::sieve_i#2 main::sieve_i#1 ] zp ZP_WORD:86 [ main::$38 ] zp ZP_WORD:6 [ main::i#10 main::i#3 ] zp ZP_DWORD:60 [ main::$10 ] zp ZP_DWORD:76 [ main::$14 ] zp ZP_WORD:80 [ main::sec100s#0 ] zp ZP_DWORD:64 [ main::cyclecount#0 ] -Uplifting [ultoa_append] best 101707 combination zp ZP_DWORD:37 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ] zp ZP_DWORD:110 [ ultoa_append::sub#0 ] zp ZP_DWORD:114 [ ultoa_append::return#0 ] zp ZP_WORD:108 [ ultoa_append::buffer#0 ] -Uplifting [print_str] best 101707 combination zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 ] -Uplifting [] best 101707 combination zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] zp ZP_WORD:27 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] zp ZP_WORD:132 [ rem16u#1 ] -Uplifting [divr16u] best 101497 combination zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:118 [ divr16u::return#2 ] zp ZP_WORD:122 [ divr16u::return#3 ] -Uplifting [ultoa] best 101363 combination zp ZP_WORD:35 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ] zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ] reg byte a [ ultoa::$11 ] zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] reg byte x [ ultoa::started#2 ultoa::started#3 ] zp ZP_DWORD:101 [ ultoa::digit_value#0 ] reg byte a [ ultoa::$4 ] zp ZP_WORD:106 [ ultoa::buffer#4 ] -Uplifting [memset] best 101347 combination zp ZP_WORD:54 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:138 [ memset::end#0 ] zp ZP_WORD:49 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:51 [ memset::str#3 ] -Uplifting [print_word_decimal] best 101347 combination zp ZP_WORD:16 [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] -Uplifting [div32u16u] best 101347 combination zp ZP_DWORD:72 [ div32u16u::return#2 ] zp ZP_WORD:124 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:126 [ div32u16u::return#0 ] zp ZP_DWORD:68 [ div32u16u::dividend#0 ] zp ZP_WORD:120 [ div32u16u::quotient_hi#0 ] -Uplifting [clock] best 101347 combination zp ZP_DWORD:56 [ clock::return#2 ] zp ZP_DWORD:134 [ clock::return#0 ] -Uplifting [print_dword_decimal] best 101347 combination zp ZP_DWORD:82 [ print_dword_decimal::w#0 ] -Uplifting [clock_start] best 101347 combination -Uplifting [RADIX] best 101347 combination -Uplifting [print_ln] best 101347 combination -Uplifting [print_char] best 101347 combination -Uplifting [print_cls] best 101347 combination -Attempting to uplift remaining variables inzp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] -Uplifting [utoa] best 101347 combination zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] -Uplifting [ultoa] best 101347 combination zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] -Coalescing zero page register [ zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:132 [ rem16u#1 ] ] - score: 2 -Coalescing zero page register [ zp ZP_WORD:6 [ main::i#10 main::i#3 ] ] with [ zp ZP_WORD:16 [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:19 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 ] ] with [ zp ZP_WORD:24 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:19 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] with [ zp ZP_WORD:98 [ utoa_append::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:22 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 ] ] with [ zp ZP_WORD:92 [ utoa::buffer#4 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:22 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 utoa::buffer#4 ] ] with [ zp ZP_WORD:94 [ utoa_append::buffer#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ] ] with [ zp ZP_DWORD:37 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] ] with [ zp ZP_DWORD:82 [ print_dword_decimal::w#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ] ] with [ zp ZP_DWORD:114 [ ultoa_append::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:35 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ] ] with [ zp ZP_WORD:106 [ ultoa::buffer#4 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:35 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ultoa::buffer#4 ] ] with [ zp ZP_WORD:108 [ ultoa_append::buffer#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:118 [ divr16u::return#2 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:122 [ divr16u::return#3 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:49 [ memset::num#2 ] ] with [ zp ZP_WORD:138 [ memset::end#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:51 [ memset::str#3 ] ] with [ zp ZP_WORD:54 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:56 [ clock::return#2 ] ] with [ zp ZP_DWORD:60 [ main::$10 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:56 [ clock::return#2 main::$10 ] ] with [ zp ZP_DWORD:134 [ clock::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:64 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:68 [ div32u16u::dividend#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:72 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:76 [ main::$14 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:72 [ div32u16u::return#2 main::$14 ] ] with [ zp ZP_DWORD:126 [ div32u16u::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:89 [ utoa::digit_value#0 ] ] with [ zp ZP_WORD:96 [ utoa_append::sub#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:101 [ ultoa::digit_value#0 ] ] with [ zp ZP_DWORD:110 [ ultoa_append::sub#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:6 [ main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] ] with [ zp ZP_WORD:80 [ main::sec100s#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 ] ] with [ zp ZP_DWORD:64 [ main::cyclecount#0 div32u16u::dividend#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp ZP_WORD:124 [ div32u16u::quotient_lo#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_DWORD:30 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 ] ] with [ zp ZP_DWORD:56 [ clock::return#2 main::$10 clock::return#0 ] ] - score: 1 -Coalescing zero page register [ zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] ] with [ zp ZP_WORD:2 [ main::i#11 main::i#2 ] ] -Coalescing zero page register [ zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 ] ] with [ zp ZP_WORD:4 [ main::sieve_i#2 main::sieve_i#1 ] ] -Coalescing zero page register [ zp ZP_WORD:19 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 ] ] with [ zp ZP_WORD:8 [ main::j#2 main::j#0 main::j#1 ] ] -Coalescing zero page register [ zp ZP_WORD:22 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 ] ] with [ zp ZP_WORD:10 [ main::s#2 main::s#0 main::s#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:29 [ ultoa::digit#2 ultoa::digit#1 ] ] with [ zp ZP_BYTE:18 [ utoa::digit#2 utoa::digit#1 ] ] -Coalescing zero page register [ zp ZP_WORD:35 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 ] ] with [ zp ZP_WORD:6 [ main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] ] -Coalescing zero page register [ zp ZP_WORD:49 [ memset::num#2 memset::end#0 ] ] with [ zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] ] -Coalescing zero page register [ zp ZP_WORD:51 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] ] with [ zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] ] -Coalescing zero page register [ zp ZP_WORD:86 [ main::$38 ] ] with [ zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] ] -Coalescing zero page register [ zp ZP_DWORD:101 [ ultoa::digit_value#0 ultoa_append::sub#0 ] ] with [ zp ZP_DWORD:72 [ div32u16u::return#2 main::$14 div32u16u::return#0 ] ] -Coalescing zero page register [ zp ZP_WORD:120 [ div32u16u::quotient_hi#0 ] ] with [ zp ZP_WORD:89 [ utoa::digit_value#0 utoa_append::sub#0 ] ] -Coalescing zero page register [ zp ZP_WORD:49 [ memset::num#2 memset::end#0 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] ] with [ zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#2 main::sieve_i#1 ] ] -Coalescing zero page register [ zp ZP_WORD:51 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] ] with [ zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#11 main::i#2 ] ] -Allocated (was zp ZP_WORD:19) zp ZP_WORD:2 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::j#2 main::j#0 main::j#1 ] -Allocated (was zp ZP_WORD:22) zp ZP_WORD:4 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 main::s#2 main::s#0 main::s#1 ] -Allocated (was zp ZP_WORD:27) zp ZP_WORD:6 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] -Allocated (was zp ZP_BYTE:29) zp ZP_BYTE:8 [ ultoa::digit#2 ultoa::digit#1 utoa::digit#2 utoa::digit#1 ] -Allocated (was zp ZP_DWORD:30) zp ZP_DWORD:9 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 clock::return#2 main::$10 clock::return#0 ] -Allocated (was zp ZP_WORD:35) zp ZP_WORD:13 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] -Allocated (was zp ZP_WORD:49) zp ZP_WORD:15 [ memset::num#2 memset::end#0 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#2 main::sieve_i#1 ] -Allocated (was zp ZP_WORD:51) zp ZP_WORD:17 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#11 main::i#2 ] -Allocated (was zp ZP_WORD:86) zp ZP_WORD:19 [ main::$38 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -Allocated (was zp ZP_DWORD:101) zp ZP_DWORD:21 [ ultoa::digit_value#0 ultoa_append::sub#0 div32u16u::return#2 main::$14 div32u16u::return#0 ] -Allocated (was zp ZP_WORD:120) zp ZP_WORD:25 [ div32u16u::quotient_hi#0 utoa::digit_value#0 utoa_append::sub#0 ] +Uplifting [utoa_append] best 103746 combination zp ZP_WORD:26 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ] zp ZP_WORD:100 [ utoa_append::sub#0 ] zp ZP_WORD:102 [ utoa_append::return#0 ] zp ZP_WORD:98 [ utoa_append::buffer#0 ] +Uplifting [utoa] best 102442 combination zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 ] zp ZP_WORD:22 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 ] zp ZP_WORD:24 [ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 ] reg byte a [ utoa::$11 ] reg byte x [ utoa::started#4 utoa::started#2 ] reg byte a [ utoa::$4 ] zp ZP_WORD:95 [ utoa::buffer#4 ] +Uplifting [main] best 102442 combination zp ZP_WORD:6 [ main::j#2 main::j#0 main::j#1 ] zp ZP_WORD:8 [ main::s#2 main::s#0 main::s#1 ] zp ZP_WORD:2 [ main::i#16 main::i#11 ] zp ZP_WORD:92 [ main::$38 ] zp ZP_WORD:10 [ main::i#10 main::i#3 ] zp ZP_WORD:4 [ main::sieve_i#11 main::sieve_i#1 ] zp ZP_DWORD:66 [ main::$10 ] zp ZP_DWORD:82 [ main::$14 ] zp ZP_WORD:86 [ main::sec100s#0 ] zp ZP_DWORD:70 [ main::cyclecount#0 ] +Uplifting [ultoa_append] best 101839 combination zp ZP_DWORD:43 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ] zp ZP_DWORD:110 [ ultoa_append::sub#0 ] zp ZP_DWORD:114 [ ultoa_append::return#0 ] zp ZP_WORD:108 [ ultoa_append::buffer#0 ] +Uplifting [print_str] best 101839 combination zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 ] +Uplifting [ultoa] best 101705 combination zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ] zp ZP_WORD:37 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ] zp ZP_DWORD:39 [ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ] reg byte a [ ultoa::$11 ] reg byte x [ ultoa::started#4 ultoa::started#2 ] reg byte a [ ultoa::$4 ] zp ZP_WORD:105 [ ultoa::buffer#4 ] +Uplifting [] best 101705 combination zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] zp ZP_WORD:29 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] zp ZP_WORD:132 [ rem16u#1 ] +Uplifting [divr16u] best 101495 combination zp ZP_WORD:48 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] zp ZP_WORD:50 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:118 [ divr16u::return#2 ] zp ZP_WORD:122 [ divr16u::return#3 ] +Uplifting [memset] best 101479 combination zp ZP_WORD:60 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:138 [ memset::end#0 ] zp ZP_WORD:55 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:57 [ memset::str#3 ] +Uplifting [print_word_decimal] best 101479 combination zp ZP_WORD:16 [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] +Uplifting [div32u16u] best 101479 combination zp ZP_DWORD:78 [ div32u16u::return#2 ] zp ZP_WORD:124 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:126 [ div32u16u::return#0 ] zp ZP_DWORD:74 [ div32u16u::dividend#0 ] zp ZP_WORD:120 [ div32u16u::quotient_hi#0 ] +Uplifting [clock] best 101479 combination zp ZP_DWORD:62 [ clock::return#2 ] zp ZP_DWORD:134 [ clock::return#0 ] +Uplifting [print_dword_decimal] best 101479 combination zp ZP_DWORD:88 [ print_dword_decimal::w#0 ] +Uplifting [clock_start] best 101479 combination +Uplifting [RADIX] best 101479 combination +Uplifting [print_ln] best 101479 combination +Uplifting [print_char] best 101479 combination +Uplifting [print_cls] best 101479 combination +Attempting to uplift remaining variables inzp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +Uplifting [utoa] best 101479 combination zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] +Uplifting [ultoa] best 101479 combination zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] +Coalescing zero page register [ zp ZP_WORD:48 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:132 [ rem16u#1 ] ] - score: 2 +Coalescing zero page register [ zp ZP_WORD:10 [ main::i#10 main::i#3 ] ] with [ zp ZP_WORD:16 [ print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 ] ] with [ zp ZP_WORD:26 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] with [ zp ZP_WORD:102 [ utoa_append::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:22 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 ] ] with [ zp ZP_WORD:95 [ utoa::buffer#4 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:22 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 utoa::buffer#4 ] ] with [ zp ZP_WORD:98 [ utoa_append::buffer#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:24 [ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 ] ] with [ zp ZP_WORD:100 [ utoa_append::sub#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ] ] with [ zp ZP_DWORD:43 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] ] with [ zp ZP_DWORD:88 [ print_dword_decimal::w#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ] ] with [ zp ZP_DWORD:114 [ ultoa_append::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:37 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ] ] with [ zp ZP_WORD:105 [ ultoa::buffer#4 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:37 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ultoa::buffer#4 ] ] with [ zp ZP_WORD:108 [ ultoa_append::buffer#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:39 [ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ] ] with [ zp ZP_DWORD:110 [ ultoa_append::sub#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:118 [ divr16u::return#2 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:122 [ divr16u::return#3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:55 [ memset::num#2 ] ] with [ zp ZP_WORD:138 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:57 [ memset::str#3 ] ] with [ zp ZP_WORD:60 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:62 [ clock::return#2 ] ] with [ zp ZP_DWORD:66 [ main::$10 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:62 [ clock::return#2 main::$10 ] ] with [ zp ZP_DWORD:134 [ clock::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:70 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:74 [ div32u16u::dividend#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:78 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:82 [ main::$14 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:78 [ div32u16u::return#2 main::$14 ] ] with [ zp ZP_DWORD:126 [ div32u16u::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:10 [ main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 ] ] with [ zp ZP_WORD:86 [ main::sec100s#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 ] ] with [ zp ZP_DWORD:70 [ main::cyclecount#0 div32u16u::dividend#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp ZP_WORD:124 [ div32u16u::quotient_lo#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_DWORD:33 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 ] ] with [ zp ZP_DWORD:62 [ clock::return#2 main::$10 clock::return#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 ] ] with [ zp ZP_WORD:2 [ main::i#16 main::i#11 ] ] +Coalescing zero page register [ zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 ] ] with [ zp ZP_WORD:4 [ main::sieve_i#11 main::sieve_i#1 ] ] +Coalescing zero page register [ zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 ] ] with [ zp ZP_WORD:6 [ main::j#2 main::j#0 main::j#1 ] ] +Coalescing zero page register [ zp ZP_WORD:22 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 ] ] with [ zp ZP_WORD:8 [ main::s#2 main::s#0 main::s#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:32 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 ] ] with [ zp ZP_BYTE:19 [ utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] ] +Coalescing zero page register [ zp ZP_WORD:37 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 ] ] with [ zp ZP_WORD:10 [ main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] ] +Coalescing zero page register [ zp ZP_WORD:48 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] ] with [ zp ZP_WORD:24 [ utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 utoa_append::sub#0 ] ] +Coalescing zero page register [ zp ZP_WORD:55 [ memset::num#2 memset::end#0 ] ] with [ zp ZP_WORD:50 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] ] +Coalescing zero page register [ zp ZP_WORD:57 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] ] with [ zp ZP_WORD:52 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] ] +Coalescing zero page register [ zp ZP_DWORD:78 [ div32u16u::return#2 main::$14 div32u16u::return#0 ] ] with [ zp ZP_DWORD:39 [ ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ultoa_append::sub#0 ] ] +Coalescing zero page register [ zp ZP_WORD:120 [ div32u16u::quotient_hi#0 ] ] with [ zp ZP_WORD:92 [ main::$38 ] ] +Coalescing zero page register [ zp ZP_WORD:48 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 utoa_append::sub#0 ] ] with [ zp ZP_WORD:14 [ print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#11 main::sieve_i#1 ] ] +Coalescing zero page register [ zp ZP_WORD:55 [ memset::num#2 memset::end#0 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 ] ] with [ zp ZP_WORD:12 [ print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#16 main::i#11 ] ] +Coalescing zero page register [ zp ZP_WORD:57 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] ] with [ zp ZP_WORD:20 [ utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::j#2 main::j#0 main::j#1 ] ] +Allocated (was zp ZP_WORD:22) zp ZP_WORD:2 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 main::s#2 main::s#0 main::s#1 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:4 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] +Allocated (was zp ZP_BYTE:32) zp ZP_BYTE:6 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +Allocated (was zp ZP_DWORD:33) zp ZP_DWORD:7 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 clock::return#2 main::$10 clock::return#0 ] +Allocated (was zp ZP_WORD:37) zp ZP_WORD:11 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] +Allocated (was zp ZP_WORD:48) zp ZP_WORD:13 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 utoa_append::sub#0 print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#11 main::sieve_i#1 ] +Allocated (was zp ZP_WORD:55) zp ZP_WORD:15 [ memset::num#2 memset::end#0 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#16 main::i#11 ] +Allocated (was zp ZP_WORD:57) zp ZP_WORD:17 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::j#2 main::j#0 main::j#1 ] +Allocated (was zp ZP_DWORD:78) zp ZP_DWORD:19 [ div32u16u::return#2 main::$14 div32u16u::return#0 ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ultoa_append::sub#0 ] +Allocated (was zp ZP_WORD:120) zp ZP_WORD:23 [ div32u16u::quotient_hi#0 main::$38 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -6158,11 +12040,11 @@ ASSEMBLER BEFORE OPTIMIZATION .label sieve = $1000 // Clock cycles per second (on a C64 PAL) .const CLOCKS_PER_SEC = CLOCKS_PER_FRAME*FRAMES_PER_SEC - .label rem16u = $f - .label print_char_cursor = $11 - .label print_line_cursor = 6 - .label print_char_cursor_62 = 6 - .label print_char_cursor_99 = 6 + .label rem16u = $d + .label print_char_cursor = $f + .label print_line_cursor = 4 + .label print_char_cursor_62 = 4 + .label print_char_cursor_99 = 4 // @begin bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -6183,17 +12065,17 @@ bend: main: { .label toD0181_gfx = $1800 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>toD0181_gfx)/4&$f - .label _10 = 9 - .label _14 = $15 - .label cyclecount = 9 - .label sec100s = $d - .label i = $11 - .label sieve_i = $f - .label j = 2 - .label s = 4 - .label i_3 = $d - .label i_10 = $d - .label _38 = $13 + .label _10 = 7 + .label _14 = $13 + .label cyclecount = 7 + .label sec100s = $b + .label sieve_i = $d + .label j = $11 + .label s = 2 + .label i = $b + .label i_11 = $f + .label _38 = $17 + .label i_16 = $f // [5] phi from main to main::toD0181 [phi:main->main::toD0181] toD0181_from_main: jmp toD0181 @@ -6207,7 +12089,7 @@ main: { lda #toD0181_return sta D018 // [7] call print_cls - // [198] phi from main::@13 to print_cls [phi:main::@13->print_cls] + // [202] phi from main::@13 to print_cls [phi:main::@13->print_cls] print_cls_from_b13: jsr print_cls // [8] phi from main::@13 to main::@14 [phi:main::@13->main::@14] @@ -6235,9 +12117,9 @@ main: { // main::@15 b15: // [11] call print_ln - // [114] phi from main::@15 to print_ln [phi:main::@15->print_ln] + // [116] phi from main::@15 to print_ln [phi:main::@15->print_ln] print_ln_from_b15: - // [114] phi (byte*) print_line_cursor#21 = (byte*) 1024 [phi:main::@15->print_ln#0] -- pbuz1=pbuc1 + // [116] phi (byte*) print_line_cursor#21 = (byte*) 1024 [phi:main::@15->print_ln#0] -- pbuz1=pbuc1 lda #<$400 sta print_line_cursor lda #>$400 @@ -6282,9 +12164,9 @@ main: { // main::@18 b18: // [17] call print_ln - // [114] phi from main::@18 to print_ln [phi:main::@18->print_ln] + // [116] phi from main::@18 to print_ln [phi:main::@18->print_ln] print_ln_from_b18: - // [114] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@18->print_ln#0] -- register_copy + // [116] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@18->print_ln#0] -- register_copy jsr print_ln // [18] phi from main::@18 to main::@19 [phi:main::@18->main::@19] b19_from_b18: @@ -6292,16 +12174,16 @@ main: { // main::@19 b19: // [19] call memset - // [189] phi from main::@19 to memset [phi:main::@19->memset] + // [193] phi from main::@19 to memset [phi:main::@19->memset] memset_from_b19: - // [189] phi (byte) memset::c#3 = (byte) 0 [phi:main::@19->memset#0] -- vbuxx=vbuc1 + // [193] phi (byte) memset::c#3 = (byte) 0 [phi:main::@19->memset#0] -- vbuxx=vbuc1 ldx #0 - // [189] phi (void*) memset::str#3 = (void*)(const byte*) sieve#0 [phi:main::@19->memset#1] -- pvoz1=pvoc1 + // [193] phi (void*) memset::str#3 = (void*)(const byte*) sieve#0 [phi:main::@19->memset#1] -- pvoz1=pvoc1 lda #<sieve sta memset.str lda #>sieve sta memset.str+1 - // [189] phi (word) memset::num#2 = (const word) COUNT#0 [phi:main::@19->memset#2] -- vwuz1=vwuc1 + // [193] phi (word) memset::num#2 = (const word) COUNT#0 [phi:main::@19->memset#2] -- vwuz1=vwuc1 lda #<COUNT sta memset.num lda #>COUNT @@ -6314,43 +12196,104 @@ main: { b20: // [21] call clock_start jsr clock_start - // [22] phi from main::@20 to main::@1 [phi:main::@20->main::@1] - b1_from_b20: - // [22] phi (byte*) main::sieve_i#2 = (const byte*) sieve#0+(byte) 2 [phi:main::@20->main::@1#0] -- pbuz1=pbuc1 + // [22] phi from main::@20 to main::@2 [phi:main::@20->main::@2] + b2_from_b20: + // [22] phi (byte*) main::sieve_i#11 = (const byte*) sieve#0+(byte) 2 [phi:main::@20->main::@2#0] -- pbuz1=pbuc1 lda #<sieve+2 sta sieve_i lda #>sieve+2 sta sieve_i+1 - // [22] phi (word) main::i#11 = (byte) 2 [phi:main::@20->main::@1#1] -- vwuz1=vbuc1 + // [22] phi (word) main::i#16 = (byte) 2 [phi:main::@20->main::@2#1] -- vwuz1=vbuc1 lda #<2 - sta i + sta i_16 lda #>2 - sta i+1 + sta i_16+1 + jmp b2 + // [22] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [22] phi (byte*) main::sieve_i#11 = (byte*) main::sieve_i#1 [phi:main::@1->main::@2#0] -- register_copy + // [22] phi (word) main::i#16 = (word) main::i#11 [phi:main::@1->main::@2#1] -- register_copy + jmp b2 + // main::@2 + b2: + // [23] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 -- vbuc1_neq__deref_pbuz1_then_la1 + ldy #0 + lda (sieve_i),y + cmp #0 + bne b4 + jmp b7 + // main::@7 + b7: + // [24] (word) main::j#0 ← (word) main::i#16 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda i_16 + asl + sta j + lda i_16+1 + rol + sta j+1 + // [25] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 -- pbuz1=pbuc1_plus_vwuz2 + lda j + clc + adc #<sieve + sta s + lda j+1 + adc #>sieve + sta s+1 + // [26] phi from main::@6 main::@7 to main::@5 [phi:main::@6/main::@7->main::@5] + b5_from_b6: + b5_from_b7: + // [26] phi (byte*) main::s#2 = (byte*) main::s#1 [phi:main::@6/main::@7->main::@5#0] -- register_copy + // [26] phi (word) main::j#2 = (word) main::j#1 [phi:main::@6/main::@7->main::@5#1] -- register_copy + jmp b5 + // main::@5 + b5: + // [27] if((word) main::j#2<(const word) COUNT#0) goto main::@6 -- vwuz1_lt_vwuc1_then_la1 + lda j+1 + cmp #>COUNT + bcc b6 + bne !+ + lda j + cmp #<COUNT + bcc b6 + !: + jmp b4 + // main::@4 + b4: + // [28] (word) main::i#11 ← ++ (word) main::i#16 -- vwuz1=_inc_vwuz1 + inc i_11 + bne !+ + inc i_11+1 + !: + // [29] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 -- pbuz1=_inc_pbuz1 + inc sieve_i + bne !+ + inc sieve_i+1 + !: jmp b1 // main::@1 b1: - // [23] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 - lda i+1 + // [30] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 + lda i_11+1 cmp #>SQRT_COUNT - bcc b2 + bcc b2_from_b1 bne !+ - lda i + lda i_11 cmp #<SQRT_COUNT - bcc b2 + bcc b2_from_b1 !: - // [24] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [31] phi from main::@1 to main::@3 [phi:main::@1->main::@3] b3_from_b1: jmp b3 // main::@3 b3: - // [25] call clock + // [32] call clock jsr clock - // [26] (dword) clock::return#2 ← (dword) clock::return#0 + // [33] (dword) clock::return#2 ← (dword) clock::return#0 jmp b21 // main::@21 b21: - // [27] (dword~) main::$10 ← (dword) clock::return#2 - // [28] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz1_minus_vduc1 + // [34] (dword~) main::$10 ← (dword) clock::return#2 + // [35] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz1_minus_vduc1 lda cyclecount sec sbc #<CLOCKS_PER_INIT @@ -6364,25 +12307,25 @@ main: { lda cyclecount+3 sbc #>CLOCKS_PER_INIT>>$10 sta cyclecount+3 - // [29] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 - // [30] call div32u16u + // [36] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + // [37] call div32u16u jsr div32u16u - // [31] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + // [38] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 jmp b22 // main::@22 b22: - // [32] (dword~) main::$14 ← (dword) div32u16u::return#2 - // [33] (word) main::sec100s#0 ← (word)(dword~) main::$14 -- vwuz1=_word_vduz2 + // [39] (dword~) main::$14 ← (dword) div32u16u::return#2 + // [40] (word) main::sec100s#0 ← (word)(dword~) main::$14 -- vwuz1=_word_vduz2 lda _14 sta sec100s lda _14+1 sta sec100s+1 - // [34] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 + // [41] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 lda print_line_cursor sta print_char_cursor lda print_line_cursor+1 sta print_char_cursor+1 - // [35] call print_str + // [42] call print_str // [70] phi from main::@22 to print_str [phi:main::@22->print_str] print_str_from_b22: // [70] phi (byte*) print_char_cursor#66 = (byte*~) print_char_cursor#90 [phi:main::@22->print_str#0] -- register_copy @@ -6395,19 +12338,19 @@ main: { jmp b23 // main::@23 b23: - // [36] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 - // [37] call print_word_decimal + // [43] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + // [44] call print_word_decimal // [80] phi from main::@23 to print_word_decimal [phi:main::@23->print_word_decimal] print_word_decimal_from_b23: // [80] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#2 [phi:main::@23->print_word_decimal#0] -- register_copy // [80] phi (word) print_word_decimal::w#3 = (word) print_word_decimal::w#1 [phi:main::@23->print_word_decimal#1] -- register_copy jsr print_word_decimal - // [38] phi from main::@23 to main::@24 [phi:main::@23->main::@24] + // [45] phi from main::@23 to main::@24 [phi:main::@23->main::@24] b24_from_b23: jmp b24 // main::@24 b24: - // [39] call print_str + // [46] call print_str // [70] phi from main::@24 to print_str [phi:main::@24->print_str] print_str_from_b24: // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:main::@24->print_str#0] -- register_copy @@ -6420,39 +12363,39 @@ main: { jmp b25 // main::@25 b25: - // [40] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 - // [41] call print_dword_decimal + // [47] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + // [48] call print_dword_decimal jsr print_dword_decimal - // [42] phi from main::@25 to main::@26 [phi:main::@25->main::@26] + // [49] phi from main::@25 to main::@26 [phi:main::@25->main::@26] b26_from_b25: jmp b26 // main::@26 b26: - // [43] call print_ln - // [114] phi from main::@26 to print_ln [phi:main::@26->print_ln] + // [50] call print_ln + // [116] phi from main::@26 to print_ln [phi:main::@26->print_ln] print_ln_from_b26: - // [114] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@26->print_ln#0] -- register_copy + // [116] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@26->print_ln#0] -- register_copy jsr print_ln - // [44] phi from main::@26 to main::@8 [phi:main::@26->main::@8] + // [51] phi from main::@26 to main::@8 [phi:main::@26->main::@8] b8_from_b26: - // [44] phi (byte*) print_char_cursor#62 = (byte*) print_line_cursor#1 [phi:main::@26->main::@8#0] -- register_copy - // [44] phi (word) main::i#10 = (byte) 2 [phi:main::@26->main::@8#1] -- vwuz1=vbuc1 + // [51] phi (byte*) print_char_cursor#62 = (byte*) print_line_cursor#1 [phi:main::@26->main::@8#0] -- register_copy + // [51] phi (word) main::i#10 = (byte) 2 [phi:main::@26->main::@8#1] -- vwuz1=vbuc1 lda #<2 - sta i_10 + sta i lda #>2 - sta i_10+1 + sta i+1 jmp b8 // main::@8 b8: - // [45] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 -- pbuz1=pbuc1_plus_vwuz2 - lda i_10 + // [52] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 -- pbuz1=pbuc1_plus_vwuz2 + lda i clc adc #<sieve sta _38 - lda i_10+1 + lda i+1 adc #>sieve sta _38+1 - // [46] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 -- vbuc1_neq__deref_pbuz1_then_la1 + // [53] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 -- vbuc1_neq__deref_pbuz1_then_la1 ldy #0 lda (_38),y cmp #0 @@ -6460,52 +12403,52 @@ main: { jmp b10 // main::@10 b10: - // [47] (word) print_word_decimal::w#2 ← (word) main::i#10 - // [48] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 + // [54] (word) print_word_decimal::w#2 ← (word) main::i#10 + // [55] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 lda print_char_cursor_62 sta print_char_cursor lda print_char_cursor_62+1 sta print_char_cursor+1 - // [49] call print_word_decimal + // [56] call print_word_decimal // [80] phi from main::@10 to print_word_decimal [phi:main::@10->print_word_decimal] print_word_decimal_from_b10: // [80] phi (byte*) print_char_cursor#58 = (byte*~) print_char_cursor#96 [phi:main::@10->print_word_decimal#0] -- register_copy // [80] phi (word) print_word_decimal::w#3 = (word) print_word_decimal::w#2 [phi:main::@10->print_word_decimal#1] -- register_copy jsr print_word_decimal - // [50] phi from main::@10 to main::@27 [phi:main::@10->main::@27] + // [57] phi from main::@10 to main::@27 [phi:main::@10->main::@27] b27_from_b10: jmp b27 // main::@27 b27: - // [51] call print_char + // [58] call print_char jsr print_char - // [52] phi from main::@27 main::@29 to main::@9 [phi:main::@27/main::@29->main::@9] + // [59] phi from main::@27 main::@29 to main::@9 [phi:main::@27/main::@29->main::@9] b9_from_b27: b9_from_b29: - // [52] phi (byte*) print_char_cursor#63 = (byte*) print_char_cursor#10 [phi:main::@27/main::@29->main::@9#0] -- register_copy + // [59] phi (byte*) print_char_cursor#63 = (byte*) print_char_cursor#10 [phi:main::@27/main::@29->main::@9#0] -- register_copy jmp b9 // main::@9 b9: - // [53] (word) main::i#3 ← ++ (word) main::i#10 -- vwuz1=_inc_vwuz1 - inc i_3 + // [60] (word) main::i#3 ← ++ (word) main::i#10 -- vwuz1=_inc_vwuz1 + inc i bne !+ - inc i_3+1 + inc i+1 !: - // [54] if((word) main::i#3<(word) $514) goto main::@28 -- vwuz1_lt_vwuc1_then_la1 - lda i_3+1 + // [61] if((word) main::i#3<(word) $514) goto main::@28 -- vwuz1_lt_vwuc1_then_la1 + lda i+1 cmp #>$514 bcc b28 bne !+ - lda i_3 + lda i cmp #<$514 bcc b28 !: - // [55] phi from main::@9 to main::@11 [phi:main::@9->main::@11] + // [62] phi from main::@9 to main::@11 [phi:main::@9->main::@11] b11_from_b9: jmp b11 // main::@11 b11: - // [56] call print_str + // [63] call print_str // [70] phi from main::@11 to print_str [phi:main::@11->print_str] print_str_from_b11: // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#63 [phi:main::@11->print_str#0] -- register_copy @@ -6518,110 +12461,50 @@ main: { jmp b12 // main::@12 b12: - // [57] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 + // [64] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 inc SCREEN+$3e7 jmp b12 // main::@28 b28: - // [58] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 -- pbuz1=pbuz2 + // [65] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 -- pbuz1=pbuz2 lda print_char_cursor sta print_char_cursor_99 lda print_char_cursor+1 sta print_char_cursor_99+1 - // [44] phi from main::@28 to main::@8 [phi:main::@28->main::@8] + // [51] phi from main::@28 to main::@8 [phi:main::@28->main::@8] b8_from_b28: - // [44] phi (byte*) print_char_cursor#62 = (byte*~) print_char_cursor#99 [phi:main::@28->main::@8#0] -- register_copy - // [44] phi (word) main::i#10 = (word) main::i#3 [phi:main::@28->main::@8#1] -- register_copy + // [51] phi (byte*) print_char_cursor#62 = (byte*~) print_char_cursor#99 [phi:main::@28->main::@8#0] -- register_copy + // [51] phi (word) main::i#10 = (word) main::i#3 [phi:main::@28->main::@8#1] -- register_copy jmp b8 // main::@29 b29: - // [59] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 + // [66] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 lda print_char_cursor_62 sta print_char_cursor lda print_char_cursor_62+1 sta print_char_cursor+1 jmp b9_from_b29 - // main::@2 - b2: - // [60] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 -- vbuc1_neq__deref_pbuz1_then_la1 - ldy #0 - lda (sieve_i),y - cmp #0 - bne b4 - jmp b7 - // main::@7 - b7: - // [61] (word) main::j#0 ← (word) main::i#11 << (byte) 1 -- vwuz1=vwuz2_rol_1 - lda i - asl - sta j - lda i+1 - rol - sta j+1 - // [62] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 -- pbuz1=pbuc1_plus_vwuz2 - lda j - clc - adc #<sieve - sta s - lda j+1 - adc #>sieve - sta s+1 - // [63] phi from main::@6 main::@7 to main::@5 [phi:main::@6/main::@7->main::@5] - b5_from_b6: - b5_from_b7: - // [63] phi (byte*) main::s#2 = (byte*) main::s#1 [phi:main::@6/main::@7->main::@5#0] -- register_copy - // [63] phi (word) main::j#2 = (word) main::j#1 [phi:main::@6/main::@7->main::@5#1] -- register_copy - jmp b5 - // main::@5 - b5: - // [64] if((word) main::j#2<(const word) COUNT#0) goto main::@6 -- vwuz1_lt_vwuc1_then_la1 - lda j+1 - cmp #>COUNT - bcc b6 - bne !+ - lda j - cmp #<COUNT - bcc b6 - !: - jmp b4 - // main::@4 - b4: - // [65] (word) main::i#2 ← ++ (word) main::i#11 -- vwuz1=_inc_vwuz1 - inc i - bne !+ - inc i+1 - !: - // [66] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#2 -- pbuz1=_inc_pbuz1 - inc sieve_i - bne !+ - inc sieve_i+1 - !: - // [22] phi from main::@4 to main::@1 [phi:main::@4->main::@1] - b1_from_b4: - // [22] phi (byte*) main::sieve_i#2 = (byte*) main::sieve_i#1 [phi:main::@4->main::@1#0] -- register_copy - // [22] phi (word) main::i#11 = (word) main::i#2 [phi:main::@4->main::@1#1] -- register_copy - jmp b1 // main::@6 b6: // [67] *((byte*) main::s#2) ← (byte) 1 -- _deref_pbuz1=vbuc1 lda #1 ldy #0 sta (s),y - // [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#11 -- pbuz1=pbuz1_plus_vwuz2 + // [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 -- pbuz1=pbuz1_plus_vwuz2 lda s clc - adc i + adc i_16 sta s lda s+1 - adc i+1 + adc i_16+1 sta s+1 - // [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#11 -- vwuz1=vwuz1_plus_vwuz2 + // [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 -- vwuz1=vwuz1_plus_vwuz2 lda j clc - adc i + adc i_16 sta j lda j+1 - adc i+1 + adc i_16+1 sta j+1 jmp b5_from_b6 str: .text "Sieve benchmark - calculating primes@" @@ -6632,9 +12515,9 @@ main: { } // print_str // Print a zero-terminated string -// print_str(byte* zeropage($f) str) +// print_str(byte* zeropage($d) str) print_str: { - .label str = $f + .label str = $d // [71] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] b1_from_print_str: b1_from_b2: @@ -6693,9 +12576,9 @@ print_char: { } // print_word_decimal // Print a word as DECIMAL -// print_word_decimal(word zeropage($d) w) +// print_word_decimal(word zeropage($b) w) print_word_decimal: { - .label w = $d + .label w = $b // [81] (word) utoa::value#1 ← (word) print_word_decimal::w#3 -- vwuz1=vwuz2 lda w sta utoa.value @@ -6732,123 +12615,142 @@ print_word_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// utoa(word zeropage(2) value, byte* zeropage(4) buffer) +// utoa(word zeropage($11) value, byte* zeropage(2) buffer) utoa: { .const max_digits = 5 - .label digit_value = $19 - .label digit = 8 - .label value = 2 - .label buffer = 4 - // [87] phi from utoa to utoa::@1 [phi:utoa->utoa::@1] - b1_from_utoa: - // [87] phi (byte*) utoa::buffer#11 = (const byte[6]) decimal_digits#0 [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 + .label digit_value = $d + .label digit = 6 + .label value = $11 + .label buffer = 2 + jmp b18_1 + // utoa::@18_1 + b18_1: + // [87] (word) utoa::digit_value#4 ← *((const word[]) RADIX_DECIMAL_VALUES#0) -- vwuz1=_deref_pwuc1 + lda RADIX_DECIMAL_VALUES + sta digit_value + lda RADIX_DECIMAL_VALUES+1 + sta digit_value+1 + // [88] phi from utoa::@18_1 to utoa::@6 [phi:utoa::@18_1->utoa::@6] + b6_from_b18_1: + // [88] phi (word) utoa::digit_value#3 = (word) utoa::digit_value#4 [phi:utoa::@18_1->utoa::@6#0] -- register_copy + // [88] phi (byte*) utoa::buffer#21 = (const byte[6]) decimal_digits#0 [phi:utoa::@18_1->utoa::@6#1] -- pbuz1=pbuc1 lda #<decimal_digits sta buffer lda #>decimal_digits sta buffer+1 - // [87] phi (byte) utoa::started#2 = (byte) 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 + // [88] phi (byte) utoa::started#4 = (byte) 0 [phi:utoa::@18_1->utoa::@6#2] -- vbuxx=vbuc1 ldx #0 - // [87] phi (word) utoa::value#2 = (word) utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy - // [87] phi (byte) utoa::digit#2 = (byte) 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 + // [88] phi (word) utoa::value#15 = (word) utoa::value#1 [phi:utoa::@18_1->utoa::@6#3] -- register_copy + // [88] phi (byte) utoa::digit#8 = (byte) 0 [phi:utoa::@18_1->utoa::@6#4] -- vbuz1=vbuc1 lda #0 sta digit - jmp b1 - // [87] phi from utoa::@2 to utoa::@1 [phi:utoa::@2->utoa::@1] - b1_from_b2: - // [87] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#12 [phi:utoa::@2->utoa::@1#0] -- register_copy - // [87] phi (byte) utoa::started#2 = (byte) utoa::started#3 [phi:utoa::@2->utoa::@1#1] -- register_copy - // [87] phi (word) utoa::value#2 = (word) utoa::value#4 [phi:utoa::@2->utoa::@1#2] -- register_copy - // [87] phi (byte) utoa::digit#2 = (byte) utoa::digit#1 [phi:utoa::@2->utoa::@1#3] -- register_copy - jmp b1 - // utoa::@1 - b1: - // [88] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda digit - asl - // [89] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuaa - tay - lda RADIX_DECIMAL_VALUES,y - sta digit_value - lda RADIX_DECIMAL_VALUES+1,y - sta digit_value+1 - // [90] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 -- vbuc1_neq_vbuxx_then_la1 - cpx #0 - bne b3 jmp b6 // utoa::@6 b6: - // [91] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@3 -- vwuz1_ge_vwuz2_then_la1 + // [89] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@3 -- vwuz1_ge_vwuz2_then_la1 lda digit_value+1 cmp value+1 bne !+ lda digit_value cmp value - beq b3 + beq b3_from_b6 !: - bcc b3 - // [92] phi from utoa::@6 to utoa::@2 [phi:utoa::@6->utoa::@2] + bcc b3_from_b6 + // [90] phi from utoa::@6 to utoa::@2 [phi:utoa::@6->utoa::@2] b2_from_b6: - // [92] phi (byte*) utoa::buffer#12 = (byte*) utoa::buffer#11 [phi:utoa::@6->utoa::@2#0] -- register_copy - // [92] phi (byte) utoa::started#3 = (byte) utoa::started#2 [phi:utoa::@6->utoa::@2#1] -- register_copy - // [92] phi (word) utoa::value#4 = (word) utoa::value#2 [phi:utoa::@6->utoa::@2#2] -- register_copy + // [90] phi (byte) utoa::digit#6 = (byte) utoa::digit#8 [phi:utoa::@6->utoa::@2#0] -- register_copy + // [90] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#21 [phi:utoa::@6->utoa::@2#1] -- register_copy + // [90] phi (byte) utoa::started#2 = (byte) utoa::started#4 [phi:utoa::@6->utoa::@2#2] -- register_copy + // [90] phi (word) utoa::value#2 = (word) utoa::value#15 [phi:utoa::@6->utoa::@2#3] -- register_copy jmp b2 // utoa::@2 b2: - // [93] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 -- vbuz1=_inc_vbuz1 + // [91] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 -- vbuz1=_inc_vbuz1 inc digit - // [94] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 -- vbuz1_lt_vbuc1_then_la1 + // [92] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 -- vbuz1_lt_vbuc1_then_la1 lda digit cmp #max_digits-1 - bcc b1_from_b2 + bcc b1 jmp b4 // utoa::@4 b4: - // [95] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 -- vbuaa=_byte_vwuz1 + // [93] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 -- vbuaa=_byte_vwuz1 lda value - // [96] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa + // [94] *((byte*) utoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa tay lda DIGITS,y ldy #0 sta (buffer),y - // [97] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 -- pbuz1=_inc_pbuz1 + // [95] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - // [98] *((byte*) utoa::buffer#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [96] *((byte*) utoa::buffer#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (buffer),y jmp breturn // utoa::@return breturn: - // [99] return + // [97] return rts + // utoa::@1 + b1: + // [98] (byte~) utoa::$11 ← (byte) utoa::digit#1 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda digit + asl + // [99] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda RADIX_DECIMAL_VALUES,y + sta digit_value + lda RADIX_DECIMAL_VALUES+1,y + sta digit_value+1 + // [100] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 -- vbuc1_neq_vbuxx_then_la1 + cpx #0 + bne b3_from_b1 + // [88] phi from utoa::@1 to utoa::@6 [phi:utoa::@1->utoa::@6] + b6_from_b1: + // [88] phi (word) utoa::digit_value#3 = (word) utoa::digit_value#0 [phi:utoa::@1->utoa::@6#0] -- register_copy + // [88] phi (byte*) utoa::buffer#21 = (byte*) utoa::buffer#11 [phi:utoa::@1->utoa::@6#1] -- register_copy + // [88] phi (byte) utoa::started#4 = (byte) utoa::started#2 [phi:utoa::@1->utoa::@6#2] -- register_copy + // [88] phi (word) utoa::value#15 = (word) utoa::value#2 [phi:utoa::@1->utoa::@6#3] -- register_copy + // [88] phi (byte) utoa::digit#8 = (byte) utoa::digit#1 [phi:utoa::@1->utoa::@6#4] -- register_copy + jmp b6 + // [101] phi from utoa::@1 utoa::@6 to utoa::@3 [phi:utoa::@1/utoa::@6->utoa::@3] + b3_from_b1: + b3_from_b6: + // [101] phi (word) utoa::digit_value#2 = (word) utoa::digit_value#0 [phi:utoa::@1/utoa::@6->utoa::@3#0] -- register_copy + // [101] phi (byte*) utoa::buffer#22 = (byte*) utoa::buffer#11 [phi:utoa::@1/utoa::@6->utoa::@3#1] -- register_copy + // [101] phi (word) utoa::value#16 = (word) utoa::value#2 [phi:utoa::@1/utoa::@6->utoa::@3#2] -- register_copy + // [101] phi (byte) utoa::digit#7 = (byte) utoa::digit#1 [phi:utoa::@1/utoa::@6->utoa::@3#3] -- register_copy + jmp b3 // utoa::@3 b3: - // [100] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 - // [101] (word) utoa_append::value#0 ← (word) utoa::value#2 - // [102] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 - // [103] call utoa_append - // [107] phi from utoa::@3 to utoa_append [phi:utoa::@3->utoa_append] + // [102] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + // [103] (word) utoa_append::value#0 ← (word) utoa::value#16 + // [104] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + // [105] call utoa_append + // [109] phi from utoa::@3 to utoa_append [phi:utoa::@3->utoa_append] utoa_append_from_b3: jsr utoa_append - // [104] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + // [106] (word) utoa_append::return#0 ← (word) utoa_append::value#2 jmp b5 // utoa::@5 b5: - // [105] (word) utoa::value#0 ← (word) utoa_append::return#0 - // [106] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [107] (word) utoa::value#0 ← (word) utoa_append::return#0 + // [108] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#22 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - // [92] phi from utoa::@5 to utoa::@2 [phi:utoa::@5->utoa::@2] + // [90] phi from utoa::@5 to utoa::@2 [phi:utoa::@5->utoa::@2] b2_from_b5: - // [92] phi (byte*) utoa::buffer#12 = (byte*) utoa::buffer#3 [phi:utoa::@5->utoa::@2#0] -- register_copy - // [92] phi (byte) utoa::started#3 = (byte) 1 [phi:utoa::@5->utoa::@2#1] -- vbuxx=vbuc1 + // [90] phi (byte) utoa::digit#6 = (byte) utoa::digit#7 [phi:utoa::@5->utoa::@2#0] -- register_copy + // [90] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#3 [phi:utoa::@5->utoa::@2#1] -- register_copy + // [90] phi (byte) utoa::started#2 = (byte) 1 [phi:utoa::@5->utoa::@2#2] -- vbuxx=vbuc1 ldx #1 - // [92] phi (word) utoa::value#4 = (word) utoa::value#0 [phi:utoa::@5->utoa::@2#2] -- register_copy + // [90] phi (word) utoa::value#2 = (word) utoa::value#0 [phi:utoa::@5->utoa::@2#3] -- register_copy jmp b2 } // utoa_append @@ -6860,21 +12762,21 @@ utoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// utoa_append(byte* zeropage(4) buffer, word zeropage(2) value, word zeropage($19) sub) +// utoa_append(byte* zeropage(2) buffer, word zeropage($11) value, word zeropage($d) sub) utoa_append: { - .label buffer = 4 - .label value = 2 - .label sub = $19 - .label return = 2 - // [108] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] + .label buffer = 2 + .label value = $11 + .label sub = $d + .label return = $11 + // [110] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] b1_from_utoa_append: - // [108] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 + // [110] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 ldx #0 - // [108] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy + // [110] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy jmp b1 // utoa_append::@1 b1: - // [109] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 + // [111] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 lda sub+1 cmp value+1 bne !+ @@ -6886,20 +12788,20 @@ utoa_append: { jmp b3 // utoa_append::@3 b3: - // [110] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [112] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda DIGITS,x ldy #0 sta (buffer),y jmp breturn // utoa_append::@return breturn: - // [111] return + // [113] return rts // utoa_append::@2 b2: - // [112] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuxx=_inc_vbuxx + // [114] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuxx=_inc_vbuxx inx - // [113] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 + // [115] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 lda value sec sbc sub @@ -6907,23 +12809,23 @@ utoa_append: { lda value+1 sbc sub+1 sta value+1 - // [108] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] + // [110] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] b1_from_b2: - // [108] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy - // [108] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy + // [110] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy + // [110] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy jmp b1 } // print_ln // Print a newline print_ln: { - // [115] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + // [117] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] b1_from_print_ln: b1_from_b1: - // [115] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + // [117] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy jmp b1 // print_ln::@1 b1: - // [116] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [118] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc print_line_cursor @@ -6931,7 +12833,7 @@ print_ln: { bcc !+ inc print_line_cursor+1 !: - // [117] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + // [119] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 lda print_line_cursor+1 cmp print_char_cursor+1 bcc b1_from_b1 @@ -6943,25 +12845,25 @@ print_ln: { jmp breturn // print_ln::@return breturn: - // [118] return + // [120] return rts } // print_dword_decimal // Print a dword as DECIMAL -// print_dword_decimal(dword zeropage(9) w) +// print_dword_decimal(dword zeropage(7) w) print_dword_decimal: { - .label w = 9 - // [119] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 - // [120] call ultoa - // [124] phi from print_dword_decimal to ultoa [phi:print_dword_decimal->ultoa] + .label w = 7 + // [121] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + // [122] call ultoa + // [126] phi from print_dword_decimal to ultoa [phi:print_dword_decimal->ultoa] ultoa_from_print_dword_decimal: jsr ultoa - // [121] phi from print_dword_decimal to print_dword_decimal::@1 [phi:print_dword_decimal->print_dword_decimal::@1] + // [123] phi from print_dword_decimal to print_dword_decimal::@1 [phi:print_dword_decimal->print_dword_decimal::@1] b1_from_print_dword_decimal: jmp b1 // print_dword_decimal::@1 b1: - // [122] call print_str + // [124] call print_str // [70] phi from print_dword_decimal::@1 to print_str [phi:print_dword_decimal::@1->print_str] print_str_from_b1: // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:print_dword_decimal::@1->print_str#0] -- register_copy @@ -6974,7 +12876,7 @@ print_dword_decimal: { jmp breturn // print_dword_decimal::@return breturn: - // [123] return + // [125] return rts } // ultoa @@ -6983,98 +12885,85 @@ print_dword_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// ultoa(dword zeropage(9) value, byte* zeropage($d) buffer) +// ultoa(dword zeropage(7) value, byte* zeropage($b) buffer) ultoa: { .const max_digits = $a - .label digit_value = $15 - .label digit = 8 - .label value = 9 - .label buffer = $d - // [125] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] - b1_from_ultoa: - // [125] phi (byte*) ultoa::buffer#11 = (const byte[$b]) decimal_digits_long#0 [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 + .label digit_value = $13 + .label digit = 6 + .label value = 7 + .label buffer = $b + jmp b18_1 + // ultoa::@18_1 + b18_1: + // [127] (dword) ultoa::digit_value#4 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0) -- vduz1=_deref_pduc1 + lda RADIX_DECIMAL_VALUES_LONG + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1 + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2 + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3 + sta digit_value+3 + // [128] phi from ultoa::@18_1 to ultoa::@6 [phi:ultoa::@18_1->ultoa::@6] + b6_from_b18_1: + // [128] phi (dword) ultoa::digit_value#3 = (dword) ultoa::digit_value#4 [phi:ultoa::@18_1->ultoa::@6#0] -- register_copy + // [128] phi (byte*) ultoa::buffer#21 = (const byte[$b]) decimal_digits_long#0 [phi:ultoa::@18_1->ultoa::@6#1] -- pbuz1=pbuc1 lda #<decimal_digits_long sta buffer lda #>decimal_digits_long sta buffer+1 - // [125] phi (byte) ultoa::started#2 = (byte) 0 [phi:ultoa->ultoa::@1#1] -- vbuxx=vbuc1 + // [128] phi (byte) ultoa::started#4 = (byte) 0 [phi:ultoa::@18_1->ultoa::@6#2] -- vbuxx=vbuc1 ldx #0 - // [125] phi (dword) ultoa::value#2 = (dword) ultoa::value#1 [phi:ultoa->ultoa::@1#2] -- register_copy - // [125] phi (byte) ultoa::digit#2 = (byte) 0 [phi:ultoa->ultoa::@1#3] -- vbuz1=vbuc1 + // [128] phi (dword) ultoa::value#15 = (dword) ultoa::value#1 [phi:ultoa::@18_1->ultoa::@6#3] -- register_copy + // [128] phi (byte) ultoa::digit#8 = (byte) 0 [phi:ultoa::@18_1->ultoa::@6#4] -- vbuz1=vbuc1 lda #0 sta digit - jmp b1 - // [125] phi from ultoa::@2 to ultoa::@1 [phi:ultoa::@2->ultoa::@1] - b1_from_b2: - // [125] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#12 [phi:ultoa::@2->ultoa::@1#0] -- register_copy - // [125] phi (byte) ultoa::started#2 = (byte) ultoa::started#3 [phi:ultoa::@2->ultoa::@1#1] -- register_copy - // [125] phi (dword) ultoa::value#2 = (dword) ultoa::value#4 [phi:ultoa::@2->ultoa::@1#2] -- register_copy - // [125] phi (byte) ultoa::digit#2 = (byte) ultoa::digit#1 [phi:ultoa::@2->ultoa::@1#3] -- register_copy - jmp b1 - // ultoa::@1 - b1: - // [126] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 << (byte) 2 -- vbuaa=vbuz1_rol_2 - lda digit - asl - asl - // [127] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) -- vduz1=pduc1_derefidx_vbuaa - tay - lda RADIX_DECIMAL_VALUES_LONG,y - sta digit_value - lda RADIX_DECIMAL_VALUES_LONG+1,y - sta digit_value+1 - lda RADIX_DECIMAL_VALUES_LONG+2,y - sta digit_value+2 - lda RADIX_DECIMAL_VALUES_LONG+3,y - sta digit_value+3 - // [128] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 -- vbuc1_neq_vbuxx_then_la1 - cpx #0 - bne b3 jmp b6 // ultoa::@6 b6: - // [129] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@3 -- vduz1_ge_vduz2_then_la1 + // [129] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@3 -- vduz1_ge_vduz2_then_la1 lda value+3 cmp digit_value+3 bcc !+ - bne b3 + bne b3_from_b6 lda value+2 cmp digit_value+2 bcc !+ - bne b3 + bne b3_from_b6 lda value+1 cmp digit_value+1 bcc !+ - bne b3 + bne b3_from_b6 lda value cmp digit_value - bcs b3 + bcs b3_from_b6 !: // [130] phi from ultoa::@6 to ultoa::@2 [phi:ultoa::@6->ultoa::@2] b2_from_b6: - // [130] phi (byte*) ultoa::buffer#12 = (byte*) ultoa::buffer#11 [phi:ultoa::@6->ultoa::@2#0] -- register_copy - // [130] phi (byte) ultoa::started#3 = (byte) ultoa::started#2 [phi:ultoa::@6->ultoa::@2#1] -- register_copy - // [130] phi (dword) ultoa::value#4 = (dword) ultoa::value#2 [phi:ultoa::@6->ultoa::@2#2] -- register_copy + // [130] phi (byte) ultoa::digit#6 = (byte) ultoa::digit#8 [phi:ultoa::@6->ultoa::@2#0] -- register_copy + // [130] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#21 [phi:ultoa::@6->ultoa::@2#1] -- register_copy + // [130] phi (byte) ultoa::started#2 = (byte) ultoa::started#4 [phi:ultoa::@6->ultoa::@2#2] -- register_copy + // [130] phi (dword) ultoa::value#2 = (dword) ultoa::value#15 [phi:ultoa::@6->ultoa::@2#3] -- register_copy jmp b2 // ultoa::@2 b2: - // [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 -- vbuz1=_inc_vbuz1 + // [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 -- vbuz1=_inc_vbuz1 inc digit // [132] if((byte) ultoa::digit#1<(const byte) ultoa::max_digits#1-(byte) 1) goto ultoa::@1 -- vbuz1_lt_vbuc1_then_la1 lda digit cmp #max_digits-1 - bcc b1_from_b2 + bcc b1 jmp b4 // ultoa::@4 b4: - // [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 -- vbuaa=_byte_vduz1 + // [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#2 -- vbuaa=_byte_vduz1 lda value - // [134] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa + // [134] *((byte*) ultoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa tay lda DIGITS,y ldy #0 sta (buffer),y - // [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 -- pbuz1=_inc_pbuz1 + // [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 @@ -7088,31 +12977,67 @@ ultoa: { breturn: // [137] return rts + // ultoa::@1 + b1: + // [138] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 << (byte) 2 -- vbuaa=vbuz1_rol_2 + lda digit + asl + asl + // [139] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) -- vduz1=pduc1_derefidx_vbuaa + tay + lda RADIX_DECIMAL_VALUES_LONG,y + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1,y + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2,y + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3,y + sta digit_value+3 + // [140] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 -- vbuc1_neq_vbuxx_then_la1 + cpx #0 + bne b3_from_b1 + // [128] phi from ultoa::@1 to ultoa::@6 [phi:ultoa::@1->ultoa::@6] + b6_from_b1: + // [128] phi (dword) ultoa::digit_value#3 = (dword) ultoa::digit_value#0 [phi:ultoa::@1->ultoa::@6#0] -- register_copy + // [128] phi (byte*) ultoa::buffer#21 = (byte*) ultoa::buffer#11 [phi:ultoa::@1->ultoa::@6#1] -- register_copy + // [128] phi (byte) ultoa::started#4 = (byte) ultoa::started#2 [phi:ultoa::@1->ultoa::@6#2] -- register_copy + // [128] phi (dword) ultoa::value#15 = (dword) ultoa::value#2 [phi:ultoa::@1->ultoa::@6#3] -- register_copy + // [128] phi (byte) ultoa::digit#8 = (byte) ultoa::digit#1 [phi:ultoa::@1->ultoa::@6#4] -- register_copy + jmp b6 + // [141] phi from ultoa::@1 ultoa::@6 to ultoa::@3 [phi:ultoa::@1/ultoa::@6->ultoa::@3] + b3_from_b1: + b3_from_b6: + // [141] phi (dword) ultoa::digit_value#2 = (dword) ultoa::digit_value#0 [phi:ultoa::@1/ultoa::@6->ultoa::@3#0] -- register_copy + // [141] phi (byte*) ultoa::buffer#22 = (byte*) ultoa::buffer#11 [phi:ultoa::@1/ultoa::@6->ultoa::@3#1] -- register_copy + // [141] phi (dword) ultoa::value#16 = (dword) ultoa::value#2 [phi:ultoa::@1/ultoa::@6->ultoa::@3#2] -- register_copy + // [141] phi (byte) ultoa::digit#7 = (byte) ultoa::digit#1 [phi:ultoa::@1/ultoa::@6->ultoa::@3#3] -- register_copy + jmp b3 // ultoa::@3 b3: - // [138] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 - // [139] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 - // [140] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 - // [141] call ultoa_append - // [145] phi from ultoa::@3 to ultoa_append [phi:ultoa::@3->ultoa_append] + // [142] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 + // [143] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + // [144] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 + // [145] call ultoa_append + // [149] phi from ultoa::@3 to ultoa_append [phi:ultoa::@3->ultoa_append] ultoa_append_from_b3: jsr ultoa_append - // [142] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + // [146] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 jmp b5 // ultoa::@5 b5: - // [143] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 - // [144] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [147] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + // [148] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#22 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: // [130] phi from ultoa::@5 to ultoa::@2 [phi:ultoa::@5->ultoa::@2] b2_from_b5: - // [130] phi (byte*) ultoa::buffer#12 = (byte*) ultoa::buffer#3 [phi:ultoa::@5->ultoa::@2#0] -- register_copy - // [130] phi (byte) ultoa::started#3 = (byte) 1 [phi:ultoa::@5->ultoa::@2#1] -- vbuxx=vbuc1 + // [130] phi (byte) ultoa::digit#6 = (byte) ultoa::digit#7 [phi:ultoa::@5->ultoa::@2#0] -- register_copy + // [130] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#3 [phi:ultoa::@5->ultoa::@2#1] -- register_copy + // [130] phi (byte) ultoa::started#2 = (byte) 1 [phi:ultoa::@5->ultoa::@2#2] -- vbuxx=vbuc1 ldx #1 - // [130] phi (dword) ultoa::value#4 = (dword) ultoa::value#0 [phi:ultoa::@5->ultoa::@2#2] -- register_copy + // [130] phi (dword) ultoa::value#2 = (dword) ultoa::value#0 [phi:ultoa::@5->ultoa::@2#3] -- register_copy jmp b2 } // ultoa_append @@ -7124,21 +13049,21 @@ ultoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// ultoa_append(byte* zeropage($d) buffer, dword zeropage(9) value, dword zeropage($15) sub) +// ultoa_append(byte* zeropage($b) buffer, dword zeropage(7) value, dword zeropage($13) sub) ultoa_append: { - .label buffer = $d - .label value = 9 - .label sub = $15 - .label return = 9 - // [146] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] + .label buffer = $b + .label value = 7 + .label sub = $13 + .label return = 7 + // [150] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] b1_from_ultoa_append: - // [146] phi (byte) ultoa_append::digit#2 = (byte) 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 + // [150] phi (byte) ultoa_append::digit#2 = (byte) 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 ldx #0 - // [146] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy + // [150] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy jmp b1 // ultoa_append::@1 b1: - // [147] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 + // [151] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 lda value+3 cmp sub+3 bcc !+ @@ -7158,20 +13083,20 @@ ultoa_append: { jmp b3 // ultoa_append::@3 b3: - // [148] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [152] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda DIGITS,x ldy #0 sta (buffer),y jmp breturn // ultoa_append::@return breturn: - // [149] return + // [153] return rts // ultoa_append::@2 b2: - // [150] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 -- vbuxx=_inc_vbuxx + // [154] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 -- vbuxx=_inc_vbuxx inx - // [151] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 + // [155] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 lda value sec sbc sub @@ -7185,64 +13110,64 @@ ultoa_append: { lda value+3 sbc sub+3 sta value+3 - // [146] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] + // [150] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] b1_from_b2: - // [146] phi (byte) ultoa_append::digit#2 = (byte) ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy - // [146] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy + // [150] phi (byte) ultoa_append::digit#2 = (byte) ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy + // [150] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy jmp b1 } // div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division -// div32u16u(dword zeropage(9) dividend) +// div32u16u(dword zeropage(7) dividend) div32u16u: { .label divisor = CLOCKS_PER_SEC/$64 - .label quotient_hi = $19 - .label quotient_lo = $13 - .label return = $15 - .label dividend = 9 - // [152] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 -- vwuz1=_hi_vduz2 + .label quotient_hi = $17 + .label quotient_lo = $11 + .label return = $13 + .label dividend = 7 + // [156] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 -- vwuz1=_hi_vduz2 lda dividend+2 sta divr16u.dividend lda dividend+3 sta divr16u.dividend+1 - // [153] call divr16u - // [163] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [157] call divr16u + // [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - // [163] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#1 [phi:div32u16u->divr16u#0] -- register_copy - // [163] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [167] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#1 [phi:div32u16u->divr16u#0] -- register_copy + // [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem lda #>0 sta divr16u.rem+1 jsr divr16u - // [154] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [158] (word) divr16u::return#2 ← (word) divr16u::return#0 jmp b1 // div32u16u::@1 b1: - // [155] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 - // [156] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 -- vwuz1=_lo_vduz2 + // [160] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 -- vwuz1=_lo_vduz2 lda dividend sta divr16u.dividend lda dividend+1 sta divr16u.dividend+1 - // [157] (word) divr16u::rem#4 ← (word) rem16u#1 - // [158] call divr16u - // [163] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [161] (word) divr16u::rem#4 ← (word) rem16u#1 + // [162] call divr16u + // [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - // [163] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#2 [phi:div32u16u::@1->divr16u#0] -- register_copy - // [163] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [167] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#2 [phi:div32u16u::@1->divr16u#0] -- register_copy + // [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - // [159] (word) divr16u::return#3 ← (word) divr16u::return#0 + // [163] (word) divr16u::return#3 ← (word) divr16u::return#0 jmp b2 // div32u16u::@2 b2: - // [160] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - // [161] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + // [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -7254,7 +13179,7 @@ div32u16u: { jmp breturn // div32u16u::@return breturn: - // [162] return + // [166] return rts } // divr16u @@ -7262,64 +13187,64 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($11) dividend, word zeropage($f) rem) +// divr16u(word zeropage($f) dividend, word zeropage($d) rem) divr16u: { - .label rem = $f - .label dividend = $11 - .label quotient = $13 - .label return = $13 - // [164] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + .label rem = $d + .label dividend = $f + .label quotient = $11 + .label return = $11 + // [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [164] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + // [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [164] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [168] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [164] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [164] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - // [164] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [164] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [164] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [164] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [164] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [165] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [166] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + // [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 - // [167] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - // [168] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [169] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [170] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [170] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [171] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [172] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [173] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [177] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>div32u16u.divisor bcc b3_from_b2 @@ -7331,12 +13256,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [174] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [175] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 + // [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<div32u16u.divisor @@ -7344,35 +13269,35 @@ divr16u: { lda rem+1 sbc #>div32u16u.divisor sta rem+1 - // [176] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [176] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [176] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [177] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [178] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1_from_b3 jmp b6 // divr16u::@6 b6: - // [179] (word) rem16u#1 ← (word) divr16u::rem#11 + // [183] (word) rem16u#1 ← (word) divr16u::rem#11 jmp breturn // divr16u::@return breturn: - // [180] return + // [184] return rts } // clock // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { - .label return = 9 - // [181] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 + .label return = 7 + // [185] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -7389,21 +13314,21 @@ clock: { jmp breturn // clock::@return breturn: - // [182] return + // [186] return rts } // clock_start // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { - // [183] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #CIA_TIMER_CONTROL_CONTINUOUS sta CIA2_TIMER_A_CONTROL - // [184] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [188] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [185] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + // [189] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -7412,16 +13337,16 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - // [186] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [190] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - // [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + // [191] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL jmp breturn // clock_start::@return breturn: - // [188] return + // [192] return rts } // memset @@ -7432,7 +13357,7 @@ memset: { .label dst = $11 .label num = $f .label str = $11 - // [190] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + // [194] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 lda num bne !+ lda num+1 @@ -7441,7 +13366,7 @@ memset: { jmp b1 // memset::@1 b1: - // [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [195] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -7449,24 +13374,24 @@ memset: { lda end+1 adc str+1 sta end+1 - // [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 - // [193] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [196] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [197] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] b2_from_b1: b2_from_b2: - // [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // [197] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy jmp b2 // memset::@2 b2: - // [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [198] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - // [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [199] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 + // [200] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 bne b2_from_b2 @@ -7476,23 +13401,23 @@ memset: { jmp breturn // memset::@return breturn: - // [197] return + // [201] return rts } // print_cls // Clear the screen. Also resets current line/char cursor. print_cls: { - // [199] call memset - // [189] phi from print_cls to memset [phi:print_cls->memset] + // [203] call memset + // [193] phi from print_cls to memset [phi:print_cls->memset] memset_from_print_cls: - // [189] phi (byte) memset::c#3 = (byte) ' ' [phi:print_cls->memset#0] -- vbuxx=vbuc1 + // [193] phi (byte) memset::c#3 = (byte) ' ' [phi:print_cls->memset#0] -- vbuxx=vbuc1 ldx #' ' - // [189] phi (void*) memset::str#3 = (void*)(byte*) 1024 [phi:print_cls->memset#1] -- pvoz1=pvoc1 + // [193] phi (void*) memset::str#3 = (void*)(byte*) 1024 [phi:print_cls->memset#1] -- pvoz1=pvoc1 lda #<$400 sta memset.str lda #>$400 sta memset.str+1 - // [189] phi (word) memset::num#2 = (word) $3e8 [phi:print_cls->memset#2] -- vwuz1=vwuc1 + // [193] phi (word) memset::num#2 = (word) $3e8 [phi:print_cls->memset#2] -- vwuz1=vwuc1 lda #<$3e8 sta memset.num lda #>$3e8 @@ -7501,7 +13426,7 @@ print_cls: { jmp breturn // print_cls::@return breturn: - // [200] return + // [204] return rts } // File Data @@ -7528,6 +13453,10 @@ Removing instruction jmp b17 Removing instruction jmp b18 Removing instruction jmp b19 Removing instruction jmp b20 +Removing instruction jmp b2 +Removing instruction jmp b7 +Removing instruction jmp b5 +Removing instruction jmp b4 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp b21 @@ -7542,19 +13471,17 @@ Removing instruction jmp b27 Removing instruction jmp b9 Removing instruction jmp b11 Removing instruction jmp b12 -Removing instruction jmp b7 -Removing instruction jmp b5 -Removing instruction jmp b4 Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn -Removing instruction jmp b1 +Removing instruction jmp b18_1 Removing instruction jmp b6 Removing instruction jmp b2 Removing instruction jmp b4 Removing instruction jmp breturn +Removing instruction jmp b3 Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b3 @@ -7563,11 +13490,12 @@ Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn -Removing instruction jmp b1 +Removing instruction jmp b18_1 Removing instruction jmp b6 Removing instruction jmp b2 Removing instruction jmp b4 Removing instruction jmp breturn +Removing instruction jmp b3 Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b3 @@ -7598,13 +13526,21 @@ Removing instruction lda #>0 Replacing instruction lda #<0 with TXA Removing instruction lda #>0 Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 Replacing label b9_from_b29 with b9 Replacing label b5_from_b6 with b5 Replacing label b1_from_b2 with b1 -Replacing label b1_from_b2 with b1 +Replacing label b3_from_b6 with b3 +Replacing label b3_from_b6 with b3 +Replacing label b3_from_b1 with b3 Replacing label b1_from_b1 with b1 Replacing label b1_from_b1 with b1 -Replacing label b1_from_b2 with b1 +Replacing label b3_from_b6 with b3 +Replacing label b3_from_b6 with b3 +Replacing label b3_from_b6 with b3 +Replacing label b3_from_b6 with b3 +Replacing label b3_from_b1 with b3 Replacing label b2_from_b1 with b2 Replacing label b3_from_b2 with b3 Replacing label b3_from_b2 with b3 @@ -7628,6 +13564,9 @@ Removing instruction print_ln_from_b18: Removing instruction b19_from_b18: Removing instruction memset_from_b19: Removing instruction b20_from_b19: +Removing instruction b2_from_b1: +Removing instruction b5_from_b6: +Removing instruction b5_from_b7: Removing instruction b3_from_b1: Removing instruction print_word_decimal_from_b23: Removing instruction b24_from_b23: @@ -7639,21 +13578,21 @@ Removing instruction b9_from_b27: Removing instruction b9_from_b29: Removing instruction b11_from_b9: Removing instruction print_str_from_b11: -Removing instruction b5_from_b6: -Removing instruction b5_from_b7: Removing instruction b1_from_print_str: Removing instruction b1_from_b2: Removing instruction b1_from_print_word_decimal: Removing instruction print_str_from_b1: -Removing instruction b1_from_b2: Removing instruction b2_from_b6: +Removing instruction b3_from_b1: +Removing instruction b3_from_b6: Removing instruction utoa_append_from_b3: Removing instruction b1_from_print_ln: Removing instruction b1_from_b1: Removing instruction b1_from_print_dword_decimal: Removing instruction print_str_from_b1: -Removing instruction b1_from_b2: Removing instruction b2_from_b6: +Removing instruction b3_from_b1: +Removing instruction b3_from_b6: Removing instruction ultoa_append_from_b3: Removing instruction b1_from_b3: Removing instruction b2_from_b1: @@ -7675,7 +13614,9 @@ Removing instruction b17: Removing instruction b18: Removing instruction b19: Removing instruction b20: -Removing instruction b1_from_b20: +Removing instruction b2_from_b20: +Removing instruction b7: +Removing instruction b1: Removing instruction b3: Removing instruction b21: Removing instruction b22: @@ -7690,17 +13631,16 @@ Removing instruction print_word_decimal_from_b10: Removing instruction b27: Removing instruction b11: Removing instruction b8_from_b28: -Removing instruction b7: -Removing instruction b1_from_b4: Removing instruction breturn: Removing instruction breturn: Removing instruction utoa_from_print_word_decimal: Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_utoa: -Removing instruction b6: +Removing instruction b18_1: +Removing instruction b6_from_b18_1: Removing instruction b4: Removing instruction breturn: +Removing instruction b6_from_b1: Removing instruction b5: Removing instruction b2_from_b5: Removing instruction b1_from_utoa_append: @@ -7711,10 +13651,11 @@ Removing instruction breturn: Removing instruction ultoa_from_print_dword_decimal: Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_ultoa: -Removing instruction b6: +Removing instruction b18_1: +Removing instruction b6_from_b18_1: Removing instruction b4: Removing instruction breturn: +Removing instruction b6_from_b1: Removing instruction b5: Removing instruction b2_from_b5: Removing instruction b1_from_ultoa_append: @@ -7739,16 +13680,13 @@ Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 -Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp b1 Succesful ASM optimization Pass5NextJumpElimination -Removing instruction lda digit_value+1 -Succesful ASM optimization Pass5UnnecesaryLoadElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [105] bcc b2 to bcs -Fixing long branch [111] bcc b2 to bcs +Fixing long branch [123] bcc b6 to bcs +Fixing long branch [129] bcc b6 to bcs FINAL SYMBOL TABLE (label) @1 @@ -7803,8 +13741,8 @@ FINAL SYMBOL TABLE (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:9 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:9 4.0 +(dword) clock::return#0 return zp ZP_DWORD:7 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:7 4.0 (void()) clock_start() (label) clock_start::@return (byte[6]) decimal_digits @@ -7816,17 +13754,17 @@ FINAL SYMBOL TABLE (label) div32u16u::@2 (label) div32u16u::@return (dword) div32u16u::dividend -(dword) div32u16u::dividend#0 dividend zp ZP_DWORD:9 1.2000000000000002 +(dword) div32u16u::dividend#0 dividend zp ZP_DWORD:7 1.2000000000000002 (word) div32u16u::divisor (const word) div32u16u::divisor#0 divisor = (word)(const dword) CLOCKS_PER_SEC#0/(byte) $64 (dword) div32u16u::quotient (word) div32u16u::quotient_hi -(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:25 0.6666666666666666 +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:23 0.6666666666666666 (word) div32u16u::quotient_lo -(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:19 4.0 +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:17 4.0 (dword) div32u16u::return -(dword) div32u16u::return#0 return zp ZP_DWORD:21 1.3333333333333333 -(dword) div32u16u::return#2 return zp ZP_DWORD:21 4.0 +(dword) div32u16u::return#0 return zp ZP_DWORD:19 1.3333333333333333 +(dword) div32u16u::return#2 return zp ZP_DWORD:19 4.0 (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (byte~) divr16u::$1 reg byte a 22.0 (byte~) divr16u::$2 reg byte a 22.0 @@ -7838,36 +13776,36 @@ FINAL SYMBOL TABLE (label) divr16u::@6 (label) divr16u::@return (word) divr16u::dividend -(word) divr16u::dividend#0 dividend zp ZP_WORD:17 2.75 -(word) divr16u::dividend#1 dividend zp ZP_WORD:17 4.0 -(word) divr16u::dividend#2 dividend zp ZP_WORD:17 2.0 -(word) divr16u::dividend#3 dividend zp ZP_WORD:17 5.0 -(word) divr16u::dividend#5 dividend zp ZP_WORD:17 6.0 +(word) divr16u::dividend#0 dividend zp ZP_WORD:15 2.75 +(word) divr16u::dividend#1 dividend zp ZP_WORD:15 4.0 +(word) divr16u::dividend#2 dividend zp ZP_WORD:15 2.0 +(word) divr16u::dividend#3 dividend zp ZP_WORD:15 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:15 6.0 (word) divr16u::divisor (byte) divr16u::i (byte) divr16u::i#1 reg byte x 16.5 (byte) divr16u::i#2 reg byte x 1.6923076923076923 (word) divr16u::quotient -(word) divr16u::quotient#1 quotient zp ZP_WORD:19 16.5 -(word) divr16u::quotient#2 quotient zp ZP_WORD:19 11.0 -(word) divr16u::quotient#3 quotient zp ZP_WORD:19 2.75 +(word) divr16u::quotient#1 quotient zp ZP_WORD:17 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:17 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:17 2.75 (word) divr16u::rem -(word) divr16u::rem#0 rem zp ZP_WORD:15 8.25 -(word) divr16u::rem#1 rem zp ZP_WORD:15 22.0 -(word) divr16u::rem#10 rem zp ZP_WORD:15 4.0 -(word) divr16u::rem#11 rem zp ZP_WORD:15 11.666666666666666 -(word) divr16u::rem#2 rem zp ZP_WORD:15 22.0 -(word) divr16u::rem#4 rem zp ZP_WORD:15 4.0 -(word) divr16u::rem#5 rem zp ZP_WORD:15 24.0 -(word) divr16u::rem#6 rem zp ZP_WORD:15 11.0 +(word) divr16u::rem#0 rem zp ZP_WORD:13 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:13 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:13 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:13 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:13 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:13 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:13 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:13 11.0 (word) divr16u::return -(word) divr16u::return#0 return zp ZP_WORD:19 5.285714285714286 -(word) divr16u::return#2 return zp ZP_WORD:19 4.0 -(word) divr16u::return#3 return zp ZP_WORD:19 4.0 +(word) divr16u::return#0 return zp ZP_WORD:17 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:17 4.0 +(word) divr16u::return#3 return zp ZP_WORD:17 4.0 (void()) main() -(dword~) main::$10 $10 zp ZP_DWORD:9 4.0 -(dword~) main::$14 $14 zp ZP_DWORD:21 2.0 -(byte*~) main::$38 $38 zp ZP_WORD:19 22.0 +(dword~) main::$10 $10 zp ZP_DWORD:7 4.0 +(dword~) main::$14 $14 zp ZP_DWORD:19 2.0 +(byte*~) main::$38 $38 zp ZP_WORD:23 22.0 (label) main::@1 (label) main::@10 (label) main::@11 @@ -7898,25 +13836,25 @@ FINAL SYMBOL TABLE (label) main::@8 (label) main::@9 (dword) main::cyclecount -(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:9 0.5 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:7 0.5 (word) main::i -(word) main::i#10 i#10 zp ZP_WORD:13 4.4 -(word) main::i#11 i zp ZP_WORD:17 24.6 -(word) main::i#2 i zp ZP_WORD:17 11.0 -(word) main::i#3 i#3 zp ZP_WORD:13 11.0 +(word) main::i#10 i zp ZP_WORD:11 4.4 +(word) main::i#11 i#11 zp ZP_WORD:15 11.0 +(word) main::i#16 i#16 zp ZP_WORD:15 26.11111111111111 +(word) main::i#3 i zp ZP_WORD:11 11.0 (word) main::j -(word) main::j#0 j zp ZP_WORD:2 16.5 -(word) main::j#1 j zp ZP_WORD:2 202.0 -(word) main::j#2 j zp ZP_WORD:2 78.5 +(word) main::j#0 j zp ZP_WORD:17 16.5 +(word) main::j#1 j zp ZP_WORD:17 202.0 +(word) main::j#2 j zp ZP_WORD:17 78.5 (byte*) main::s -(byte*) main::s#0 s zp ZP_WORD:4 22.0 -(byte*) main::s#1 s zp ZP_WORD:4 101.0 -(byte*) main::s#2 s zp ZP_WORD:4 104.66666666666666 +(byte*) main::s#0 s zp ZP_WORD:2 22.0 +(byte*) main::s#1 s zp ZP_WORD:2 101.0 +(byte*) main::s#2 s zp ZP_WORD:2 104.66666666666666 (word) main::sec100s -(word) main::sec100s#0 sec100s zp ZP_WORD:13 1.3333333333333333 +(word) main::sec100s#0 sec100s zp ZP_WORD:11 1.3333333333333333 (byte*) main::sieve_i -(byte*) main::sieve_i#1 sieve_i zp ZP_WORD:15 22.0 -(byte*) main::sieve_i#2 sieve_i zp ZP_WORD:15 3.0 +(byte*) main::sieve_i#1 sieve_i zp ZP_WORD:13 11.0 +(byte*) main::sieve_i#11 sieve_i zp ZP_WORD:13 3.3000000000000003 (const string) main::str str = (string) "Sieve benchmark - calculating primes@" (const string) main::str1 str1 = (string) "between 2 and @" (const string) main::str2 str2 = (string) "100ths seconds used: @" @@ -7959,29 +13897,29 @@ FINAL SYMBOL TABLE (byte) print_char::ch (const byte) print_char::ch#0 ch = (byte) ' ' (byte*) print_char_cursor -(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:17 101.0 -(byte*) print_char_cursor#10 print_char_cursor zp ZP_WORD:17 4.333333333333333 -(byte*~) print_char_cursor#101 print_char_cursor zp ZP_WORD:17 22.0 -(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:17 10.25 -(byte*) print_char_cursor#58 print_char_cursor zp ZP_WORD:17 4.25 -(byte*) print_char_cursor#62 print_char_cursor#62 zp ZP_WORD:6 8.75 -(byte*) print_char_cursor#63 print_char_cursor zp ZP_WORD:17 8.75 -(byte*) print_char_cursor#66 print_char_cursor zp ZP_WORD:17 14.0 -(byte*~) print_char_cursor#89 print_char_cursor zp ZP_WORD:17 4.0 -(byte*~) print_char_cursor#90 print_char_cursor zp ZP_WORD:17 4.0 -(byte*~) print_char_cursor#96 print_char_cursor zp ZP_WORD:17 22.0 -(byte*~) print_char_cursor#99 print_char_cursor#99 zp ZP_WORD:6 22.0 +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:15 101.0 +(byte*) print_char_cursor#10 print_char_cursor zp ZP_WORD:15 4.333333333333333 +(byte*~) print_char_cursor#101 print_char_cursor zp ZP_WORD:15 22.0 +(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:15 10.25 +(byte*) print_char_cursor#58 print_char_cursor zp ZP_WORD:15 4.25 +(byte*) print_char_cursor#62 print_char_cursor#62 zp ZP_WORD:4 8.75 +(byte*) print_char_cursor#63 print_char_cursor zp ZP_WORD:15 8.75 +(byte*) print_char_cursor#66 print_char_cursor zp ZP_WORD:15 14.0 +(byte*~) print_char_cursor#89 print_char_cursor zp ZP_WORD:15 4.0 +(byte*~) print_char_cursor#90 print_char_cursor zp ZP_WORD:15 4.0 +(byte*~) print_char_cursor#96 print_char_cursor zp ZP_WORD:15 22.0 +(byte*~) print_char_cursor#99 print_char_cursor#99 zp ZP_WORD:4 22.0 (void()) print_cls() (label) print_cls::@return (void()) print_dword_decimal((dword) print_dword_decimal::w) (label) print_dword_decimal::@1 (label) print_dword_decimal::@return (dword) print_dword_decimal::w -(dword) print_dword_decimal::w#0 w zp ZP_DWORD:9 4.0 +(dword) print_dword_decimal::w#0 w zp ZP_DWORD:7 4.0 (byte*) print_line_cursor -(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:6 0.9347826086956521 -(byte*) print_line_cursor#11 print_line_cursor zp ZP_WORD:6 24.0 -(byte*) print_line_cursor#21 print_line_cursor zp ZP_WORD:6 6.0 +(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:4 0.9347826086956521 +(byte*) print_line_cursor#11 print_line_cursor zp ZP_WORD:4 24.0 +(byte*) print_line_cursor#21 print_line_cursor zp ZP_WORD:4 6.0 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -7991,24 +13929,25 @@ FINAL SYMBOL TABLE (label) print_str::@2 (label) print_str::@return (byte*) print_str::str -(byte*) print_str::str#0 str zp ZP_WORD:15 202.0 -(byte*) print_str::str#10 str zp ZP_WORD:15 2.0 -(byte*) print_str::str#8 str zp ZP_WORD:15 101.5 +(byte*) print_str::str#0 str zp ZP_WORD:13 202.0 +(byte*) print_str::str#10 str zp ZP_WORD:13 2.0 +(byte*) print_str::str#8 str zp ZP_WORD:13 101.5 (void()) print_word_decimal((word) print_word_decimal::w) (label) print_word_decimal::@1 (label) print_word_decimal::@return (word) print_word_decimal::w -(word) print_word_decimal::w#1 w zp ZP_WORD:13 4.0 -(word) print_word_decimal::w#2 w zp ZP_WORD:13 11.0 -(word) print_word_decimal::w#3 w zp ZP_WORD:13 15.0 +(word) print_word_decimal::w#1 w zp ZP_WORD:11 4.0 +(word) print_word_decimal::w#2 w zp ZP_WORD:11 11.0 +(word) print_word_decimal::w#3 w zp ZP_WORD:11 15.0 (word) rem16u -(word) rem16u#1 rem16u zp ZP_WORD:15 0.6666666666666666 +(word) rem16u#1 rem16u zp ZP_WORD:13 0.6666666666666666 (byte*) sieve (const byte*) sieve#0 sieve = (byte*) 4096 (void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) (byte~) ultoa::$11 reg byte a 22.0 (byte~) ultoa::$4 reg byte a 4.0 (label) ultoa::@1 +(label) ultoa::@18_1 (label) ultoa::@2 (label) ultoa::@3 (label) ultoa::@4 @@ -8016,49 +13955,57 @@ FINAL SYMBOL TABLE (label) ultoa::@6 (label) ultoa::@return (byte*) ultoa::buffer -(byte*) ultoa::buffer#11 buffer zp ZP_WORD:13 4.0 -(byte*) ultoa::buffer#12 buffer zp ZP_WORD:13 7.400000000000001 -(byte*) ultoa::buffer#3 buffer zp ZP_WORD:13 22.0 -(byte*) ultoa::buffer#4 buffer zp ZP_WORD:13 4.0 +(byte*) ultoa::buffer#11 buffer zp ZP_WORD:11 6.0 +(byte*) ultoa::buffer#21 buffer zp ZP_WORD:11 16.5 +(byte*) ultoa::buffer#22 buffer zp ZP_WORD:11 6.285714285714286 +(byte*) ultoa::buffer#3 buffer zp ZP_WORD:11 22.0 +(byte*) ultoa::buffer#4 buffer zp ZP_WORD:11 4.0 (byte) ultoa::digit -(byte) ultoa::digit#1 digit zp ZP_BYTE:8 16.5 -(byte) ultoa::digit#2 digit zp ZP_BYTE:8 2.5384615384615383 +(byte) ultoa::digit#1 digit zp ZP_BYTE:6 11.0 +(byte) ultoa::digit#6 digit zp ZP_BYTE:6 33.0 +(byte) ultoa::digit#7 digit zp ZP_BYTE:6 4.125 +(byte) ultoa::digit#8 digit zp ZP_BYTE:6 16.5 (dword) ultoa::digit_value -(dword) ultoa::digit_value#0 digit_value zp ZP_DWORD:21 6.6000000000000005 +(dword) ultoa::digit_value#0 digit_value zp ZP_DWORD:19 16.5 +(dword) ultoa::digit_value#2 digit_value zp ZP_DWORD:19 11.0 +(dword) ultoa::digit_value#3 digit_value zp ZP_DWORD:19 17.5 +(dword) ultoa::digit_value#4 digit_value zp ZP_DWORD:19 4.0 (dword*) ultoa::digit_values (byte) ultoa::max_digits (const byte) ultoa::max_digits#1 max_digits = (byte) $a (byte) ultoa::radix (byte) ultoa::started -(byte) ultoa::started#2 reg byte x 6.6000000000000005 -(byte) ultoa::started#3 reg byte x 7.333333333333333 +(byte) ultoa::started#2 reg byte x 5.5 +(byte) ultoa::started#4 reg byte x 11.0 (dword) ultoa::value -(dword) ultoa::value#0 value zp ZP_DWORD:9 11.0 -(dword) ultoa::value#1 value zp ZP_DWORD:9 2.0 -(dword) ultoa::value#2 value zp ZP_DWORD:9 7.666666666666666 -(dword) ultoa::value#4 value zp ZP_DWORD:9 11.0 +(dword) ultoa::value#0 value zp ZP_DWORD:7 11.0 +(dword) ultoa::value#1 value zp ZP_DWORD:7 1.3333333333333333 +(dword) ultoa::value#15 value zp ZP_DWORD:7 23.0 +(dword) ultoa::value#16 value zp ZP_DWORD:7 16.5 +(dword) ultoa::value#2 value zp ZP_DWORD:7 7.333333333333333 (dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) (label) ultoa_append::@1 (label) ultoa_append::@2 (label) ultoa_append::@3 (label) ultoa_append::@return (byte*) ultoa_append::buffer -(byte*) ultoa_append::buffer#0 buffer zp ZP_WORD:13 1.625 +(byte*) ultoa_append::buffer#0 buffer zp ZP_WORD:11 1.625 (byte) ultoa_append::digit (byte) ultoa_append::digit#1 reg byte x 101.0 (byte) ultoa_append::digit#2 reg byte x 102.0 (dword) ultoa_append::return -(dword) ultoa_append::return#0 return zp ZP_DWORD:9 22.0 +(dword) ultoa_append::return#0 return zp ZP_DWORD:7 22.0 (dword) ultoa_append::sub -(dword) ultoa_append::sub#0 sub zp ZP_DWORD:21 35.5 +(dword) ultoa_append::sub#0 sub zp ZP_DWORD:19 35.5 (dword) ultoa_append::value -(dword) ultoa_append::value#0 value zp ZP_DWORD:9 4.333333333333333 -(dword) ultoa_append::value#1 value zp ZP_DWORD:9 202.0 -(dword) ultoa_append::value#2 value zp ZP_DWORD:9 52.66666666666666 +(dword) ultoa_append::value#0 value zp ZP_DWORD:7 4.333333333333333 +(dword) ultoa_append::value#1 value zp ZP_DWORD:7 202.0 +(dword) ultoa_append::value#2 value zp ZP_DWORD:7 52.66666666666666 (void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix) (byte~) utoa::$11 reg byte a 202.0 (byte~) utoa::$4 reg byte a 4.0 (label) utoa::@1 +(label) utoa::@18_1 (label) utoa::@2 (label) utoa::@3 (label) utoa::@4 @@ -8066,73 +14013,79 @@ FINAL SYMBOL TABLE (label) utoa::@6 (label) utoa::@return (byte*) utoa::buffer -(byte*) utoa::buffer#11 buffer zp ZP_WORD:4 36.72727272727273 -(byte*) utoa::buffer#12 buffer zp ZP_WORD:4 61.39999999999999 -(byte*) utoa::buffer#3 buffer zp ZP_WORD:4 202.0 -(byte*) utoa::buffer#4 buffer zp ZP_WORD:4 4.0 +(byte*) utoa::buffer#11 buffer zp ZP_WORD:2 51.0 +(byte*) utoa::buffer#21 buffer zp ZP_WORD:2 151.5 +(byte*) utoa::buffer#22 buffer zp ZP_WORD:2 57.714285714285715 +(byte*) utoa::buffer#3 buffer zp ZP_WORD:2 202.0 +(byte*) utoa::buffer#4 buffer zp ZP_WORD:2 4.0 (byte) utoa::digit -(byte) utoa::digit#1 digit zp ZP_BYTE:8 151.5 -(byte) utoa::digit#2 digit zp ZP_BYTE:8 23.307692307692307 +(byte) utoa::digit#1 digit zp ZP_BYTE:6 101.0 +(byte) utoa::digit#6 digit zp ZP_BYTE:6 303.0 +(byte) utoa::digit#7 digit zp ZP_BYTE:6 37.875 +(byte) utoa::digit#8 digit zp ZP_BYTE:6 151.5 (word) utoa::digit_value -(word) utoa::digit_value#0 digit_value zp ZP_WORD:25 60.599999999999994 +(word) utoa::digit_value#0 digit_value zp ZP_WORD:13 151.5 +(word) utoa::digit_value#2 digit_value zp ZP_WORD:13 101.0 +(word) utoa::digit_value#3 digit_value zp ZP_WORD:13 152.5 +(word) utoa::digit_value#4 digit_value zp ZP_WORD:13 4.0 (word*) utoa::digit_values (byte) utoa::max_digits (const byte) utoa::max_digits#1 max_digits = (byte) 5 (byte) utoa::radix (byte) utoa::started -(byte) utoa::started#2 reg byte x 60.599999999999994 -(byte) utoa::started#3 reg byte x 67.33333333333333 +(byte) utoa::started#2 reg byte x 50.5 +(byte) utoa::started#4 reg byte x 101.0 (word) utoa::value -(word) utoa::value#0 value zp ZP_WORD:2 101.0 -(word) utoa::value#1 value zp ZP_WORD:2 2.0 -(word) utoa::value#2 value zp ZP_WORD:2 67.66666666666666 -(word) utoa::value#4 value zp ZP_WORD:2 101.0 +(word) utoa::value#0 value zp ZP_WORD:17 101.0 +(word) utoa::value#1 value zp ZP_WORD:17 1.3333333333333333 +(word) utoa::value#15 value zp ZP_WORD:17 203.0 +(word) utoa::value#16 value zp ZP_WORD:17 151.5 +(word) utoa::value#2 value zp ZP_WORD:17 67.33333333333333 (word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub) (label) utoa_append::@1 (label) utoa_append::@2 (label) utoa_append::@3 (label) utoa_append::@return (byte*) utoa_append::buffer -(byte*) utoa_append::buffer#0 buffer zp ZP_WORD:4 12.875 +(byte*) utoa_append::buffer#0 buffer zp ZP_WORD:2 12.875 (byte) utoa_append::digit (byte) utoa_append::digit#1 reg byte x 1001.0 (byte) utoa_append::digit#2 reg byte x 1002.0 (word) utoa_append::return -(word) utoa_append::return#0 return zp ZP_WORD:2 202.0 +(word) utoa_append::return#0 return zp ZP_WORD:17 202.0 (word) utoa_append::sub -(word) utoa_append::sub#0 sub zp ZP_WORD:25 350.5 +(word) utoa_append::sub#0 sub zp ZP_WORD:13 350.5 (word) utoa_append::value -(word) utoa_append::value#0 value zp ZP_WORD:2 34.33333333333333 -(word) utoa_append::value#1 value zp ZP_WORD:2 2002.0 -(word) utoa_append::value#2 value zp ZP_WORD:2 517.6666666666667 +(word) utoa_append::value#0 value zp ZP_WORD:17 34.33333333333333 +(word) utoa_append::value#1 value zp ZP_WORD:17 2002.0 +(word) utoa_append::value#2 value zp ZP_WORD:17 517.6666666666667 -zp ZP_WORD:2 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::j#2 main::j#0 main::j#1 ] -reg byte x [ utoa::started#2 utoa::started#3 ] -zp ZP_WORD:4 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 main::s#2 main::s#0 main::s#1 ] +reg byte x [ utoa::started#4 utoa::started#2 ] +zp ZP_WORD:2 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 main::s#2 main::s#0 main::s#1 ] reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ] -zp ZP_WORD:6 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] -zp ZP_BYTE:8 [ ultoa::digit#2 ultoa::digit#1 utoa::digit#2 utoa::digit#1 ] -zp ZP_DWORD:9 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 clock::return#2 main::$10 clock::return#0 ] -reg byte x [ ultoa::started#2 ultoa::started#3 ] -zp ZP_WORD:13 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] +zp ZP_WORD:4 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] +reg byte x [ ultoa::started#4 ultoa::started#2 ] +zp ZP_BYTE:6 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +zp ZP_DWORD:7 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 clock::return#2 main::$10 clock::return#0 ] +zp ZP_WORD:11 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ] +zp ZP_WORD:13 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 utoa_append::sub#0 print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#11 main::sieve_i#1 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:15 [ memset::num#2 memset::end#0 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#2 main::sieve_i#1 ] -zp ZP_WORD:17 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#11 main::i#2 ] +zp ZP_WORD:15 [ memset::num#2 memset::end#0 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#16 main::i#11 ] +zp ZP_WORD:17 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::j#2 main::j#0 main::j#1 ] reg byte x [ memset::c#3 ] -zp ZP_WORD:19 [ main::$38 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -reg byte a [ utoa::$11 ] +zp ZP_DWORD:19 [ div32u16u::return#2 main::$14 div32u16u::return#0 ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ultoa_append::sub#0 ] reg byte a [ utoa::$4 ] -reg byte a [ ultoa::$11 ] -zp ZP_DWORD:21 [ ultoa::digit_value#0 ultoa_append::sub#0 div32u16u::return#2 main::$14 div32u16u::return#0 ] +reg byte a [ utoa::$11 ] reg byte a [ ultoa::$4 ] -zp ZP_WORD:25 [ div32u16u::quotient_hi#0 utoa::digit_value#0 utoa_append::sub#0 ] +reg byte a [ ultoa::$11 ] +zp ZP_WORD:23 [ div32u16u::quotient_hi#0 main::$38 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] FINAL ASSEMBLER -Score: 82987 +Score: 84169 // File Comments // Upstart @@ -8168,11 +14121,11 @@ Score: 82987 .label sieve = $1000 // Clock cycles per second (on a C64 PAL) .const CLOCKS_PER_SEC = CLOCKS_PER_FRAME*FRAMES_PER_SEC - .label rem16u = $f - .label print_char_cursor = $11 - .label print_line_cursor = 6 - .label print_char_cursor_62 = 6 - .label print_char_cursor_99 = 6 + .label rem16u = $d + .label print_char_cursor = $f + .label print_line_cursor = 4 + .label print_char_cursor_62 = 4 + .label print_char_cursor_99 = 4 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -8184,17 +14137,17 @@ Score: 82987 main: { .label toD0181_gfx = $1800 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>toD0181_gfx)/4&$f - .label _10 = 9 - .label _14 = $15 - .label cyclecount = 9 - .label sec100s = $d - .label i = $11 - .label sieve_i = $f - .label j = 2 - .label s = 4 - .label i_3 = $d - .label i_10 = $d - .label _38 = $13 + .label _10 = 7 + .label _14 = $13 + .label cyclecount = 7 + .label sec100s = $b + .label sieve_i = $d + .label j = $11 + .label s = 2 + .label i = $b + .label i_11 = $f + .label _38 = $17 + .label i_16 = $f // [5] phi from main to main::toD0181 [phi:main->main::toD0181] // main::toD0181 // main::@13 @@ -8205,7 +14158,7 @@ main: { sta D018 // print_cls() // [7] call print_cls - // [198] phi from main::@13 to print_cls [phi:main::@13->print_cls] + // [202] phi from main::@13 to print_cls [phi:main::@13->print_cls] jsr print_cls // [8] phi from main::@13 to main::@14 [phi:main::@13->main::@14] // main::@14 @@ -8227,8 +14180,8 @@ main: { // main::@15 // print_ln() // [11] call print_ln - // [114] phi from main::@15 to print_ln [phi:main::@15->print_ln] - // [114] phi (byte*) print_line_cursor#21 = (byte*) 1024 [phi:main::@15->print_ln#0] -- pbuz1=pbuc1 + // [116] phi from main::@15 to print_ln [phi:main::@15->print_ln] + // [116] phi (byte*) print_line_cursor#21 = (byte*) 1024 [phi:main::@15->print_ln#0] -- pbuz1=pbuc1 lda #<$400 sta print_line_cursor lda #>$400 @@ -8266,22 +14219,22 @@ main: { // main::@18 // print_ln() // [17] call print_ln - // [114] phi from main::@18 to print_ln [phi:main::@18->print_ln] - // [114] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@18->print_ln#0] -- register_copy + // [116] phi from main::@18 to print_ln [phi:main::@18->print_ln] + // [116] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@18->print_ln#0] -- register_copy jsr print_ln // [18] phi from main::@18 to main::@19 [phi:main::@18->main::@19] // main::@19 // memset(sieve, 0, COUNT) // [19] call memset - // [189] phi from main::@19 to memset [phi:main::@19->memset] - // [189] phi (byte) memset::c#3 = (byte) 0 [phi:main::@19->memset#0] -- vbuxx=vbuc1 + // [193] phi from main::@19 to memset [phi:main::@19->memset] + // [193] phi (byte) memset::c#3 = (byte) 0 [phi:main::@19->memset#0] -- vbuxx=vbuc1 ldx #0 - // [189] phi (void*) memset::str#3 = (void*)(const byte*) sieve#0 [phi:main::@19->memset#1] -- pvoz1=pvoc1 + // [193] phi (void*) memset::str#3 = (void*)(const byte*) sieve#0 [phi:main::@19->memset#1] -- pvoz1=pvoc1 lda #<sieve sta memset.str lda #>sieve sta memset.str+1 - // [189] phi (word) memset::num#2 = (const word) COUNT#0 [phi:main::@19->memset#2] -- vwuz1=vwuc1 + // [193] phi (word) memset::num#2 = (const word) COUNT#0 [phi:main::@19->memset#2] -- vwuz1=vwuc1 lda #<COUNT sta memset.num lda #>COUNT @@ -8292,43 +14245,100 @@ main: { // clock_start() // [21] call clock_start jsr clock_start - // [22] phi from main::@20 to main::@1 [phi:main::@20->main::@1] - // [22] phi (byte*) main::sieve_i#2 = (const byte*) sieve#0+(byte) 2 [phi:main::@20->main::@1#0] -- pbuz1=pbuc1 + // [22] phi from main::@20 to main::@2 [phi:main::@20->main::@2] + // [22] phi (byte*) main::sieve_i#11 = (const byte*) sieve#0+(byte) 2 [phi:main::@20->main::@2#0] -- pbuz1=pbuc1 lda #<sieve+2 sta sieve_i lda #>sieve+2 sta sieve_i+1 - // [22] phi (word) main::i#11 = (byte) 2 [phi:main::@20->main::@1#1] -- vwuz1=vbuc1 + // [22] phi (word) main::i#16 = (byte) 2 [phi:main::@20->main::@2#1] -- vwuz1=vbuc1 lda #<2 - sta i + sta i_16 lda #>2 - sta i+1 - // main::@1 - b1: - // while (i < SQRT_COUNT) - // [23] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 - lda i+1 - cmp #>SQRT_COUNT - bcs !b2+ - jmp b2 - !b2: + sta i_16+1 + // [22] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [22] phi (byte*) main::sieve_i#11 = (byte*) main::sieve_i#1 [phi:main::@1->main::@2#0] -- register_copy + // [22] phi (word) main::i#16 = (word) main::i#11 [phi:main::@1->main::@2#1] -- register_copy + // main::@2 + b2: + // if (!*sieve_i) + // [23] if((byte) 0!=*((byte*) main::sieve_i#11)) goto main::@4 -- vbuc1_neq__deref_pbuz1_then_la1 + ldy #0 + lda (sieve_i),y + cmp #0 + bne b4 + // main::@7 + // j = i*2 + // [24] (word) main::j#0 ← (word) main::i#16 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda i_16 + asl + sta j + lda i_16+1 + rol + sta j+1 + // s = &sieve[j] + // [25] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 -- pbuz1=pbuc1_plus_vwuz2 + lda j + clc + adc #<sieve + sta s + lda j+1 + adc #>sieve + sta s+1 + // [26] phi from main::@6 main::@7 to main::@5 [phi:main::@6/main::@7->main::@5] + // [26] phi (byte*) main::s#2 = (byte*) main::s#1 [phi:main::@6/main::@7->main::@5#0] -- register_copy + // [26] phi (word) main::j#2 = (word) main::j#1 [phi:main::@6/main::@7->main::@5#1] -- register_copy + // main::@5 + b5: + // while (j < COUNT) + // [27] if((word) main::j#2<(const word) COUNT#0) goto main::@6 -- vwuz1_lt_vwuc1_then_la1 + lda j+1 + cmp #>COUNT + bcs !b6+ + jmp b6 + !b6: bne !+ - lda i - cmp #<SQRT_COUNT - bcs !b2+ - jmp b2 - !b2: + lda j + cmp #<COUNT + bcs !b6+ + jmp b6 + !b6: !: - // [24] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // main::@4 + b4: + // i++; + // [28] (word) main::i#11 ← ++ (word) main::i#16 -- vwuz1=_inc_vwuz1 + inc i_11 + bne !+ + inc i_11+1 + !: + // sieve_i++; + // [29] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#11 -- pbuz1=_inc_pbuz1 + inc sieve_i + bne !+ + inc sieve_i+1 + !: + // main::@1 + // while (i < SQRT_COUNT) + // [30] if((word) main::i#11<(const byte) SQRT_COUNT#0) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 + lda i_11+1 + cmp #>SQRT_COUNT + bcc b2 + bne !+ + lda i_11 + cmp #<SQRT_COUNT + bcc b2 + !: + // [31] phi from main::@1 to main::@3 [phi:main::@1->main::@3] // main::@3 // clock() - // [25] call clock + // [32] call clock jsr clock - // [26] (dword) clock::return#2 ← (dword) clock::return#0 + // [33] (dword) clock::return#2 ← (dword) clock::return#0 // main::@21 - // [27] (dword~) main::$10 ← (dword) clock::return#2 + // [34] (dword~) main::$10 ← (dword) clock::return#2 // cyclecount = clock()-CLOCKS_PER_INIT - // [28] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz1_minus_vduc1 + // [35] (dword) main::cyclecount#0 ← (dword~) main::$10 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz1_minus_vduc1 lda cyclecount sec sbc #<CLOCKS_PER_INIT @@ -8343,25 +14353,25 @@ main: { sbc #>CLOCKS_PER_INIT>>$10 sta cyclecount+3 // div32u16u(cyclecount, (unsigned int)(CLOCKS_PER_SEC/100)) - // [29] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 - // [30] call div32u16u + // [36] (dword) div32u16u::dividend#0 ← (dword) main::cyclecount#0 + // [37] call div32u16u jsr div32u16u - // [31] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + // [38] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 // main::@22 - // [32] (dword~) main::$14 ← (dword) div32u16u::return#2 + // [39] (dword~) main::$14 ← (dword) div32u16u::return#2 // sec100s = (unsigned int)div32u16u(cyclecount, (unsigned int)(CLOCKS_PER_SEC/100)) - // [33] (word) main::sec100s#0 ← (word)(dword~) main::$14 -- vwuz1=_word_vduz2 + // [40] (word) main::sec100s#0 ← (word)(dword~) main::$14 -- vwuz1=_word_vduz2 lda _14 sta sec100s lda _14+1 sta sec100s+1 - // [34] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 + // [41] (byte*~) print_char_cursor#90 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 lda print_line_cursor sta print_char_cursor lda print_line_cursor+1 sta print_char_cursor+1 // print_str("100ths seconds used: ") - // [35] call print_str + // [42] call print_str // [70] phi from main::@22 to print_str [phi:main::@22->print_str] // [70] phi (byte*) print_char_cursor#66 = (byte*~) print_char_cursor#90 [phi:main::@22->print_str#0] -- register_copy // [70] phi (byte*) print_str::str#10 = (const string) main::str2 [phi:main::@22->print_str#1] -- pbuz1=pbuc1 @@ -8372,16 +14382,16 @@ main: { jsr print_str // main::@23 // print_word_decimal(sec100s) - // [36] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 - // [37] call print_word_decimal + // [43] (word) print_word_decimal::w#1 ← (word) main::sec100s#0 + // [44] call print_word_decimal // [80] phi from main::@23 to print_word_decimal [phi:main::@23->print_word_decimal] // [80] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#2 [phi:main::@23->print_word_decimal#0] -- register_copy // [80] phi (word) print_word_decimal::w#3 = (word) print_word_decimal::w#1 [phi:main::@23->print_word_decimal#1] -- register_copy jsr print_word_decimal - // [38] phi from main::@23 to main::@24 [phi:main::@23->main::@24] + // [45] phi from main::@23 to main::@24 [phi:main::@23->main::@24] // main::@24 // print_str(" cycles: ") - // [39] call print_str + // [46] call print_str // [70] phi from main::@24 to print_str [phi:main::@24->print_str] // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:main::@24->print_str#0] -- register_copy // [70] phi (byte*) print_str::str#10 = (const string) main::str3 [phi:main::@24->print_str#1] -- pbuz1=pbuc1 @@ -8392,81 +14402,81 @@ main: { jsr print_str // main::@25 // print_dword_decimal(cyclecount) - // [40] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 - // [41] call print_dword_decimal + // [47] (dword) print_dword_decimal::w#0 ← (dword) main::cyclecount#0 + // [48] call print_dword_decimal jsr print_dword_decimal - // [42] phi from main::@25 to main::@26 [phi:main::@25->main::@26] + // [49] phi from main::@25 to main::@26 [phi:main::@25->main::@26] // main::@26 // print_ln() - // [43] call print_ln - // [114] phi from main::@26 to print_ln [phi:main::@26->print_ln] - // [114] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@26->print_ln#0] -- register_copy + // [50] call print_ln + // [116] phi from main::@26 to print_ln [phi:main::@26->print_ln] + // [116] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#1 [phi:main::@26->print_ln#0] -- register_copy jsr print_ln - // [44] phi from main::@26 to main::@8 [phi:main::@26->main::@8] - // [44] phi (byte*) print_char_cursor#62 = (byte*) print_line_cursor#1 [phi:main::@26->main::@8#0] -- register_copy - // [44] phi (word) main::i#10 = (byte) 2 [phi:main::@26->main::@8#1] -- vwuz1=vbuc1 + // [51] phi from main::@26 to main::@8 [phi:main::@26->main::@8] + // [51] phi (byte*) print_char_cursor#62 = (byte*) print_line_cursor#1 [phi:main::@26->main::@8#0] -- register_copy + // [51] phi (word) main::i#10 = (byte) 2 [phi:main::@26->main::@8#1] -- vwuz1=vbuc1 lda #<2 - sta i_10 + sta i lda #>2 - sta i_10+1 + sta i+1 // main::@8 b8: // if (!sieve[i]) - // [45] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 -- pbuz1=pbuc1_plus_vwuz2 - lda i_10 + // [52] (byte*~) main::$38 ← (const byte*) sieve#0 + (word) main::i#10 -- pbuz1=pbuc1_plus_vwuz2 + lda i clc adc #<sieve sta _38 - lda i_10+1 + lda i+1 adc #>sieve sta _38+1 - // [46] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 -- vbuc1_neq__deref_pbuz1_then_la1 + // [53] if((byte) 0!=*((byte*~) main::$38)) goto main::@29 -- vbuc1_neq__deref_pbuz1_then_la1 ldy #0 lda (_38),y cmp #0 bne b29 // main::@10 // print_word_decimal(i) - // [47] (word) print_word_decimal::w#2 ← (word) main::i#10 - // [48] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 + // [54] (word) print_word_decimal::w#2 ← (word) main::i#10 + // [55] (byte*~) print_char_cursor#96 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 lda print_char_cursor_62 sta print_char_cursor lda print_char_cursor_62+1 sta print_char_cursor+1 // print_word_decimal(i) - // [49] call print_word_decimal + // [56] call print_word_decimal // [80] phi from main::@10 to print_word_decimal [phi:main::@10->print_word_decimal] // [80] phi (byte*) print_char_cursor#58 = (byte*~) print_char_cursor#96 [phi:main::@10->print_word_decimal#0] -- register_copy // [80] phi (word) print_word_decimal::w#3 = (word) print_word_decimal::w#2 [phi:main::@10->print_word_decimal#1] -- register_copy jsr print_word_decimal - // [50] phi from main::@10 to main::@27 [phi:main::@10->main::@27] + // [57] phi from main::@10 to main::@27 [phi:main::@10->main::@27] // main::@27 // print_char(' ') - // [51] call print_char + // [58] call print_char jsr print_char - // [52] phi from main::@27 main::@29 to main::@9 [phi:main::@27/main::@29->main::@9] - // [52] phi (byte*) print_char_cursor#63 = (byte*) print_char_cursor#10 [phi:main::@27/main::@29->main::@9#0] -- register_copy + // [59] phi from main::@27 main::@29 to main::@9 [phi:main::@27/main::@29->main::@9] + // [59] phi (byte*) print_char_cursor#63 = (byte*) print_char_cursor#10 [phi:main::@27/main::@29->main::@9#0] -- register_copy // main::@9 b9: // for (i = 2; i < 1300; ++i) - // [53] (word) main::i#3 ← ++ (word) main::i#10 -- vwuz1=_inc_vwuz1 - inc i_3 + // [60] (word) main::i#3 ← ++ (word) main::i#10 -- vwuz1=_inc_vwuz1 + inc i bne !+ - inc i_3+1 + inc i+1 !: - // [54] if((word) main::i#3<(word) $514) goto main::@28 -- vwuz1_lt_vwuc1_then_la1 - lda i_3+1 + // [61] if((word) main::i#3<(word) $514) goto main::@28 -- vwuz1_lt_vwuc1_then_la1 + lda i+1 cmp #>$514 bcc b28 bne !+ - lda i_3 + lda i cmp #<$514 bcc b28 !: - // [55] phi from main::@9 to main::@11 [phi:main::@9->main::@11] + // [62] phi from main::@9 to main::@11 [phi:main::@9->main::@11] // main::@11 // print_str("...") - // [56] call print_str + // [63] call print_str // [70] phi from main::@11 to print_str [phi:main::@11->print_str] // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#63 [phi:main::@11->print_str#0] -- register_copy // [70] phi (byte*) print_str::str#10 = (const string) main::str4 [phi:main::@11->print_str#1] -- pbuz1=pbuc1 @@ -8478,87 +14488,28 @@ main: { // main::@12 b12: // (*(SCREEN+999))++; - // [57] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 + // [64] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) -- _deref_pbuc1=_inc__deref_pbuc1 inc SCREEN+$3e7 jmp b12 // main::@28 b28: - // [58] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 -- pbuz1=pbuz2 + // [65] (byte*~) print_char_cursor#99 ← (byte*) print_char_cursor#63 -- pbuz1=pbuz2 lda print_char_cursor sta print_char_cursor_99 lda print_char_cursor+1 sta print_char_cursor_99+1 - // [44] phi from main::@28 to main::@8 [phi:main::@28->main::@8] - // [44] phi (byte*) print_char_cursor#62 = (byte*~) print_char_cursor#99 [phi:main::@28->main::@8#0] -- register_copy - // [44] phi (word) main::i#10 = (word) main::i#3 [phi:main::@28->main::@8#1] -- register_copy + // [51] phi from main::@28 to main::@8 [phi:main::@28->main::@8] + // [51] phi (byte*) print_char_cursor#62 = (byte*~) print_char_cursor#99 [phi:main::@28->main::@8#0] -- register_copy + // [51] phi (word) main::i#10 = (word) main::i#3 [phi:main::@28->main::@8#1] -- register_copy jmp b8 // main::@29 b29: - // [59] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 + // [66] (byte*~) print_char_cursor#101 ← (byte*) print_char_cursor#62 -- pbuz1=pbuz2 lda print_char_cursor_62 sta print_char_cursor lda print_char_cursor_62+1 sta print_char_cursor+1 jmp b9 - // main::@2 - b2: - // if (!*sieve_i) - // [60] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 -- vbuc1_neq__deref_pbuz1_then_la1 - ldy #0 - lda (sieve_i),y - cmp #0 - bne b4 - // main::@7 - // j = i*2 - // [61] (word) main::j#0 ← (word) main::i#11 << (byte) 1 -- vwuz1=vwuz2_rol_1 - lda i - asl - sta j - lda i+1 - rol - sta j+1 - // s = &sieve[j] - // [62] (byte*) main::s#0 ← (const byte*) sieve#0 + (word) main::j#0 -- pbuz1=pbuc1_plus_vwuz2 - lda j - clc - adc #<sieve - sta s - lda j+1 - adc #>sieve - sta s+1 - // [63] phi from main::@6 main::@7 to main::@5 [phi:main::@6/main::@7->main::@5] - // [63] phi (byte*) main::s#2 = (byte*) main::s#1 [phi:main::@6/main::@7->main::@5#0] -- register_copy - // [63] phi (word) main::j#2 = (word) main::j#1 [phi:main::@6/main::@7->main::@5#1] -- register_copy - // main::@5 - b5: - // while (j < COUNT) - // [64] if((word) main::j#2<(const word) COUNT#0) goto main::@6 -- vwuz1_lt_vwuc1_then_la1 - lda j+1 - cmp #>COUNT - bcc b6 - bne !+ - lda j - cmp #<COUNT - bcc b6 - !: - // main::@4 - b4: - // i++; - // [65] (word) main::i#2 ← ++ (word) main::i#11 -- vwuz1=_inc_vwuz1 - inc i - bne !+ - inc i+1 - !: - // sieve_i++; - // [66] (byte*) main::sieve_i#1 ← ++ (byte*) main::sieve_i#2 -- pbuz1=_inc_pbuz1 - inc sieve_i - bne !+ - inc sieve_i+1 - !: - // [22] phi from main::@4 to main::@1 [phi:main::@4->main::@1] - // [22] phi (byte*) main::sieve_i#2 = (byte*) main::sieve_i#1 [phi:main::@4->main::@1#0] -- register_copy - // [22] phi (word) main::i#11 = (word) main::i#2 [phi:main::@4->main::@1#1] -- register_copy - jmp b1 // main::@6 b6: // *s = 1 @@ -8567,22 +14518,22 @@ main: { ldy #0 sta (s),y // s += i - // [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#11 -- pbuz1=pbuz1_plus_vwuz2 + // [68] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#16 -- pbuz1=pbuz1_plus_vwuz2 lda s clc - adc i + adc i_16 sta s lda s+1 - adc i+1 + adc i_16+1 sta s+1 // j += i - // [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#11 -- vwuz1=vwuz1_plus_vwuz2 + // [69] (word) main::j#1 ← (word) main::j#2 + (word) main::i#16 -- vwuz1=vwuz1_plus_vwuz2 lda j clc - adc i + adc i_16 sta j lda j+1 - adc i+1 + adc i_16+1 sta j+1 jmp b5 str: .text "Sieve benchmark - calculating primes@" @@ -8593,9 +14544,9 @@ main: { } // print_str // Print a zero-terminated string -// print_str(byte* zeropage($f) str) +// print_str(byte* zeropage($d) str) print_str: { - .label str = $f + .label str = $d // [71] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] // [71] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#66 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy // [71] phi (byte*) print_str::str#8 = (byte*) print_str::str#10 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy @@ -8653,9 +14604,9 @@ print_char: { } // print_word_decimal // Print a word as DECIMAL -// print_word_decimal(word zeropage($d) w) +// print_word_decimal(word zeropage($b) w) print_word_decimal: { - .label w = $d + .label w = $b // utoa(w, decimal_digits, DECIMAL) // [81] (word) utoa::value#1 ← (word) print_word_decimal::w#3 -- vwuz1=vwuz2 lda w @@ -8688,48 +14639,38 @@ print_word_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// utoa(word zeropage(2) value, byte* zeropage(4) buffer) +// utoa(word zeropage($11) value, byte* zeropage(2) buffer) utoa: { .const max_digits = 5 - .label digit_value = $19 - .label digit = 8 - .label value = 2 - .label buffer = 4 - // [87] phi from utoa to utoa::@1 [phi:utoa->utoa::@1] - // [87] phi (byte*) utoa::buffer#11 = (const byte[6]) decimal_digits#0 [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 + .label digit_value = $d + .label digit = 6 + .label value = $11 + .label buffer = 2 + // utoa::@18_1 + // digit_value = digit_values[digit] + // [87] (word) utoa::digit_value#4 ← *((const word[]) RADIX_DECIMAL_VALUES#0) -- vwuz1=_deref_pwuc1 + lda RADIX_DECIMAL_VALUES + sta digit_value + lda RADIX_DECIMAL_VALUES+1 + sta digit_value+1 + // [88] phi from utoa::@18_1 to utoa::@6 [phi:utoa::@18_1->utoa::@6] + // [88] phi (word) utoa::digit_value#3 = (word) utoa::digit_value#4 [phi:utoa::@18_1->utoa::@6#0] -- register_copy + // [88] phi (byte*) utoa::buffer#21 = (const byte[6]) decimal_digits#0 [phi:utoa::@18_1->utoa::@6#1] -- pbuz1=pbuc1 lda #<decimal_digits sta buffer lda #>decimal_digits sta buffer+1 - // [87] phi (byte) utoa::started#2 = (byte) 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 + // [88] phi (byte) utoa::started#4 = (byte) 0 [phi:utoa::@18_1->utoa::@6#2] -- vbuxx=vbuc1 ldx #0 - // [87] phi (word) utoa::value#2 = (word) utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy - // [87] phi (byte) utoa::digit#2 = (byte) 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 + // [88] phi (word) utoa::value#15 = (word) utoa::value#1 [phi:utoa::@18_1->utoa::@6#3] -- register_copy + // [88] phi (byte) utoa::digit#8 = (byte) 0 [phi:utoa::@18_1->utoa::@6#4] -- vbuz1=vbuc1 txa sta digit - // [87] phi from utoa::@2 to utoa::@1 [phi:utoa::@2->utoa::@1] - // [87] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#12 [phi:utoa::@2->utoa::@1#0] -- register_copy - // [87] phi (byte) utoa::started#2 = (byte) utoa::started#3 [phi:utoa::@2->utoa::@1#1] -- register_copy - // [87] phi (word) utoa::value#2 = (word) utoa::value#4 [phi:utoa::@2->utoa::@1#2] -- register_copy - // [87] phi (byte) utoa::digit#2 = (byte) utoa::digit#1 [phi:utoa::@2->utoa::@1#3] -- register_copy - // utoa::@1 - b1: - // digit_value = digit_values[digit] - // [88] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda digit - asl - // [89] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuaa - tay - lda RADIX_DECIMAL_VALUES,y - sta digit_value - lda RADIX_DECIMAL_VALUES+1,y - sta digit_value+1 - // if (started || value >= digit_value) - // [90] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 -- vbuc1_neq_vbuxx_then_la1 - cpx #0 - bne b3 // utoa::@6 - // [91] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@3 -- vwuz1_ge_vwuz2_then_la1 + b6: + // if (started || value >= digit_value) + // [89] if((word) utoa::value#15>=(word) utoa::digit_value#3) goto utoa::@3 -- vwuz1_ge_vwuz2_then_la1 + lda digit_value+1 cmp value+1 bne !+ lda digit_value @@ -8737,69 +14678,99 @@ utoa: { beq b3 !: bcc b3 - // [92] phi from utoa::@6 to utoa::@2 [phi:utoa::@6->utoa::@2] - // [92] phi (byte*) utoa::buffer#12 = (byte*) utoa::buffer#11 [phi:utoa::@6->utoa::@2#0] -- register_copy - // [92] phi (byte) utoa::started#3 = (byte) utoa::started#2 [phi:utoa::@6->utoa::@2#1] -- register_copy - // [92] phi (word) utoa::value#4 = (word) utoa::value#2 [phi:utoa::@6->utoa::@2#2] -- register_copy + // [90] phi from utoa::@6 to utoa::@2 [phi:utoa::@6->utoa::@2] + // [90] phi (byte) utoa::digit#6 = (byte) utoa::digit#8 [phi:utoa::@6->utoa::@2#0] -- register_copy + // [90] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#21 [phi:utoa::@6->utoa::@2#1] -- register_copy + // [90] phi (byte) utoa::started#2 = (byte) utoa::started#4 [phi:utoa::@6->utoa::@2#2] -- register_copy + // [90] phi (word) utoa::value#2 = (word) utoa::value#15 [phi:utoa::@6->utoa::@2#3] -- register_copy // utoa::@2 b2: // for( char digit=0; digit<max_digits-1; digit++ ) - // [93] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 -- vbuz1=_inc_vbuz1 + // [91] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#6 -- vbuz1=_inc_vbuz1 inc digit - // [94] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 -- vbuz1_lt_vbuc1_then_la1 + // [92] if((byte) utoa::digit#1<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@1 -- vbuz1_lt_vbuc1_then_la1 lda digit cmp #max_digits-1 bcc b1 // utoa::@4 // (char)value - // [95] (byte~) utoa::$4 ← (byte)(word) utoa::value#4 -- vbuaa=_byte_vwuz1 + // [93] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 -- vbuaa=_byte_vwuz1 lda value // *buffer++ = DIGITS[(char)value] - // [96] *((byte*) utoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa + // [94] *((byte*) utoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa tay lda DIGITS,y ldy #0 sta (buffer),y // *buffer++ = DIGITS[(char)value]; - // [97] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#12 -- pbuz1=_inc_pbuz1 + // [95] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: // *buffer = 0 - // [98] *((byte*) utoa::buffer#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [96] *((byte*) utoa::buffer#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (buffer),y // utoa::@return // } - // [99] return + // [97] return rts + // utoa::@1 + b1: + // digit_value = digit_values[digit] + // [98] (byte~) utoa::$11 ← (byte) utoa::digit#1 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda digit + asl + // [99] (word) utoa::digit_value#0 ← *((const word[]) RADIX_DECIMAL_VALUES#0 + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda RADIX_DECIMAL_VALUES,y + sta digit_value + lda RADIX_DECIMAL_VALUES+1,y + sta digit_value+1 + // if (started || value >= digit_value) + // [100] if((byte) 0!=(byte) utoa::started#2) goto utoa::@3 -- vbuc1_neq_vbuxx_then_la1 + cpx #0 + bne b3 + // [88] phi from utoa::@1 to utoa::@6 [phi:utoa::@1->utoa::@6] + // [88] phi (word) utoa::digit_value#3 = (word) utoa::digit_value#0 [phi:utoa::@1->utoa::@6#0] -- register_copy + // [88] phi (byte*) utoa::buffer#21 = (byte*) utoa::buffer#11 [phi:utoa::@1->utoa::@6#1] -- register_copy + // [88] phi (byte) utoa::started#4 = (byte) utoa::started#2 [phi:utoa::@1->utoa::@6#2] -- register_copy + // [88] phi (word) utoa::value#15 = (word) utoa::value#2 [phi:utoa::@1->utoa::@6#3] -- register_copy + // [88] phi (byte) utoa::digit#8 = (byte) utoa::digit#1 [phi:utoa::@1->utoa::@6#4] -- register_copy + jmp b6 + // [101] phi from utoa::@1 utoa::@6 to utoa::@3 [phi:utoa::@1/utoa::@6->utoa::@3] + // [101] phi (word) utoa::digit_value#2 = (word) utoa::digit_value#0 [phi:utoa::@1/utoa::@6->utoa::@3#0] -- register_copy + // [101] phi (byte*) utoa::buffer#22 = (byte*) utoa::buffer#11 [phi:utoa::@1/utoa::@6->utoa::@3#1] -- register_copy + // [101] phi (word) utoa::value#16 = (word) utoa::value#2 [phi:utoa::@1/utoa::@6->utoa::@3#2] -- register_copy + // [101] phi (byte) utoa::digit#7 = (byte) utoa::digit#1 [phi:utoa::@1/utoa::@6->utoa::@3#3] -- register_copy // utoa::@3 b3: // utoa_append(buffer++, value, digit_value) - // [100] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 - // [101] (word) utoa_append::value#0 ← (word) utoa::value#2 - // [102] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 - // [103] call utoa_append - // [107] phi from utoa::@3 to utoa_append [phi:utoa::@3->utoa_append] + // [102] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#22 + // [103] (word) utoa_append::value#0 ← (word) utoa::value#16 + // [104] (word) utoa_append::sub#0 ← (word) utoa::digit_value#2 + // [105] call utoa_append + // [109] phi from utoa::@3 to utoa_append [phi:utoa::@3->utoa_append] jsr utoa_append // utoa_append(buffer++, value, digit_value) - // [104] (word) utoa_append::return#0 ← (word) utoa_append::value#2 + // [106] (word) utoa_append::return#0 ← (word) utoa_append::value#2 // utoa::@5 // value = utoa_append(buffer++, value, digit_value) - // [105] (word) utoa::value#0 ← (word) utoa_append::return#0 + // [107] (word) utoa::value#0 ← (word) utoa_append::return#0 // value = utoa_append(buffer++, value, digit_value); - // [106] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [108] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#22 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: - // [92] phi from utoa::@5 to utoa::@2 [phi:utoa::@5->utoa::@2] - // [92] phi (byte*) utoa::buffer#12 = (byte*) utoa::buffer#3 [phi:utoa::@5->utoa::@2#0] -- register_copy - // [92] phi (byte) utoa::started#3 = (byte) 1 [phi:utoa::@5->utoa::@2#1] -- vbuxx=vbuc1 + // [90] phi from utoa::@5 to utoa::@2 [phi:utoa::@5->utoa::@2] + // [90] phi (byte) utoa::digit#6 = (byte) utoa::digit#7 [phi:utoa::@5->utoa::@2#0] -- register_copy + // [90] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#3 [phi:utoa::@5->utoa::@2#1] -- register_copy + // [90] phi (byte) utoa::started#2 = (byte) 1 [phi:utoa::@5->utoa::@2#2] -- vbuxx=vbuc1 ldx #1 - // [92] phi (word) utoa::value#4 = (word) utoa::value#0 [phi:utoa::@5->utoa::@2#2] -- register_copy + // [90] phi (word) utoa::value#2 = (word) utoa::value#0 [phi:utoa::@5->utoa::@2#3] -- register_copy jmp b2 } // utoa_append @@ -8811,20 +14782,20 @@ utoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// utoa_append(byte* zeropage(4) buffer, word zeropage(2) value, word zeropage($19) sub) +// utoa_append(byte* zeropage(2) buffer, word zeropage($11) value, word zeropage($d) sub) utoa_append: { - .label buffer = 4 - .label value = 2 - .label sub = $19 - .label return = 2 - // [108] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] - // [108] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 + .label buffer = 2 + .label value = $11 + .label sub = $d + .label return = $11 + // [110] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] + // [110] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 ldx #0 - // [108] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy + // [110] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy // utoa_append::@1 b1: // while (value >= sub) - // [109] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 + // [111] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 lda sub+1 cmp value+1 bne !+ @@ -8835,21 +14806,21 @@ utoa_append: { bcc b2 // utoa_append::@3 // *buffer = DIGITS[digit] - // [110] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [112] *((byte*) utoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda DIGITS,x ldy #0 sta (buffer),y // utoa_append::@return // } - // [111] return + // [113] return rts // utoa_append::@2 b2: // digit++; - // [112] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuxx=_inc_vbuxx + // [114] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuxx=_inc_vbuxx inx // value -= sub - // [113] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 + // [115] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 lda value sec sbc sub @@ -8857,20 +14828,20 @@ utoa_append: { lda value+1 sbc sub+1 sta value+1 - // [108] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] - // [108] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy - // [108] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy + // [110] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] + // [110] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy + // [110] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy jmp b1 } // print_ln // Print a newline print_ln: { - // [115] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] - // [115] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + // [117] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + // [117] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 b1: // print_line_cursor + $28 - // [116] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [118] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc print_line_cursor @@ -8879,7 +14850,7 @@ print_ln: { inc print_line_cursor+1 !: // while (print_line_cursor<print_char_cursor) - // [117] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + // [119] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 lda print_line_cursor+1 cmp print_char_cursor+1 bcc b1 @@ -8890,23 +14861,23 @@ print_ln: { !: // print_ln::@return // } - // [118] return + // [120] return rts } // print_dword_decimal // Print a dword as DECIMAL -// print_dword_decimal(dword zeropage(9) w) +// print_dword_decimal(dword zeropage(7) w) print_dword_decimal: { - .label w = 9 + .label w = 7 // ultoa(w, decimal_digits_long, DECIMAL) - // [119] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 - // [120] call ultoa - // [124] phi from print_dword_decimal to ultoa [phi:print_dword_decimal->ultoa] + // [121] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 + // [122] call ultoa + // [126] phi from print_dword_decimal to ultoa [phi:print_dword_decimal->ultoa] jsr ultoa - // [121] phi from print_dword_decimal to print_dword_decimal::@1 [phi:print_dword_decimal->print_dword_decimal::@1] + // [123] phi from print_dword_decimal to print_dword_decimal::@1 [phi:print_dword_decimal->print_dword_decimal::@1] // print_dword_decimal::@1 // print_str(decimal_digits_long) - // [122] call print_str + // [124] call print_str // [70] phi from print_dword_decimal::@1 to print_str [phi:print_dword_decimal::@1->print_str] // [70] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:print_dword_decimal::@1->print_str#0] -- register_copy // [70] phi (byte*) print_str::str#10 = (const byte[$b]) decimal_digits_long#0 [phi:print_dword_decimal::@1->print_str#1] -- pbuz1=pbuc1 @@ -8917,7 +14888,7 @@ print_dword_decimal: { jsr print_str // print_dword_decimal::@return // } - // [123] return + // [125] return rts } // ultoa @@ -8926,53 +14897,41 @@ print_dword_decimal: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// ultoa(dword zeropage(9) value, byte* zeropage($d) buffer) +// ultoa(dword zeropage(7) value, byte* zeropage($b) buffer) ultoa: { .const max_digits = $a - .label digit_value = $15 - .label digit = 8 - .label value = 9 - .label buffer = $d - // [125] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] - // [125] phi (byte*) ultoa::buffer#11 = (const byte[$b]) decimal_digits_long#0 [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 + .label digit_value = $13 + .label digit = 6 + .label value = 7 + .label buffer = $b + // ultoa::@18_1 + // digit_value = digit_values[digit] + // [127] (dword) ultoa::digit_value#4 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0) -- vduz1=_deref_pduc1 + lda RADIX_DECIMAL_VALUES_LONG + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1 + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2 + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3 + sta digit_value+3 + // [128] phi from ultoa::@18_1 to ultoa::@6 [phi:ultoa::@18_1->ultoa::@6] + // [128] phi (dword) ultoa::digit_value#3 = (dword) ultoa::digit_value#4 [phi:ultoa::@18_1->ultoa::@6#0] -- register_copy + // [128] phi (byte*) ultoa::buffer#21 = (const byte[$b]) decimal_digits_long#0 [phi:ultoa::@18_1->ultoa::@6#1] -- pbuz1=pbuc1 lda #<decimal_digits_long sta buffer lda #>decimal_digits_long sta buffer+1 - // [125] phi (byte) ultoa::started#2 = (byte) 0 [phi:ultoa->ultoa::@1#1] -- vbuxx=vbuc1 + // [128] phi (byte) ultoa::started#4 = (byte) 0 [phi:ultoa::@18_1->ultoa::@6#2] -- vbuxx=vbuc1 ldx #0 - // [125] phi (dword) ultoa::value#2 = (dword) ultoa::value#1 [phi:ultoa->ultoa::@1#2] -- register_copy - // [125] phi (byte) ultoa::digit#2 = (byte) 0 [phi:ultoa->ultoa::@1#3] -- vbuz1=vbuc1 + // [128] phi (dword) ultoa::value#15 = (dword) ultoa::value#1 [phi:ultoa::@18_1->ultoa::@6#3] -- register_copy + // [128] phi (byte) ultoa::digit#8 = (byte) 0 [phi:ultoa::@18_1->ultoa::@6#4] -- vbuz1=vbuc1 txa sta digit - // [125] phi from ultoa::@2 to ultoa::@1 [phi:ultoa::@2->ultoa::@1] - // [125] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#12 [phi:ultoa::@2->ultoa::@1#0] -- register_copy - // [125] phi (byte) ultoa::started#2 = (byte) ultoa::started#3 [phi:ultoa::@2->ultoa::@1#1] -- register_copy - // [125] phi (dword) ultoa::value#2 = (dword) ultoa::value#4 [phi:ultoa::@2->ultoa::@1#2] -- register_copy - // [125] phi (byte) ultoa::digit#2 = (byte) ultoa::digit#1 [phi:ultoa::@2->ultoa::@1#3] -- register_copy - // ultoa::@1 - b1: - // digit_value = digit_values[digit] - // [126] (byte~) ultoa::$11 ← (byte) ultoa::digit#2 << (byte) 2 -- vbuaa=vbuz1_rol_2 - lda digit - asl - asl - // [127] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) -- vduz1=pduc1_derefidx_vbuaa - tay - lda RADIX_DECIMAL_VALUES_LONG,y - sta digit_value - lda RADIX_DECIMAL_VALUES_LONG+1,y - sta digit_value+1 - lda RADIX_DECIMAL_VALUES_LONG+2,y - sta digit_value+2 - lda RADIX_DECIMAL_VALUES_LONG+3,y - sta digit_value+3 - // if (started || value >= digit_value) - // [128] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 -- vbuc1_neq_vbuxx_then_la1 - cpx #0 - bne b3 // ultoa::@6 - // [129] if((dword) ultoa::value#2>=(dword) ultoa::digit_value#0) goto ultoa::@3 -- vduz1_ge_vduz2_then_la1 + b6: + // if (started || value >= digit_value) + // [129] if((dword) ultoa::value#15>=(dword) ultoa::digit_value#3) goto ultoa::@3 -- vduz1_ge_vduz2_then_la1 lda value+3 cmp digit_value+3 bcc !+ @@ -8990,13 +14949,14 @@ ultoa: { bcs b3 !: // [130] phi from ultoa::@6 to ultoa::@2 [phi:ultoa::@6->ultoa::@2] - // [130] phi (byte*) ultoa::buffer#12 = (byte*) ultoa::buffer#11 [phi:ultoa::@6->ultoa::@2#0] -- register_copy - // [130] phi (byte) ultoa::started#3 = (byte) ultoa::started#2 [phi:ultoa::@6->ultoa::@2#1] -- register_copy - // [130] phi (dword) ultoa::value#4 = (dword) ultoa::value#2 [phi:ultoa::@6->ultoa::@2#2] -- register_copy + // [130] phi (byte) ultoa::digit#6 = (byte) ultoa::digit#8 [phi:ultoa::@6->ultoa::@2#0] -- register_copy + // [130] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#21 [phi:ultoa::@6->ultoa::@2#1] -- register_copy + // [130] phi (byte) ultoa::started#2 = (byte) ultoa::started#4 [phi:ultoa::@6->ultoa::@2#2] -- register_copy + // [130] phi (dword) ultoa::value#2 = (dword) ultoa::value#15 [phi:ultoa::@6->ultoa::@2#3] -- register_copy // ultoa::@2 b2: // for( char digit=0; digit<max_digits-1; digit++ ) - // [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#2 -- vbuz1=_inc_vbuz1 + // [131] (byte) ultoa::digit#1 ← ++ (byte) ultoa::digit#6 -- vbuz1=_inc_vbuz1 inc digit // [132] if((byte) ultoa::digit#1<(const byte) ultoa::max_digits#1-(byte) 1) goto ultoa::@1 -- vbuz1_lt_vbuc1_then_la1 lda digit @@ -9004,16 +14964,16 @@ ultoa: { bcc b1 // ultoa::@4 // (char)value - // [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#4 -- vbuaa=_byte_vduz1 + // [133] (byte~) ultoa::$4 ← (byte)(dword) ultoa::value#2 -- vbuaa=_byte_vduz1 lda value // *buffer++ = DIGITS[(char)value] - // [134] *((byte*) ultoa::buffer#12) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa + // [134] *((byte*) ultoa::buffer#11) ← *((const byte[]) DIGITS#0 + (byte~) ultoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa tay lda DIGITS,y ldy #0 sta (buffer),y // *buffer++ = DIGITS[(char)value]; - // [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#12 -- pbuz1=_inc_pbuz1 + // [135] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 @@ -9027,31 +14987,65 @@ ultoa: { // } // [137] return rts + // ultoa::@1 + b1: + // digit_value = digit_values[digit] + // [138] (byte~) ultoa::$11 ← (byte) ultoa::digit#1 << (byte) 2 -- vbuaa=vbuz1_rol_2 + lda digit + asl + asl + // [139] (dword) ultoa::digit_value#0 ← *((const dword[]) RADIX_DECIMAL_VALUES_LONG#0 + (byte~) ultoa::$11) -- vduz1=pduc1_derefidx_vbuaa + tay + lda RADIX_DECIMAL_VALUES_LONG,y + sta digit_value + lda RADIX_DECIMAL_VALUES_LONG+1,y + sta digit_value+1 + lda RADIX_DECIMAL_VALUES_LONG+2,y + sta digit_value+2 + lda RADIX_DECIMAL_VALUES_LONG+3,y + sta digit_value+3 + // if (started || value >= digit_value) + // [140] if((byte) 0!=(byte) ultoa::started#2) goto ultoa::@3 -- vbuc1_neq_vbuxx_then_la1 + cpx #0 + bne b3 + // [128] phi from ultoa::@1 to ultoa::@6 [phi:ultoa::@1->ultoa::@6] + // [128] phi (dword) ultoa::digit_value#3 = (dword) ultoa::digit_value#0 [phi:ultoa::@1->ultoa::@6#0] -- register_copy + // [128] phi (byte*) ultoa::buffer#21 = (byte*) ultoa::buffer#11 [phi:ultoa::@1->ultoa::@6#1] -- register_copy + // [128] phi (byte) ultoa::started#4 = (byte) ultoa::started#2 [phi:ultoa::@1->ultoa::@6#2] -- register_copy + // [128] phi (dword) ultoa::value#15 = (dword) ultoa::value#2 [phi:ultoa::@1->ultoa::@6#3] -- register_copy + // [128] phi (byte) ultoa::digit#8 = (byte) ultoa::digit#1 [phi:ultoa::@1->ultoa::@6#4] -- register_copy + jmp b6 + // [141] phi from ultoa::@1 ultoa::@6 to ultoa::@3 [phi:ultoa::@1/ultoa::@6->ultoa::@3] + // [141] phi (dword) ultoa::digit_value#2 = (dword) ultoa::digit_value#0 [phi:ultoa::@1/ultoa::@6->ultoa::@3#0] -- register_copy + // [141] phi (byte*) ultoa::buffer#22 = (byte*) ultoa::buffer#11 [phi:ultoa::@1/ultoa::@6->ultoa::@3#1] -- register_copy + // [141] phi (dword) ultoa::value#16 = (dword) ultoa::value#2 [phi:ultoa::@1/ultoa::@6->ultoa::@3#2] -- register_copy + // [141] phi (byte) ultoa::digit#7 = (byte) ultoa::digit#1 [phi:ultoa::@1/ultoa::@6->ultoa::@3#3] -- register_copy // ultoa::@3 b3: // ultoa_append(buffer++, value, digit_value) - // [138] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#11 - // [139] (dword) ultoa_append::value#0 ← (dword) ultoa::value#2 - // [140] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#0 - // [141] call ultoa_append - // [145] phi from ultoa::@3 to ultoa_append [phi:ultoa::@3->ultoa_append] + // [142] (byte*) ultoa_append::buffer#0 ← (byte*) ultoa::buffer#22 + // [143] (dword) ultoa_append::value#0 ← (dword) ultoa::value#16 + // [144] (dword) ultoa_append::sub#0 ← (dword) ultoa::digit_value#2 + // [145] call ultoa_append + // [149] phi from ultoa::@3 to ultoa_append [phi:ultoa::@3->ultoa_append] jsr ultoa_append // ultoa_append(buffer++, value, digit_value) - // [142] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 + // [146] (dword) ultoa_append::return#0 ← (dword) ultoa_append::value#2 // ultoa::@5 // value = ultoa_append(buffer++, value, digit_value) - // [143] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 + // [147] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 // value = ultoa_append(buffer++, value, digit_value); - // [144] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [148] (byte*) ultoa::buffer#3 ← ++ (byte*) ultoa::buffer#22 -- pbuz1=_inc_pbuz1 inc buffer bne !+ inc buffer+1 !: // [130] phi from ultoa::@5 to ultoa::@2 [phi:ultoa::@5->ultoa::@2] - // [130] phi (byte*) ultoa::buffer#12 = (byte*) ultoa::buffer#3 [phi:ultoa::@5->ultoa::@2#0] -- register_copy - // [130] phi (byte) ultoa::started#3 = (byte) 1 [phi:ultoa::@5->ultoa::@2#1] -- vbuxx=vbuc1 + // [130] phi (byte) ultoa::digit#6 = (byte) ultoa::digit#7 [phi:ultoa::@5->ultoa::@2#0] -- register_copy + // [130] phi (byte*) ultoa::buffer#11 = (byte*) ultoa::buffer#3 [phi:ultoa::@5->ultoa::@2#1] -- register_copy + // [130] phi (byte) ultoa::started#2 = (byte) 1 [phi:ultoa::@5->ultoa::@2#2] -- vbuxx=vbuc1 ldx #1 - // [130] phi (dword) ultoa::value#4 = (dword) ultoa::value#0 [phi:ultoa::@5->ultoa::@2#2] -- register_copy + // [130] phi (dword) ultoa::value#2 = (dword) ultoa::value#0 [phi:ultoa::@5->ultoa::@2#3] -- register_copy jmp b2 } // ultoa_append @@ -9063,20 +15057,20 @@ ultoa: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// ultoa_append(byte* zeropage($d) buffer, dword zeropage(9) value, dword zeropage($15) sub) +// ultoa_append(byte* zeropage($b) buffer, dword zeropage(7) value, dword zeropage($13) sub) ultoa_append: { - .label buffer = $d - .label value = 9 - .label sub = $15 - .label return = 9 - // [146] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] - // [146] phi (byte) ultoa_append::digit#2 = (byte) 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 + .label buffer = $b + .label value = 7 + .label sub = $13 + .label return = 7 + // [150] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] + // [150] phi (byte) ultoa_append::digit#2 = (byte) 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 ldx #0 - // [146] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy + // [150] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy // ultoa_append::@1 b1: // while (value >= sub) - // [147] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 + // [151] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 lda value+3 cmp sub+3 bcc !+ @@ -9095,21 +15089,21 @@ ultoa_append: { !: // ultoa_append::@3 // *buffer = DIGITS[digit] - // [148] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [152] *((byte*) ultoa_append::buffer#0) ← *((const byte[]) DIGITS#0 + (byte) ultoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda DIGITS,x ldy #0 sta (buffer),y // ultoa_append::@return // } - // [149] return + // [153] return rts // ultoa_append::@2 b2: // digit++; - // [150] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 -- vbuxx=_inc_vbuxx + // [154] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 -- vbuxx=_inc_vbuxx inx // value -= sub - // [151] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 + // [155] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 lda value sec sbc sub @@ -9123,63 +15117,63 @@ ultoa_append: { lda value+3 sbc sub+3 sta value+3 - // [146] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] - // [146] phi (byte) ultoa_append::digit#2 = (byte) ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy - // [146] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy + // [150] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] + // [150] phi (byte) ultoa_append::digit#2 = (byte) ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy + // [150] phi (dword) ultoa_append::value#2 = (dword) ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy jmp b1 } // div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division -// div32u16u(dword zeropage(9) dividend) +// div32u16u(dword zeropage(7) dividend) div32u16u: { .label divisor = CLOCKS_PER_SEC/$64 - .label quotient_hi = $19 - .label quotient_lo = $13 - .label return = $15 - .label dividend = 9 + .label quotient_hi = $17 + .label quotient_lo = $11 + .label return = $13 + .label dividend = 7 // divr16u(>dividend, divisor, 0) - // [152] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 -- vwuz1=_hi_vduz2 + // [156] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 -- vwuz1=_hi_vduz2 lda dividend+2 sta divr16u.dividend lda dividend+3 sta divr16u.dividend+1 - // [153] call divr16u - // [163] phi from div32u16u to divr16u [phi:div32u16u->divr16u] - // [163] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#1 [phi:div32u16u->divr16u#0] -- register_copy - // [163] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [157] call divr16u + // [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [167] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#1 [phi:div32u16u->divr16u#0] -- register_copy + // [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem sta divr16u.rem+1 jsr divr16u // divr16u(>dividend, divisor, 0) - // [154] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [158] (word) divr16u::return#2 ← (word) divr16u::return#0 // div32u16u::@1 // quotient_hi = divr16u(>dividend, divisor, 0) - // [155] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 // divr16u(<dividend, divisor, rem16u) - // [156] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 -- vwuz1=_lo_vduz2 + // [160] (word) divr16u::dividend#2 ← < (dword) div32u16u::dividend#0 -- vwuz1=_lo_vduz2 lda dividend sta divr16u.dividend lda dividend+1 sta divr16u.dividend+1 - // [157] (word) divr16u::rem#4 ← (word) rem16u#1 - // [158] call divr16u - // [163] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] - // [163] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#2 [phi:div32u16u::@1->divr16u#0] -- register_copy - // [163] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [161] (word) divr16u::rem#4 ← (word) rem16u#1 + // [162] call divr16u + // [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [167] phi (word) divr16u::dividend#5 = (word) divr16u::dividend#2 [phi:div32u16u::@1->divr16u#0] -- register_copy + // [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u // divr16u(<dividend, divisor, rem16u) - // [159] (word) divr16u::return#3 ← (word) divr16u::return#0 + // [163] (word) divr16u::return#3 ← (word) divr16u::return#0 // div32u16u::@2 // quotient_lo = divr16u(<dividend, divisor, rem16u) - // [160] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + // [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 // quotient = { quotient_hi, quotient_lo} - // [161] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -9190,7 +15184,7 @@ div32u16u: { sta return+1 // div32u16u::@return // } - // [162] return + // [166] return rts } // divr16u @@ -9198,62 +15192,62 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($11) dividend, word zeropage($f) rem) +// divr16u(word zeropage($f) dividend, word zeropage($d) rem) divr16u: { - .label rem = $f - .label dividend = $11 - .label quotient = $13 - .label return = $13 - // [164] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] - // [164] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + .label rem = $d + .label dividend = $f + .label quotient = $11 + .label return = $11 + // [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [164] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [168] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 txa sta quotient sta quotient+1 - // [164] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [164] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy - // [164] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] - // [164] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [164] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [164] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [164] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy // divr16u::@1 b1: // rem = rem << 1 - // [165] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 // >dividend - // [166] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + // [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 // >dividend & $80 - // [167] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 // if( (>dividend & $80) != 0 ) - // [168] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2 // divr16u::@4 // rem = rem | 1 - // [169] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [170] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] - // [170] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy // divr16u::@2 b2: // dividend = dividend << 1 - // [171] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 // quotient = quotient << 1 - // [172] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 // if(rem>=divisor) - // [173] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [177] if((word) divr16u::rem#6<(const word) div32u16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>div32u16u.divisor bcc b3 @@ -9264,13 +15258,13 @@ divr16u: { !: // divr16u::@5 // quotient++; - // [174] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: // rem = rem - divisor - // [175] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 + // [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) div32u16u::divisor#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<div32u16u.divisor @@ -9278,32 +15272,32 @@ divr16u: { lda rem+1 sbc #>div32u16u.divisor sta rem+1 - // [176] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] - // [176] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [176] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy // divr16u::@3 b3: // for( byte i : 0..15) - // [177] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [178] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1 // divr16u::@6 // rem16u = rem - // [179] (word) rem16u#1 ← (word) divr16u::rem#11 + // [183] (word) rem16u#1 ← (word) divr16u::rem#11 // divr16u::@return // } - // [180] return + // [184] return rts } // clock // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { - .label return = 9 + .label return = 7 // 0xffffffff - *CIA2_TIMER_AB - // [181] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 + // [185] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -9319,7 +15313,7 @@ clock: { sta return+3 // clock::@return // } - // [182] return + // [186] return rts } // clock_start @@ -9327,16 +15321,16 @@ clock: { // This uses CIA #2 Timer A+B on the C64 clock_start: { // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES - // [183] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #CIA_TIMER_CONTROL_CONTINUOUS sta CIA2_TIMER_A_CONTROL // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A - // [184] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [188] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL // *CIA2_TIMER_AB = 0xffffffff - // [185] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + // [189] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -9346,16 +15340,16 @@ clock_start: { lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A - // [186] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + // [190] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES - // [187] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + // [191] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL // clock_start::@return // } - // [188] return + // [192] return rts } // memset @@ -9367,7 +15361,7 @@ memset: { .label num = $f .label str = $11 // if(num>0) - // [190] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + // [194] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 lda num bne !+ lda num+1 @@ -9375,7 +15369,7 @@ memset: { !: // memset::@1 // end = (char*)str + num - // [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [195] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -9383,23 +15377,23 @@ memset: { lda end+1 adc str+1 sta end+1 - // [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 - // [193] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] - // [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // [196] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [197] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [197] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy // memset::@2 b2: // *dst = c - // [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [198] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [199] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 + // [200] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 bne b2 @@ -9409,23 +15403,23 @@ memset: { // memset::@return breturn: // } - // [197] return + // [201] return rts } // print_cls // Clear the screen. Also resets current line/char cursor. print_cls: { // memset(print_screen, ' ', 1000) - // [199] call memset - // [189] phi from print_cls to memset [phi:print_cls->memset] - // [189] phi (byte) memset::c#3 = (byte) ' ' [phi:print_cls->memset#0] -- vbuxx=vbuc1 + // [203] call memset + // [193] phi from print_cls to memset [phi:print_cls->memset] + // [193] phi (byte) memset::c#3 = (byte) ' ' [phi:print_cls->memset#0] -- vbuxx=vbuc1 ldx #' ' - // [189] phi (void*) memset::str#3 = (void*)(byte*) 1024 [phi:print_cls->memset#1] -- pvoz1=pvoc1 + // [193] phi (void*) memset::str#3 = (void*)(byte*) 1024 [phi:print_cls->memset#1] -- pvoz1=pvoc1 lda #<$400 sta memset.str lda #>$400 sta memset.str+1 - // [189] phi (word) memset::num#2 = (word) $3e8 [phi:print_cls->memset#2] -- vwuz1=vwuc1 + // [193] phi (word) memset::num#2 = (word) $3e8 [phi:print_cls->memset#2] -- vwuz1=vwuc1 lda #<$3e8 sta memset.num lda #>$3e8 @@ -9433,7 +15427,7 @@ print_cls: { jsr memset // print_cls::@return // } - // [200] return + // [204] return rts } // File Data diff --git a/src/test/ref/sieve.sym b/src/test/ref/sieve.sym index e094861ab..1bea6ca91 100644 --- a/src/test/ref/sieve.sym +++ b/src/test/ref/sieve.sym @@ -50,8 +50,8 @@ (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:9 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:9 4.0 +(dword) clock::return#0 return zp ZP_DWORD:7 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:7 4.0 (void()) clock_start() (label) clock_start::@return (byte[6]) decimal_digits @@ -63,17 +63,17 @@ (label) div32u16u::@2 (label) div32u16u::@return (dword) div32u16u::dividend -(dword) div32u16u::dividend#0 dividend zp ZP_DWORD:9 1.2000000000000002 +(dword) div32u16u::dividend#0 dividend zp ZP_DWORD:7 1.2000000000000002 (word) div32u16u::divisor (const word) div32u16u::divisor#0 divisor = (word)(const dword) CLOCKS_PER_SEC#0/(byte) $64 (dword) div32u16u::quotient (word) div32u16u::quotient_hi -(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:25 0.6666666666666666 +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:23 0.6666666666666666 (word) div32u16u::quotient_lo -(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:19 4.0 +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:17 4.0 (dword) div32u16u::return -(dword) div32u16u::return#0 return zp ZP_DWORD:21 1.3333333333333333 -(dword) div32u16u::return#2 return zp ZP_DWORD:21 4.0 +(dword) div32u16u::return#0 return zp ZP_DWORD:19 1.3333333333333333 +(dword) div32u16u::return#2 return zp ZP_DWORD:19 4.0 (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (byte~) divr16u::$1 reg byte a 22.0 (byte~) divr16u::$2 reg byte a 22.0 @@ -85,36 +85,36 @@ (label) divr16u::@6 (label) divr16u::@return (word) divr16u::dividend -(word) divr16u::dividend#0 dividend zp ZP_WORD:17 2.75 -(word) divr16u::dividend#1 dividend zp ZP_WORD:17 4.0 -(word) divr16u::dividend#2 dividend zp ZP_WORD:17 2.0 -(word) divr16u::dividend#3 dividend zp ZP_WORD:17 5.0 -(word) divr16u::dividend#5 dividend zp ZP_WORD:17 6.0 +(word) divr16u::dividend#0 dividend zp ZP_WORD:15 2.75 +(word) divr16u::dividend#1 dividend zp ZP_WORD:15 4.0 +(word) divr16u::dividend#2 dividend zp ZP_WORD:15 2.0 +(word) divr16u::dividend#3 dividend zp ZP_WORD:15 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:15 6.0 (word) divr16u::divisor (byte) divr16u::i (byte) divr16u::i#1 reg byte x 16.5 (byte) divr16u::i#2 reg byte x 1.6923076923076923 (word) divr16u::quotient -(word) divr16u::quotient#1 quotient zp ZP_WORD:19 16.5 -(word) divr16u::quotient#2 quotient zp ZP_WORD:19 11.0 -(word) divr16u::quotient#3 quotient zp ZP_WORD:19 2.75 +(word) divr16u::quotient#1 quotient zp ZP_WORD:17 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:17 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:17 2.75 (word) divr16u::rem -(word) divr16u::rem#0 rem zp ZP_WORD:15 8.25 -(word) divr16u::rem#1 rem zp ZP_WORD:15 22.0 -(word) divr16u::rem#10 rem zp ZP_WORD:15 4.0 -(word) divr16u::rem#11 rem zp ZP_WORD:15 11.666666666666666 -(word) divr16u::rem#2 rem zp ZP_WORD:15 22.0 -(word) divr16u::rem#4 rem zp ZP_WORD:15 4.0 -(word) divr16u::rem#5 rem zp ZP_WORD:15 24.0 -(word) divr16u::rem#6 rem zp ZP_WORD:15 11.0 +(word) divr16u::rem#0 rem zp ZP_WORD:13 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:13 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:13 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:13 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:13 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:13 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:13 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:13 11.0 (word) divr16u::return -(word) divr16u::return#0 return zp ZP_WORD:19 5.285714285714286 -(word) divr16u::return#2 return zp ZP_WORD:19 4.0 -(word) divr16u::return#3 return zp ZP_WORD:19 4.0 +(word) divr16u::return#0 return zp ZP_WORD:17 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:17 4.0 +(word) divr16u::return#3 return zp ZP_WORD:17 4.0 (void()) main() -(dword~) main::$10 $10 zp ZP_DWORD:9 4.0 -(dword~) main::$14 $14 zp ZP_DWORD:21 2.0 -(byte*~) main::$38 $38 zp ZP_WORD:19 22.0 +(dword~) main::$10 $10 zp ZP_DWORD:7 4.0 +(dword~) main::$14 $14 zp ZP_DWORD:19 2.0 +(byte*~) main::$38 $38 zp ZP_WORD:23 22.0 (label) main::@1 (label) main::@10 (label) main::@11 @@ -145,25 +145,25 @@ (label) main::@8 (label) main::@9 (dword) main::cyclecount -(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:9 0.5 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:7 0.5 (word) main::i -(word) main::i#10 i#10 zp ZP_WORD:13 4.4 -(word) main::i#11 i zp ZP_WORD:17 24.6 -(word) main::i#2 i zp ZP_WORD:17 11.0 -(word) main::i#3 i#3 zp ZP_WORD:13 11.0 +(word) main::i#10 i zp ZP_WORD:11 4.4 +(word) main::i#11 i#11 zp ZP_WORD:15 11.0 +(word) main::i#16 i#16 zp ZP_WORD:15 26.11111111111111 +(word) main::i#3 i zp ZP_WORD:11 11.0 (word) main::j -(word) main::j#0 j zp ZP_WORD:2 16.5 -(word) main::j#1 j zp ZP_WORD:2 202.0 -(word) main::j#2 j zp ZP_WORD:2 78.5 +(word) main::j#0 j zp ZP_WORD:17 16.5 +(word) main::j#1 j zp ZP_WORD:17 202.0 +(word) main::j#2 j zp ZP_WORD:17 78.5 (byte*) main::s -(byte*) main::s#0 s zp ZP_WORD:4 22.0 -(byte*) main::s#1 s zp ZP_WORD:4 101.0 -(byte*) main::s#2 s zp ZP_WORD:4 104.66666666666666 +(byte*) main::s#0 s zp ZP_WORD:2 22.0 +(byte*) main::s#1 s zp ZP_WORD:2 101.0 +(byte*) main::s#2 s zp ZP_WORD:2 104.66666666666666 (word) main::sec100s -(word) main::sec100s#0 sec100s zp ZP_WORD:13 1.3333333333333333 +(word) main::sec100s#0 sec100s zp ZP_WORD:11 1.3333333333333333 (byte*) main::sieve_i -(byte*) main::sieve_i#1 sieve_i zp ZP_WORD:15 22.0 -(byte*) main::sieve_i#2 sieve_i zp ZP_WORD:15 3.0 +(byte*) main::sieve_i#1 sieve_i zp ZP_WORD:13 11.0 +(byte*) main::sieve_i#11 sieve_i zp ZP_WORD:13 3.3000000000000003 (const string) main::str str = (string) "Sieve benchmark - calculating primes@" (const string) main::str1 str1 = (string) "between 2 and @" (const string) main::str2 str2 = (string) "100ths seconds used: @" @@ -206,29 +206,29 @@ (byte) print_char::ch (const byte) print_char::ch#0 ch = (byte) ' ' (byte*) print_char_cursor -(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:17 101.0 -(byte*) print_char_cursor#10 print_char_cursor zp ZP_WORD:17 4.333333333333333 -(byte*~) print_char_cursor#101 print_char_cursor zp ZP_WORD:17 22.0 -(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:17 10.25 -(byte*) print_char_cursor#58 print_char_cursor zp ZP_WORD:17 4.25 -(byte*) print_char_cursor#62 print_char_cursor#62 zp ZP_WORD:6 8.75 -(byte*) print_char_cursor#63 print_char_cursor zp ZP_WORD:17 8.75 -(byte*) print_char_cursor#66 print_char_cursor zp ZP_WORD:17 14.0 -(byte*~) print_char_cursor#89 print_char_cursor zp ZP_WORD:17 4.0 -(byte*~) print_char_cursor#90 print_char_cursor zp ZP_WORD:17 4.0 -(byte*~) print_char_cursor#96 print_char_cursor zp ZP_WORD:17 22.0 -(byte*~) print_char_cursor#99 print_char_cursor#99 zp ZP_WORD:6 22.0 +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:15 101.0 +(byte*) print_char_cursor#10 print_char_cursor zp ZP_WORD:15 4.333333333333333 +(byte*~) print_char_cursor#101 print_char_cursor zp ZP_WORD:15 22.0 +(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:15 10.25 +(byte*) print_char_cursor#58 print_char_cursor zp ZP_WORD:15 4.25 +(byte*) print_char_cursor#62 print_char_cursor#62 zp ZP_WORD:4 8.75 +(byte*) print_char_cursor#63 print_char_cursor zp ZP_WORD:15 8.75 +(byte*) print_char_cursor#66 print_char_cursor zp ZP_WORD:15 14.0 +(byte*~) print_char_cursor#89 print_char_cursor zp ZP_WORD:15 4.0 +(byte*~) print_char_cursor#90 print_char_cursor zp ZP_WORD:15 4.0 +(byte*~) print_char_cursor#96 print_char_cursor zp ZP_WORD:15 22.0 +(byte*~) print_char_cursor#99 print_char_cursor#99 zp ZP_WORD:4 22.0 (void()) print_cls() (label) print_cls::@return (void()) print_dword_decimal((dword) print_dword_decimal::w) (label) print_dword_decimal::@1 (label) print_dword_decimal::@return (dword) print_dword_decimal::w -(dword) print_dword_decimal::w#0 w zp ZP_DWORD:9 4.0 +(dword) print_dword_decimal::w#0 w zp ZP_DWORD:7 4.0 (byte*) print_line_cursor -(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:6 0.9347826086956521 -(byte*) print_line_cursor#11 print_line_cursor zp ZP_WORD:6 24.0 -(byte*) print_line_cursor#21 print_line_cursor zp ZP_WORD:6 6.0 +(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:4 0.9347826086956521 +(byte*) print_line_cursor#11 print_line_cursor zp ZP_WORD:4 24.0 +(byte*) print_line_cursor#21 print_line_cursor zp ZP_WORD:4 6.0 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -238,24 +238,25 @@ (label) print_str::@2 (label) print_str::@return (byte*) print_str::str -(byte*) print_str::str#0 str zp ZP_WORD:15 202.0 -(byte*) print_str::str#10 str zp ZP_WORD:15 2.0 -(byte*) print_str::str#8 str zp ZP_WORD:15 101.5 +(byte*) print_str::str#0 str zp ZP_WORD:13 202.0 +(byte*) print_str::str#10 str zp ZP_WORD:13 2.0 +(byte*) print_str::str#8 str zp ZP_WORD:13 101.5 (void()) print_word_decimal((word) print_word_decimal::w) (label) print_word_decimal::@1 (label) print_word_decimal::@return (word) print_word_decimal::w -(word) print_word_decimal::w#1 w zp ZP_WORD:13 4.0 -(word) print_word_decimal::w#2 w zp ZP_WORD:13 11.0 -(word) print_word_decimal::w#3 w zp ZP_WORD:13 15.0 +(word) print_word_decimal::w#1 w zp ZP_WORD:11 4.0 +(word) print_word_decimal::w#2 w zp ZP_WORD:11 11.0 +(word) print_word_decimal::w#3 w zp ZP_WORD:11 15.0 (word) rem16u -(word) rem16u#1 rem16u zp ZP_WORD:15 0.6666666666666666 +(word) rem16u#1 rem16u zp ZP_WORD:13 0.6666666666666666 (byte*) sieve (const byte*) sieve#0 sieve = (byte*) 4096 (void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) (byte~) ultoa::$11 reg byte a 22.0 (byte~) ultoa::$4 reg byte a 4.0 (label) ultoa::@1 +(label) ultoa::@18_1 (label) ultoa::@2 (label) ultoa::@3 (label) ultoa::@4 @@ -263,49 +264,57 @@ (label) ultoa::@6 (label) ultoa::@return (byte*) ultoa::buffer -(byte*) ultoa::buffer#11 buffer zp ZP_WORD:13 4.0 -(byte*) ultoa::buffer#12 buffer zp ZP_WORD:13 7.400000000000001 -(byte*) ultoa::buffer#3 buffer zp ZP_WORD:13 22.0 -(byte*) ultoa::buffer#4 buffer zp ZP_WORD:13 4.0 +(byte*) ultoa::buffer#11 buffer zp ZP_WORD:11 6.0 +(byte*) ultoa::buffer#21 buffer zp ZP_WORD:11 16.5 +(byte*) ultoa::buffer#22 buffer zp ZP_WORD:11 6.285714285714286 +(byte*) ultoa::buffer#3 buffer zp ZP_WORD:11 22.0 +(byte*) ultoa::buffer#4 buffer zp ZP_WORD:11 4.0 (byte) ultoa::digit -(byte) ultoa::digit#1 digit zp ZP_BYTE:8 16.5 -(byte) ultoa::digit#2 digit zp ZP_BYTE:8 2.5384615384615383 +(byte) ultoa::digit#1 digit zp ZP_BYTE:6 11.0 +(byte) ultoa::digit#6 digit zp ZP_BYTE:6 33.0 +(byte) ultoa::digit#7 digit zp ZP_BYTE:6 4.125 +(byte) ultoa::digit#8 digit zp ZP_BYTE:6 16.5 (dword) ultoa::digit_value -(dword) ultoa::digit_value#0 digit_value zp ZP_DWORD:21 6.6000000000000005 +(dword) ultoa::digit_value#0 digit_value zp ZP_DWORD:19 16.5 +(dword) ultoa::digit_value#2 digit_value zp ZP_DWORD:19 11.0 +(dword) ultoa::digit_value#3 digit_value zp ZP_DWORD:19 17.5 +(dword) ultoa::digit_value#4 digit_value zp ZP_DWORD:19 4.0 (dword*) ultoa::digit_values (byte) ultoa::max_digits (const byte) ultoa::max_digits#1 max_digits = (byte) $a (byte) ultoa::radix (byte) ultoa::started -(byte) ultoa::started#2 reg byte x 6.6000000000000005 -(byte) ultoa::started#3 reg byte x 7.333333333333333 +(byte) ultoa::started#2 reg byte x 5.5 +(byte) ultoa::started#4 reg byte x 11.0 (dword) ultoa::value -(dword) ultoa::value#0 value zp ZP_DWORD:9 11.0 -(dword) ultoa::value#1 value zp ZP_DWORD:9 2.0 -(dword) ultoa::value#2 value zp ZP_DWORD:9 7.666666666666666 -(dword) ultoa::value#4 value zp ZP_DWORD:9 11.0 +(dword) ultoa::value#0 value zp ZP_DWORD:7 11.0 +(dword) ultoa::value#1 value zp ZP_DWORD:7 1.3333333333333333 +(dword) ultoa::value#15 value zp ZP_DWORD:7 23.0 +(dword) ultoa::value#16 value zp ZP_DWORD:7 16.5 +(dword) ultoa::value#2 value zp ZP_DWORD:7 7.333333333333333 (dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) (label) ultoa_append::@1 (label) ultoa_append::@2 (label) ultoa_append::@3 (label) ultoa_append::@return (byte*) ultoa_append::buffer -(byte*) ultoa_append::buffer#0 buffer zp ZP_WORD:13 1.625 +(byte*) ultoa_append::buffer#0 buffer zp ZP_WORD:11 1.625 (byte) ultoa_append::digit (byte) ultoa_append::digit#1 reg byte x 101.0 (byte) ultoa_append::digit#2 reg byte x 102.0 (dword) ultoa_append::return -(dword) ultoa_append::return#0 return zp ZP_DWORD:9 22.0 +(dword) ultoa_append::return#0 return zp ZP_DWORD:7 22.0 (dword) ultoa_append::sub -(dword) ultoa_append::sub#0 sub zp ZP_DWORD:21 35.5 +(dword) ultoa_append::sub#0 sub zp ZP_DWORD:19 35.5 (dword) ultoa_append::value -(dword) ultoa_append::value#0 value zp ZP_DWORD:9 4.333333333333333 -(dword) ultoa_append::value#1 value zp ZP_DWORD:9 202.0 -(dword) ultoa_append::value#2 value zp ZP_DWORD:9 52.66666666666666 +(dword) ultoa_append::value#0 value zp ZP_DWORD:7 4.333333333333333 +(dword) ultoa_append::value#1 value zp ZP_DWORD:7 202.0 +(dword) ultoa_append::value#2 value zp ZP_DWORD:7 52.66666666666666 (void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix) (byte~) utoa::$11 reg byte a 202.0 (byte~) utoa::$4 reg byte a 4.0 (label) utoa::@1 +(label) utoa::@18_1 (label) utoa::@2 (label) utoa::@3 (label) utoa::@4 @@ -313,66 +322,72 @@ (label) utoa::@6 (label) utoa::@return (byte*) utoa::buffer -(byte*) utoa::buffer#11 buffer zp ZP_WORD:4 36.72727272727273 -(byte*) utoa::buffer#12 buffer zp ZP_WORD:4 61.39999999999999 -(byte*) utoa::buffer#3 buffer zp ZP_WORD:4 202.0 -(byte*) utoa::buffer#4 buffer zp ZP_WORD:4 4.0 +(byte*) utoa::buffer#11 buffer zp ZP_WORD:2 51.0 +(byte*) utoa::buffer#21 buffer zp ZP_WORD:2 151.5 +(byte*) utoa::buffer#22 buffer zp ZP_WORD:2 57.714285714285715 +(byte*) utoa::buffer#3 buffer zp ZP_WORD:2 202.0 +(byte*) utoa::buffer#4 buffer zp ZP_WORD:2 4.0 (byte) utoa::digit -(byte) utoa::digit#1 digit zp ZP_BYTE:8 151.5 -(byte) utoa::digit#2 digit zp ZP_BYTE:8 23.307692307692307 +(byte) utoa::digit#1 digit zp ZP_BYTE:6 101.0 +(byte) utoa::digit#6 digit zp ZP_BYTE:6 303.0 +(byte) utoa::digit#7 digit zp ZP_BYTE:6 37.875 +(byte) utoa::digit#8 digit zp ZP_BYTE:6 151.5 (word) utoa::digit_value -(word) utoa::digit_value#0 digit_value zp ZP_WORD:25 60.599999999999994 +(word) utoa::digit_value#0 digit_value zp ZP_WORD:13 151.5 +(word) utoa::digit_value#2 digit_value zp ZP_WORD:13 101.0 +(word) utoa::digit_value#3 digit_value zp ZP_WORD:13 152.5 +(word) utoa::digit_value#4 digit_value zp ZP_WORD:13 4.0 (word*) utoa::digit_values (byte) utoa::max_digits (const byte) utoa::max_digits#1 max_digits = (byte) 5 (byte) utoa::radix (byte) utoa::started -(byte) utoa::started#2 reg byte x 60.599999999999994 -(byte) utoa::started#3 reg byte x 67.33333333333333 +(byte) utoa::started#2 reg byte x 50.5 +(byte) utoa::started#4 reg byte x 101.0 (word) utoa::value -(word) utoa::value#0 value zp ZP_WORD:2 101.0 -(word) utoa::value#1 value zp ZP_WORD:2 2.0 -(word) utoa::value#2 value zp ZP_WORD:2 67.66666666666666 -(word) utoa::value#4 value zp ZP_WORD:2 101.0 +(word) utoa::value#0 value zp ZP_WORD:17 101.0 +(word) utoa::value#1 value zp ZP_WORD:17 1.3333333333333333 +(word) utoa::value#15 value zp ZP_WORD:17 203.0 +(word) utoa::value#16 value zp ZP_WORD:17 151.5 +(word) utoa::value#2 value zp ZP_WORD:17 67.33333333333333 (word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub) (label) utoa_append::@1 (label) utoa_append::@2 (label) utoa_append::@3 (label) utoa_append::@return (byte*) utoa_append::buffer -(byte*) utoa_append::buffer#0 buffer zp ZP_WORD:4 12.875 +(byte*) utoa_append::buffer#0 buffer zp ZP_WORD:2 12.875 (byte) utoa_append::digit (byte) utoa_append::digit#1 reg byte x 1001.0 (byte) utoa_append::digit#2 reg byte x 1002.0 (word) utoa_append::return -(word) utoa_append::return#0 return zp ZP_WORD:2 202.0 +(word) utoa_append::return#0 return zp ZP_WORD:17 202.0 (word) utoa_append::sub -(word) utoa_append::sub#0 sub zp ZP_WORD:25 350.5 +(word) utoa_append::sub#0 sub zp ZP_WORD:13 350.5 (word) utoa_append::value -(word) utoa_append::value#0 value zp ZP_WORD:2 34.33333333333333 -(word) utoa_append::value#1 value zp ZP_WORD:2 2002.0 -(word) utoa_append::value#2 value zp ZP_WORD:2 517.6666666666667 +(word) utoa_append::value#0 value zp ZP_WORD:17 34.33333333333333 +(word) utoa_append::value#1 value zp ZP_WORD:17 2002.0 +(word) utoa_append::value#2 value zp ZP_WORD:17 517.6666666666667 -zp ZP_WORD:2 [ utoa::value#2 utoa::value#4 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::j#2 main::j#0 main::j#1 ] -reg byte x [ utoa::started#2 utoa::started#3 ] -zp ZP_WORD:4 [ utoa::buffer#11 utoa::buffer#12 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 main::s#2 main::s#0 main::s#1 ] +reg byte x [ utoa::started#4 utoa::started#2 ] +zp ZP_WORD:2 [ utoa::buffer#22 utoa::buffer#21 utoa::buffer#11 utoa::buffer#3 utoa::buffer#4 utoa_append::buffer#0 main::s#2 main::s#0 main::s#1 ] reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ] -zp ZP_WORD:6 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] -zp ZP_BYTE:8 [ ultoa::digit#2 ultoa::digit#1 utoa::digit#2 utoa::digit#1 ] -zp ZP_DWORD:9 [ ultoa::value#2 ultoa::value#4 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 clock::return#2 main::$10 clock::return#0 ] -reg byte x [ ultoa::started#2 ultoa::started#3 ] -zp ZP_WORD:13 [ ultoa::buffer#11 ultoa::buffer#12 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] +zp ZP_WORD:4 [ print_line_cursor#11 print_line_cursor#21 print_char_cursor#62 print_char_cursor#99 print_line_cursor#1 ] +reg byte x [ ultoa::started#4 ultoa::started#2 ] +zp ZP_BYTE:6 [ ultoa::digit#6 ultoa::digit#7 ultoa::digit#8 ultoa::digit#1 utoa::digit#6 utoa::digit#7 utoa::digit#8 utoa::digit#1 ] +zp ZP_DWORD:7 [ ultoa::value#16 ultoa::value#15 ultoa::value#2 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_dword_decimal::w#0 ultoa_append::return#0 main::cyclecount#0 div32u16u::dividend#0 clock::return#2 main::$10 clock::return#0 ] +zp ZP_WORD:11 [ ultoa::buffer#22 ultoa::buffer#21 ultoa::buffer#11 ultoa::buffer#3 ultoa::buffer#4 ultoa_append::buffer#0 main::i#10 main::i#3 print_word_decimal::w#3 print_word_decimal::w#2 print_word_decimal::w#1 main::sec100s#0 ] reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ] +zp ZP_WORD:13 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 utoa::digit_value#2 utoa::digit_value#3 utoa::digit_value#0 utoa::digit_value#4 utoa_append::sub#0 print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#11 main::sieve_i#1 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:15 [ memset::num#2 memset::end#0 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 print_str::str#8 print_str::str#10 print_str::str#0 main::sieve_i#2 main::sieve_i#1 ] -zp ZP_WORD:17 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#11 main::i#2 ] +zp ZP_WORD:15 [ memset::num#2 memset::end#0 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#1 divr16u::dividend#2 divr16u::dividend#0 print_char_cursor#66 print_char_cursor#63 print_char_cursor#101 print_char_cursor#10 print_char_cursor#89 print_char_cursor#90 print_char_cursor#2 print_char_cursor#58 print_char_cursor#1 print_char_cursor#96 main::i#16 main::i#11 ] +zp ZP_WORD:17 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 utoa::value#16 utoa::value#15 utoa::value#2 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::j#2 main::j#0 main::j#1 ] reg byte x [ memset::c#3 ] -zp ZP_WORD:19 [ main::$38 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -reg byte a [ utoa::$11 ] +zp ZP_DWORD:19 [ div32u16u::return#2 main::$14 div32u16u::return#0 ultoa::digit_value#2 ultoa::digit_value#3 ultoa::digit_value#0 ultoa::digit_value#4 ultoa_append::sub#0 ] reg byte a [ utoa::$4 ] -reg byte a [ ultoa::$11 ] -zp ZP_DWORD:21 [ ultoa::digit_value#0 ultoa_append::sub#0 div32u16u::return#2 main::$14 div32u16u::return#0 ] +reg byte a [ utoa::$11 ] reg byte a [ ultoa::$4 ] -zp ZP_WORD:25 [ div32u16u::quotient_hi#0 utoa::digit_value#0 utoa_append::sub#0 ] +reg byte a [ ultoa::$11 ] +zp ZP_WORD:23 [ div32u16u::quotient_hi#0 main::$38 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] diff --git a/src/test/ref/signed-bytes.asm b/src/test/ref/signed-bytes.asm index 08df84ab4..31b7e2b02 100644 --- a/src/test/ref/signed-bytes.asm +++ b/src/test/ref/signed-bytes.asm @@ -3,10 +3,14 @@ .pc = $80d "Program" main: { .label screen = $400 - ldy #0 - ldx #-$7f - b1: - txa + ldx #0 + ldy #-$7f + b2: + tya + sta screen,x + iny + inx + tya sec sbc #$7f bvc !+ @@ -14,10 +18,4 @@ main: { !: bmi b2 rts - b2: - txa - sta screen,y - inx - iny - jmp b1 } diff --git a/src/test/ref/signed-bytes.cfg b/src/test/ref/signed-bytes.cfg index 57172f44b..171258843 100644 --- a/src/test/ref/signed-bytes.cfg +++ b/src/test/ref/signed-bytes.cfg @@ -9,17 +9,17 @@ [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::j#4 ← phi( main::@1/(byte) main::j#1 main/(byte) 0 ) + [5] (signed byte) main::i#4 ← phi( main::@1/(signed byte) main::i#1 main/(signed byte) -$7f ) + [6] *((const byte*) main::screen#0 + (byte) main::j#4) ← (byte)(signed byte) main::i#4 + [7] (signed byte) main::i#1 ← ++ (signed byte) main::i#4 + [8] (byte) main::j#1 ← ++ (byte) main::j#4 to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte) main::j#1 ) - [5] (signed byte) main::i#2 ← phi( main/(signed byte) -$7f main::@2/(signed byte) main::i#1 ) - [6] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 +main::@1: scope:[main] from main::@2 + [9] if((signed byte) main::i#1<(signed byte) $7f) goto main::@2 to:main::@return main::@return: scope:[main] from main::@1 - [7] return + [10] return to:@return -main::@2: scope:[main] from main::@1 - [8] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte)(signed byte) main::i#2 - [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 - [10] (byte) main::j#1 ← ++ (byte) main::j#2 - to:main::@1 diff --git a/src/test/ref/signed-bytes.log b/src/test/ref/signed-bytes.log index 1253a6e36..886f1a7db 100644 --- a/src/test/ref/signed-bytes.log +++ b/src/test/ref/signed-bytes.log @@ -87,26 +87,94 @@ Constant (const byte*) main::screen#0 = (byte*) 1024 Constant (const byte) main::j#0 = 0 Constant (const signed byte) main::i#0 = -$7f Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [2] (byte~) main::$1 ← (byte)(signed byte) main::i#2 keeping main::i#2 +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::j#2 ← phi( main/(const byte) main::j#0 main::@2/(byte) main::j#1 ) + [0] (signed byte) main::i#2 ← phi( main/(const signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + [1] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (signed byte) main::i#4 ← phi( ) + [2] (byte~) main::$1 ← (byte)(signed byte) main::i#4 + [3] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte~) main::$1 + [4] (signed byte) main::i#1 ← ++ (signed byte) main::i#4 + [5] (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::j#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::j#2 ← phi( main/(const byte) main::j#0 main::@2/(byte) main::j#1 ) + [0] (signed byte) main::i#2 ← phi( main/(const signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + [1] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte) main::j#4 ← phi( ) + (signed byte) main::i#4 ← phi( main::@1/(signed byte) main::i#2 ) + [2] (byte~) main::$1 ← (byte)(signed byte) main::i#4 + [3] *((const byte*) main::screen#0 + (byte) main::j#4) ← (byte~) main::$1 + [4] (signed byte) main::i#1 ← ++ (signed byte) main::i#4 + [5] (byte) main::j#1 ← ++ (byte) main::j#4 + to:main::@1 +main::@return: scope:[main] from main::@1 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (signed byte) main::i#1 = (signed byte) main::i#2 +Alias (byte) main::j#1 = (byte) main::j#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (signed byte) main::i#5 (const signed byte) main::i#0 +Identical Phi Values (byte) main::j#5 (const byte) main::j#0 +Successful SSA optimization Pass2IdenticalPhiElimination +if() condition always true - replacing block destination [11] if((const signed byte) main::i#0<(signed byte) $7f) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Inlining Noop Cast [2] (byte~) main::$1 ← (byte)(signed byte) main::i#4 keeping main::i#4 Successful SSA optimization Pass2NopCastInlining Inlining constant with var siblings (const byte) main::j#0 Inlining constant with var siblings (const signed byte) main::i#0 Constant inlined main::i#0 = (signed byte) -$7f Constant inlined main::j#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting main::@7(between main::@1 and main::@2) 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 Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 Created 2 initial phi equivalence classes -Coalesced [12] main::i#4 ← main::i#1 -Coalesced [13] main::j#4 ← main::j#1 +Coalesced [13] main::i#6 ← main::i#1 +Coalesced [14] main::j#6 ← main::j#1 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@7 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -124,40 +192,40 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::j#4 ← phi( main::@1/(byte) main::j#1 main/(byte) 0 ) + [5] (signed byte) main::i#4 ← phi( main::@1/(signed byte) main::i#1 main/(signed byte) -$7f ) + [6] *((const byte*) main::screen#0 + (byte) main::j#4) ← (byte)(signed byte) main::i#4 + [7] (signed byte) main::i#1 ← ++ (signed byte) main::i#4 + [8] (byte) main::j#1 ← ++ (byte) main::j#4 to:main::@1 -main::@1: scope:[main] from main main::@2 - [5] (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte) main::j#1 ) - [5] (signed byte) main::i#2 ← phi( main/(signed byte) -$7f main::@2/(signed byte) main::i#1 ) - [6] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 +main::@1: scope:[main] from main::@2 + [9] if((signed byte) main::i#1<(signed byte) $7f) goto main::@2 to:main::@return main::@return: scope:[main] from main::@1 - [7] return + [10] return to:@return -main::@2: scope:[main] from main::@1 - [8] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte)(signed byte) main::i#2 - [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 - [10] (byte) main::j#1 ← ++ (byte) main::j#2 - to:main::@1 VARIABLE REGISTER WEIGHTS (void()) main() (signed byte) main::i (signed byte) main::i#1 11.0 -(signed byte) main::i#2 11.0 +(signed byte) main::i#4 11.0 (byte) main::j -(byte) main::j#1 22.0 -(byte) main::j#2 8.25 +(byte) main::j#1 11.0 +(byte) main::j#4 11.0 (byte*) main::screen Initial phi equivalence classes -[ main::i#2 main::i#1 ] -[ main::j#2 main::j#1 ] +[ main::i#4 main::i#1 ] +[ main::j#4 main::j#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] -[ main::j#2 main::j#1 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +[ main::i#4 main::i#1 ] +[ main::j#4 main::j#1 ] +Allocated zp ZP_BYTE:2 [ main::i#4 main::i#1 ] +Allocated zp ZP_BYTE:3 [ main::j#4 main::j#1 ] INITIAL ASM Target platform is c64basic @@ -188,64 +256,64 @@ main: { .label screen = $400 .label i = 2 .label j = 3 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::j#4 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 sta j - // [5] phi (signed byte) main::i#2 = (signed byte) -$7f [phi:main->main::@1#1] -- vbsz1=vbsc1 + // [5] phi (signed byte) main::i#4 = (signed byte) -$7f [phi:main->main::@2#1] -- vbsz1=vbsc1 lda #-$7f sta i + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::j#4 = (byte) main::j#1 [phi:main::@1->main::@2#0] -- register_copy + // [5] phi (signed byte) main::i#4 = (signed byte) main::i#1 [phi:main::@1->main::@2#1] -- register_copy + jmp b2 + // main::@2 + b2: + // [6] *((const byte*) main::screen#0 + (byte) main::j#4) ← (byte)(signed byte) main::i#4 -- pbuc1_derefidx_vbuz1=vbuz2 + lda i + ldy j + sta screen,y + // [7] (signed byte) main::i#1 ← ++ (signed byte) main::i#4 -- vbsz1=_inc_vbsz1 + inc i + // [8] (byte) main::j#1 ← ++ (byte) main::j#4 -- vbuz1=_inc_vbuz1 + inc j jmp b1 // main::@1 b1: - // [6] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 -- vbsz1_lt_vbsc1_then_la1 + // [9] if((signed byte) main::i#1<(signed byte) $7f) goto main::@2 -- vbsz1_lt_vbsc1_then_la1 lda i sec sbc #$7f bvc !+ eor #$80 !: - bmi b2 + bmi b2_from_b1 jmp breturn // main::@return breturn: - // [7] return + // [10] return rts - // main::@2 - b2: - // [8] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte)(signed byte) main::i#2 -- pbuc1_derefidx_vbuz1=vbuz2 - lda i - ldy j - sta screen,y - // [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsz1=_inc_vbsz1 - inc i - // [10] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1 - inc j - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [6] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 [ main::i#2 main::j#2 ] ( main:2 [ main::i#2 main::j#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::j#2 main::j#1 ] -Statement [8] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte)(signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:2 [ main::i#2 main::j#2 ] ) always clobbers reg byte a -Statement [6] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 [ main::i#2 main::j#2 ] ( main:2 [ main::i#2 main::j#2 ] ) always clobbers reg byte a -Statement [8] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte)(signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:2 [ main::i#2 main::j#2 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::j#2 main::j#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , +Statement [9] if((signed byte) main::i#1<(signed byte) $7f) goto main::@2 [ main::i#1 main::j#1 ] ( main:2 [ main::i#1 main::j#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#4 main::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::j#4 main::j#1 ] +Statement [6] *((const byte*) main::screen#0 + (byte) main::j#4) ← (byte)(signed byte) main::i#4 [ main::i#4 main::j#4 ] ( main:2 [ main::i#4 main::j#4 ] ) always clobbers reg byte a +Statement [9] if((signed byte) main::i#1<(signed byte) $7f) goto main::@2 [ main::i#1 main::j#1 ] ( main:2 [ main::i#1 main::j#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::i#4 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::j#4 main::j#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 30.25: zp ZP_BYTE:3 [ main::j#2 main::j#1 ] 22: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplift Scope [main] 22: zp ZP_BYTE:2 [ main::i#4 main::i#1 ] 22: zp ZP_BYTE:3 [ main::j#4 main::j#1 ] Uplift Scope [] -Uplifting [main] best 388 combination reg byte y [ main::j#2 main::j#1 ] reg byte x [ main::i#2 main::i#1 ] -Uplifting [] best 388 combination +Uplifting [main] best 418 combination reg byte y [ main::i#4 main::i#1 ] reg byte x [ main::j#4 main::j#1 ] +Uplifting [] best 418 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -273,64 +341,70 @@ bend: // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 - ldy #0 - // [5] phi (signed byte) main::i#2 = (signed byte) -$7f [phi:main->main::@1#1] -- vbsxx=vbsc1 - ldx #-$7f + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::j#4 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 + ldx #0 + // [5] phi (signed byte) main::i#4 = (signed byte) -$7f [phi:main->main::@2#1] -- vbsyy=vbsc1 + ldy #-$7f + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [5] phi (byte) main::j#4 = (byte) main::j#1 [phi:main::@1->main::@2#0] -- register_copy + // [5] phi (signed byte) main::i#4 = (signed byte) main::i#1 [phi:main::@1->main::@2#1] -- register_copy + jmp b2 + // main::@2 + b2: + // [6] *((const byte*) main::screen#0 + (byte) main::j#4) ← (byte)(signed byte) main::i#4 -- pbuc1_derefidx_vbuxx=vbuyy + tya + sta screen,x + // [7] (signed byte) main::i#1 ← ++ (signed byte) main::i#4 -- vbsyy=_inc_vbsyy + iny + // [8] (byte) main::j#1 ← ++ (byte) main::j#4 -- vbuxx=_inc_vbuxx + inx jmp b1 // main::@1 b1: - // [6] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 -- vbsxx_lt_vbsc1_then_la1 - txa + // [9] if((signed byte) main::i#1<(signed byte) $7f) goto main::@2 -- vbsyy_lt_vbsc1_then_la1 + tya sec sbc #$7f bvc !+ eor #$80 !: - bmi b2 + bmi b2_from_b1 jmp breturn // main::@return breturn: - // [7] return + // [10] return rts - // main::@2 - b2: - // [8] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte)(signed byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx - txa - sta screen,y - // [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsxx=_inc_vbsxx - inx - // [10] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuyy=_inc_vbuyy - iny - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [5] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination +Replacing label b2_from_b1 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: +Removing instruction b2_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: +Removing instruction b2_from_main: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b2: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -343,20 +417,20 @@ FINAL SYMBOL TABLE (label) main::@2 (label) main::@return (signed byte) main::i -(signed byte) main::i#1 reg byte x 11.0 -(signed byte) main::i#2 reg byte x 11.0 +(signed byte) main::i#1 reg byte y 11.0 +(signed byte) main::i#4 reg byte y 11.0 (byte) main::j -(byte) main::j#1 reg byte y 22.0 -(byte) main::j#2 reg byte y 8.25 +(byte) main::j#1 reg byte x 11.0 +(byte) main::j#4 reg byte x 11.0 (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::j#2 main::j#1 ] +reg byte y [ main::i#4 main::i#1 ] +reg byte x [ main::j#4 main::j#1 ] FINAL ASSEMBLER -Score: 316 +Score: 286 // File Comments // Upstart @@ -374,16 +448,30 @@ Score: 316 // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 - ldy #0 - // [5] phi (signed byte) main::i#2 = (signed byte) -$7f [phi:main->main::@1#1] -- vbsxx=vbsc1 - ldx #-$7f + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::j#4 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 + ldx #0 + // [5] phi (signed byte) main::i#4 = (signed byte) -$7f [phi:main->main::@2#1] -- vbsyy=vbsc1 + ldy #-$7f + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi (byte) main::j#4 = (byte) main::j#1 [phi:main::@1->main::@2#0] -- register_copy + // [5] phi (signed byte) main::i#4 = (signed byte) main::i#1 [phi:main::@1->main::@2#1] -- register_copy + // main::@2 + b2: + // screen[j] = (byte)i + // [6] *((const byte*) main::screen#0 + (byte) main::j#4) ← (byte)(signed byte) main::i#4 -- pbuc1_derefidx_vbuxx=vbuyy + tya + sta screen,x + // i++; + // [7] (signed byte) main::i#1 ← ++ (signed byte) main::i#4 -- vbsyy=_inc_vbsyy + iny + // j++; + // [8] (byte) main::j#1 ← ++ (byte) main::j#4 -- vbuxx=_inc_vbuxx + inx // main::@1 - b1: // while(i<127) - // [6] if((signed byte) main::i#2<(signed byte) $7f) goto main::@2 -- vbsxx_lt_vbsc1_then_la1 - txa + // [9] if((signed byte) main::i#1<(signed byte) $7f) goto main::@2 -- vbsyy_lt_vbsc1_then_la1 + tya sec sbc #$7f bvc !+ @@ -392,24 +480,8 @@ main: { bmi b2 // main::@return // } - // [7] return + // [10] return rts - // main::@2 - b2: - // screen[j] = (byte)i - // [8] *((const byte*) main::screen#0 + (byte) main::j#2) ← (byte)(signed byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx - txa - sta screen,y - // i++; - // [9] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 -- vbsxx=_inc_vbsxx - inx - // j++; - // [10] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuyy=_inc_vbuyy - iny - // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [5] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy - // [5] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 } // File Data diff --git a/src/test/ref/signed-bytes.sym b/src/test/ref/signed-bytes.sym index 4f11ae0c0..3000cf312 100644 --- a/src/test/ref/signed-bytes.sym +++ b/src/test/ref/signed-bytes.sym @@ -6,13 +6,13 @@ (label) main::@2 (label) main::@return (signed byte) main::i -(signed byte) main::i#1 reg byte x 11.0 -(signed byte) main::i#2 reg byte x 11.0 +(signed byte) main::i#1 reg byte y 11.0 +(signed byte) main::i#4 reg byte y 11.0 (byte) main::j -(byte) main::j#1 reg byte y 22.0 -(byte) main::j#2 reg byte y 8.25 +(byte) main::j#1 reg byte x 11.0 +(byte) main::j#4 reg byte x 11.0 (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte x [ main::i#2 main::i#1 ] -reg byte y [ main::j#2 main::j#1 ] +reg byte y [ main::i#4 main::i#1 ] +reg byte x [ main::j#4 main::j#1 ] diff --git a/src/test/ref/struct-ptr-5.asm b/src/test/ref/struct-ptr-5.asm index 1be917e27..7bc8861eb 100644 --- a/src/test/ref/struct-ptr-5.asm +++ b/src/test/ref/struct-ptr-5.asm @@ -33,14 +33,6 @@ main: { sta entry lda #>ENTRIES sta entry+1 - b1: - lda entry+1 - cmp #>0 - bne b2 - lda entry - cmp #<0 - bne b2 - rts b2: lda #'0' clc @@ -67,5 +59,11 @@ main: { sta entry+1 pla sta entry - jmp b1 + lda entry+1 + cmp #>0 + bne b2 + lda entry + cmp #<0 + bne b2 + rts } diff --git a/src/test/ref/struct-ptr-5.cfg b/src/test/ref/struct-ptr-5.cfg index c4791dca3..de332e267 100644 --- a/src/test/ref/struct-ptr-5.cfg +++ b/src/test/ref/struct-ptr-5.cfg @@ -14,26 +14,26 @@ main: scope:[main] from @1 [7] *((byte*)(const struct Entry*) main::entry2#0) ← (byte) 2 [8] *((struct Entry**)(const struct Entry*) main::entry1#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) 0 [9] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 + to:main::@2 +main::@2: scope:[main] from main main::@1 + [10] (byte) main::idx#7 ← phi( main::@1/(byte) main::idx#4 main/(byte) 0 ) + [10] (struct Entry*) main::entry#4 ← phi( main::@1/(struct Entry*) main::entry#1 main/(const struct Entry*) ENTRIES#0 ) + [11] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) + [12] *((const byte*) main::SCREEN#0 + (byte) main::idx#7) ← (byte~) main::$2 + [13] (byte) main::idx#1 ← ++ (byte) main::idx#7 + [14] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [15] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 + [16] (byte) main::idx#2 ← ++ (byte) main::idx#1 + [17] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [18] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 + [19] (byte) main::idx#3 ← ++ (byte) main::idx#2 + [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' + [21] (byte) main::idx#4 ← ++ (byte) main::idx#3 + [22] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) to:main::@1 -main::@1: scope:[main] from main main::@2 - [10] (byte) main::idx#5 ← phi( main/(byte) 0 main::@2/(byte) main::idx#4 ) - [10] (struct Entry*) main::entry#2 ← phi( main/(const struct Entry*) ENTRIES#0 main::@2/(struct Entry*) main::entry#1 ) - [11] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 +main::@1: scope:[main] from main::@2 + [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#1) goto main::@2 to:main::@return main::@return: scope:[main] from main::@1 - [12] return + [24] return to:@return -main::@2: scope:[main] from main::@1 - [13] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2) - [14] *((const byte*) main::SCREEN#0 + (byte) main::idx#5) ← (byte~) main::$2 - [15] (byte) main::idx#1 ← ++ (byte) main::idx#5 - [16] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) - [17] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 - [18] (byte) main::idx#2 ← ++ (byte) main::idx#1 - [19] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) - [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 - [21] (byte) main::idx#3 ← ++ (byte) main::idx#2 - [22] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' - [23] (byte) main::idx#4 ← ++ (byte) main::idx#3 - [24] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) - to:main::@1 diff --git a/src/test/ref/struct-ptr-5.log b/src/test/ref/struct-ptr-5.log index 3d8fe3ee1..985a26c99 100644 --- a/src/test/ref/struct-ptr-5.log +++ b/src/test/ref/struct-ptr-5.log @@ -228,6 +228,100 @@ Eliminating unused variable (struct Entry**) main::$15 and assignment [24] (stru Eliminating unused variable (struct Entry**) main::$16 and assignment [30] (struct Entry**) main::$16 ← (struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT Eliminating unused constant (const byte) OFFSET_STRUCT_ENTRY_VALUE Successful SSA optimization PassNEliminateUnusedVars +GRAPH (NEW VERSIONS for main::entry#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (struct Entry*) main::entry1#0 ← (const struct Entry*) ENTRIES#0 + (const byte) main::$5 + [1] (struct Entry*) main::entry2#0 ← (const struct Entry*) ENTRIES#0 + (const byte) main::$6 + [2] *((struct Entry**)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) main::entry2#0 + [3] *((byte*)(const struct Entry*) main::entry0#0) ← (byte) 1 + [4] *((struct Entry**)(struct Entry*) main::entry2#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) main::entry1#0 + [5] *((byte*)(struct Entry*) main::entry2#0) ← (byte) 2 + [6] *((struct Entry**)(struct Entry*) main::entry1#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) 0 + [7] *((byte*)(struct Entry*) main::entry1#0) ← (byte) 3 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [8] (byte) main::idx#5 ← phi( main/(const byte) main::idx#0 main::@2/(byte) main::idx#4 ) + [8] (struct Entry*) main::entry#2 ← phi( main/(const struct Entry*) main::entry#0 main::@2/(struct Entry*) main::entry#1 ) + [9] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (struct Entry*) main::entry#4 ← phi( ) + [10] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) + [11] *((const byte*) main::SCREEN#0 + (byte) main::idx#5) ← (byte~) main::$2 + [12] (byte) main::idx#1 ← ++ (byte) main::idx#5 + [13] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [14] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 + [15] (byte) main::idx#2 ← ++ (byte) main::idx#1 + [16] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [17] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 + [18] (byte) main::idx#3 ← ++ (byte) main::idx#2 + [19] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' + [20] (byte) main::idx#4 ← ++ (byte) main::idx#3 + [21] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + to:main::@1 +main::@return: scope:[main] from main::@1 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +GRAPH (NEW VERSIONS for main::idx#5) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (struct Entry*) main::entry1#0 ← (const struct Entry*) ENTRIES#0 + (const byte) main::$5 + [1] (struct Entry*) main::entry2#0 ← (const struct Entry*) ENTRIES#0 + (const byte) main::$6 + [2] *((struct Entry**)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) main::entry2#0 + [3] *((byte*)(const struct Entry*) main::entry0#0) ← (byte) 1 + [4] *((struct Entry**)(struct Entry*) main::entry2#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) main::entry1#0 + [5] *((byte*)(struct Entry*) main::entry2#0) ← (byte) 2 + [6] *((struct Entry**)(struct Entry*) main::entry1#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) 0 + [7] *((byte*)(struct Entry*) main::entry1#0) ← (byte) 3 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [8] (byte) main::idx#5 ← phi( main/(const byte) main::idx#0 main::@2/(byte) main::idx#4 ) + [8] (struct Entry*) main::entry#2 ← phi( main/(const struct Entry*) main::entry#0 main::@2/(struct Entry*) main::entry#1 ) + [9] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte) main::idx#7 ← phi( ) + (struct Entry*) main::entry#4 ← phi( main::@1/(struct Entry*) main::entry#2 ) + [10] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) + [11] *((const byte*) main::SCREEN#0 + (byte) main::idx#7) ← (byte~) main::$2 + [12] (byte) main::idx#1 ← ++ (byte) main::idx#7 + [13] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [14] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 + [15] (byte) main::idx#2 ← ++ (byte) main::idx#1 + [16] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [17] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 + [18] (byte) main::idx#3 ← ++ (byte) main::idx#2 + [19] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' + [20] (byte) main::idx#4 ← ++ (byte) main::idx#3 + [21] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + to:main::@1 +main::@return: scope:[main] from main::@1 + [22] return + to:@return +@1: scope:[] from @begin + [23] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (struct Entry*) main::entry#1 = (struct Entry*) main::entry#2 +Alias (byte) main::idx#4 = (byte) main::idx#5 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (struct Entry*) main::entry#5 (const struct Entry*) main::entry#0 +Identical Phi Values (byte) main::idx#8 (const byte) main::idx#0 +Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [0] (struct Entry*) main::entry1#0 ← (const struct Entry*) ENTRIES#0 + (const byte) main::$5 Constant right-side identified [1] (struct Entry*) main::entry2#0 ← (const struct Entry*) ENTRIES#0 + (const byte) main::$6 Successful SSA optimization Pass2ConstantRValueConsolidation @@ -239,6 +333,8 @@ Constant value identified (byte*)main::entry2#0 in [5] *((byte*)(const struct En Constant value identified (struct Entry**)main::entry1#0 in [6] *((struct Entry**)(const struct Entry*) main::entry1#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) 0 Constant value identified (byte*)main::entry1#0 in [7] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 Successful SSA optimization Pass2ConstantValues +if() condition always true - replacing block destination [27] if((struct Entry*)(word) 0!=(const struct Entry*) main::entry#0) goto main::@2 +Successful SSA optimization Pass2ConstantIfs Inlining constant with var siblings (const byte) main::idx#0 Inlining constant with var siblings (const struct Entry*) main::entry#0 Constant inlined main::$5 = (byte) 1*(const byte) SIZEOF_STRUCT_ENTRY @@ -251,18 +347,22 @@ Consolidated array index constant in *((struct Entry**)ENTRIES#0+OFFSET_STRUCT_E Consolidated array index constant in *((struct Entry**)main::entry2#0+OFFSET_STRUCT_ENTRY_NEXT) Consolidated array index constant in *((struct Entry**)main::entry1#0+OFFSET_STRUCT_ENTRY_NEXT) Successful SSA optimization Pass2ConstantAdditionElimination +Added new block during phi lifting main::@7(between main::@1 and main::@2) 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 +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 Created 2 initial phi equivalence classes -Coalesced [26] main::entry#4 ← main::entry#1 -Coalesced [27] main::idx#7 ← main::idx#4 +Coalesced [27] main::entry#6 ← main::entry#1 +Coalesced [28] main::idx#9 ← main::idx#4 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@7 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -284,29 +384,29 @@ main: scope:[main] from @1 [7] *((byte*)(const struct Entry*) main::entry2#0) ← (byte) 2 [8] *((struct Entry**)(const struct Entry*) main::entry1#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) 0 [9] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 + to:main::@2 +main::@2: scope:[main] from main main::@1 + [10] (byte) main::idx#7 ← phi( main::@1/(byte) main::idx#4 main/(byte) 0 ) + [10] (struct Entry*) main::entry#4 ← phi( main::@1/(struct Entry*) main::entry#1 main/(const struct Entry*) ENTRIES#0 ) + [11] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) + [12] *((const byte*) main::SCREEN#0 + (byte) main::idx#7) ← (byte~) main::$2 + [13] (byte) main::idx#1 ← ++ (byte) main::idx#7 + [14] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [15] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 + [16] (byte) main::idx#2 ← ++ (byte) main::idx#1 + [17] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) + [18] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 + [19] (byte) main::idx#3 ← ++ (byte) main::idx#2 + [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' + [21] (byte) main::idx#4 ← ++ (byte) main::idx#3 + [22] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) to:main::@1 -main::@1: scope:[main] from main main::@2 - [10] (byte) main::idx#5 ← phi( main/(byte) 0 main::@2/(byte) main::idx#4 ) - [10] (struct Entry*) main::entry#2 ← phi( main/(const struct Entry*) ENTRIES#0 main::@2/(struct Entry*) main::entry#1 ) - [11] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 +main::@1: scope:[main] from main::@2 + [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#1) goto main::@2 to:main::@return main::@return: scope:[main] from main::@1 - [12] return + [24] return to:@return -main::@2: scope:[main] from main::@1 - [13] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2) - [14] *((const byte*) main::SCREEN#0 + (byte) main::idx#5) ← (byte~) main::$2 - [15] (byte) main::idx#1 ← ++ (byte) main::idx#5 - [16] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) - [17] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 - [18] (byte) main::idx#2 ← ++ (byte) main::idx#1 - [19] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) - [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 - [21] (byte) main::idx#3 ← ++ (byte) main::idx#2 - [22] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' - [23] (byte) main::idx#4 ← ++ (byte) main::idx#3 - [24] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) - to:main::@1 VARIABLE REGISTER WEIGHTS @@ -319,8 +419,8 @@ VARIABLE REGISTER WEIGHTS (byte~) main::$4 22.0 (byte*) main::SCREEN (struct Entry*) main::entry -(struct Entry*) main::entry#1 22.0 -(struct Entry*) main::entry#2 1.6923076923076923 +(struct Entry*) main::entry#1 16.5 +(struct Entry*) main::entry#4 0.9166666666666666 (struct Entry*) main::entry0 (struct Entry*) main::entry1 (struct Entry*) main::entry2 @@ -328,12 +428,12 @@ VARIABLE REGISTER WEIGHTS (byte) main::idx#1 11.0 (byte) main::idx#2 11.0 (byte) main::idx#3 16.5 -(byte) main::idx#4 11.0 -(byte) main::idx#5 8.25 +(byte) main::idx#4 7.333333333333333 +(byte) main::idx#7 11.0 Initial phi equivalence classes -[ main::entry#2 main::entry#1 ] -[ main::idx#5 main::idx#4 ] +[ main::entry#4 main::entry#1 ] +[ main::idx#7 main::idx#4 ] Added variable main::$2 to zero page equivalence class [ main::$2 ] Added variable main::idx#1 to zero page equivalence class [ main::idx#1 ] Added variable main::$3 to zero page equivalence class [ main::$3 ] @@ -341,16 +441,16 @@ Added variable main::idx#2 to zero page equivalence class [ main::idx#2 ] Added variable main::$4 to zero page equivalence class [ main::$4 ] Added variable main::idx#3 to zero page equivalence class [ main::idx#3 ] Complete equivalence classes -[ main::entry#2 main::entry#1 ] -[ main::idx#5 main::idx#4 ] +[ main::entry#4 main::entry#1 ] +[ main::idx#7 main::idx#4 ] [ main::$2 ] [ main::idx#1 ] [ main::$3 ] [ main::idx#2 ] [ main::$4 ] [ main::idx#3 ] -Allocated zp ZP_WORD:2 [ main::entry#2 main::entry#1 ] -Allocated zp ZP_BYTE:4 [ main::idx#5 main::idx#4 ] +Allocated zp ZP_WORD:2 [ main::entry#4 main::entry#1 ] +Allocated zp ZP_BYTE:4 [ main::idx#7 main::idx#4 ] Allocated zp ZP_BYTE:5 [ main::$2 ] Allocated zp ZP_BYTE:6 [ main::idx#1 ] Allocated zp ZP_BYTE:7 [ main::$3 ] @@ -398,7 +498,7 @@ main: { .label idx_3 = $a .label idx_4 = 4 .label entry = 2 - .label idx_5 = 4 + .label idx_7 = 4 // [4] *((struct Entry**)(const struct Entry*) ENTRIES#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (const struct Entry*) main::entry2#0 -- _deref_pptc1=pssc2 lda #<entry2 sta ENTRIES+OFFSET_STRUCT_ENTRY_NEXT @@ -423,80 +523,71 @@ main: { // [9] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta entry1 - // [10] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [10] phi (byte) main::idx#5 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + // [10] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [10] phi (byte) main::idx#7 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 - sta idx_5 - // [10] phi (struct Entry*) main::entry#2 = (const struct Entry*) ENTRIES#0 [phi:main->main::@1#1] -- pssz1=pssc1 + sta idx_7 + // [10] phi (struct Entry*) main::entry#4 = (const struct Entry*) ENTRIES#0 [phi:main->main::@2#1] -- pssz1=pssc1 lda #<ENTRIES sta entry lda #>ENTRIES sta entry+1 - jmp b1 - // main::@1 - b1: - // [11] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 -- pssc1_neq_pssz1_then_la1 - lda entry+1 - cmp #>0 - bne b2 - lda entry - cmp #<0 - bne b2 - jmp breturn - // main::@return - breturn: - // [12] return - rts + jmp b2 + // [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [10] phi (byte) main::idx#7 = (byte) main::idx#4 [phi:main::@1->main::@2#0] -- register_copy + // [10] phi (struct Entry*) main::entry#4 = (struct Entry*) main::entry#1 [phi:main::@1->main::@2#1] -- register_copy + jmp b2 // main::@2 b2: - // [13] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2) -- vbuz1=vbuc1_plus__deref_pbuz2 + // [11] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) -- vbuz1=vbuc1_plus__deref_pbuz2 lda #'0' clc ldy #0 adc (entry),y sta _2 - // [14] *((const byte*) main::SCREEN#0 + (byte) main::idx#5) ← (byte~) main::$2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [12] *((const byte*) main::SCREEN#0 + (byte) main::idx#7) ← (byte~) main::$2 -- pbuc1_derefidx_vbuz1=vbuz2 lda _2 - ldy idx_5 + ldy idx_7 sta SCREEN,y - // [15] (byte) main::idx#1 ← ++ (byte) main::idx#5 -- vbuz1=_inc_vbuz2 - ldy idx_5 + // [13] (byte) main::idx#1 ← ++ (byte) main::idx#7 -- vbuz1=_inc_vbuz2 + ldy idx_7 iny sty idx - // [16] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuz1=_lo_pptz2_derefidx_vbuc1 + // [14] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuz1=_lo_pptz2_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y sta _3 - // [17] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [15] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 -- pbuc1_derefidx_vbuz1=vbuz2 lda _3 ldy idx sta SCREEN,y - // [18] (byte) main::idx#2 ← ++ (byte) main::idx#1 -- vbuz1=_inc_vbuz2 + // [16] (byte) main::idx#2 ← ++ (byte) main::idx#1 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_2 - // [19] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuz1=_hi_pptz2_derefidx_vbuc1 + // [17] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuz1=_hi_pptz2_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT+1 lda (entry),y sta _4 - // [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuz1=vbuz2 + // [18] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuz1=vbuz2 lda _4 ldy idx_2 sta SCREEN,y - // [21] (byte) main::idx#3 ← ++ (byte) main::idx#2 -- vbuz1=_inc_vbuz2 + // [19] (byte) main::idx#3 ← ++ (byte) main::idx#2 -- vbuz1=_inc_vbuz2 ldy idx_2 iny sty idx_3 - // [22] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + // [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 lda #' ' ldy idx_3 sta SCREEN,y - // [23] (byte) main::idx#4 ← ++ (byte) main::idx#3 -- vbuz1=_inc_vbuz2 + // [21] (byte) main::idx#4 ← ++ (byte) main::idx#3 -- vbuz1=_inc_vbuz2 ldy idx_3 iny sty idx_4 - // [24] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- pssz1=pptz1_derefidx_vbuc1 + // [22] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- pssz1=pptz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y pha @@ -505,11 +596,21 @@ main: { sta entry+1 pla sta entry - // [10] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [10] phi (byte) main::idx#5 = (byte) main::idx#4 [phi:main::@2->main::@1#0] -- register_copy - // [10] phi (struct Entry*) main::entry#2 = (struct Entry*) main::entry#1 [phi:main::@2->main::@1#1] -- register_copy jmp b1 + // main::@1 + b1: + // [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#1) goto main::@2 -- pssc1_neq_pssz1_then_la1 + lda entry+1 + cmp #>0 + bne b2_from_b1 + lda entry + cmp #<0 + bne b2_from_b1 + jmp breturn + // main::@return + breturn: + // [24] return + rts } // File Data @@ -520,33 +621,33 @@ Statement [6] *((struct Entry**)(const struct Entry*) main::entry2#0+(const byte Statement [7] *((byte*)(const struct Entry*) main::entry2#0) ← (byte) 2 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [8] *((struct Entry**)(const struct Entry*) main::entry1#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [9] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [11] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 [ main::entry#2 main::idx#5 ] ( main:2 [ main::entry#2 main::idx#5 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::idx#5 main::idx#4 ] -Statement [13] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2) [ main::entry#2 main::idx#5 main::$2 ] ( main:2 [ main::entry#2 main::idx#5 main::$2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::idx#5 main::idx#4 ] -Statement [16] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#2 main::idx#1 main::$3 ] ( main:2 [ main::entry#2 main::idx#1 main::$3 ] ) always clobbers reg byte a reg byte y +Statement [11] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) [ main::entry#4 main::idx#7 main::$2 ] ( main:2 [ main::entry#4 main::idx#7 main::$2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::idx#7 main::idx#4 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::idx#7 main::idx#4 ] +Statement [14] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#4 main::idx#1 main::$3 ] ( main:2 [ main::entry#4 main::idx#1 main::$3 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::idx#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ main::idx#1 ] -Statement [19] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#2 main::idx#2 main::$4 ] ( main:2 [ main::entry#2 main::idx#2 main::$4 ] ) always clobbers reg byte a reg byte y +Statement [17] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#4 main::idx#2 main::$4 ] ( main:2 [ main::entry#4 main::idx#2 main::$4 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ main::idx#2 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:8 [ main::idx#2 ] -Statement [22] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' [ main::entry#2 main::idx#3 ] ( main:2 [ main::entry#2 main::idx#3 ] ) always clobbers reg byte a +Statement [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' [ main::entry#4 main::idx#3 ] ( main:2 [ main::entry#4 main::idx#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ main::idx#3 ] -Statement [24] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#1 main::idx#4 ] ( main:2 [ main::entry#1 main::idx#4 ] ) always clobbers reg byte a reg byte y +Statement [22] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#1 main::idx#4 ] ( main:2 [ main::entry#1 main::idx#4 ] ) always clobbers reg byte a reg byte y +Statement [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#1) goto main::@2 [ main::entry#1 main::idx#4 ] ( main:2 [ main::entry#1 main::idx#4 ] ) always clobbers reg byte a Statement [4] *((struct Entry**)(const struct Entry*) ENTRIES#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (const struct Entry*) main::entry2#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [5] *((byte*)(const struct Entry*) ENTRIES#0) ← (byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((struct Entry**)(const struct Entry*) main::entry2#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (const struct Entry*) main::entry1#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [7] *((byte*)(const struct Entry*) main::entry2#0) ← (byte) 2 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [8] *((struct Entry**)(const struct Entry*) main::entry1#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (struct Entry*) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [9] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [11] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 [ main::entry#2 main::idx#5 ] ( main:2 [ main::entry#2 main::idx#5 ] ) always clobbers reg byte a -Statement [13] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2) [ main::entry#2 main::idx#5 main::$2 ] ( main:2 [ main::entry#2 main::idx#5 main::$2 ] ) always clobbers reg byte a reg byte y -Statement [16] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#2 main::idx#1 main::$3 ] ( main:2 [ main::entry#2 main::idx#1 main::$3 ] ) always clobbers reg byte a reg byte y -Statement [19] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#2 main::idx#2 main::$4 ] ( main:2 [ main::entry#2 main::idx#2 main::$4 ] ) always clobbers reg byte a reg byte y -Statement [22] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' [ main::entry#2 main::idx#3 ] ( main:2 [ main::entry#2 main::idx#3 ] ) always clobbers reg byte a -Statement [24] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#1 main::idx#4 ] ( main:2 [ main::entry#1 main::idx#4 ] ) always clobbers reg byte a reg byte y -Potential registers zp ZP_WORD:2 [ main::entry#2 main::entry#1 ] : zp ZP_WORD:2 , -Potential registers zp ZP_BYTE:4 [ main::idx#5 main::idx#4 ] : zp ZP_BYTE:4 , reg byte x , +Statement [11] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) [ main::entry#4 main::idx#7 main::$2 ] ( main:2 [ main::entry#4 main::idx#7 main::$2 ] ) always clobbers reg byte a reg byte y +Statement [14] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#4 main::idx#1 main::$3 ] ( main:2 [ main::entry#4 main::idx#1 main::$3 ] ) always clobbers reg byte a reg byte y +Statement [17] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#4 main::idx#2 main::$4 ] ( main:2 [ main::entry#4 main::idx#2 main::$4 ] ) always clobbers reg byte a reg byte y +Statement [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' [ main::entry#4 main::idx#3 ] ( main:2 [ main::entry#4 main::idx#3 ] ) always clobbers reg byte a +Statement [22] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) [ main::entry#1 main::idx#4 ] ( main:2 [ main::entry#1 main::idx#4 ] ) always clobbers reg byte a reg byte y +Statement [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#1) goto main::@2 [ main::entry#1 main::idx#4 ] ( main:2 [ main::entry#1 main::idx#4 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ main::entry#4 main::entry#1 ] : zp ZP_WORD:2 , +Potential registers zp ZP_BYTE:4 [ main::idx#7 main::idx#4 ] : zp ZP_BYTE:4 , reg byte x , Potential registers zp ZP_BYTE:5 [ main::$2 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_BYTE:6 [ main::idx#1 ] : zp ZP_BYTE:6 , reg byte x , Potential registers zp ZP_BYTE:7 [ main::$3 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , @@ -555,20 +656,20 @@ Potential registers zp ZP_BYTE:9 [ main::$4 ] : zp ZP_BYTE:9 , reg byte a , reg Potential registers zp ZP_BYTE:10 [ main::idx#3 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 23.69: zp ZP_WORD:2 [ main::entry#2 main::entry#1 ] 22: zp ZP_BYTE:5 [ main::$2 ] 22: zp ZP_BYTE:7 [ main::$3 ] 22: zp ZP_BYTE:9 [ main::$4 ] 19.25: zp ZP_BYTE:4 [ main::idx#5 main::idx#4 ] 16.5: zp ZP_BYTE:10 [ main::idx#3 ] 11: zp ZP_BYTE:6 [ main::idx#1 ] 11: zp ZP_BYTE:8 [ main::idx#2 ] +Uplift Scope [main] 22: zp ZP_BYTE:5 [ main::$2 ] 22: zp ZP_BYTE:7 [ main::$3 ] 22: zp ZP_BYTE:9 [ main::$4 ] 18.33: zp ZP_BYTE:4 [ main::idx#7 main::idx#4 ] 17.42: zp ZP_WORD:2 [ main::entry#4 main::entry#1 ] 16.5: zp ZP_BYTE:10 [ main::idx#3 ] 11: zp ZP_BYTE:6 [ main::idx#1 ] 11: zp ZP_BYTE:8 [ main::idx#2 ] Uplift Scope [Entry] Uplift Scope [] -Uplifting [main] best 1547 combination zp ZP_WORD:2 [ main::entry#2 main::entry#1 ] reg byte a [ main::$2 ] reg byte a [ main::$3 ] reg byte a [ main::$4 ] reg byte x [ main::idx#5 main::idx#4 ] zp ZP_BYTE:10 [ main::idx#3 ] zp ZP_BYTE:6 [ main::idx#1 ] zp ZP_BYTE:8 [ main::idx#2 ] +Uplifting [main] best 1577 combination reg byte a [ main::$2 ] reg byte a [ main::$3 ] reg byte a [ main::$4 ] reg byte x [ main::idx#7 main::idx#4 ] zp ZP_WORD:2 [ main::entry#4 main::entry#1 ] zp ZP_BYTE:10 [ main::idx#3 ] zp ZP_BYTE:6 [ main::idx#1 ] zp ZP_BYTE:8 [ main::idx#2 ] Limited combination testing to 100 combinations of 1536 possible. -Uplifting [Entry] best 1547 combination -Uplifting [] best 1547 combination +Uplifting [Entry] best 1577 combination +Uplifting [] best 1577 combination Attempting to uplift remaining variables inzp ZP_BYTE:10 [ main::idx#3 ] -Uplifting [main] best 1457 combination reg byte x [ main::idx#3 ] +Uplifting [main] best 1487 combination reg byte x [ main::idx#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:6 [ main::idx#1 ] -Uplifting [main] best 1367 combination reg byte x [ main::idx#1 ] +Uplifting [main] best 1397 combination reg byte x [ main::idx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:8 [ main::idx#2 ] -Uplifting [main] best 1277 combination reg byte x [ main::idx#2 ] +Uplifting [main] best 1307 combination reg byte x [ main::idx#2 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -626,61 +727,52 @@ main: { // [9] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta entry1 - // [10] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [10] phi (byte) main::idx#5 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [10] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [10] phi (byte) main::idx#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [10] phi (struct Entry*) main::entry#2 = (const struct Entry*) ENTRIES#0 [phi:main->main::@1#1] -- pssz1=pssc1 + // [10] phi (struct Entry*) main::entry#4 = (const struct Entry*) ENTRIES#0 [phi:main->main::@2#1] -- pssz1=pssc1 lda #<ENTRIES sta entry lda #>ENTRIES sta entry+1 - jmp b1 - // main::@1 - b1: - // [11] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 -- pssc1_neq_pssz1_then_la1 - lda entry+1 - cmp #>0 - bne b2 - lda entry - cmp #<0 - bne b2 - jmp breturn - // main::@return - breturn: - // [12] return - rts + jmp b2 + // [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + // [10] phi (byte) main::idx#7 = (byte) main::idx#4 [phi:main::@1->main::@2#0] -- register_copy + // [10] phi (struct Entry*) main::entry#4 = (struct Entry*) main::entry#1 [phi:main::@1->main::@2#1] -- register_copy + jmp b2 // main::@2 b2: - // [13] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2) -- vbuaa=vbuc1_plus__deref_pbuz1 + // [11] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) -- vbuaa=vbuc1_plus__deref_pbuz1 lda #'0' clc ldy #0 adc (entry),y - // [14] *((const byte*) main::SCREEN#0 + (byte) main::idx#5) ← (byte~) main::$2 -- pbuc1_derefidx_vbuxx=vbuaa + // [12] *((const byte*) main::SCREEN#0 + (byte) main::idx#7) ← (byte~) main::$2 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x - // [15] (byte) main::idx#1 ← ++ (byte) main::idx#5 -- vbuxx=_inc_vbuxx + // [13] (byte) main::idx#1 ← ++ (byte) main::idx#7 -- vbuxx=_inc_vbuxx inx - // [16] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_lo_pptz1_derefidx_vbuc1 + // [14] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_lo_pptz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y - // [17] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa + // [15] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x - // [18] (byte) main::idx#2 ← ++ (byte) main::idx#1 -- vbuxx=_inc_vbuxx + // [16] (byte) main::idx#2 ← ++ (byte) main::idx#1 -- vbuxx=_inc_vbuxx inx - // [19] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_hi_pptz1_derefidx_vbuc1 + // [17] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_hi_pptz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT+1 lda (entry),y - // [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa + // [18] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x - // [21] (byte) main::idx#3 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx + // [19] (byte) main::idx#3 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx inx - // [22] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + // [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 lda #' ' sta SCREEN,x - // [23] (byte) main::idx#4 ← ++ (byte) main::idx#3 -- vbuxx=_inc_vbuxx + // [21] (byte) main::idx#4 ← ++ (byte) main::idx#3 -- vbuxx=_inc_vbuxx inx - // [24] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- pssz1=pptz1_derefidx_vbuc1 + // [22] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- pssz1=pptz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y pha @@ -689,34 +781,50 @@ main: { sta entry+1 pla sta entry - // [10] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - b1_from_b2: - // [10] phi (byte) main::idx#5 = (byte) main::idx#4 [phi:main::@2->main::@1#0] -- register_copy - // [10] phi (struct Entry*) main::entry#2 = (struct Entry*) main::entry#1 [phi:main::@2->main::@1#1] -- register_copy jmp b1 + // main::@1 + b1: + // [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#1) goto main::@2 -- pssc1_neq_pssz1_then_la1 + lda entry+1 + cmp #>0 + bne b2_from_b1 + lda entry + cmp #<0 + bne b2_from_b1 + jmp breturn + // main::@return + breturn: + // [24] return + rts } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend +Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #>0 Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction bend_from_b1: +Removing instruction b2_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: +Removing instruction b2_from_main: +Removing instruction b1: Removing instruction breturn: -Removing instruction b1_from_b2: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -740,8 +848,8 @@ FINAL SYMBOL TABLE (byte*) main::SCREEN (const byte*) main::SCREEN#0 SCREEN = (byte*) 1024 (struct Entry*) main::entry -(struct Entry*) main::entry#1 entry zp ZP_WORD:2 22.0 -(struct Entry*) main::entry#2 entry zp ZP_WORD:2 1.6923076923076923 +(struct Entry*) main::entry#1 entry zp ZP_WORD:2 16.5 +(struct Entry*) main::entry#4 entry zp ZP_WORD:2 0.9166666666666666 (struct Entry*) main::entry0 (struct Entry*) main::entry1 (const struct Entry*) main::entry1#0 entry1 = (const struct Entry*) ENTRIES#0+(byte) 1*(const byte) SIZEOF_STRUCT_ENTRY @@ -751,11 +859,11 @@ FINAL SYMBOL TABLE (byte) main::idx#1 reg byte x 11.0 (byte) main::idx#2 reg byte x 11.0 (byte) main::idx#3 reg byte x 16.5 -(byte) main::idx#4 reg byte x 11.0 -(byte) main::idx#5 reg byte x 8.25 +(byte) main::idx#4 reg byte x 7.333333333333333 +(byte) main::idx#7 reg byte x 11.0 -zp ZP_WORD:2 [ main::entry#2 main::entry#1 ] -reg byte x [ main::idx#5 main::idx#4 ] +zp ZP_WORD:2 [ main::entry#4 main::entry#1 ] +reg byte x [ main::idx#7 main::idx#4 ] reg byte a [ main::$2 ] reg byte x [ main::idx#1 ] reg byte a [ main::$3 ] @@ -765,7 +873,7 @@ reg byte x [ main::idx#3 ] FINAL ASSEMBLER -Score: 1203 +Score: 1173 // File Comments // Minimal struct - simple linked list implemented using pointers @@ -819,71 +927,60 @@ main: { // [9] *((byte*)(const struct Entry*) main::entry1#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta entry1 - // [10] phi from main to main::@1 [phi:main->main::@1] - // [10] phi (byte) main::idx#5 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [10] phi from main to main::@2 [phi:main->main::@2] + // [10] phi (byte) main::idx#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [10] phi (struct Entry*) main::entry#2 = (const struct Entry*) ENTRIES#0 [phi:main->main::@1#1] -- pssz1=pssc1 + // [10] phi (struct Entry*) main::entry#4 = (const struct Entry*) ENTRIES#0 [phi:main->main::@2#1] -- pssz1=pssc1 lda #<ENTRIES sta entry lda #>ENTRIES sta entry+1 - // main::@1 - b1: - // while(entry) - // [11] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 -- pssc1_neq_pssz1_then_la1 - lda entry+1 - cmp #>0 - bne b2 - lda entry - cmp #<0 - bne b2 - // main::@return - // } - // [12] return - rts + // [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [10] phi (byte) main::idx#7 = (byte) main::idx#4 [phi:main::@1->main::@2#0] -- register_copy + // [10] phi (struct Entry*) main::entry#4 = (struct Entry*) main::entry#1 [phi:main::@1->main::@2#1] -- register_copy // main::@2 b2: // '0'+entry->value - // [13] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2) -- vbuaa=vbuc1_plus__deref_pbuz1 + // [11] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#4) -- vbuaa=vbuc1_plus__deref_pbuz1 lda #'0' clc ldy #0 adc (entry),y // SCREEN[idx++] = '0'+entry->value - // [14] *((const byte*) main::SCREEN#0 + (byte) main::idx#5) ← (byte~) main::$2 -- pbuc1_derefidx_vbuxx=vbuaa + // [12] *((const byte*) main::SCREEN#0 + (byte) main::idx#7) ← (byte~) main::$2 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x // SCREEN[idx++] = '0'+entry->value; - // [15] (byte) main::idx#1 ← ++ (byte) main::idx#5 -- vbuxx=_inc_vbuxx + // [13] (byte) main::idx#1 ← ++ (byte) main::idx#7 -- vbuxx=_inc_vbuxx inx // <entry->next - // [16] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_lo_pptz1_derefidx_vbuc1 + // [14] (byte~) main::$3 ← < *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_lo_pptz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y // SCREEN[idx++] = <entry->next - // [17] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa + // [15] *((const byte*) main::SCREEN#0 + (byte) main::idx#1) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x // SCREEN[idx++] = <entry->next; - // [18] (byte) main::idx#2 ← ++ (byte) main::idx#1 -- vbuxx=_inc_vbuxx + // [16] (byte) main::idx#2 ← ++ (byte) main::idx#1 -- vbuxx=_inc_vbuxx inx // >entry->next - // [19] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_hi_pptz1_derefidx_vbuc1 + // [17] (byte~) main::$4 ← > *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- vbuaa=_hi_pptz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT+1 lda (entry),y // SCREEN[idx++] = >entry->next - // [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa + // [18] *((const byte*) main::SCREEN#0 + (byte) main::idx#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x // SCREEN[idx++] = >entry->next; - // [21] (byte) main::idx#3 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx + // [19] (byte) main::idx#3 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx inx // SCREEN[idx++] = ' ' - // [22] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 + // [20] *((const byte*) main::SCREEN#0 + (byte) main::idx#3) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 lda #' ' sta SCREEN,x // SCREEN[idx++] = ' '; - // [23] (byte) main::idx#4 ← ++ (byte) main::idx#3 -- vbuxx=_inc_vbuxx + // [21] (byte) main::idx#4 ← ++ (byte) main::idx#3 -- vbuxx=_inc_vbuxx inx // entry = entry->next - // [24] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- pssz1=pptz1_derefidx_vbuc1 + // [22] (struct Entry*) main::entry#1 ← *((struct Entry**)(struct Entry*) main::entry#4 + (const byte) OFFSET_STRUCT_ENTRY_NEXT) -- pssz1=pptz1_derefidx_vbuc1 ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y pha @@ -892,10 +989,19 @@ main: { sta entry+1 pla sta entry - // [10] phi from main::@2 to main::@1 [phi:main::@2->main::@1] - // [10] phi (byte) main::idx#5 = (byte) main::idx#4 [phi:main::@2->main::@1#0] -- register_copy - // [10] phi (struct Entry*) main::entry#2 = (struct Entry*) main::entry#1 [phi:main::@2->main::@1#1] -- register_copy - jmp b1 + // main::@1 + // while(entry) + // [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#1) goto main::@2 -- pssc1_neq_pssz1_then_la1 + lda entry+1 + cmp #>0 + bne b2 + lda entry + cmp #<0 + bne b2 + // main::@return + // } + // [24] return + rts } // File Data diff --git a/src/test/ref/struct-ptr-5.sym b/src/test/ref/struct-ptr-5.sym index 9d6b2adb9..7b72e51a8 100644 --- a/src/test/ref/struct-ptr-5.sym +++ b/src/test/ref/struct-ptr-5.sym @@ -17,8 +17,8 @@ (byte*) main::SCREEN (const byte*) main::SCREEN#0 SCREEN = (byte*) 1024 (struct Entry*) main::entry -(struct Entry*) main::entry#1 entry zp ZP_WORD:2 22.0 -(struct Entry*) main::entry#2 entry zp ZP_WORD:2 1.6923076923076923 +(struct Entry*) main::entry#1 entry zp ZP_WORD:2 16.5 +(struct Entry*) main::entry#4 entry zp ZP_WORD:2 0.9166666666666666 (struct Entry*) main::entry0 (struct Entry*) main::entry1 (const struct Entry*) main::entry1#0 entry1 = (const struct Entry*) ENTRIES#0+(byte) 1*(const byte) SIZEOF_STRUCT_ENTRY @@ -28,11 +28,11 @@ (byte) main::idx#1 reg byte x 11.0 (byte) main::idx#2 reg byte x 11.0 (byte) main::idx#3 reg byte x 16.5 -(byte) main::idx#4 reg byte x 11.0 -(byte) main::idx#5 reg byte x 8.25 +(byte) main::idx#4 reg byte x 7.333333333333333 +(byte) main::idx#7 reg byte x 11.0 -zp ZP_WORD:2 [ main::entry#2 main::entry#1 ] -reg byte x [ main::idx#5 main::idx#4 ] +zp ZP_WORD:2 [ main::entry#4 main::entry#1 ] +reg byte x [ main::idx#7 main::idx#4 ] reg byte a [ main::$2 ] reg byte x [ main::idx#1 ] reg byte a [ main::$3 ] diff --git a/src/test/ref/ternary-1.asm b/src/test/ref/ternary-1.asm index 3fb22b231..1d4c56829 100644 --- a/src/test/ref/ternary-1.asm +++ b/src/test/ref/ternary-1.asm @@ -5,11 +5,6 @@ main: { .label SCREEN = $400 ldx #0 - b1: - cpx #5 - bcc b2 - lda #'b' - jmp b3 b2: lda #'a' b3: @@ -18,4 +13,9 @@ main: { cpx #$a bne b1 rts + b1: + cpx #5 + bcc b2 + lda #'b' + jmp b3 } diff --git a/src/test/ref/ternary-1.cfg b/src/test/ref/ternary-1.cfg index e09d5adcf..4519d8f3c 100644 --- a/src/test/ref/ternary-1.cfg +++ b/src/test/ref/ternary-1.cfg @@ -9,20 +9,20 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@3/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) 5) goto main::@2 - to:main::@3 -main::@2: scope:[main] from main::@1 - [7] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#7 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) to:main::@3 main::@3: scope:[main] from main::@1 main::@2 - [8] (byte~) main::$3 ← phi( main::@2/(byte) 'a' main::@1/(byte) 'b' ) - [9] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte~) main::$3 - [10] (byte) main::i#1 ← ++ (byte) main::i#2 - [11] if((byte) main::i#1!=(byte) $a) goto main::@1 + [6] (byte) main::i#6 ← phi( main::@2/(byte) main::i#7 main::@1/(byte) main::i#1 ) + [6] (byte~) main::$3 ← phi( main::@2/(byte) 'a' main::@1/(byte) 'b' ) + [7] *((const byte*) main::SCREEN#0 + (byte) main::i#6) ← (byte~) main::$3 + [8] (byte) main::i#1 ← ++ (byte) main::i#6 + [9] if((byte) main::i#1!=(byte) $a) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [12] return + [10] return to:@return +main::@1: scope:[main] from main::@3 + [11] if((byte) main::i#1<(byte) 5) goto main::@2 + to:main::@3 diff --git a/src/test/ref/ternary-1.log b/src/test/ref/ternary-1.log index f9e3a9eb3..9ada0e232 100644 --- a/src/test/ref/ternary-1.log +++ b/src/test/ref/ternary-1.log @@ -89,32 +89,74 @@ Constant (const byte) main::$1 = 'b' Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,9)) goto main::@1 to (number) $a +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@4/(byte) main::i#1 ) + [1] if((byte) main::i#2<(byte) 5) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + to:main::@4 +main::@3: scope:[main] from main::@1 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@3 + [2] (byte) main::i#6 ← phi( ) + [2] (byte~) main::$3 ← phi( main::@2/(const byte) main::$2 main::@3/(const byte) main::$1 ) + [3] *((const byte*) main::SCREEN#0 + (byte) main::i#6) ← (byte~) main::$3 + [4] (byte) main::i#1 ← ++ (byte) main::i#6 + [5] if((byte) main::i#1!=(number) $a) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [6] return + to:@return +@1: scope:[] from @begin + [7] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $a in if((byte) main::i#1!=(number) $a) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $a Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $a Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte) main::i#1 = (byte) main::i#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#9 (const byte) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +if() condition always true - replacing block destination [11] if((const byte) main::i#0<(byte) 5) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Alias (byte) main::i#1 = (byte) main::i#8 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::$1 = (byte) 'b' Constant inlined main::i#0 = (byte) 0 Constant inlined main::$2 = (byte) 'a' Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@8(between main::@4 and main::@1) +Added new block during phi lifting main::@8(between main::@1 and main::@2) 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 Adding NOP phi() at start of main -Adding NOP phi() at start of main::@3 -Adding NOP phi() at start of main::@2 +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 -Created 2 initial phi equivalence classes -Coalesced [14] main::i#6 ← main::i#1 +Created 3 initial phi equivalence classes +Coalesced [8] main::i#11 ← main::i#7 +Coalesced [15] main::i#12 ← main::i#1 +Coalesced (already) [16] main::i#10 ← main::i#1 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@8 Renumbering block main::@4 to main::@3 @@ -122,7 +164,6 @@ Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@2 FINAL CONTROL FLOW GRAPH @begin: scope:[] from @@ -136,41 +177,42 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@3/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) 5) goto main::@2 - to:main::@3 -main::@2: scope:[main] from main::@1 - [7] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#7 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) to:main::@3 main::@3: scope:[main] from main::@1 main::@2 - [8] (byte~) main::$3 ← phi( main::@2/(byte) 'a' main::@1/(byte) 'b' ) - [9] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte~) main::$3 - [10] (byte) main::i#1 ← ++ (byte) main::i#2 - [11] if((byte) main::i#1!=(byte) $a) goto main::@1 + [6] (byte) main::i#6 ← phi( main::@2/(byte) main::i#7 main::@1/(byte) main::i#1 ) + [6] (byte~) main::$3 ← phi( main::@2/(byte) 'a' main::@1/(byte) 'b' ) + [7] *((const byte*) main::SCREEN#0 + (byte) main::i#6) ← (byte~) main::$3 + [8] (byte) main::i#1 ← ++ (byte) main::i#6 + [9] if((byte) main::i#1!=(byte) $a) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [12] return + [10] return to:@return +main::@1: scope:[main] from main::@3 + [11] if((byte) main::i#1<(byte) 5) goto main::@2 + to:main::@3 VARIABLE REGISTER WEIGHTS (void()) main() -(byte~) main::$3 11.0 +(byte~) main::$3 101.0 (byte*) main::SCREEN (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#2 8.8 +(byte) main::i#1 168.33333333333331 +(byte) main::i#6 157.0 +(byte) main::i#7 112.0 Initial phi equivalence classes -[ main::i#2 main::i#1 ] [ main::$3 ] +[ main::i#6 main::i#7 main::i#1 ] Complete equivalence classes -[ main::i#2 main::i#1 ] [ main::$3 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::$3 ] +[ main::i#6 main::i#7 main::i#1 ] +Allocated zp ZP_BYTE:2 [ main::$3 ] +Allocated zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] INITIAL ASM Target platform is c64basic @@ -200,71 +242,70 @@ bend: // main main: { .label SCREEN = $400 - .label _3 = 3 - .label i = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + .label _3 = 2 + .label i = 3 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2<(byte) 5) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #5 - bcc b2_from_b1 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [8] phi (byte~) main::$3 = (byte) 'b' [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 - lda #'b' - sta _3 - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: - // [8] phi (byte~) main::$3 = (byte) 'a' [phi:main::@2->main::@3#0] -- vbuz1=vbuc1 + // [6] phi (byte) main::i#6 = (byte) main::i#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) 'a' [phi:main::@2->main::@3#1] -- vbuz1=vbuc1 lda #'a' sta _3 jmp b3 // main::@3 b3: - // [9] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte~) main::$3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [7] *((const byte*) main::SCREEN#0 + (byte) main::i#6) ← (byte~) main::$3 -- pbuc1_derefidx_vbuz1=vbuz2 lda _3 ldy i sta SCREEN,y - // [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + // [8] (byte) main::i#1 ← ++ (byte) main::i#6 -- vbuz1=_inc_vbuz1 inc i - // [11] if((byte) main::i#1!=(byte) $a) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + // [9] if((byte) main::i#1!=(byte) $a) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$a cmp i - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [12] return + // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::i#1<(byte) 5) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #5 + bcc b2_from_b1 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [6] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) 'b' [phi:main::@1->main::@3#1] -- vbuz1=vbuc1 + lda #'b' + sta _3 + jmp b3 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::$3 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:2 [ main::$3 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 25.3: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 11: zp ZP_BYTE:3 [ main::$3 ] +Uplift Scope [main] 437.33: zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] 101: zp ZP_BYTE:2 [ main::$3 ] Uplift Scope [] -Uplifting [main] best 418 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$3 ] -Uplifting [] best 418 combination +Uplifting [main] best 2998 combination reg byte x [ main::i#6 main::i#7 main::i#1 ] reg byte a [ main::$3 ] +Uplifting [] best 2998 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -293,79 +334,75 @@ bend: // main main: { .label SCREEN = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #5 - bcc b2_from_b1 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [8] phi (byte~) main::$3 = (byte) 'b' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'b' - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: - // [8] phi (byte~) main::$3 = (byte) 'a' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 + // [6] phi (byte) main::i#6 = (byte) main::i#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) 'a' [phi:main::@2->main::@3#1] -- vbuaa=vbuc1 lda #'a' jmp b3 // main::@3 b3: - // [9] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa + // [7] *((const byte*) main::SCREEN#0 + (byte) main::i#6) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x - // [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::i#1 ← ++ (byte) main::i#6 -- vbuxx=_inc_vbuxx inx - // [11] if((byte) main::i#1!=(byte) $a) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + // [9] if((byte) main::i#1!=(byte) $a) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$a - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [12] return + // [10] return rts + // main::@1 + b1: + // [11] if((byte) main::i#1<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #5 + bcc b2_from_b1 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [6] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) 'b' [phi:main::@1->main::@3#1] -- vbuaa=vbuc1 + lda #'b' + jmp b3 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing label b2_from_b1 with b2 -Replacing label b1_from_b3 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b3: Removing instruction b2_from_b1: Removing instruction b3_from_b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b3_from_b1: +Removing instruction b2_from_main: Removing instruction breturn: +Removing instruction b3_from_b1: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 +Removing instruction jmp b2 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -375,7 +412,7 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (void()) main() -(byte~) main::$3 reg byte a 11.0 +(byte~) main::$3 reg byte a 101.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -383,15 +420,16 @@ FINAL SYMBOL TABLE (byte*) main::SCREEN (const byte*) main::SCREEN#0 SCREEN = (byte*) 1024 (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 8.8 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#6 reg byte x 157.0 +(byte) main::i#7 reg byte x 112.0 -reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$3 ] +reg byte x [ main::i#6 main::i#7 main::i#1 ] FINAL ASSEMBLER -Score: 256 +Score: 2326 // File Comments // Tests the ternary operator @@ -410,42 +448,43 @@ Score: 256 // main main: { .label SCREEN = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#0] -- register_copy - // main::@1 - b1: - // i<5?'a':'b' - // [6] if((byte) main::i#2<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #5 - bcc b2 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - // [8] phi (byte~) main::$3 = (byte) 'b' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'b' - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - // [8] phi (byte~) main::$3 = (byte) 'a' [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi (byte) main::i#6 = (byte) main::i#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) 'a' [phi:main::@2->main::@3#1] -- vbuaa=vbuc1 lda #'a' // main::@3 b3: // SCREEN[i] = i<5?'a':'b' - // [9] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa + // [7] *((const byte*) main::SCREEN#0 + (byte) main::i#6) ← (byte~) main::$3 -- pbuc1_derefidx_vbuxx=vbuaa sta SCREEN,x // for( byte i: 0..9) - // [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx + // [8] (byte) main::i#1 ← ++ (byte) main::i#6 -- vbuxx=_inc_vbuxx inx - // [11] if((byte) main::i#1!=(byte) $a) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + // [9] if((byte) main::i#1!=(byte) $a) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$a bne b1 // main::@return // } - // [12] return + // [10] return rts + // main::@1 + b1: + // i<5?'a':'b' + // [11] if((byte) main::i#1<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #5 + bcc b2 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [6] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) 'b' [phi:main::@1->main::@3#1] -- vbuaa=vbuc1 + lda #'b' + jmp b3 } // File Data diff --git a/src/test/ref/ternary-1.sym b/src/test/ref/ternary-1.sym index 2949ea515..c624b19d5 100644 --- a/src/test/ref/ternary-1.sym +++ b/src/test/ref/ternary-1.sym @@ -2,7 +2,7 @@ (label) @begin (label) @end (void()) main() -(byte~) main::$3 reg byte a 11.0 +(byte~) main::$3 reg byte a 101.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -10,8 +10,9 @@ (byte*) main::SCREEN (const byte*) main::SCREEN#0 SCREEN = (byte*) 1024 (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 8.8 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#6 reg byte x 157.0 +(byte) main::i#7 reg byte x 112.0 -reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$3 ] +reg byte x [ main::i#6 main::i#7 main::i#1 ] diff --git a/src/test/ref/ternary-inference.asm b/src/test/ref/ternary-inference.asm index 90df7b35e..874b75b14 100644 --- a/src/test/ref/ternary-inference.asm +++ b/src/test/ref/ternary-inference.asm @@ -5,11 +5,6 @@ main: { .label screen = $400 ldx #0 - b1: - cpx #5 - bcc b2 - lda #'0' - jmp b3 b2: lda #$57 b3: @@ -21,4 +16,9 @@ main: { cpx #$b bne b1 rts + b1: + cpx #5 + bcc b2 + lda #'0' + jmp b3 } diff --git a/src/test/ref/ternary-inference.cfg b/src/test/ref/ternary-inference.cfg index 87fb263b1..e62d5acd4 100644 --- a/src/test/ref/ternary-inference.cfg +++ b/src/test/ref/ternary-inference.cfg @@ -9,21 +9,21 @@ [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@3/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) 5) goto main::@2 - to:main::@3 -main::@2: scope:[main] from main::@1 - [7] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#7 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) to:main::@3 main::@3: scope:[main] from main::@1 main::@2 - [8] (byte~) main::$3 ← phi( main::@2/(byte) $57 main::@1/(byte) '0' ) - [9] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 - [10] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte~) main::$4 - [11] (byte) main::i#1 ← ++ (byte) main::i#2 - [12] if((byte) main::i#1!=(byte) $b) goto main::@1 + [6] (byte) main::i#6 ← phi( main::@2/(byte) main::i#7 main::@1/(byte) main::i#1 ) + [6] (byte~) main::$3 ← phi( main::@2/(byte) $57 main::@1/(byte) '0' ) + [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 + [8] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte~) main::$4 + [9] (byte) main::i#1 ← ++ (byte) main::i#6 + [10] if((byte) main::i#1!=(byte) $b) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [13] return + [11] return to:@return +main::@1: scope:[main] from main::@3 + [12] if((byte) main::i#1<(byte) 5) goto main::@2 + to:main::@3 diff --git a/src/test/ref/ternary-inference.log b/src/test/ref/ternary-inference.log index 1853aeaac..4326cec32 100644 --- a/src/test/ref/ternary-inference.log +++ b/src/test/ref/ternary-inference.log @@ -105,32 +105,75 @@ Constant (const byte) main::$1 = '0' Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [12] main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value [14] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@4/(byte) main::i#1 ) + [1] if((byte) main::i#2<(byte) 5) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + to:main::@4 +main::@3: scope:[main] from main::@1 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@3 + [2] (byte) main::i#6 ← phi( ) + [2] (byte~) main::$3 ← phi( main::@2/(const byte) main::$2 main::@3/(const byte) main::$1 ) + [3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 + [4] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte~) main::$4 + [5] (byte) main::i#1 ← ++ (byte) main::i#6 + [6] if((byte) main::i#1!=(number) $b) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [7] return + to:@return +@1: scope:[] from @begin + [8] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $b Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte) main::i#1 = (byte) main::i#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#9 (const byte) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Removing PHI-reference to removed block (main::@1_1) in block main::@3 +if() condition always true - replacing block destination [12] if((const byte) main::i#0<(byte) 5) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Alias (byte) main::i#1 = (byte) main::i#8 +Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::$1 = (byte) '0' Constant inlined main::i#0 = (byte) 0 Constant inlined main::$2 = (byte) $57 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting main::@8(between main::@4 and main::@1) +Added new block during phi lifting main::@8(between main::@1 and main::@2) 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 Adding NOP phi() at start of main -Adding NOP phi() at start of main::@3 -Adding NOP phi() at start of main::@2 +Adding NOP phi() at start of main::@1_1 CALL GRAPH Calls in [] to main:2 -Created 2 initial phi equivalence classes -Coalesced [15] main::i#6 ← main::i#1 +Created 3 initial phi equivalence classes +Coalesced [8] main::i#11 ← main::i#7 +Coalesced [16] main::i#12 ← main::i#1 +Coalesced (already) [17] main::i#10 ← main::i#1 Coalesced down to 2 phi equivalence classes Culled Empty Block (label) @2 +Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@8 Renumbering block main::@4 to main::@3 @@ -138,7 +181,6 @@ Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@2 FINAL CONTROL FLOW GRAPH @begin: scope:[] from @@ -152,45 +194,46 @@ FINAL CONTROL FLOW GRAPH [3] phi() main: scope:[main] from @1 [4] phi() - to:main::@1 -main::@1: scope:[main] from main main::@3 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@3/(byte) main::i#1 ) - [6] if((byte) main::i#2<(byte) 5) goto main::@2 - to:main::@3 -main::@2: scope:[main] from main::@1 - [7] phi() + to:main::@2 +main::@2: scope:[main] from main main::@1 + [5] (byte) main::i#7 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 ) to:main::@3 main::@3: scope:[main] from main::@1 main::@2 - [8] (byte~) main::$3 ← phi( main::@2/(byte) $57 main::@1/(byte) '0' ) - [9] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 - [10] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte~) main::$4 - [11] (byte) main::i#1 ← ++ (byte) main::i#2 - [12] if((byte) main::i#1!=(byte) $b) goto main::@1 + [6] (byte) main::i#6 ← phi( main::@2/(byte) main::i#7 main::@1/(byte) main::i#1 ) + [6] (byte~) main::$3 ← phi( main::@2/(byte) $57 main::@1/(byte) '0' ) + [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 + [8] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte~) main::$4 + [9] (byte) main::i#1 ← ++ (byte) main::i#6 + [10] if((byte) main::i#1!=(byte) $b) goto main::@1 to:main::@return main::@return: scope:[main] from main::@3 - [13] return + [11] return to:@return +main::@1: scope:[main] from main::@3 + [12] if((byte) main::i#1<(byte) 5) goto main::@2 + to:main::@3 VARIABLE REGISTER WEIGHTS (void()) main() -(byte~) main::$3 11.0 -(byte~) main::$4 22.0 +(byte~) main::$3 101.0 +(byte~) main::$4 202.0 (byte) main::i -(byte) main::i#1 16.5 -(byte) main::i#2 9.166666666666666 +(byte) main::i#1 168.33333333333331 +(byte) main::i#6 138.33333333333331 +(byte) main::i#7 112.0 (byte*) main::screen Initial phi equivalence classes -[ main::i#2 main::i#1 ] [ main::$3 ] +[ main::i#6 main::i#7 main::i#1 ] Added variable main::$4 to zero page equivalence class [ main::$4 ] Complete equivalence classes -[ main::i#2 main::i#1 ] [ main::$3 ] +[ main::i#6 main::i#7 main::i#1 ] [ main::$4 ] -Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_BYTE:3 [ main::$3 ] +Allocated zp ZP_BYTE:2 [ main::$3 ] +Allocated zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] Allocated zp ZP_BYTE:4 [ main::$4 ] INITIAL ASM @@ -221,81 +264,80 @@ bend: // main main: { .label screen = $400 - .label _3 = 3 + .label _3 = 2 .label _4 = 4 - .label i = 2 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + .label i = 3 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 lda #0 sta i - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2<(byte) 5) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #5 - bcc b2_from_b1 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [8] phi (byte~) main::$3 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 - lda #'0' - sta _3 - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: - // [8] phi (byte~) main::$3 = (byte) $57 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1 + // [6] phi (byte) main::i#6 = (byte) main::i#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) $57 [phi:main::@2->main::@3#1] -- vbuz1=vbuc1 lda #$57 sta _3 jmp b3 // main::@3 b3: - // [9] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 + // [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 -- vbuz1=vbuz2_plus_vbuz3 lda _3 clc adc i sta _4 - // [10] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuz1=vbuz2 + // [8] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte~) main::$4 -- pbuc1_derefidx_vbuz1=vbuz2 lda _4 ldy i sta screen,y - // [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + // [9] (byte) main::i#1 ← ++ (byte) main::i#6 -- vbuz1=_inc_vbuz1 inc i - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + // [10] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$b cmp i - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [13] return + // [11] return rts + // main::@1 + b1: + // [12] if((byte) main::i#1<(byte) 5) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #5 + bcc b2_from_b1 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [6] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) '0' [phi:main::@1->main::@3#1] -- vbuz1=vbuc1 + lda #'0' + sta _3 + jmp b3 } // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [9] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::$4 ] ( main:2 [ main::i#2 main::$4 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Statement [9] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::$4 ] ( main:2 [ main::i#2 main::$4 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:3 [ main::$3 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , +Statement [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 [ main::i#6 main::$4 ] ( main:2 [ main::i#6 main::$4 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] +Statement [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 [ main::i#6 main::$4 ] ( main:2 [ main::i#6 main::$4 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::$3 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , Potential registers zp ZP_BYTE:4 [ main::$4 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 25.67: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 22: zp ZP_BYTE:4 [ main::$4 ] 11: zp ZP_BYTE:3 [ main::$3 ] +Uplift Scope [main] 418.67: zp ZP_BYTE:3 [ main::i#6 main::i#7 main::i#1 ] 202: zp ZP_BYTE:4 [ main::$4 ] 101: zp ZP_BYTE:2 [ main::$3 ] Uplift Scope [] -Uplifting [main] best 498 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$4 ] reg byte a [ main::$3 ] -Uplifting [] best 498 combination +Uplifting [main] best 3798 combination reg byte x [ main::i#6 main::i#7 main::i#1 ] reg byte a [ main::$4 ] reg byte a [ main::$3 ] +Uplifting [] best 3798 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -324,83 +366,79 @@ bend: // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - jmp b1 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - b1_from_b3: - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#0] -- register_copy - jmp b1 - // main::@1 - b1: - // [6] if((byte) main::i#2<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #5 - bcc b2_from_b1 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - b3_from_b1: - // [8] phi (byte~) main::$3 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'0' - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + jmp b2 + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy jmp b2 // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] b3_from_b2: - // [8] phi (byte~) main::$3 = (byte) $57 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 + // [6] phi (byte) main::i#6 = (byte) main::i#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) $57 [phi:main::@2->main::@3#1] -- vbuaa=vbuc1 lda #$57 jmp b3 // main::@3 b3: - // [9] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuxx + // [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 -- vbuaa=vbuaa_plus_vbuxx stx $ff clc adc $ff - // [10] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa + // [8] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa sta screen,x - // [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx + // [9] (byte) main::i#1 ← ++ (byte) main::i#6 -- vbuxx=_inc_vbuxx inx - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + // [10] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$b - bne b1_from_b3 + bne b1 jmp breturn // main::@return breturn: - // [13] return + // [11] return rts + // main::@1 + b1: + // [12] if((byte) main::i#1<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #5 + bcc b2_from_b1 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + // [6] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) '0' [phi:main::@1->main::@3#1] -- vbuaa=vbuc1 + lda #'0' + jmp b3 } // File Data ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend -Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing label b2_from_b1 with b2 -Replacing label b1_from_b3 with b1 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: -Removing instruction b1_from_b3: Removing instruction b2_from_b1: Removing instruction b3_from_b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction b3_from_b1: +Removing instruction b2_from_main: Removing instruction breturn: +Removing instruction b3_from_b1: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 +Removing instruction jmp b2 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination @@ -410,25 +448,26 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (void()) main() -(byte~) main::$3 reg byte a 11.0 -(byte~) main::$4 reg byte a 22.0 +(byte~) main::$3 reg byte a 101.0 +(byte~) main::$4 reg byte a 202.0 (label) main::@1 (label) main::@2 (label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 9.166666666666666 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#6 reg byte x 138.33333333333331 +(byte) main::i#7 reg byte x 112.0 (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$3 ] +reg byte x [ main::i#6 main::i#7 main::i#1 ] reg byte a [ main::$4 ] FINAL ASSEMBLER -Score: 336 +Score: 3126 // File Comments // Type inference into the ternary operator @@ -447,47 +486,48 @@ Score: 336 // main main: { .label screen = $400 - // [5] phi from main to main::@1 [phi:main->main::@1] - // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + // [5] phi from main to main::@2 [phi:main->main::@2] + // [5] phi (byte) main::i#7 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 ldx #0 - // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] - // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@3->main::@1#0] -- register_copy - // main::@1 - b1: - // i<5?0x57:'0' - // [6] if((byte) main::i#2<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #5 - bcc b2 - // [8] phi from main::@1 to main::@3 [phi:main::@1->main::@3] - // [8] phi (byte~) main::$3 = (byte) '0' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 - lda #'0' - jmp b3 - // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [5] phi (byte) main::i#7 = (byte) main::i#1 [phi:main::@1->main::@2#0] -- register_copy // main::@2 b2: - // [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - // [8] phi (byte~) main::$3 = (byte) $57 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1 + // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [6] phi (byte) main::i#6 = (byte) main::i#7 [phi:main::@2->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) $57 [phi:main::@2->main::@3#1] -- vbuaa=vbuc1 lda #$57 // main::@3 b3: // (i<5?0x57:'0')+i - // [9] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuaa=vbuaa_plus_vbuxx + // [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#6 -- vbuaa=vbuaa_plus_vbuxx stx $ff clc adc $ff // screen[i] = (i<5?0x57:'0')+i - // [10] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa + // [8] *((const byte*) main::screen#0 + (byte) main::i#6) ← (byte~) main::$4 -- pbuc1_derefidx_vbuxx=vbuaa sta screen,x // for(byte i: 0..10) - // [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx + // [9] (byte) main::i#1 ← ++ (byte) main::i#6 -- vbuxx=_inc_vbuxx inx - // [12] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + // [10] if((byte) main::i#1!=(byte) $b) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$b bne b1 // main::@return // } - // [13] return + // [11] return rts + // main::@1 + b1: + // i<5?0x57:'0' + // [12] if((byte) main::i#1<(byte) 5) goto main::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #5 + bcc b2 + // [6] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [6] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@1->main::@3#0] -- register_copy + // [6] phi (byte~) main::$3 = (byte) '0' [phi:main::@1->main::@3#1] -- vbuaa=vbuc1 + lda #'0' + jmp b3 } // File Data diff --git a/src/test/ref/ternary-inference.sym b/src/test/ref/ternary-inference.sym index fc7afc695..bb32d290d 100644 --- a/src/test/ref/ternary-inference.sym +++ b/src/test/ref/ternary-inference.sym @@ -2,18 +2,19 @@ (label) @begin (label) @end (void()) main() -(byte~) main::$3 reg byte a 11.0 -(byte~) main::$4 reg byte a 22.0 +(byte~) main::$3 reg byte a 101.0 +(byte~) main::$4 reg byte a 202.0 (label) main::@1 (label) main::@2 (label) main::@3 (label) main::@return (byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 9.166666666666666 +(byte) main::i#1 reg byte x 168.33333333333331 +(byte) main::i#6 reg byte x 138.33333333333331 +(byte) main::i#7 reg byte x 112.0 (byte*) main::screen (const byte*) main::screen#0 screen = (byte*) 1024 -reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$3 ] +reg byte x [ main::i#6 main::i#7 main::i#1 ] reg byte a [ main::$4 ] diff --git a/src/test/ref/unroll-loop-modifyvar.log b/src/test/ref/unroll-loop-modifyvar.log index 3bea6e4ff..ae3ba49ea 100644 --- a/src/test/ref/unroll-loop-modifyvar.log +++ b/src/test/ref/unroll-loop-modifyvar.log @@ -67,7 +67,31 @@ Constant (const byte*) main::SCREEN#0 = (byte*) 1024 Constant (const byte) main::a#0 = 3 Successful SSA optimization Pass2ConstantIdentification Unrolling loop Loop head: main::@1 tails: main::@1 blocks: main::@1 -Creating PHI for main::a#1 in block main::@2 - (byte) main::a#4 ← phi( main::@1/(byte) main::a#1 ) +GRAPH (NEW VERSIONS for main::a#1) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [0] (byte) main::a#2 ← phi( main/(const byte) main::a#0 main::@1/(byte) main::a#1 ) + [1] *((const byte*) main::SCREEN#0 + (byte) main::a#2) ← (byte) main::a#2 + [2] (byte) main::a#1 ← ++ (byte) main::a#2 + [3] unroll if((byte) main::a#1<(byte) $e) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) main::a#4 ← phi( ) + [4] *((const byte*) main::SCREEN#0 + (byte) main::a#4) ← (byte) main::a#4 + to:main::@return +main::@return: scope:[main] from main::@2 + [5] return + to:@return +@1: scope:[] from @begin + [6] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#2 (const byte) main::a#0 Successful SSA optimization Pass2IdenticalPhiElimination @@ -83,7 +107,34 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#4 = (byte) main::a#6 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_1 tails: main::@1_1 blocks: main::@1_1 -Creating PHI for main::a#4 in block main::@2 - (byte) main::a#7 ← phi( main::@1_1/(byte) main::a#4 ) +GRAPH (NEW VERSIONS for main::a#4) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 main::@1_1 + [2] (byte) main::a#5 ← phi( main::@1_1/(byte) main::a#4 main::@1/(const byte) main::a#1 ) + [3] *((const byte*) main::SCREEN#0 + (byte) main::a#5) ← (byte) main::a#5 + [4] (byte) main::a#4 ← ++ (byte) main::a#5 + [5] unroll if((byte) main::a#4<(byte) $e) goto main::@1_1 + to:main::@2 +main::@2: scope:[main] from main::@1_1 + (byte) main::a#7 ← phi( ) + [6] *((const byte*) main::SCREEN#0 + (byte) main::a#7) ← (byte) main::a#7 + to:main::@return +main::@return: scope:[main] from main::@2 + [7] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#5 (const byte) main::a#1 Successful SSA optimization Pass2IdenticalPhiElimination @@ -99,7 +150,37 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#7 = (byte) main::a#9 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_2 tails: main::@1_2 blocks: main::@1_2 -Creating PHI for main::a#7 in block main::@2 - (byte) main::a#10 ← phi( main::@1_2/(byte) main::a#7 ) +GRAPH (NEW VERSIONS for main::a#7) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 main::@1_2 + [3] (byte) main::a#8 ← phi( main::@1_2/(byte) main::a#7 main::@1_1/(const byte) main::a#4 ) + [4] *((const byte*) main::SCREEN#0 + (byte) main::a#8) ← (byte) main::a#8 + [5] (byte) main::a#7 ← ++ (byte) main::a#8 + [6] unroll if((byte) main::a#7<(byte) $e) goto main::@1_2 + to:main::@2 +main::@2: scope:[main] from main::@1_2 + (byte) main::a#10 ← phi( ) + [7] *((const byte*) main::SCREEN#0 + (byte) main::a#10) ← (byte) main::a#10 + to:main::@return +main::@return: scope:[main] from main::@2 + [8] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#8 (const byte) main::a#4 Successful SSA optimization Pass2IdenticalPhiElimination @@ -115,7 +196,40 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#10 = (byte) main::a#12 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_3 tails: main::@1_3 blocks: main::@1_3 -Creating PHI for main::a#10 in block main::@2 - (byte) main::a#13 ← phi( main::@1_3/(byte) main::a#10 ) +GRAPH (NEW VERSIONS for main::a#10) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 main::@1_3 + [4] (byte) main::a#11 ← phi( main::@1_3/(byte) main::a#10 main::@1_2/(const byte) main::a#7 ) + [5] *((const byte*) main::SCREEN#0 + (byte) main::a#11) ← (byte) main::a#11 + [6] (byte) main::a#10 ← ++ (byte) main::a#11 + [7] unroll if((byte) main::a#10<(byte) $e) goto main::@1_3 + to:main::@2 +main::@2: scope:[main] from main::@1_3 + (byte) main::a#13 ← phi( ) + [8] *((const byte*) main::SCREEN#0 + (byte) main::a#13) ← (byte) main::a#13 + to:main::@return +main::@return: scope:[main] from main::@2 + [9] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#11 (const byte) main::a#7 Successful SSA optimization Pass2IdenticalPhiElimination @@ -131,7 +245,43 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#13 = (byte) main::a#15 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_4 tails: main::@1_4 blocks: main::@1_4 -Creating PHI for main::a#13 in block main::@2 - (byte) main::a#16 ← phi( main::@1_4/(byte) main::a#13 ) +GRAPH (NEW VERSIONS for main::a#13) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 + [4] *((const byte*) main::SCREEN#0 + (const byte) main::a#7) ← (const byte) main::a#7 + to:main::@1_4 +main::@1_4: scope:[main] from main::@1_3 main::@1_4 + [5] (byte) main::a#14 ← phi( main::@1_4/(byte) main::a#13 main::@1_3/(const byte) main::a#10 ) + [6] *((const byte*) main::SCREEN#0 + (byte) main::a#14) ← (byte) main::a#14 + [7] (byte) main::a#13 ← ++ (byte) main::a#14 + [8] unroll if((byte) main::a#13<(byte) $e) goto main::@1_4 + to:main::@2 +main::@2: scope:[main] from main::@1_4 + (byte) main::a#16 ← phi( ) + [9] *((const byte*) main::SCREEN#0 + (byte) main::a#16) ← (byte) main::a#16 + to:main::@return +main::@return: scope:[main] from main::@2 + [10] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#14 (const byte) main::a#10 Successful SSA optimization Pass2IdenticalPhiElimination @@ -147,7 +297,46 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#16 = (byte) main::a#18 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_5 tails: main::@1_5 blocks: main::@1_5 -Creating PHI for main::a#16 in block main::@2 - (byte) main::a#19 ← phi( main::@1_5/(byte) main::a#16 ) +GRAPH (NEW VERSIONS for main::a#16) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 + [4] *((const byte*) main::SCREEN#0 + (const byte) main::a#7) ← (const byte) main::a#7 + to:main::@1_4 +main::@1_4: scope:[main] from main::@1_3 + [5] *((const byte*) main::SCREEN#0 + (const byte) main::a#10) ← (const byte) main::a#10 + to:main::@1_5 +main::@1_5: scope:[main] from main::@1_4 main::@1_5 + [6] (byte) main::a#17 ← phi( main::@1_5/(byte) main::a#16 main::@1_4/(const byte) main::a#13 ) + [7] *((const byte*) main::SCREEN#0 + (byte) main::a#17) ← (byte) main::a#17 + [8] (byte) main::a#16 ← ++ (byte) main::a#17 + [9] unroll if((byte) main::a#16<(byte) $e) goto main::@1_5 + to:main::@2 +main::@2: scope:[main] from main::@1_5 + (byte) main::a#19 ← phi( ) + [10] *((const byte*) main::SCREEN#0 + (byte) main::a#19) ← (byte) main::a#19 + to:main::@return +main::@return: scope:[main] from main::@2 + [11] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#17 (const byte) main::a#13 Successful SSA optimization Pass2IdenticalPhiElimination @@ -163,7 +352,49 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#19 = (byte) main::a#21 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_6 tails: main::@1_6 blocks: main::@1_6 -Creating PHI for main::a#19 in block main::@2 - (byte) main::a#22 ← phi( main::@1_6/(byte) main::a#19 ) +GRAPH (NEW VERSIONS for main::a#19) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 + [4] *((const byte*) main::SCREEN#0 + (const byte) main::a#7) ← (const byte) main::a#7 + to:main::@1_4 +main::@1_4: scope:[main] from main::@1_3 + [5] *((const byte*) main::SCREEN#0 + (const byte) main::a#10) ← (const byte) main::a#10 + to:main::@1_5 +main::@1_5: scope:[main] from main::@1_4 + [6] *((const byte*) main::SCREEN#0 + (const byte) main::a#13) ← (const byte) main::a#13 + to:main::@1_6 +main::@1_6: scope:[main] from main::@1_5 main::@1_6 + [7] (byte) main::a#20 ← phi( main::@1_6/(byte) main::a#19 main::@1_5/(const byte) main::a#16 ) + [8] *((const byte*) main::SCREEN#0 + (byte) main::a#20) ← (byte) main::a#20 + [9] (byte) main::a#19 ← ++ (byte) main::a#20 + [10] unroll if((byte) main::a#19<(byte) $e) goto main::@1_6 + to:main::@2 +main::@2: scope:[main] from main::@1_6 + (byte) main::a#22 ← phi( ) + [11] *((const byte*) main::SCREEN#0 + (byte) main::a#22) ← (byte) main::a#22 + to:main::@return +main::@return: scope:[main] from main::@2 + [12] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#20 (const byte) main::a#16 Successful SSA optimization Pass2IdenticalPhiElimination @@ -179,7 +410,52 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#22 = (byte) main::a#24 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_7 tails: main::@1_7 blocks: main::@1_7 -Creating PHI for main::a#22 in block main::@2 - (byte) main::a#25 ← phi( main::@1_7/(byte) main::a#22 ) +GRAPH (NEW VERSIONS for main::a#22) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 + [4] *((const byte*) main::SCREEN#0 + (const byte) main::a#7) ← (const byte) main::a#7 + to:main::@1_4 +main::@1_4: scope:[main] from main::@1_3 + [5] *((const byte*) main::SCREEN#0 + (const byte) main::a#10) ← (const byte) main::a#10 + to:main::@1_5 +main::@1_5: scope:[main] from main::@1_4 + [6] *((const byte*) main::SCREEN#0 + (const byte) main::a#13) ← (const byte) main::a#13 + to:main::@1_6 +main::@1_6: scope:[main] from main::@1_5 + [7] *((const byte*) main::SCREEN#0 + (const byte) main::a#16) ← (const byte) main::a#16 + to:main::@1_7 +main::@1_7: scope:[main] from main::@1_6 main::@1_7 + [8] (byte) main::a#23 ← phi( main::@1_7/(byte) main::a#22 main::@1_6/(const byte) main::a#19 ) + [9] *((const byte*) main::SCREEN#0 + (byte) main::a#23) ← (byte) main::a#23 + [10] (byte) main::a#22 ← ++ (byte) main::a#23 + [11] unroll if((byte) main::a#22<(byte) $e) goto main::@1_7 + to:main::@2 +main::@2: scope:[main] from main::@1_7 + (byte) main::a#25 ← phi( ) + [12] *((const byte*) main::SCREEN#0 + (byte) main::a#25) ← (byte) main::a#25 + to:main::@return +main::@return: scope:[main] from main::@2 + [13] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#23 (const byte) main::a#19 Successful SSA optimization Pass2IdenticalPhiElimination @@ -195,7 +471,55 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#25 = (byte) main::a#27 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_8 tails: main::@1_8 blocks: main::@1_8 -Creating PHI for main::a#25 in block main::@2 - (byte) main::a#28 ← phi( main::@1_8/(byte) main::a#25 ) +GRAPH (NEW VERSIONS for main::a#25) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 + [4] *((const byte*) main::SCREEN#0 + (const byte) main::a#7) ← (const byte) main::a#7 + to:main::@1_4 +main::@1_4: scope:[main] from main::@1_3 + [5] *((const byte*) main::SCREEN#0 + (const byte) main::a#10) ← (const byte) main::a#10 + to:main::@1_5 +main::@1_5: scope:[main] from main::@1_4 + [6] *((const byte*) main::SCREEN#0 + (const byte) main::a#13) ← (const byte) main::a#13 + to:main::@1_6 +main::@1_6: scope:[main] from main::@1_5 + [7] *((const byte*) main::SCREEN#0 + (const byte) main::a#16) ← (const byte) main::a#16 + to:main::@1_7 +main::@1_7: scope:[main] from main::@1_6 + [8] *((const byte*) main::SCREEN#0 + (const byte) main::a#19) ← (const byte) main::a#19 + to:main::@1_8 +main::@1_8: scope:[main] from main::@1_7 main::@1_8 + [9] (byte) main::a#26 ← phi( main::@1_8/(byte) main::a#25 main::@1_7/(const byte) main::a#22 ) + [10] *((const byte*) main::SCREEN#0 + (byte) main::a#26) ← (byte) main::a#26 + [11] (byte) main::a#25 ← ++ (byte) main::a#26 + [12] unroll if((byte) main::a#25<(byte) $e) goto main::@1_8 + to:main::@2 +main::@2: scope:[main] from main::@1_8 + (byte) main::a#28 ← phi( ) + [13] *((const byte*) main::SCREEN#0 + (byte) main::a#28) ← (byte) main::a#28 + to:main::@return +main::@return: scope:[main] from main::@2 + [14] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#26 (const byte) main::a#22 Successful SSA optimization Pass2IdenticalPhiElimination @@ -211,7 +535,58 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#28 = (byte) main::a#30 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_9 tails: main::@1_9 blocks: main::@1_9 -Creating PHI for main::a#28 in block main::@2 - (byte) main::a#31 ← phi( main::@1_9/(byte) main::a#28 ) +GRAPH (NEW VERSIONS for main::a#28) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 + [4] *((const byte*) main::SCREEN#0 + (const byte) main::a#7) ← (const byte) main::a#7 + to:main::@1_4 +main::@1_4: scope:[main] from main::@1_3 + [5] *((const byte*) main::SCREEN#0 + (const byte) main::a#10) ← (const byte) main::a#10 + to:main::@1_5 +main::@1_5: scope:[main] from main::@1_4 + [6] *((const byte*) main::SCREEN#0 + (const byte) main::a#13) ← (const byte) main::a#13 + to:main::@1_6 +main::@1_6: scope:[main] from main::@1_5 + [7] *((const byte*) main::SCREEN#0 + (const byte) main::a#16) ← (const byte) main::a#16 + to:main::@1_7 +main::@1_7: scope:[main] from main::@1_6 + [8] *((const byte*) main::SCREEN#0 + (const byte) main::a#19) ← (const byte) main::a#19 + to:main::@1_8 +main::@1_8: scope:[main] from main::@1_7 + [9] *((const byte*) main::SCREEN#0 + (const byte) main::a#22) ← (const byte) main::a#22 + to:main::@1_9 +main::@1_9: scope:[main] from main::@1_8 main::@1_9 + [10] (byte) main::a#29 ← phi( main::@1_9/(byte) main::a#28 main::@1_8/(const byte) main::a#25 ) + [11] *((const byte*) main::SCREEN#0 + (byte) main::a#29) ← (byte) main::a#29 + [12] (byte) main::a#28 ← ++ (byte) main::a#29 + [13] unroll if((byte) main::a#28<(byte) $e) goto main::@1_9 + to:main::@2 +main::@2: scope:[main] from main::@1_9 + (byte) main::a#31 ← phi( ) + [14] *((const byte*) main::SCREEN#0 + (byte) main::a#31) ← (byte) main::a#31 + to:main::@return +main::@return: scope:[main] from main::@2 + [15] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#29 (const byte) main::a#25 Successful SSA optimization Pass2IdenticalPhiElimination @@ -227,7 +602,61 @@ Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#31 = (byte) main::a#33 Successful SSA optimization Pass2AliasElimination Unrolling loop Loop head: main::@1_10 tails: main::@1_10 blocks: main::@1_10 -Creating PHI for main::a#31 in block main::@2 - (byte) main::a#34 ← phi( main::@1_10/(byte) main::a#31 ) +GRAPH (NEW VERSIONS for main::a#31) +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main + [1] *((const byte*) main::SCREEN#0 + (const byte) main::a#0) ← (const byte) main::a#0 + to:main::@1_1 +main::@1_1: scope:[main] from main::@1 + [2] *((const byte*) main::SCREEN#0 + (const byte) main::a#1) ← (const byte) main::a#1 + to:main::@1_2 +main::@1_2: scope:[main] from main::@1_1 + [3] *((const byte*) main::SCREEN#0 + (const byte) main::a#4) ← (const byte) main::a#4 + to:main::@1_3 +main::@1_3: scope:[main] from main::@1_2 + [4] *((const byte*) main::SCREEN#0 + (const byte) main::a#7) ← (const byte) main::a#7 + to:main::@1_4 +main::@1_4: scope:[main] from main::@1_3 + [5] *((const byte*) main::SCREEN#0 + (const byte) main::a#10) ← (const byte) main::a#10 + to:main::@1_5 +main::@1_5: scope:[main] from main::@1_4 + [6] *((const byte*) main::SCREEN#0 + (const byte) main::a#13) ← (const byte) main::a#13 + to:main::@1_6 +main::@1_6: scope:[main] from main::@1_5 + [7] *((const byte*) main::SCREEN#0 + (const byte) main::a#16) ← (const byte) main::a#16 + to:main::@1_7 +main::@1_7: scope:[main] from main::@1_6 + [8] *((const byte*) main::SCREEN#0 + (const byte) main::a#19) ← (const byte) main::a#19 + to:main::@1_8 +main::@1_8: scope:[main] from main::@1_7 + [9] *((const byte*) main::SCREEN#0 + (const byte) main::a#22) ← (const byte) main::a#22 + to:main::@1_9 +main::@1_9: scope:[main] from main::@1_8 + [10] *((const byte*) main::SCREEN#0 + (const byte) main::a#25) ← (const byte) main::a#25 + to:main::@1_10 +main::@1_10: scope:[main] from main::@1_10 main::@1_9 + [11] (byte) main::a#32 ← phi( main::@1_10/(byte) main::a#31 main::@1_9/(const byte) main::a#28 ) + [12] *((const byte*) main::SCREEN#0 + (byte) main::a#32) ← (byte) main::a#32 + [13] (byte) main::a#31 ← ++ (byte) main::a#32 + [14] unroll if((byte) main::a#31<(byte) $e) goto main::@1_10 + to:main::@2 +main::@2: scope:[main] from main::@1_10 + (byte) main::a#34 ← phi( ) + [15] *((const byte*) main::SCREEN#0 + (byte) main::a#34) ← (byte) main::a#34 + to:main::@return +main::@return: scope:[main] from main::@2 + [16] return + to:@return + Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::a#32 (const byte) main::a#28 Successful SSA optimization Pass2IdenticalPhiElimination diff --git a/src/test/ref/unroll-screenfill-while.log b/src/test/ref/unroll-screenfill-while.log index c08e01d4b..30b3379f1 100644 --- a/src/test/ref/unroll-screenfill-while.log +++ b/src/test/ref/unroll-screenfill-while.log @@ -107,15 +107,55 @@ Constant (const byte) main::line#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [13] main::x#1 ← ++ main::x#5 to ++ Resolved ranged comparison value [15] if(main::x#1!=rangelast(0,$27)) goto main::@1 to (number) $28 +GRAPH (NEW VERSIONS for main::line#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [0] (byte) main::x#5 ← phi( main/(const byte) main::x#0 main::@4/(byte) main::x#1 ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@3 + [1] (byte) main::line#2 ← phi( main::@1/(const byte) main::line#0 main::@3/(byte) main::line#1 ) + [2] unroll if((byte) main::line#2!=(byte) $19) goto main::@3 + to:main::@4 +main::@3: scope:[main] from main::@2 + (byte) main::line#4 ← phi( ) + [3] (byte~) main::$1 ← (byte) main::line#4 * (byte) $28 + [4] (byte*~) main::$2 ← (const byte*) main::SCREEN#0 + (byte~) main::$1 + [5] *((byte*~) main::$2 + (byte) main::x#5) ← (byte) main::x#5 + [6] (byte) main::line#1 ← ++ (byte) main::line#4 + to:main::@2 +main::@4: scope:[main] from main::@2 + [7] (byte) main::x#1 ← ++ (byte) main::x#5 + [8] if((byte) main::x#1!=(number) $28) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [9] return + to:@return +@1: scope:[] from @begin + [10] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification Adding number conversion cast (unumber) $28 in if((byte) main::x#1!=(number) $28) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $28 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $28 Successful SSA optimization PassNFinalizeNumberTypeConversions -Unrolling loop Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 +Alias (byte) main::line#1 = (byte) main::line#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::line#5 (const byte) main::line#0 +Successful SSA optimization Pass2IdenticalPhiElimination +if() condition always true - replacing block destination [14] unroll if((const byte) main::line#0!=(byte) $19) goto main::@3 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: main::@3 tails: main::@2 blocks: main::@2 main::@3 Successful SSA optimization Pass2LoopUnroll -Identical Phi Values (byte) main::line#2 (const byte) main::line#0 +Identical Phi Values (byte) main::line#4 (const byte) main::line#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [3] (byte~) main::$1 ← (const byte) main::line#0 * (byte) $28 Constant right-side identified [6] (byte) main::line#1 ← ++ (const byte) main::line#0 @@ -123,7 +163,7 @@ Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$1 = main::line#0*$28 Constant (const byte) main::line#1 = ++main::line#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [2] if((const byte) main::line#0!=(byte) $19) goto main::@3 +if() condition always true - replacing block destination [1] if((const byte) main::line#1!=(byte) $19) goto main::@3_1 Successful SSA optimization Pass2ConstantIfs Simplifying constant evaluating to zero (const byte) main::line#0*(byte) $28 in Successful SSA optimization PassNSimplifyConstantZero @@ -133,421 +173,403 @@ Eliminating unused constant (const byte) main::$1 Successful SSA optimization PassNEliminateUnusedVars Constant (const byte*) main::$2 = main::SCREEN#0 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_1 tails: main::@3_1 blocks: main::@3_1 main::@2_1 +Unrolling loop Loop head: main::@3_1 tails: main::@2_2 blocks: main::@2_2 main::@3_1 Successful SSA optimization Pass2LoopUnroll -Identical Phi Values (byte) main::line#4 (const byte) main::line#1 +Identical Phi Values (byte) main::line#6 (const byte) main::line#1 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [9] (byte~) main::$4 ← (const byte) main::line#1 * (byte) $28 -Constant right-side identified [12] (byte) main::line#5 ← ++ (const byte) main::line#1 +Constant right-side identified [4] (byte~) main::$4 ← (const byte) main::line#1 * (byte) $28 +Constant right-side identified [7] (byte) main::line#7 ← ++ (const byte) main::line#1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$4 = main::line#1*$28 -Constant (const byte) main::line#5 = ++main::line#1 +Constant (const byte) main::line#7 = ++main::line#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [4] if((const byte) main::line#1!=(byte) $19) goto main::@3_1 +if() condition always true - replacing block destination [8] if((const byte) main::line#7!=(byte) $19) goto main::@3_2 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [6] (byte*~) main::$5 ← (const byte*) main::SCREEN#0 + (const byte) main::$4 +Constant right-side identified [3] (byte*~) main::$5 ← (const byte*) main::SCREEN#0 + (const byte) main::$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::$5 = main::SCREEN#0+main::$4 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_2 tails: main::@3_2 blocks: main::@3_2 main::@2_2 -Successful SSA optimization Pass2LoopUnroll -Identical Phi Values (byte) main::line#6 (const byte) main::line#5 -Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [10] (byte~) main::$6 ← (const byte) main::line#5 * (byte) $28 -Constant right-side identified [13] (byte) main::line#7 ← ++ (const byte) main::line#5 -Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$6 = main::line#5*$28 -Constant (const byte) main::line#7 = ++main::line#5 -Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [5] if((const byte) main::line#5!=(byte) $19) goto main::@3_2 -Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [7] (byte*~) main::$7 ← (const byte*) main::SCREEN#0 + (const byte) main::$6 -Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$7 = main::SCREEN#0+main::$6 -Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_3 tails: main::@3_3 blocks: main::@3_3 main::@2_3 +Unrolling loop Loop head: main::@3_2 tails: main::@2_3 blocks: main::@2_3 main::@3_2 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#8 (const byte) main::line#7 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [11] (byte~) main::$8 ← (const byte) main::line#7 * (byte) $28 -Constant right-side identified [14] (byte) main::line#9 ← ++ (const byte) main::line#7 +Constant right-side identified [5] (byte~) main::$6 ← (const byte) main::line#7 * (byte) $28 +Constant right-side identified [8] (byte) main::line#9 ← ++ (const byte) main::line#7 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$8 = main::line#7*$28 +Constant (const byte) main::$6 = main::line#7*$28 Constant (const byte) main::line#9 = ++main::line#7 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [6] if((const byte) main::line#7!=(byte) $19) goto main::@3_3 +if() condition always true - replacing block destination [9] if((const byte) main::line#9!=(byte) $19) goto main::@3_3 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [8] (byte*~) main::$9 ← (const byte*) main::SCREEN#0 + (const byte) main::$8 +Constant right-side identified [4] (byte*~) main::$7 ← (const byte*) main::SCREEN#0 + (const byte) main::$6 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$9 = main::SCREEN#0+main::$8 +Constant (const byte*) main::$7 = main::SCREEN#0+main::$6 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_4 tails: main::@3_4 blocks: main::@3_4 main::@2_4 +Unrolling loop Loop head: main::@3_3 tails: main::@2_4 blocks: main::@2_4 main::@3_3 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#10 (const byte) main::line#9 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [12] (byte~) main::$10 ← (const byte) main::line#9 * (byte) $28 -Constant right-side identified [15] (byte) main::line#11 ← ++ (const byte) main::line#9 +Constant right-side identified [6] (byte~) main::$8 ← (const byte) main::line#9 * (byte) $28 +Constant right-side identified [9] (byte) main::line#11 ← ++ (const byte) main::line#9 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$10 = main::line#9*$28 +Constant (const byte) main::$8 = main::line#9*$28 Constant (const byte) main::line#11 = ++main::line#9 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [7] if((const byte) main::line#9!=(byte) $19) goto main::@3_4 +if() condition always true - replacing block destination [10] if((const byte) main::line#11!=(byte) $19) goto main::@3_4 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [9] (byte*~) main::$11 ← (const byte*) main::SCREEN#0 + (const byte) main::$10 +Constant right-side identified [5] (byte*~) main::$9 ← (const byte*) main::SCREEN#0 + (const byte) main::$8 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$11 = main::SCREEN#0+main::$10 +Constant (const byte*) main::$9 = main::SCREEN#0+main::$8 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_5 tails: main::@3_5 blocks: main::@3_5 main::@2_5 +Unrolling loop Loop head: main::@3_4 tails: main::@2_5 blocks: main::@2_5 main::@3_4 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#12 (const byte) main::line#11 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [13] (byte~) main::$12 ← (const byte) main::line#11 * (byte) $28 -Constant right-side identified [16] (byte) main::line#13 ← ++ (const byte) main::line#11 +Constant right-side identified [7] (byte~) main::$10 ← (const byte) main::line#11 * (byte) $28 +Constant right-side identified [10] (byte) main::line#13 ← ++ (const byte) main::line#11 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$12 = main::line#11*$28 +Constant (const byte) main::$10 = main::line#11*$28 Constant (const byte) main::line#13 = ++main::line#11 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [8] if((const byte) main::line#11!=(byte) $19) goto main::@3_5 +if() condition always true - replacing block destination [11] if((const byte) main::line#13!=(byte) $19) goto main::@3_5 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [10] (byte*~) main::$13 ← (const byte*) main::SCREEN#0 + (const byte) main::$12 +Constant right-side identified [6] (byte*~) main::$11 ← (const byte*) main::SCREEN#0 + (const byte) main::$10 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$13 = main::SCREEN#0+main::$12 +Constant (const byte*) main::$11 = main::SCREEN#0+main::$10 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_6 tails: main::@3_6 blocks: main::@3_6 main::@2_6 +Unrolling loop Loop head: main::@3_5 tails: main::@2_6 blocks: main::@2_6 main::@3_5 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#14 (const byte) main::line#13 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [14] (byte~) main::$14 ← (const byte) main::line#13 * (byte) $28 -Constant right-side identified [17] (byte) main::line#15 ← ++ (const byte) main::line#13 +Constant right-side identified [8] (byte~) main::$12 ← (const byte) main::line#13 * (byte) $28 +Constant right-side identified [11] (byte) main::line#15 ← ++ (const byte) main::line#13 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$14 = main::line#13*$28 +Constant (const byte) main::$12 = main::line#13*$28 Constant (const byte) main::line#15 = ++main::line#13 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [9] if((const byte) main::line#13!=(byte) $19) goto main::@3_6 +if() condition always true - replacing block destination [12] if((const byte) main::line#15!=(byte) $19) goto main::@3_6 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [11] (byte*~) main::$15 ← (const byte*) main::SCREEN#0 + (const byte) main::$14 +Constant right-side identified [7] (byte*~) main::$13 ← (const byte*) main::SCREEN#0 + (const byte) main::$12 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$15 = main::SCREEN#0+main::$14 +Constant (const byte*) main::$13 = main::SCREEN#0+main::$12 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_7 tails: main::@3_7 blocks: main::@3_7 main::@2_7 +Unrolling loop Loop head: main::@3_6 tails: main::@2_7 blocks: main::@2_7 main::@3_6 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#16 (const byte) main::line#15 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [15] (byte~) main::$16 ← (const byte) main::line#15 * (byte) $28 -Constant right-side identified [18] (byte) main::line#17 ← ++ (const byte) main::line#15 +Constant right-side identified [9] (byte~) main::$14 ← (const byte) main::line#15 * (byte) $28 +Constant right-side identified [12] (byte) main::line#17 ← ++ (const byte) main::line#15 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$16 = main::line#15*$28 +Constant (const byte) main::$14 = main::line#15*$28 Constant (const byte) main::line#17 = ++main::line#15 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [10] if((const byte) main::line#15!=(byte) $19) goto main::@3_7 +if() condition always true - replacing block destination [13] if((const byte) main::line#17!=(byte) $19) goto main::@3_7 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [12] (byte*~) main::$17 ← (const byte*) main::SCREEN#0 + (const byte) main::$16 +Constant right-side identified [8] (byte*~) main::$15 ← (const byte*) main::SCREEN#0 + (const byte) main::$14 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$17 = main::SCREEN#0+main::$16 +Constant (const byte*) main::$15 = main::SCREEN#0+main::$14 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_8 tails: main::@3_8 blocks: main::@3_8 main::@2_8 +Unrolling loop Loop head: main::@3_7 tails: main::@2_8 blocks: main::@2_8 main::@3_7 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#18 (const byte) main::line#17 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [16] (byte~) main::$18 ← (const byte) main::line#17 * (byte) $28 -Constant right-side identified [19] (byte) main::line#19 ← ++ (const byte) main::line#17 +Constant right-side identified [10] (byte~) main::$16 ← (const byte) main::line#17 * (byte) $28 +Constant right-side identified [13] (byte) main::line#19 ← ++ (const byte) main::line#17 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$18 = main::line#17*$28 +Constant (const byte) main::$16 = main::line#17*$28 Constant (const byte) main::line#19 = ++main::line#17 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [11] if((const byte) main::line#17!=(byte) $19) goto main::@3_8 +if() condition always true - replacing block destination [14] if((const byte) main::line#19!=(byte) $19) goto main::@3_8 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [13] (byte*~) main::$19 ← (const byte*) main::SCREEN#0 + (const byte) main::$18 +Constant right-side identified [9] (byte*~) main::$17 ← (const byte*) main::SCREEN#0 + (const byte) main::$16 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$19 = main::SCREEN#0+main::$18 +Constant (const byte*) main::$17 = main::SCREEN#0+main::$16 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_9 tails: main::@3_9 blocks: main::@3_9 main::@2_9 +Unrolling loop Loop head: main::@3_8 tails: main::@2_9 blocks: main::@2_9 main::@3_8 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#20 (const byte) main::line#19 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [17] (byte~) main::$20 ← (const byte) main::line#19 * (byte) $28 -Constant right-side identified [20] (byte) main::line#21 ← ++ (const byte) main::line#19 +Constant right-side identified [11] (byte~) main::$18 ← (const byte) main::line#19 * (byte) $28 +Constant right-side identified [14] (byte) main::line#21 ← ++ (const byte) main::line#19 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$20 = main::line#19*$28 +Constant (const byte) main::$18 = main::line#19*$28 Constant (const byte) main::line#21 = ++main::line#19 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [12] if((const byte) main::line#19!=(byte) $19) goto main::@3_9 +if() condition always true - replacing block destination [15] if((const byte) main::line#21!=(byte) $19) goto main::@3_9 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [14] (byte*~) main::$21 ← (const byte*) main::SCREEN#0 + (const byte) main::$20 +Constant right-side identified [10] (byte*~) main::$19 ← (const byte*) main::SCREEN#0 + (const byte) main::$18 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$21 = main::SCREEN#0+main::$20 +Constant (const byte*) main::$19 = main::SCREEN#0+main::$18 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_10 tails: main::@3_10 blocks: main::@3_10 main::@2_10 +Unrolling loop Loop head: main::@3_9 tails: main::@2_10 blocks: main::@2_10 main::@3_9 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#22 (const byte) main::line#21 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [18] (byte~) main::$22 ← (const byte) main::line#21 * (byte) $28 -Constant right-side identified [21] (byte) main::line#23 ← ++ (const byte) main::line#21 +Constant right-side identified [12] (byte~) main::$20 ← (const byte) main::line#21 * (byte) $28 +Constant right-side identified [15] (byte) main::line#23 ← ++ (const byte) main::line#21 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$22 = main::line#21*$28 +Constant (const byte) main::$20 = main::line#21*$28 Constant (const byte) main::line#23 = ++main::line#21 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [13] if((const byte) main::line#21!=(byte) $19) goto main::@3_10 +if() condition always true - replacing block destination [16] if((const byte) main::line#23!=(byte) $19) goto main::@3_10 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [15] (byte*~) main::$23 ← (const byte*) main::SCREEN#0 + (const byte) main::$22 +Constant right-side identified [11] (byte*~) main::$21 ← (const byte*) main::SCREEN#0 + (const byte) main::$20 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$23 = main::SCREEN#0+main::$22 +Constant (const byte*) main::$21 = main::SCREEN#0+main::$20 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_11 tails: main::@3_11 blocks: main::@3_11 main::@2_11 +Unrolling loop Loop head: main::@3_10 tails: main::@2_11 blocks: main::@2_11 main::@3_10 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#24 (const byte) main::line#23 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [19] (byte~) main::$24 ← (const byte) main::line#23 * (byte) $28 -Constant right-side identified [22] (byte) main::line#25 ← ++ (const byte) main::line#23 +Constant right-side identified [13] (byte~) main::$22 ← (const byte) main::line#23 * (byte) $28 +Constant right-side identified [16] (byte) main::line#25 ← ++ (const byte) main::line#23 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$24 = main::line#23*$28 +Constant (const byte) main::$22 = main::line#23*$28 Constant (const byte) main::line#25 = ++main::line#23 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [14] if((const byte) main::line#23!=(byte) $19) goto main::@3_11 +if() condition always true - replacing block destination [17] if((const byte) main::line#25!=(byte) $19) goto main::@3_11 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [16] (byte*~) main::$25 ← (const byte*) main::SCREEN#0 + (const byte) main::$24 +Constant right-side identified [12] (byte*~) main::$23 ← (const byte*) main::SCREEN#0 + (const byte) main::$22 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$25 = main::SCREEN#0+main::$24 +Constant (const byte*) main::$23 = main::SCREEN#0+main::$22 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_12 tails: main::@3_12 blocks: main::@3_12 main::@2_12 +Unrolling loop Loop head: main::@3_11 tails: main::@2_12 blocks: main::@2_12 main::@3_11 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#26 (const byte) main::line#25 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [20] (byte~) main::$26 ← (const byte) main::line#25 * (byte) $28 -Constant right-side identified [23] (byte) main::line#27 ← ++ (const byte) main::line#25 +Constant right-side identified [14] (byte~) main::$24 ← (const byte) main::line#25 * (byte) $28 +Constant right-side identified [17] (byte) main::line#27 ← ++ (const byte) main::line#25 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$26 = main::line#25*$28 +Constant (const byte) main::$24 = main::line#25*$28 Constant (const byte) main::line#27 = ++main::line#25 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [15] if((const byte) main::line#25!=(byte) $19) goto main::@3_12 +if() condition always true - replacing block destination [18] if((const byte) main::line#27!=(byte) $19) goto main::@3_12 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [17] (byte*~) main::$27 ← (const byte*) main::SCREEN#0 + (const byte) main::$26 +Constant right-side identified [13] (byte*~) main::$25 ← (const byte*) main::SCREEN#0 + (const byte) main::$24 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$27 = main::SCREEN#0+main::$26 +Constant (const byte*) main::$25 = main::SCREEN#0+main::$24 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_13 tails: main::@3_13 blocks: main::@3_13 main::@2_13 +Unrolling loop Loop head: main::@3_12 tails: main::@2_13 blocks: main::@2_13 main::@3_12 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#28 (const byte) main::line#27 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [21] (byte~) main::$28 ← (const byte) main::line#27 * (byte) $28 -Constant right-side identified [24] (byte) main::line#29 ← ++ (const byte) main::line#27 +Constant right-side identified [15] (byte~) main::$26 ← (const byte) main::line#27 * (byte) $28 +Constant right-side identified [18] (byte) main::line#29 ← ++ (const byte) main::line#27 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$28 = main::line#27*$28 +Constant (const byte) main::$26 = main::line#27*$28 Constant (const byte) main::line#29 = ++main::line#27 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [16] if((const byte) main::line#27!=(byte) $19) goto main::@3_13 +if() condition always true - replacing block destination [19] if((const byte) main::line#29!=(byte) $19) goto main::@3_13 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [18] (byte*~) main::$29 ← (const byte*) main::SCREEN#0 + (const byte) main::$28 +Constant right-side identified [14] (byte*~) main::$27 ← (const byte*) main::SCREEN#0 + (const byte) main::$26 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$29 = main::SCREEN#0+main::$28 +Constant (const byte*) main::$27 = main::SCREEN#0+main::$26 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_14 tails: main::@3_14 blocks: main::@3_14 main::@2_14 +Unrolling loop Loop head: main::@3_13 tails: main::@2_14 blocks: main::@2_14 main::@3_13 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#30 (const byte) main::line#29 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [22] (byte~) main::$30 ← (const byte) main::line#29 * (byte) $28 -Constant right-side identified [25] (byte) main::line#31 ← ++ (const byte) main::line#29 +Constant right-side identified [16] (byte~) main::$28 ← (const byte) main::line#29 * (byte) $28 +Constant right-side identified [19] (byte) main::line#31 ← ++ (const byte) main::line#29 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$30 = main::line#29*$28 +Constant (const byte) main::$28 = main::line#29*$28 Constant (const byte) main::line#31 = ++main::line#29 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [17] if((const byte) main::line#29!=(byte) $19) goto main::@3_14 +if() condition always true - replacing block destination [20] if((const byte) main::line#31!=(byte) $19) goto main::@3_14 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [19] (byte*~) main::$31 ← (const byte*) main::SCREEN#0 + (const byte) main::$30 +Constant right-side identified [15] (byte*~) main::$29 ← (const byte*) main::SCREEN#0 + (const byte) main::$28 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$31 = main::SCREEN#0+main::$30 +Constant (const byte*) main::$29 = main::SCREEN#0+main::$28 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_15 tails: main::@3_15 blocks: main::@3_15 main::@2_15 +Unrolling loop Loop head: main::@3_14 tails: main::@2_15 blocks: main::@2_15 main::@3_14 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#32 (const byte) main::line#31 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [23] (byte~) main::$32 ← (const byte) main::line#31 * (byte) $28 -Constant right-side identified [26] (byte) main::line#33 ← ++ (const byte) main::line#31 +Constant right-side identified [17] (byte~) main::$30 ← (const byte) main::line#31 * (byte) $28 +Constant right-side identified [20] (byte) main::line#33 ← ++ (const byte) main::line#31 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$32 = main::line#31*$28 +Constant (const byte) main::$30 = main::line#31*$28 Constant (const byte) main::line#33 = ++main::line#31 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [18] if((const byte) main::line#31!=(byte) $19) goto main::@3_15 +if() condition always true - replacing block destination [21] if((const byte) main::line#33!=(byte) $19) goto main::@3_15 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [20] (byte*~) main::$33 ← (const byte*) main::SCREEN#0 + (const byte) main::$32 +Constant right-side identified [16] (byte*~) main::$31 ← (const byte*) main::SCREEN#0 + (const byte) main::$30 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$33 = main::SCREEN#0+main::$32 +Constant (const byte*) main::$31 = main::SCREEN#0+main::$30 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_16 tails: main::@3_16 blocks: main::@3_16 main::@2_16 +Unrolling loop Loop head: main::@3_15 tails: main::@2_16 blocks: main::@2_16 main::@3_15 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#34 (const byte) main::line#33 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [24] (byte~) main::$34 ← (const byte) main::line#33 * (byte) $28 -Constant right-side identified [27] (byte) main::line#35 ← ++ (const byte) main::line#33 +Constant right-side identified [18] (byte~) main::$32 ← (const byte) main::line#33 * (byte) $28 +Constant right-side identified [21] (byte) main::line#35 ← ++ (const byte) main::line#33 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$34 = main::line#33*$28 +Constant (const byte) main::$32 = main::line#33*$28 Constant (const byte) main::line#35 = ++main::line#33 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [19] if((const byte) main::line#33!=(byte) $19) goto main::@3_16 +if() condition always true - replacing block destination [22] if((const byte) main::line#35!=(byte) $19) goto main::@3_16 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [21] (byte*~) main::$35 ← (const byte*) main::SCREEN#0 + (const byte) main::$34 +Constant right-side identified [17] (byte*~) main::$33 ← (const byte*) main::SCREEN#0 + (const byte) main::$32 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$35 = main::SCREEN#0+main::$34 +Constant (const byte*) main::$33 = main::SCREEN#0+main::$32 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_17 tails: main::@3_17 blocks: main::@3_17 main::@2_17 +Unrolling loop Loop head: main::@3_16 tails: main::@2_17 blocks: main::@2_17 main::@3_16 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#36 (const byte) main::line#35 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [25] (byte~) main::$36 ← (const byte) main::line#35 * (byte) $28 -Constant right-side identified [28] (byte) main::line#37 ← ++ (const byte) main::line#35 +Constant right-side identified [19] (byte~) main::$34 ← (const byte) main::line#35 * (byte) $28 +Constant right-side identified [22] (byte) main::line#37 ← ++ (const byte) main::line#35 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$36 = main::line#35*$28 +Constant (const byte) main::$34 = main::line#35*$28 Constant (const byte) main::line#37 = ++main::line#35 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [20] if((const byte) main::line#35!=(byte) $19) goto main::@3_17 +if() condition always true - replacing block destination [23] if((const byte) main::line#37!=(byte) $19) goto main::@3_17 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [22] (byte*~) main::$37 ← (const byte*) main::SCREEN#0 + (const byte) main::$36 +Constant right-side identified [18] (byte*~) main::$35 ← (const byte*) main::SCREEN#0 + (const byte) main::$34 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$37 = main::SCREEN#0+main::$36 +Constant (const byte*) main::$35 = main::SCREEN#0+main::$34 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_18 tails: main::@3_18 blocks: main::@3_18 main::@2_18 +Unrolling loop Loop head: main::@3_17 tails: main::@2_18 blocks: main::@2_18 main::@3_17 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#38 (const byte) main::line#37 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [26] (byte~) main::$38 ← (const byte) main::line#37 * (byte) $28 -Constant right-side identified [29] (byte) main::line#39 ← ++ (const byte) main::line#37 +Constant right-side identified [20] (byte~) main::$36 ← (const byte) main::line#37 * (byte) $28 +Constant right-side identified [23] (byte) main::line#39 ← ++ (const byte) main::line#37 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$38 = main::line#37*$28 +Constant (const byte) main::$36 = main::line#37*$28 Constant (const byte) main::line#39 = ++main::line#37 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [21] if((const byte) main::line#37!=(byte) $19) goto main::@3_18 +if() condition always true - replacing block destination [24] if((const byte) main::line#39!=(byte) $19) goto main::@3_18 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [23] (byte*~) main::$39 ← (const byte*) main::SCREEN#0 + (const byte) main::$38 +Constant right-side identified [19] (byte*~) main::$37 ← (const byte*) main::SCREEN#0 + (const byte) main::$36 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$39 = main::SCREEN#0+main::$38 +Constant (const byte*) main::$37 = main::SCREEN#0+main::$36 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_19 tails: main::@3_19 blocks: main::@3_19 main::@2_19 +Unrolling loop Loop head: main::@3_18 tails: main::@2_19 blocks: main::@2_19 main::@3_18 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#40 (const byte) main::line#39 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [27] (byte~) main::$40 ← (const byte) main::line#39 * (byte) $28 -Constant right-side identified [30] (byte) main::line#41 ← ++ (const byte) main::line#39 +Constant right-side identified [21] (byte~) main::$38 ← (const byte) main::line#39 * (byte) $28 +Constant right-side identified [24] (byte) main::line#41 ← ++ (const byte) main::line#39 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$40 = main::line#39*$28 +Constant (const byte) main::$38 = main::line#39*$28 Constant (const byte) main::line#41 = ++main::line#39 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [22] if((const byte) main::line#39!=(byte) $19) goto main::@3_19 +if() condition always true - replacing block destination [25] if((const byte) main::line#41!=(byte) $19) goto main::@3_19 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [24] (byte*~) main::$41 ← (const byte*) main::SCREEN#0 + (const byte) main::$40 +Constant right-side identified [20] (byte*~) main::$39 ← (const byte*) main::SCREEN#0 + (const byte) main::$38 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$41 = main::SCREEN#0+main::$40 +Constant (const byte*) main::$39 = main::SCREEN#0+main::$38 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_20 tails: main::@3_20 blocks: main::@3_20 main::@2_20 +Unrolling loop Loop head: main::@3_19 tails: main::@2_20 blocks: main::@2_20 main::@3_19 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#42 (const byte) main::line#41 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [28] (byte~) main::$42 ← (const byte) main::line#41 * (byte) $28 -Constant right-side identified [31] (byte) main::line#43 ← ++ (const byte) main::line#41 +Constant right-side identified [22] (byte~) main::$40 ← (const byte) main::line#41 * (byte) $28 +Constant right-side identified [25] (byte) main::line#43 ← ++ (const byte) main::line#41 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$42 = main::line#41*$28 +Constant (const byte) main::$40 = main::line#41*$28 Constant (const byte) main::line#43 = ++main::line#41 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [23] if((const byte) main::line#41!=(byte) $19) goto main::@3_20 +if() condition always true - replacing block destination [26] if((const byte) main::line#43!=(byte) $19) goto main::@3_20 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [25] (byte*~) main::$43 ← (const byte*) main::SCREEN#0 + (const byte) main::$42 +Constant right-side identified [21] (byte*~) main::$41 ← (const byte*) main::SCREEN#0 + (const byte) main::$40 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$43 = main::SCREEN#0+main::$42 +Constant (const byte*) main::$41 = main::SCREEN#0+main::$40 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_21 tails: main::@3_21 blocks: main::@3_21 main::@2_21 +Unrolling loop Loop head: main::@3_20 tails: main::@2_21 blocks: main::@2_21 main::@3_20 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#44 (const byte) main::line#43 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [29] (byte~) main::$44 ← (const byte) main::line#43 * (byte) $28 -Constant right-side identified [32] (byte) main::line#45 ← ++ (const byte) main::line#43 +Constant right-side identified [23] (byte~) main::$42 ← (const byte) main::line#43 * (byte) $28 +Constant right-side identified [26] (byte) main::line#45 ← ++ (const byte) main::line#43 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$44 = main::line#43*$28 +Constant (const byte) main::$42 = main::line#43*$28 Constant (const byte) main::line#45 = ++main::line#43 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [24] if((const byte) main::line#43!=(byte) $19) goto main::@3_21 +if() condition always true - replacing block destination [27] if((const byte) main::line#45!=(byte) $19) goto main::@3_21 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [26] (byte*~) main::$45 ← (const byte*) main::SCREEN#0 + (const byte) main::$44 +Constant right-side identified [22] (byte*~) main::$43 ← (const byte*) main::SCREEN#0 + (const byte) main::$42 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$45 = main::SCREEN#0+main::$44 +Constant (const byte*) main::$43 = main::SCREEN#0+main::$42 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_22 tails: main::@3_22 blocks: main::@3_22 main::@2_22 +Unrolling loop Loop head: main::@3_21 tails: main::@2_22 blocks: main::@2_22 main::@3_21 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#46 (const byte) main::line#45 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [30] (byte~) main::$46 ← (const byte) main::line#45 * (byte) $28 -Constant right-side identified [33] (byte) main::line#47 ← ++ (const byte) main::line#45 +Constant right-side identified [24] (byte~) main::$44 ← (const byte) main::line#45 * (byte) $28 +Constant right-side identified [27] (byte) main::line#47 ← ++ (const byte) main::line#45 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$46 = main::line#45*$28 +Constant (const byte) main::$44 = main::line#45*$28 Constant (const byte) main::line#47 = ++main::line#45 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [25] if((const byte) main::line#45!=(byte) $19) goto main::@3_22 +if() condition always true - replacing block destination [28] if((const byte) main::line#47!=(byte) $19) goto main::@3_22 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [27] (byte*~) main::$47 ← (const byte*) main::SCREEN#0 + (const byte) main::$46 +Constant right-side identified [23] (byte*~) main::$45 ← (const byte*) main::SCREEN#0 + (const byte) main::$44 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$47 = main::SCREEN#0+main::$46 +Constant (const byte*) main::$45 = main::SCREEN#0+main::$44 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_23 tails: main::@3_23 blocks: main::@3_23 main::@2_23 +Unrolling loop Loop head: main::@3_22 tails: main::@2_23 blocks: main::@2_23 main::@3_22 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#48 (const byte) main::line#47 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [31] (byte~) main::$48 ← (const byte) main::line#47 * (byte) $28 -Constant right-side identified [34] (byte) main::line#49 ← ++ (const byte) main::line#47 +Constant right-side identified [25] (byte~) main::$46 ← (const byte) main::line#47 * (byte) $28 +Constant right-side identified [28] (byte) main::line#49 ← ++ (const byte) main::line#47 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$48 = main::line#47*$28 +Constant (const byte) main::$46 = main::line#47*$28 Constant (const byte) main::line#49 = ++main::line#47 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [26] if((const byte) main::line#47!=(byte) $19) goto main::@3_23 +if() condition always true - replacing block destination [29] if((const byte) main::line#49!=(byte) $19) goto main::@3_23 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [28] (byte*~) main::$49 ← (const byte*) main::SCREEN#0 + (const byte) main::$48 +Constant right-side identified [24] (byte*~) main::$47 ← (const byte*) main::SCREEN#0 + (const byte) main::$46 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$49 = main::SCREEN#0+main::$48 +Constant (const byte*) main::$47 = main::SCREEN#0+main::$46 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_24 tails: main::@3_24 blocks: main::@3_24 main::@2_24 +Unrolling loop Loop head: main::@3_23 tails: main::@2_24 blocks: main::@2_24 main::@3_23 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#50 (const byte) main::line#49 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [32] (byte~) main::$50 ← (const byte) main::line#49 * (byte) $28 -Constant right-side identified [35] (byte) main::line#51 ← ++ (const byte) main::line#49 +Constant right-side identified [26] (byte~) main::$48 ← (const byte) main::line#49 * (byte) $28 +Constant right-side identified [29] (byte) main::line#51 ← ++ (const byte) main::line#49 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$50 = main::line#49*$28 +Constant (const byte) main::$48 = main::line#49*$28 Constant (const byte) main::line#51 = ++main::line#49 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [27] if((const byte) main::line#49!=(byte) $19) goto main::@3_24 +if() condition always true - replacing block destination [30] if((const byte) main::line#51!=(byte) $19) goto main::@3_24 Successful SSA optimization Pass2ConstantIfs -Constant right-side identified [29] (byte*~) main::$51 ← (const byte*) main::SCREEN#0 + (const byte) main::$50 +Constant right-side identified [25] (byte*~) main::$49 ← (const byte*) main::SCREEN#0 + (const byte) main::$48 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) main::$51 = main::SCREEN#0+main::$50 +Constant (const byte*) main::$49 = main::SCREEN#0+main::$48 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@2_25 tails: main::@3_25 blocks: main::@3_25 main::@2_25 +Unrolling loop Loop head: main::@3_24 tails: main::@2_25 blocks: main::@2_25 main::@3_24 Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#52 (const byte) main::line#51 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [33] (byte~) main::$52 ← (const byte) main::line#51 * (byte) $28 -Constant right-side identified [36] (byte) main::line#53 ← ++ (const byte) main::line#51 +Constant right-side identified [27] (byte~) main::$50 ← (const byte) main::line#51 * (byte) $28 +Constant right-side identified [30] (byte) main::line#53 ← ++ (const byte) main::line#51 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::$52 = main::line#51*$28 +Constant (const byte) main::$50 = main::line#51*$28 Constant (const byte) main::line#53 = ++main::line#51 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [28] if((const byte) main::line#51!=(byte) $19) goto main::@3_25 +Removing PHI-reference to removed block (main::@2_25) in block main::@3_25 +if() condition always false - eliminating [31] if((const byte) main::line#53!=(byte) $19) goto main::@3_25 Successful SSA optimization Pass2ConstantIfs -Eliminating variable (byte*~) main::$53 from unused block main::@3_25 -Eliminating variable (byte) main::line#54 from unused block main::@2_26 -Eliminating variable (byte~) main::$54 from unused block main::@3_26 -Eliminating variable (byte*~) main::$55 from unused block main::@3_26 -Eliminating variable (byte) main::line#55 from unused block main::@3_26 -Removing PHI-reference to removed block (main::@3_25) in block main::@2_26 -Removing unused block main::@3_25 -Removing unused block main::@2_26 -Removing unused block main::@3_26 -Successful SSA optimization Pass2EliminateUnusedBlocks -Eliminating unused constant (const byte) main::$52 Eliminating unused constant (const byte) main::line#53 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) main::line#51 -Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable (byte) main::line#54 from unused block main::@3_25 +Eliminating variable (byte~) main::$52 from unused block main::@3_25 +Eliminating variable (byte*~) main::$53 from unused block main::@3_25 +Eliminating variable (byte) main::line#55 from unused block main::@3_25 +Removing unused block main::@3_25 +Removing unused block main::@2_26 +Successful SSA optimization Pass2EliminateUnusedBlocks +Constant right-side identified [26] (byte*~) main::$51 ← (const byte*) main::SCREEN#0 + (const byte) main::$50 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) main::$51 = main::SCREEN#0+main::$50 +Successful SSA optimization Pass2ConstantIdentification Inlining constant with var siblings (const byte) main::x#0 Inlining constant with different constant siblings (const byte) main::line#0 Inlining constant with different constant siblings (const byte) main::line#1 -Inlining constant with different constant siblings (const byte) main::line#5 Inlining constant with different constant siblings (const byte) main::line#7 Inlining constant with different constant siblings (const byte) main::line#9 Inlining constant with different constant siblings (const byte) main::line#11 @@ -570,6 +592,7 @@ Inlining constant with different constant siblings (const byte) main::line#43 Inlining constant with different constant siblings (const byte) main::line#45 Inlining constant with different constant siblings (const byte) main::line#47 Inlining constant with different constant siblings (const byte) main::line#49 +Inlining constant with different constant siblings (const byte) main::line#51 Constant inlined main::$50 = ++++++++++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$51 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$12 = ++++++++++(byte) 0*(byte) $28 @@ -578,21 +601,20 @@ Constant inlined main::$14 = ++++++++++++(byte) 0*(byte) $28 Constant inlined main::$15 = (const byte*) main::SCREEN#0+++++++++++++(byte) 0*(byte) $28 Constant inlined main::$10 = ++++++++(byte) 0*(byte) $28 Constant inlined main::$11 = (const byte*) main::SCREEN#0+++++++++(byte) 0*(byte) $28 -Constant inlined main::line#43 = ++++++++++++++++++++++++++++++++++++++++++(byte) 0 -Constant inlined main::line#45 = ++++++++++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#43 = ++++++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#45 = ++++++++++++++++++++++++++++++++++++++++++(byte) 0 Constant inlined main::$16 = ++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$17 = (const byte*) main::SCREEN#0+++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$18 = ++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#41 = ++++++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#41 = ++++++++++++++++++++++++++++++++++++++(byte) 0 Constant inlined main::$19 = (const byte*) main::SCREEN#0+++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#5 = ++++(byte) 0 Constant inlined main::line#0 = (byte) 0 -Constant inlined main::line#47 = ++++++++++++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#47 = ++++++++++++++++++++++++++++++++++++++++++++(byte) 0 Constant inlined main::line#1 = ++(byte) 0 -Constant inlined main::line#49 = ++++++++++++++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#49 = ++++++++++++++++++++++++++++++++++++++++++++++(byte) 0 Constant inlined main::$40 = ++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#9 = ++++++++(byte) 0 -Constant inlined main::line#7 = ++++++(byte) 0 +Constant inlined main::line#9 = ++++++(byte) 0 +Constant inlined main::line#7 = ++++(byte) 0 Constant inlined main::$45 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$46 = ++++++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$47 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 @@ -601,12 +623,13 @@ Constant inlined main::$41 = (const byte*) main::SCREEN#0+++++++++++++++++++++++ Constant inlined main::$42 = ++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$43 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$44 = ++++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#11 = ++++++++++(byte) 0 +Constant inlined main::line#11 = ++++++++(byte) 0 Constant inlined main::$49 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#17 = ++++++++++++++++(byte) 0 -Constant inlined main::line#19 = ++++++++++++++++++(byte) 0 -Constant inlined main::line#13 = ++++++++++++(byte) 0 -Constant inlined main::line#15 = ++++++++++++++(byte) 0 +Constant inlined main::line#51 = ++++++++++++++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#17 = ++++++++++++++(byte) 0 +Constant inlined main::line#19 = ++++++++++++++++(byte) 0 +Constant inlined main::line#13 = ++++++++++(byte) 0 +Constant inlined main::line#15 = ++++++++++++(byte) 0 Constant inlined main::$34 = ++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$35 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$36 = ++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 @@ -615,13 +638,13 @@ Constant inlined main::$30 = ++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$31 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$32 = ++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$33 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#21 = ++++++++++++++++++++(byte) 0 -Constant inlined main::line#23 = ++++++++++++++++++++++(byte) 0 +Constant inlined main::line#21 = ++++++++++++++++++(byte) 0 +Constant inlined main::line#23 = ++++++++++++++++++++(byte) 0 Constant inlined main::$38 = ++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$39 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#29 = ++++++++++++++++++++++++++++(byte) 0 -Constant inlined main::line#25 = ++++++++++++++++++++++++(byte) 0 -Constant inlined main::line#27 = ++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#29 = ++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#25 = ++++++++++++++++++++++(byte) 0 +Constant inlined main::line#27 = ++++++++++++++++++++++++(byte) 0 Constant inlined main::$23 = (const byte*) main::SCREEN#0+++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$24 = ++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$25 = (const byte*) main::SCREEN#0+++++++++++++++++++++++(byte) 0*(byte) $28 @@ -630,21 +653,21 @@ Constant inlined main::$26 = ++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$20 = ++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$21 = (const byte*) main::SCREEN#0+++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$22 = ++++++++++++++++++++(byte) 0*(byte) $28 -Constant inlined main::line#31 = ++++++++++++++++++++++++++++++(byte) 0 -Constant inlined main::line#33 = ++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#31 = ++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#33 = ++++++++++++++++++++++++++++++(byte) 0 Constant inlined main::$27 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$2 = (const byte*) main::SCREEN#0 Constant inlined main::$28 = ++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$29 = (const byte*) main::SCREEN#0+++++++++++++++++++++++++++(byte) 0*(byte) $28 Constant inlined main::$5 = (const byte*) main::SCREEN#0+++(byte) 0*(byte) $28 Constant inlined main::$6 = ++++(byte) 0*(byte) $28 -Constant inlined main::line#39 = ++++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#39 = ++++++++++++++++++++++++++++++++++++(byte) 0 Constant inlined main::$4 = ++(byte) 0*(byte) $28 Constant inlined main::$9 = (const byte*) main::SCREEN#0+++++++(byte) 0*(byte) $28 -Constant inlined main::line#35 = ++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#35 = ++++++++++++++++++++++++++++++++(byte) 0 Constant inlined main::$7 = (const byte*) main::SCREEN#0+++++(byte) 0*(byte) $28 Constant inlined main::$8 = ++++++(byte) 0*(byte) $28 -Constant inlined main::line#37 = ++++++++++++++++++++++++++++++++++++(byte) 0 +Constant inlined main::line#37 = ++++++++++++++++++++++++++++++++++(byte) 0 Successful SSA optimization Pass2ConstantInlining Simplifying constant integer increment ++0 Simplifying constant integer increment ++0 @@ -701,8 +724,8 @@ Adding NOP phi() at start of @1 Adding NOP phi() at start of @2 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::@2_1 +Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::@2_2 Adding NOP phi() at start of main::@2_3 Adding NOP phi() at start of main::@2_4 @@ -734,8 +757,8 @@ Created 1 initial phi equivalence classes Coalesced [61] main::x#6 ← main::x#1 Coalesced down to 1 phi equivalence classes Culled Empty Block (label) @2 -Culled Empty Block (label) main::@2 Culled Empty Block (label) main::@2_1 +Culled Empty Block (label) main::@2 Culled Empty Block (label) main::@2_2 Culled Empty Block (label) main::@2_3 Culled Empty Block (label) main::@2_4 diff --git a/src/test/ref/unroll-while-min.log b/src/test/ref/unroll-while-min.log index 4272c5f92..58d87f504 100644 --- a/src/test/ref/unroll-while-min.log +++ b/src/test/ref/unroll-while-min.log @@ -69,49 +69,67 @@ Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = (byte*) 1024 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Unrolling loop Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 +GRAPH (NEW VERSIONS for main::i#2) +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + [0] (byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 ) + [1] unroll if((byte) main::i#2<(byte) 2) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte) main::i#4 ← phi( ) + [2] *((const byte*) main::SCREEN#0 + (byte) main::i#4) ← (byte) 'a' + [3] (byte) main::i#1 ← ++ (byte) main::i#4 + to:main::@1 +main::@return: scope:[main] from main::@1 + [4] return + to:@return +@1: scope:[] from @begin + [5] call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Successful SSA optimization Pass2LoopHeadConstantIdentification +Alias (byte) main::i#1 = (byte) main::i#2 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) main::i#5 (const byte) main::i#0 +Successful SSA optimization Pass2IdenticalPhiElimination +if() condition always true - replacing block destination [9] unroll if((const byte) main::i#0<(byte) 2) goto main::@2 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: main::@2 tails: main::@1 blocks: main::@1 main::@2 Successful SSA optimization Pass2LoopUnroll -Identical Phi Values (byte) main::i#2 (const byte) main::i#0 +Identical Phi Values (byte) main::i#4 (const byte) main::i#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [3] (byte) main::i#1 ← ++ (const byte) main::i#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::i#1 = ++main::i#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [1] if((const byte) main::i#0<(byte) 2) goto main::@2 +if() condition always true - replacing block destination [0] if((const byte) main::i#1<(byte) 2) goto main::@2_1 Successful SSA optimization Pass2ConstantIfs Simplifying expression containing zero main::SCREEN#0 in [2] *((const byte*) main::SCREEN#0 + (const byte) main::i#0) ← (byte) 'a' Successful SSA optimization PassNSimplifyExpressionWithZero -Unrolling loop Loop head: main::@1_1 tails: main::@2_1 blocks: main::@2_1 main::@1_1 +Unrolling loop Loop head: main::@2_1 tails: main::@1_2 blocks: main::@1_2 main::@2_1 Successful SSA optimization Pass2LoopUnroll -Identical Phi Values (byte) main::i#4 (const byte) main::i#1 +Identical Phi Values (byte) main::i#6 (const byte) main::i#1 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [7] (byte) main::i#5 ← ++ (const byte) main::i#1 +Constant right-side identified [4] (byte) main::i#7 ← ++ (const byte) main::i#1 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::i#5 = ++main::i#1 +Constant (const byte) main::i#7 = ++main::i#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [3] if((const byte) main::i#1<(byte) 2) goto main::@2_1 +Removing PHI-reference to removed block (main::@1_2) in block main::@2_2 +if() condition always false - eliminating [5] if((const byte) main::i#7<(byte) 2) goto main::@2_2 Successful SSA optimization Pass2ConstantIfs -Unrolling loop Loop head: main::@1_2 tails: main::@2_2 blocks: main::@2_2 main::@1_2 -Successful SSA optimization Pass2LoopUnroll -Identical Phi Values (byte) main::i#6 (const byte) main::i#5 -Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [8] (byte) main::i#7 ← ++ (const byte) main::i#5 -Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) main::i#7 = ++main::i#5 -Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [4] if((const byte) main::i#5<(byte) 2) goto main::@2_2 -Successful SSA optimization Pass2ConstantIfs -Eliminating variable (byte) main::i#8 from unused block main::@1_3 -Eliminating variable (byte) main::i#9 from unused block main::@2_3 -Removing PHI-reference to removed block (main::@2_2) in block main::@1_3 -Removing unused block main::@2_2 -Removing unused block main::@1_3 -Removing unused block main::@2_3 -Successful SSA optimization Pass2EliminateUnusedBlocks Eliminating unused constant (const byte) main::i#7 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) main::i#5 -Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable (byte) main::i#8 from unused block main::@2_2 +Eliminating variable (byte) main::i#9 from unused block main::@2_2 +Removing unused block main::@2_2 +Removing unused block main::@1_3 +Successful SSA optimization Pass2EliminateUnusedBlocks Inlining constant with different constant siblings (const byte) main::i#0 Inlining constant with different constant siblings (const byte) main::i#1 Constant inlined main::i#0 = (byte) 0 @@ -126,8 +144,8 @@ Adding NOP phi() at start of @1 Adding NOP phi() at start of @2 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@1 Adding NOP phi() at start of main::@1_1 +Adding NOP phi() at start of main::@1 Adding NOP phi() at start of main::@1_2 CALL GRAPH Calls in [] to main:2 @@ -135,8 +153,8 @@ Calls in [] to main:2 Created 0 initial phi equivalence classes Coalesced down to 0 phi equivalence classes Culled Empty Block (label) @2 -Culled Empty Block (label) main::@1 Culled Empty Block (label) main::@1_1 +Culled Empty Block (label) main::@1 Culled Empty Block (label) main::@1_2 Renumbering block main::@2 to main::@1 Adding NOP phi() at start of @begin