From 83edd3e21be48f511dc702b2c367e1aa8a0775b4 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sat, 26 Aug 2017 01:15:57 +0200 Subject: [PATCH] Implemented phi transition reuse when transitions are identical --- .../kickc/passes/Pass4CodeGeneration.java | 299 ++- .../camelot64/kickc/test/ref/flipper-rex2.asm | 2 - .../camelot64/kickc/test/ref/flipper-rex2.cfg | 2 +- .../camelot64/kickc/test/ref/flipper-rex2.log | 1662 ++++++++--------- .../camelot64/kickc/test/ref/forrangemin.cfg | 2 +- .../dk/camelot64/kickc/test/ref/voronoi.cfg | 2 +- 6 files changed, 1043 insertions(+), 926 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java b/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java index ffcdfddaf..28e8cf1ad 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4CodeGeneration.java @@ -68,7 +68,8 @@ public class Pass4CodeGeneration { /** * Add label declarations for all scope variables assigned to ZP registers - * @param asm The ASM program + * + * @param asm The ASM program * @param scope The scope */ private void addZpLabels(AsmProgram asm, ScopeRef scope) { @@ -76,10 +77,10 @@ public class Pass4CodeGeneration { Set added = new LinkedHashSet<>(); for (Variable scopeVar : scopeVars) { Registers.Register register = scopeVar.getAllocation(); - if(register!=null && register.isZp()) { + if (register != null && register.isZp()) { Registers.RegisterZp registerZp = (Registers.RegisterZp) register; String asmName = scopeVar.getAsmName(); - if(asmName !=null && !added.contains(asmName)) { + if (asmName != null && !added.contains(asmName)) { asm.addLabelDecl(asmName, registerZp.getZp()); added.add(asmName); } @@ -170,7 +171,6 @@ public class Pass4CodeGeneration { } } - /** * Contains previous assignment added to the ALU register between calls to generateStatementAsm */ @@ -195,45 +195,157 @@ public class Pass4CodeGeneration { } } - - private void genBlockEntryPoints(AsmProgram asm, ControlFlowBlock block) { - if (block.hasPhiBlock()) { - List predecessors = new ArrayList<>(getGraph().getPredecessors(block)); - Collections.sort(predecessors, new Comparator() { - @Override - public int compare(ControlFlowBlock o1, ControlFlowBlock o2) { - return o1.getLabel().getFullName().compareTo(o2.getLabel().getFullName()); - } - }); - for (ControlFlowBlock predecessor : predecessors) { - if (block.getLabel().equals(predecessor.getConditionalSuccessor())) { - genBlockPhiTransition(asm, predecessor, block, block.getScope()); - asm.addInstruction("JMP", AsmAddressingMode.ABS, block.getLabel().getLocalName().replace('@', 'b').replace(':', '_'), false); - } + /** + * Generate all block entry points (phi transitions) which have not already been generated. + * + * @param asm The ASM program to generate into + * @param toBlock The block to generate remaining entry points for. + */ + private void genBlockEntryPoints(AsmProgram asm, ControlFlowBlock toBlock) { + PhiTransitions transitions = getTransitions(toBlock); + for (ControlFlowBlock fromBlock : transitions.getFromBlocks()) { + PhiTransitions.PhiTransition transition = transitions.getTransition(fromBlock); + if (!transition.isGenerated() && toBlock.getLabel().equals(fromBlock.getConditionalSuccessor())) { + genBlockPhiTransition(asm, fromBlock, toBlock, toBlock.getScope()); + asm.addInstruction("JMP", AsmAddressingMode.ABS, toBlock.getLabel().getLocalName().replace('@', 'b').replace(':', '_'), false); } } } + /** + * Generate a phi block transition. The transition performs all necessary assignment operations when moving from one block to another. + * The transition can be inserted either at the start of the to-block (used for conditional jumps) + * or at the end of the from-block ( used at default block transitions and before JMP/JSR) + * + * @param asm The ASP program to generate the transition into. + * @param fromBlock The from-block + * @param toBlock The to-block + * @param scope The scope where the ASM code is being inserted. Used to ensure that labels inserted in the code reference the right variables. + * If the transition code is inserted in the to-block, this is the scope of the to-block. + * If the transition code is inserted in the from-block this is the scope of the from-block. + */ + private void genBlockPhiTransition(AsmProgram asm, ControlFlowBlock fromBlock, ControlFlowBlock toBlock, ScopeRef scope) { + PhiTransitions transitions = getTransitions(toBlock); + PhiTransitions.PhiTransition transition = transitions.getTransition(fromBlock); + if (!transition.isGenerated()) { - /** Keeps track of the phi transitions into blocks during code generation. + Statement toFirstStatement = toBlock.getStatements().get(0); + String segmentSrc = "[" + toFirstStatement.getIndex() + "] phi from "; + for (ControlFlowBlock fBlock : transition.getFromBlocks()) { + segmentSrc += fBlock.getLabel().getFullName() + " "; + } + segmentSrc += "to " + toBlock.getLabel().getFullName(); + asm.startSegment(toFirstStatement.getIndex(), segmentSrc); + + for (ControlFlowBlock fBlock : transition.getFromBlocks()) { + asm.addLabel((toBlock.getLabel().getLocalName() + "_from_" + fBlock.getLabel().getLocalName()).replace('@', 'b').replace(':', '_')); + } + + List assignments = transition.getAssignments(); + for (PhiTransitions.PhiTransition.PhiAssignment assignment : assignments) { + genAsmMove(asm, assignment.getVariable(), assignment.getrValue(), assignment.getPhiBlock(), scope); + } + transition.setGenerated(true); + } + } + + + /** + * Keeps track of the phi transitions into blocks during code generation. * Used to ensure that duplicate transitions are only code generated once. - * Maps to-block label to the transition information*/ - private Map transitions; + * Maps to-blocks to the transition information for the block + */ + private Map blockTransitions = new LinkedHashMap<>(); + + /** + * Get phi transitions for a specific to-block. + * + * @param toBlock The block + * @return The transitions into the block + */ + private PhiTransitions getTransitions(ControlFlowBlock toBlock) { + PhiTransitions transitions = this.blockTransitions.get(toBlock); + if (transitions == null) { + transitions = new PhiTransitions(toBlock); + this.blockTransitions.put(toBlock, transitions); + } + return transitions; + } /** * Keeps track of the phi transitions into a single block during code generation. * Used to ensure that duplicate transitions are only code generated once. */ - public static class PhiTransitions { + public class PhiTransitions { - /** Label of the to-block. */ + /** + * Label of the to-block. + */ private ControlFlowBlock toBlock; - /** The phi-block of the to-block. */ + /** + * The phi-block of the to-block. + */ private StatementPhiBlock phiBlock; - public PhiTransition getTransition(LabelRef fromBlock) { - return null; + /** + * Maps from-block to the transition from the from-block to the to-block. + */ + private Map transitions; + + public PhiTransitions(ControlFlowBlock toBlock) { + this.toBlock = toBlock; + this.transitions = new LinkedHashMap<>(); + if (toBlock.hasPhiBlock()) { + this.phiBlock = toBlock.getPhiBlock(); + List predecessors = new ArrayList<>(getGraph().getPredecessors(toBlock)); + Collections.sort(predecessors, new Comparator() { + @Override + public int compare(ControlFlowBlock o1, ControlFlowBlock o2) { + return o1.getLabel().getFullName().compareTo(o2.getLabel().getFullName()); + } + }); + for (ControlFlowBlock predecessor : predecessors) { + PhiTransition transition = findTransition(predecessor); + transitions.put(predecessor, transition); + } + } + } + + /** + * Find the transition from a specific fromBlock. + * If another transition already has the same assignments it is reused. If not a new transition is created. + * @param fromBlock + * @return + */ + private PhiTransition findTransition(ControlFlowBlock fromBlock) { + PhiTransition transition = new PhiTransition(fromBlock); + for (PhiTransition candidate : transitions.values()) { + if(candidate.equalAssignments(transition)) { + candidate.addFromBlock(fromBlock); + return candidate; + } + } + return transition; + } + + public Collection getFromBlocks() { + return transitions.keySet(); + } + + /** + * Get the transition into the to-block from a specific from-block + * + * @param fromBlock The from-block + * @return The transition from the from-block into the to-block + */ + public PhiTransition getTransition(ControlFlowBlock fromBlock) { + PhiTransition transition = transitions.get(fromBlock); + if (transition == null) { + transition = findTransition(fromBlock); + transitions.put(fromBlock, transition); + } + return transition; } @@ -246,10 +358,41 @@ public class Pass4CodeGeneration { private List fromBlocks; + private List assignments; + private boolean generated; + public PhiTransition(ControlFlowBlock fromBlock) { + this.fromBlocks = new ArrayList<>(); + this.fromBlocks.add(fromBlock); + this.generated = false; + initAssignments(fromBlock); + } + + private void initAssignments(ControlFlowBlock fromBlock) { + this.assignments = new ArrayList<>(); + if (phiBlock != null) { + List phiVariables = new ArrayList<>(phiBlock.getPhiVariables()); + Collections.reverse(phiVariables); + for (StatementPhiBlock.PhiVariable phiVariable : phiVariables) { + List phiRValues = new ArrayList<>(phiVariable.getValues()); + Collections.sort(phiRValues, new Comparator() { + @Override + public int compare(StatementPhiBlock.PhiRValue o1, StatementPhiBlock.PhiRValue o2) { + return o1.getPredecessor().getFullName().compareTo(o2.getPredecessor().getFullName()); + } + }); + for (StatementPhiBlock.PhiRValue phiRValue : phiRValues) { + if (phiRValue.getPredecessor().equals(fromBlock.getLabel())) { + this.assignments.add(new PhiAssignment(phiVariable, phiRValue)); + } + } + } + } + } + public List getAssignments() { - return null; + return assignments; } public boolean isGenerated() { @@ -260,6 +403,37 @@ public class Pass4CodeGeneration { this.generated = generated; } + public void addFromBlock(ControlFlowBlock fromBlock) { + fromBlocks.add(fromBlock); + } + + /** + * Determines if another transition has the exact same assignments as this block + * @param other The other transition to examine + * @return true if the assignments are identical + */ + public boolean equalAssignments(PhiTransition other) { + List otherAssignments = other.getAssignments(); + if(assignments.size()!=otherAssignments.size()) { + return false; + } + for (int i = 0; i < assignments.size(); i++) { + PhiAssignment assignment = assignments.get(i); + PhiAssignment otherAssignment = otherAssignments.get(i); + if(!assignment.getVariable().equals(otherAssignment.getVariable())) { + return false; + } + if(!assignment.getrValue().equals(otherAssignment.getrValue())) { + return false; + } + } + return true; + } + + public List getFromBlocks() { + return fromBlocks; + } + /** * Assignment of a single value during a phi transition */ @@ -269,52 +443,30 @@ public class Pass4CodeGeneration { private StatementPhiBlock.PhiRValue phiRValue; - } - - - } - - } - - - - /** - * Generate a phi block transition. The transition performs all necessary assignment operations when moving from one block to another. - * The transition can be inserted either at the start of the to-block (used for conditional jumps) - * or at the end of the from-block ( used at default block transitions and before JMP/JSR) - * @param asm The ASP program to generate the transition into. - * @param fromBlock The from-block - * @param toBlock The to-block - * @param scope The scope where the ASM code is being inserted. Used to ensure that labels inserted in the code reference the right variables. - * If the transition code is inserted in the to-block, this is the scope of the to-block. - * If the transition code is inserted in the from-block this is the scope of the from-block. - */ - private void genBlockPhiTransition(AsmProgram asm, ControlFlowBlock fromBlock, ControlFlowBlock toBlock, ScopeRef scope) { - Statement toFirstStatement = toBlock.getStatements().get(0); - asm.startSegment(toFirstStatement.getIndex(), "[" + toFirstStatement.getIndex() + "]" + " phi from " + fromBlock.getLabel().getFullName() + " to " + toBlock.getLabel().getFullName()); - asm.addLabel((toBlock.getLabel().getLocalName() + "_from_" + fromBlock.getLabel().getLocalName()).replace('@', 'b').replace(':', '_')); - if (toBlock.hasPhiBlock()) { - StatementPhiBlock phiBlock = toBlock.getPhiBlock(); - List phiVariables = new ArrayList<>(phiBlock.getPhiVariables()); - Collections.reverse(phiVariables); - for (StatementPhiBlock.PhiVariable phiVariable : phiVariables) { - List phiRValues = phiVariable.getValues(); - Collections.sort(phiRValues, new Comparator() { - @Override - public int compare(StatementPhiBlock.PhiRValue o1, StatementPhiBlock.PhiRValue o2) { - return o1.getPredecessor().getFullName().compareTo(o2.getPredecessor().getFullName()); - } - }); - for (StatementPhiBlock.PhiRValue phiRValue : phiRValues) { - if (phiRValue.getPredecessor().equals(fromBlock.getLabel())) { - genAsmMove(asm, phiVariable.getVariable(), phiRValue.getrValue(), phiBlock, scope); - break; - } + public PhiAssignment(StatementPhiBlock.PhiVariable phiVariable, StatementPhiBlock.PhiRValue phiRValue) { + this.phiVariable = phiVariable; + this.phiRValue = phiRValue; } + + public LValue getVariable() { + return phiVariable.getVariable(); + } + + public RValue getrValue() { + return phiRValue.getrValue(); + } + + public Statement getPhiBlock() { + return phiBlock; + } + } + } + } + private Registers.Register getRegister(RValue rValue) { if (rValue instanceof VariableRef) { VariableRef rValueRef = (VariableRef) rValue; @@ -326,11 +478,12 @@ public class Pass4CodeGeneration { /** * Generate ASM assigning a value (rValue) to a variable (lValue). - * @param asm The ASM program to generate into - * @param lValue The lValue that should be assigned the value - * @param rValue The rValue to assign to the lValue. + * + * @param asm The ASM program to generate into + * @param lValue The lValue that should be assigned the value + * @param rValue The rValue to assign to the lValue. * @param statement The ICL statement that is the cause of the assignment. - * @param scope The scope where the ASM code is being inserted. Used to ensure that labels inserted in the code reference the right variables. + * @param scope The scope where the ASM code is being inserted. Used to ensure that labels inserted in the code reference the right variables. */ private void genAsmMove(AsmProgram asm, LValue lValue, RValue rValue, Statement statement, ScopeRef scope) { asm.startSegment(statement.getIndex(), "[" + statement.getIndex() + "] phi " + lValue.toString(program) + " = " + rValue.toString(program)); diff --git a/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm b/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm index 7b6b6a72e..66912e884 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm +++ b/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm @@ -1,8 +1,6 @@ jsr main main: { jsr prepare - ldx #$19 - jmp b3 b3_from_b11: ldx #$19 b3: diff --git a/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.cfg b/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.cfg index cbb505841..3da8fde51 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.cfg +++ b/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.cfg @@ -6,7 +6,7 @@ main: scope:[main] from @begin [1] call prepare param-assignment [ ] to:main::@3 main::@3: scope:[main] from main main::@11 main::@3 main::@6 - [2] (byte) main::c#2 ← phi( main/(byte) 25 main::@11/(byte) 25 main::@6/(byte) main::c#1 ) [ main::c#2 ] + [2] (byte) main::c#2 ← phi( main/(byte) 25 main::@6/(byte) main::c#1 main::@11/(byte) 25 ) [ main::c#2 ] [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] to:main::@4 diff --git a/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.log b/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.log index 2d6087946..e93dc0e38 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/flipper-rex2.log @@ -4372,136 +4372,131 @@ main: { .label c = 2 //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 + //SEG6 [2] phi from main main::@11 to main::@3 b3_from_main: + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- zpby1=coby1 lda #$19 sta c jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- zpby1=coby1 - lda #$19 - sta c - jmp b3 - //SEG10 [2] phi from main::@3 to main::@3 + //SEG8 [2] phi from main::@3 to main::@3 b3_from_b3: jmp b3 - //SEG11 [2] phi from main::@6 to main::@3 + //SEG9 [2] phi from main::@6 to main::@3 b3_from_b6: - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy jmp b3 - //SEG13 main::@3 + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- zpby1=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- zpby1=_star_cowo1 lda $d012 sta $1 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- zpby1_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- zpby1_neq_coby1_then_la1 lda $1 cmp #$fe bne b3_from_b3 jmp b4 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- zpby1=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- zpby1=_star_cowo1 lda $d012 sta $3 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- zpby1_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- zpby1_neq_coby1_then_la1 lda $3 cmp #$ff bne b4 jmp b6 - //SEG19 main::@6 + //SEG17 main::@6 b6: - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- zpby1=_dec_zpby1 + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- zpby1=_dec_zpby1 dec c - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- zpby1_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- zpby1_neq_0_then_la1 lda c bne b3_from_b6 jmp b7 - //SEG22 main::@7 + //SEG20 main::@7 b7: - //SEG23 [9] call flip param-assignment [ ] + //SEG21 [9] call flip param-assignment [ ] jsr flip jmp b10 - //SEG24 main::@10 + //SEG22 main::@10 b10: - //SEG25 [10] call plot param-assignment [ ] + //SEG23 [10] call plot param-assignment [ ] jsr plot jmp b11 - //SEG26 main::@11 + //SEG24 main::@11 b11: - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 jmp breturn - //SEG28 main::@return + //SEG26 main::@return breturn: - //SEG29 [12] return [ ] + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label $3 = 16 .label i = 6 .label x = 7 .label line = 3 .label y = 5 - //SEG31 [13] phi from plot to plot::@1 + //SEG29 [13] phi from plot to plot::@1 b1_from_plot: - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- zpby1=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- zpby1=coby1 lda #$0 sta i jmp b1 - //SEG35 [13] phi from plot::@3 to plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 b1_from_b3: - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy jmp b1 - //SEG39 plot::@1 + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 + //SEG38 [14] phi from plot::@1 to plot::@2 b2_from_b1: - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- zpby1=coby1 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- zpby1=coby1 lda #$0 sta x - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy jmp b2 - //SEG43 [14] phi from plot::@2 to plot::@2 + //SEG41 [14] phi from plot::@2 to plot::@2 b2_from_b2: - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy jmp b2 - //SEG46 plot::@2 + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- zpby1=cowo1_staridx_zpby2 + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- zpby1=cowo1_staridx_zpby2 ldx i lda $1000,x sta $3 - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_zpby1=zpby2 + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_zpby1=zpby2 lda $3 ldy x sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- zpby1=_inc_zpby1 + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- zpby1=_inc_zpby1 inc i - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- zpby1=_inc_zpby1 + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- zpby1=_inc_zpby1 inc x - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- zpby1_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- zpby1_lt_coby1_then_la1 lda x cmp #$10 bcc b2_from_b2 jmp b3 - //SEG52 plot::@3 + //SEG50 plot::@3 b3: - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -4509,18 +4504,18 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1_from_b3 jmp breturn - //SEG56 plot::@return + //SEG54 plot::@return breturn: - //SEG57 [23] return [ ] + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label $0 = 17 .label $4 = 18 @@ -4529,131 +4524,131 @@ flip: { .label c = 11 .label r = 8 .label i = 12 - //SEG59 [24] phi from flip to flip::@1 + //SEG57 [24] phi from flip to flip::@1 b1_from_flip: - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- zpby1=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- zpby1=coby1 lda #$f sta dstIdx - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- zpby1=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- zpby1=coby1 lda #$0 sta srcIdx jmp b1 - //SEG63 [24] phi from flip::@4 to flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 b1_from_b4: - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy jmp b1 - //SEG67 flip::@1 + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 + //SEG66 [25] phi from flip::@1 to flip::@2 b2_from_b1: - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy jmp b2 - //SEG72 [25] phi from flip::@2 to flip::@2 + //SEG70 [25] phi from flip::@2 to flip::@2 b2_from_b2: - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy jmp b2 - //SEG76 flip::@2 + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- zpby1=cowo1_staridx_zpby2 + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- zpby1=cowo1_staridx_zpby2 ldx srcIdx lda $1000,x sta $0 - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_zpby1=zpby2 + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_zpby1=zpby2 lda $0 ldx dstIdx sta $1100,x - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- zpby1=_inc_zpby1 + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- zpby1=_inc_zpby1 inc srcIdx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- zpby1=zpby1_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- zpby1=zpby1_plus_coby1 lda dstIdx clc adc #$10 sta dstIdx - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2_from_b2 jmp b4 - //SEG83 flip::@4 + //SEG81 flip::@4 b4: - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- zpby1=_dec_zpby1 dec dstIdx - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1_from_b4 - //SEG87 [35] phi from flip::@4 to flip::@3 + //SEG85 [35] phi from flip::@4 to flip::@3 b3_from_b4: - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- zpby1=coby1 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- zpby1=coby1 lda #$0 sta i jmp b3 - //SEG89 [35] phi from flip::@3 to flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 b3_from_b3: - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy jmp b3 - //SEG91 flip::@3 + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- zpby1=cowo1_staridx_zpby2 + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- zpby1=cowo1_staridx_zpby2 ldx i lda $1100,x sta $4 - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_zpby1=zpby2 + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_zpby1=zpby2 lda $4 ldx i sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- zpby1=_inc_zpby1 + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- zpby1=_inc_zpby1 inc i - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- zpby1_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- zpby1_neq_0_then_la1 lda i bne b3_from_b3 jmp breturn - //SEG96 flip::@return + //SEG94 flip::@return breturn: - //SEG97 [40] return [ ] + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { .label i = 13 - //SEG99 [41] phi from prepare to prepare::@1 + //SEG97 [41] phi from prepare to prepare::@1 b1_from_prepare: - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- zpby1=coby1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- zpby1=coby1 lda #$0 sta i jmp b1 - //SEG101 [41] phi from prepare::@1 to prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 b1_from_b1: - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy jmp b1 - //SEG103 prepare::@1 + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_zpby1=zpby1 + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_zpby1=zpby1 ldx i txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- zpby1=_inc_zpby1 + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- zpby1=_inc_zpby1 inc i - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- zpby1_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- zpby1_neq_0_then_la1 lda i bne b1_from_b1 jmp breturn - //SEG107 prepare::@return + //SEG105 prepare::@return breturn: - //SEG108 [45] return [ ] + //SEG106 [45] return [ ] rts } @@ -4691,11 +4686,11 @@ Uplift Scope [main] 2,002: zp ZP_BYTE:14 [ main::$1 ] 2,002: zp ZP_BYTE:15 [ mai Uplift Scope [prepare] 38.5: zp ZP_BYTE:13 [ prepare::i#2 prepare::i#1 ] Uplift Scope [] -Uplifting [flip] best 168124 combination reg byte a [ flip::$0 ] zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ] reg byte y [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] reg byte x [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] reg byte x [ flip::i#2 flip::i#1 ] reg byte a [ flip::$4 ] zp ZP_BYTE:8 [ flip::r#2 flip::r#1 ] -Uplifting [plot] best 143824 combination reg byte y [ plot::x#2 plot::x#1 ] reg byte a [ plot::$3 ] reg byte x [ plot::i#2 plot::i#3 plot::i#1 ] zp ZP_PTR_BYTE:3 [ plot::line#2 plot::line#1 ] zp ZP_BYTE:5 [ plot::y#2 plot::y#1 ] -Uplifting [main] best 125424 combination reg byte a [ main::$1 ] reg byte a [ main::$3 ] reg byte x [ main::c#2 main::c#1 ] -Uplifting [prepare] best 125324 combination reg byte x [ prepare::i#2 prepare::i#1 ] -Uplifting [] best 125324 combination +Uplifting [flip] best 160124 combination reg byte a [ flip::$0 ] zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ] reg byte y [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] reg byte x [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] reg byte x [ flip::i#2 flip::i#1 ] reg byte a [ flip::$4 ] zp ZP_BYTE:8 [ flip::r#2 flip::r#1 ] +Uplifting [plot] best 135824 combination reg byte y [ plot::x#2 plot::x#1 ] reg byte a [ plot::$3 ] reg byte x [ plot::i#2 plot::i#3 plot::i#1 ] zp ZP_PTR_BYTE:3 [ plot::line#2 plot::line#1 ] zp ZP_BYTE:5 [ plot::y#2 plot::y#1 ] +Uplifting [main] best 120424 combination reg byte a [ main::$1 ] reg byte a [ main::$3 ] reg byte x [ main::c#2 main::c#1 ] +Uplifting [prepare] best 120324 combination reg byte x [ prepare::i#2 prepare::i#1 ] +Uplifting [] best 120324 combination Coalescing zero page register [ zp ZP_BYTE:5 [ plot::y#2 plot::y#1 ] ] with [ zp ZP_BYTE:8 [ flip::r#2 flip::r#1 ] ] Allocated (was zp ZP_PTR_BYTE:3) zp ZP_PTR_BYTE:2 [ plot::line#2 plot::line#1 ] Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ plot::y#2 plot::y#1 flip::r#2 flip::r#1 ] @@ -4732,110 +4727,106 @@ bend: main: { //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 + //SEG6 [2] phi from main main::@11 to main::@3 b3_from_main: + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 ldx #$19 jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 - ldx #$19 - jmp b3 - //SEG10 [2] phi from main::@3 to main::@3 + //SEG8 [2] phi from main::@3 to main::@3 b3_from_b3: jmp b3 - //SEG11 [2] phi from main::@6 to main::@3 + //SEG9 [2] phi from main::@6 to main::@3 b3_from_b6: - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy - //SEG13 main::@3 + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$fe bne b3_from_b3 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$ff bne b4 - //SEG19 main::@6 + //SEG17 main::@6 b6: - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby dex - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3_from_b6 - //SEG22 main::@7 + //SEG20 main::@7 b7: - //SEG23 [9] call flip param-assignment [ ] + //SEG21 [9] call flip param-assignment [ ] jsr flip - //SEG24 main::@10 + //SEG22 main::@10 b10: - //SEG25 [10] call plot param-assignment [ ] + //SEG23 [10] call plot param-assignment [ ] jsr plot - //SEG26 main::@11 + //SEG24 main::@11 b11: - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 - //SEG28 main::@return + //SEG26 main::@return breturn: - //SEG29 [12] return [ ] + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label line = 2 .label y = 4 - //SEG31 [13] phi from plot to plot::@1 + //SEG29 [13] phi from plot to plot::@1 b1_from_plot: - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG35 [13] phi from plot::@3 to plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 b1_from_b3: - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy - //SEG39 plot::@1 + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 + //SEG38 [14] phi from plot::@1 to plot::@2 b2_from_b1: - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 ldy #$0 - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy jmp b2 - //SEG43 [14] phi from plot::@2 to plot::@2 + //SEG41 [14] phi from plot::@2 to plot::@2 b2_from_b2: - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy - //SEG46 plot::@2 + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby inx - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby iny - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 cpy #$10 bcc b2_from_b2 - //SEG52 plot::@3 + //SEG50 plot::@3 b3: - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -4843,124 +4834,124 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1_from_b3 - //SEG56 plot::@return + //SEG54 plot::@return breturn: - //SEG57 [23] return [ ] + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label c = 5 .label r = 4 - //SEG59 [24] phi from flip to flip::@1 + //SEG57 [24] phi from flip to flip::@1 b1_from_flip: - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 ldy #$f - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG63 [24] phi from flip::@4 to flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 b1_from_b4: - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy - //SEG67 flip::@1 + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 + //SEG66 [25] phi from flip::@1 to flip::@2 b2_from_b1: - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy jmp b2 - //SEG72 [25] phi from flip::@2 to flip::@2 + //SEG70 [25] phi from flip::@2 to flip::@2 b2_from_b2: - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy - //SEG76 flip::@2 + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby sta $1100,y - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby inx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 tya clc adc #$10 tay - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2_from_b2 - //SEG83 flip::@4 + //SEG81 flip::@4 b4: - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby dey - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1_from_b4 - //SEG87 [35] phi from flip::@4 to flip::@3 + //SEG85 [35] phi from flip::@4 to flip::@3 b3_from_b4: - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 ldx #$0 jmp b3 - //SEG89 [35] phi from flip::@3 to flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 b3_from_b3: - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy - //SEG91 flip::@3 + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby lda $1100,x - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby inx - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3_from_b3 - //SEG96 flip::@return + //SEG94 flip::@return breturn: - //SEG97 [40] return [ ] + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { - //SEG99 [41] phi from prepare to prepare::@1 + //SEG97 [41] phi from prepare to prepare::@1 b1_from_prepare: - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG101 [41] phi from prepare::@1 to prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 b1_from_b1: - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy - //SEG103 prepare::@1 + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby inx - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b1_from_b1 - //SEG107 prepare::@return + //SEG105 prepare::@return breturn: - //SEG108 [45] return [ ] + //SEG106 [45] return [ ] rts } @@ -4971,6 +4962,7 @@ Replacing label b2_from_b2 with b2 Replacing label b1_from_b4 with b1 Replacing label b3_from_b3 with b3 Replacing label b1_from_b1 with b1 +Removing instruction b3_from_main: Removing instruction b3_from_b6: Removing instruction b1_from_b3: Removing instruction b2_from_b1: @@ -4993,106 +4985,101 @@ bend: main: { //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 - b3_from_main: + //SEG6 [2] phi from main main::@11 to main::@3 + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 ldx #$19 jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 - ldx #$19 - jmp b3 - //SEG10 [2] phi from main::@3 to main::@3 + //SEG8 [2] phi from main::@3 to main::@3 b3_from_b3: jmp b3 - //SEG11 [2] phi from main::@6 to main::@3 - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy - //SEG13 main::@3 + //SEG9 [2] phi from main::@6 to main::@3 + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$fe bne b3_from_b3 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$ff bne b4 - //SEG19 main::@6 + //SEG17 main::@6 b6: - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby dex - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG22 main::@7 + //SEG20 main::@7 b7: - //SEG23 [9] call flip param-assignment [ ] + //SEG21 [9] call flip param-assignment [ ] jsr flip - //SEG24 main::@10 + //SEG22 main::@10 b10: - //SEG25 [10] call plot param-assignment [ ] + //SEG23 [10] call plot param-assignment [ ] jsr plot - //SEG26 main::@11 + //SEG24 main::@11 b11: - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 - //SEG28 main::@return + //SEG26 main::@return breturn: - //SEG29 [12] return [ ] + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label line = 2 .label y = 4 - //SEG31 [13] phi from plot to plot::@1 + //SEG29 [13] phi from plot to plot::@1 b1_from_plot: - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG35 [13] phi from plot::@3 to plot::@1 - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy - //SEG39 plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 + //SEG38 [14] phi from plot::@1 to plot::@2 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 ldy #$0 - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy jmp b2 - //SEG43 [14] phi from plot::@2 to plot::@2 - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy - //SEG46 plot::@2 + //SEG41 [14] phi from plot::@2 to plot::@2 + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby inx - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby iny - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 cpy #$10 bcc b2 - //SEG52 plot::@3 + //SEG50 plot::@3 b3: - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -5100,125 +5087,124 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1 - //SEG56 plot::@return + //SEG54 plot::@return breturn: - //SEG57 [23] return [ ] + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label c = 5 .label r = 4 - //SEG59 [24] phi from flip to flip::@1 + //SEG57 [24] phi from flip to flip::@1 b1_from_flip: - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 ldy #$f - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG63 [24] phi from flip::@4 to flip::@1 - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy - //SEG67 flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG66 [25] phi from flip::@1 to flip::@2 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy jmp b2 - //SEG72 [25] phi from flip::@2 to flip::@2 - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy - //SEG76 flip::@2 + //SEG70 [25] phi from flip::@2 to flip::@2 + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby sta $1100,y - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby inx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 tya clc adc #$10 tay - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2 - //SEG83 flip::@4 + //SEG81 flip::@4 b4: - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby dey - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1 - //SEG87 [35] phi from flip::@4 to flip::@3 + //SEG85 [35] phi from flip::@4 to flip::@3 b3_from_b4: - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 ldx #$0 jmp b3 - //SEG89 [35] phi from flip::@3 to flip::@3 - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy - //SEG91 flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby lda $1100,x - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby inx - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG96 flip::@return + //SEG94 flip::@return breturn: - //SEG97 [40] return [ ] + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { - //SEG99 [41] phi from prepare to prepare::@1 + //SEG97 [41] phi from prepare to prepare::@1 b1_from_prepare: - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG101 [41] phi from prepare::@1 to prepare::@1 - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy - //SEG103 prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby inx - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b1 - //SEG107 prepare::@return + //SEG105 prepare::@return breturn: - //SEG108 [45] return [ ] + //SEG106 [45] return [ ] rts } Removing instruction bbegin: Removing instruction bend: -Removing instruction b3_from_main: Removing instruction b6: Removing instruction b7: Removing instruction b10: @@ -5244,98 +5230,94 @@ ASSEMBLER main: { //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 + //SEG6 [2] phi from main main::@11 to main::@3 + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 ldx #$19 jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 - ldx #$19 - jmp b3 - //SEG10 [2] phi from main::@3 to main::@3 + //SEG8 [2] phi from main::@3 to main::@3 b3_from_b3: jmp b3 - //SEG11 [2] phi from main::@6 to main::@3 - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy - //SEG13 main::@3 + //SEG9 [2] phi from main::@6 to main::@3 + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$fe bne b3_from_b3 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$ff bne b4 - //SEG19 main::@6 - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby + //SEG17 main::@6 + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby dex - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG22 main::@7 - //SEG23 [9] call flip param-assignment [ ] + //SEG20 main::@7 + //SEG21 [9] call flip param-assignment [ ] jsr flip - //SEG24 main::@10 - //SEG25 [10] call plot param-assignment [ ] + //SEG22 main::@10 + //SEG23 [10] call plot param-assignment [ ] jsr plot - //SEG26 main::@11 - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG24 main::@11 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 - //SEG28 main::@return - //SEG29 [12] return [ ] + //SEG26 main::@return + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label line = 2 .label y = 4 - //SEG31 [13] phi from plot to plot::@1 - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG29 [13] phi from plot to plot::@1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG35 [13] phi from plot::@3 to plot::@1 - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy - //SEG39 plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 + //SEG38 [14] phi from plot::@1 to plot::@2 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 ldy #$0 - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy jmp b2 - //SEG43 [14] phi from plot::@2 to plot::@2 - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy - //SEG46 plot::@2 + //SEG41 [14] phi from plot::@2 to plot::@2 + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby inx - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby iny - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 cpy #$10 bcc b2 - //SEG52 plot::@3 - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG50 plot::@3 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -5343,112 +5325,112 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1 - //SEG56 plot::@return - //SEG57 [23] return [ ] + //SEG54 plot::@return + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label c = 5 .label r = 4 - //SEG59 [24] phi from flip to flip::@1 - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG57 [24] phi from flip to flip::@1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 ldy #$f - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG63 [24] phi from flip::@4 to flip::@1 - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy - //SEG67 flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG66 [25] phi from flip::@1 to flip::@2 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy jmp b2 - //SEG72 [25] phi from flip::@2 to flip::@2 - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy - //SEG76 flip::@2 + //SEG70 [25] phi from flip::@2 to flip::@2 + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby sta $1100,y - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby inx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 tya clc adc #$10 tay - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2 - //SEG83 flip::@4 - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby + //SEG81 flip::@4 + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby dey - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1 - //SEG87 [35] phi from flip::@4 to flip::@3 - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 + //SEG85 [35] phi from flip::@4 to flip::@3 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 ldx #$0 jmp b3 - //SEG89 [35] phi from flip::@3 to flip::@3 - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy - //SEG91 flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby lda $1100,x - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby inx - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG96 flip::@return - //SEG97 [40] return [ ] + //SEG94 flip::@return + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { - //SEG99 [41] phi from prepare to prepare::@1 - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 + //SEG97 [41] phi from prepare to prepare::@1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 ldx #$0 jmp b1 - //SEG101 [41] phi from prepare::@1 to prepare::@1 - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy - //SEG103 prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby inx - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b1 - //SEG107 prepare::@return - //SEG108 [45] return [ ] + //SEG105 prepare::@return + //SEG106 [45] return [ ] rts } @@ -5470,95 +5452,91 @@ ASSEMBLER main: { //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 + //SEG6 [2] phi from main main::@11 to main::@3 + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 ldx #$19 jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 - ldx #$19 - jmp b3 - //SEG10 [2] phi from main::@3 to main::@3 + //SEG8 [2] phi from main::@3 to main::@3 b3_from_b3: - //SEG11 [2] phi from main::@6 to main::@3 - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy - //SEG13 main::@3 + //SEG9 [2] phi from main::@6 to main::@3 + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$fe bne b3_from_b3 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$ff bne b4 - //SEG19 main::@6 - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby + //SEG17 main::@6 + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby dex - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG22 main::@7 - //SEG23 [9] call flip param-assignment [ ] + //SEG20 main::@7 + //SEG21 [9] call flip param-assignment [ ] jsr flip - //SEG24 main::@10 - //SEG25 [10] call plot param-assignment [ ] + //SEG22 main::@10 + //SEG23 [10] call plot param-assignment [ ] jsr plot - //SEG26 main::@11 - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG24 main::@11 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 - //SEG28 main::@return - //SEG29 [12] return [ ] + //SEG26 main::@return + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label line = 2 .label y = 4 - //SEG31 [13] phi from plot to plot::@1 - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG29 [13] phi from plot to plot::@1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG35 [13] phi from plot::@3 to plot::@1 - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy - //SEG39 plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 + //SEG38 [14] phi from plot::@1 to plot::@2 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 ldy #$0 - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy - //SEG43 [14] phi from plot::@2 to plot::@2 - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy - //SEG46 plot::@2 + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG41 [14] phi from plot::@2 to plot::@2 + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby inx - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby iny - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 cpy #$10 bcc b2 - //SEG52 plot::@3 - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG50 plot::@3 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -5566,108 +5544,108 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1 - //SEG56 plot::@return - //SEG57 [23] return [ ] + //SEG54 plot::@return + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label c = 5 .label r = 4 - //SEG59 [24] phi from flip to flip::@1 - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG57 [24] phi from flip to flip::@1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 ldy #$f - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG63 [24] phi from flip::@4 to flip::@1 - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy - //SEG67 flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG66 [25] phi from flip::@1 to flip::@2 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy - //SEG72 [25] phi from flip::@2 to flip::@2 - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy - //SEG76 flip::@2 + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG70 [25] phi from flip::@2 to flip::@2 + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby sta $1100,y - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby inx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 tya clc adc #$10 tay - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2 - //SEG83 flip::@4 - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby + //SEG81 flip::@4 + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby dey - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1 - //SEG87 [35] phi from flip::@4 to flip::@3 - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 + //SEG85 [35] phi from flip::@4 to flip::@3 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG89 [35] phi from flip::@3 to flip::@3 - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy - //SEG91 flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby lda $1100,x - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby inx - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG96 flip::@return - //SEG97 [40] return [ ] + //SEG94 flip::@return + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { - //SEG99 [41] phi from prepare to prepare::@1 - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 + //SEG97 [41] phi from prepare to prepare::@1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG101 [41] phi from prepare::@1 to prepare::@1 - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy - //SEG103 prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby inx - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b1 - //SEG107 prepare::@return - //SEG108 [45] return [ ] + //SEG105 prepare::@return + //SEG106 [45] return [ ] rts } @@ -5684,94 +5662,90 @@ ASSEMBLER main: { //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 + //SEG6 [2] phi from main main::@11 to main::@3 + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 ldx #$19 jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 - ldx #$19 - jmp b3 - //SEG10 [2] phi from main::@3 to main::@3 - //SEG11 [2] phi from main::@6 to main::@3 - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy - //SEG13 main::@3 + //SEG8 [2] phi from main::@3 to main::@3 + //SEG9 [2] phi from main::@6 to main::@3 + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$fe bne b3 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$ff bne b4 - //SEG19 main::@6 - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby + //SEG17 main::@6 + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby dex - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG22 main::@7 - //SEG23 [9] call flip param-assignment [ ] + //SEG20 main::@7 + //SEG21 [9] call flip param-assignment [ ] jsr flip - //SEG24 main::@10 - //SEG25 [10] call plot param-assignment [ ] + //SEG22 main::@10 + //SEG23 [10] call plot param-assignment [ ] jsr plot - //SEG26 main::@11 - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG24 main::@11 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 - //SEG28 main::@return - //SEG29 [12] return [ ] + //SEG26 main::@return + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label line = 2 .label y = 4 - //SEG31 [13] phi from plot to plot::@1 - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG29 [13] phi from plot to plot::@1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG35 [13] phi from plot::@3 to plot::@1 - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy - //SEG39 plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 + //SEG38 [14] phi from plot::@1 to plot::@2 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 ldy #$0 - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy - //SEG43 [14] phi from plot::@2 to plot::@2 - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy - //SEG46 plot::@2 + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG41 [14] phi from plot::@2 to plot::@2 + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby inx - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby iny - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 cpy #$10 bcc b2 - //SEG52 plot::@3 - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG50 plot::@3 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -5779,108 +5753,108 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1 - //SEG56 plot::@return - //SEG57 [23] return [ ] + //SEG54 plot::@return + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label c = 5 .label r = 4 - //SEG59 [24] phi from flip to flip::@1 - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG57 [24] phi from flip to flip::@1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 ldy #$f - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG63 [24] phi from flip::@4 to flip::@1 - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy - //SEG67 flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG66 [25] phi from flip::@1 to flip::@2 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy - //SEG72 [25] phi from flip::@2 to flip::@2 - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy - //SEG76 flip::@2 + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG70 [25] phi from flip::@2 to flip::@2 + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby sta $1100,y - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby inx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 tya clc adc #$10 tay - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2 - //SEG83 flip::@4 - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby + //SEG81 flip::@4 + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby dey - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1 - //SEG87 [35] phi from flip::@4 to flip::@3 - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 + //SEG85 [35] phi from flip::@4 to flip::@3 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG89 [35] phi from flip::@3 to flip::@3 - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy - //SEG91 flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby lda $1100,x - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby inx - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG96 flip::@return - //SEG97 [40] return [ ] + //SEG94 flip::@return + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { - //SEG99 [41] phi from prepare to prepare::@1 - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 + //SEG97 [41] phi from prepare to prepare::@1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG101 [41] phi from prepare::@1 to prepare::@1 - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy - //SEG103 prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby inx - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b1 - //SEG107 prepare::@return - //SEG108 [45] return [ ] + //SEG105 prepare::@return + //SEG106 [45] return [ ] rts } @@ -5896,93 +5870,89 @@ ASSEMBLER main: { //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 + //SEG6 [2] phi from main main::@11 to main::@3 + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 ldx #$19 - jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 - ldx #$19 - //SEG10 [2] phi from main::@3 to main::@3 - //SEG11 [2] phi from main::@6 to main::@3 - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy - //SEG13 main::@3 + //SEG8 [2] phi from main::@3 to main::@3 + //SEG9 [2] phi from main::@6 to main::@3 + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$fe bne b3 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$ff bne b4 - //SEG19 main::@6 - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby + //SEG17 main::@6 + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby dex - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG22 main::@7 - //SEG23 [9] call flip param-assignment [ ] + //SEG20 main::@7 + //SEG21 [9] call flip param-assignment [ ] jsr flip - //SEG24 main::@10 - //SEG25 [10] call plot param-assignment [ ] + //SEG22 main::@10 + //SEG23 [10] call plot param-assignment [ ] jsr plot - //SEG26 main::@11 - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG24 main::@11 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 - //SEG28 main::@return - //SEG29 [12] return [ ] + //SEG26 main::@return + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label line = 2 .label y = 4 - //SEG31 [13] phi from plot to plot::@1 - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG29 [13] phi from plot to plot::@1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG35 [13] phi from plot::@3 to plot::@1 - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy - //SEG39 plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 + //SEG38 [14] phi from plot::@1 to plot::@2 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 ldy #$0 - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy - //SEG43 [14] phi from plot::@2 to plot::@2 - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy - //SEG46 plot::@2 + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG41 [14] phi from plot::@2 to plot::@2 + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby inx - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby iny - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 cpy #$10 bcc b2 - //SEG52 plot::@3 - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG50 plot::@3 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -5990,108 +5960,108 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1 - //SEG56 plot::@return - //SEG57 [23] return [ ] + //SEG54 plot::@return + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label c = 5 .label r = 4 - //SEG59 [24] phi from flip to flip::@1 - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG57 [24] phi from flip to flip::@1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 ldy #$f - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG63 [24] phi from flip::@4 to flip::@1 - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy - //SEG67 flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG66 [25] phi from flip::@1 to flip::@2 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy - //SEG72 [25] phi from flip::@2 to flip::@2 - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy - //SEG76 flip::@2 + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG70 [25] phi from flip::@2 to flip::@2 + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby sta $1100,y - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby inx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 tya clc adc #$10 tay - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2 - //SEG83 flip::@4 - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby + //SEG81 flip::@4 + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby dey - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1 - //SEG87 [35] phi from flip::@4 to flip::@3 - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 + //SEG85 [35] phi from flip::@4 to flip::@3 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG89 [35] phi from flip::@3 to flip::@3 - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy - //SEG91 flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby lda $1100,x - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby inx - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG96 flip::@return - //SEG97 [40] return [ ] + //SEG94 flip::@return + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { - //SEG99 [41] phi from prepare to prepare::@1 - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 + //SEG97 [41] phi from prepare to prepare::@1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG101 [41] phi from prepare::@1 to prepare::@1 - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy - //SEG103 prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby inx - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b1 - //SEG107 prepare::@return - //SEG108 [45] return [ ] + //SEG105 prepare::@return + //SEG106 [45] return [ ] rts } @@ -6193,93 +6163,89 @@ FINAL CODE main: { //SEG5 [1] call prepare param-assignment [ ] jsr prepare - //SEG6 [2] phi from main to main::@3 + //SEG6 [2] phi from main main::@11 to main::@3 + b3_from_b11: //SEG7 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 ldx #$19 - jmp b3 - //SEG8 [2] phi from main::@11 to main::@3 - b3_from_b11: - //SEG9 [2] phi (byte) main::c#2 = (byte) 25 -- xby=coby1 - ldx #$19 - //SEG10 [2] phi from main::@3 to main::@3 - //SEG11 [2] phi from main::@6 to main::@3 - //SEG12 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy - //SEG13 main::@3 + //SEG8 [2] phi from main::@3 to main::@3 + //SEG9 [2] phi from main::@6 to main::@3 + //SEG10 [2] phi (byte) main::c#2 = (byte) main::c#1 -- register_copy + //SEG11 main::@3 b3: - //SEG14 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 + //SEG12 [3] (byte~) main::$1 ← * (word) 53266 [ main::$1 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG15 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG13 [4] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$fe bne b3 - //SEG16 main::@4 + //SEG14 main::@4 b4: - //SEG17 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 + //SEG15 [5] (byte~) main::$3 ← * (word) 53266 [ main::$3 main::c#2 ] -- aby=_star_cowo1 lda $d012 - //SEG18 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 + //SEG16 [6] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ] -- aby_neq_coby1_then_la1 cmp #$ff bne b4 - //SEG19 main::@6 - //SEG20 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby + //SEG17 main::@6 + //SEG18 [7] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby dex - //SEG21 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 + //SEG19 [8] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG22 main::@7 - //SEG23 [9] call flip param-assignment [ ] + //SEG20 main::@7 + //SEG21 [9] call flip param-assignment [ ] jsr flip - //SEG24 main::@10 - //SEG25 [10] call plot param-assignment [ ] + //SEG22 main::@10 + //SEG23 [10] call plot param-assignment [ ] jsr plot - //SEG26 main::@11 - //SEG27 [11] if(true) goto main::@3 [ ] -- true_then_la1 + //SEG24 main::@11 + //SEG25 [11] if(true) goto main::@3 [ ] -- true_then_la1 jmp b3_from_b11 - //SEG28 main::@return - //SEG29 [12] return [ ] + //SEG26 main::@return + //SEG27 [12] return [ ] rts } -//SEG30 plot +//SEG28 plot plot: { .label line = 2 .label y = 4 - //SEG31 [13] phi from plot to plot::@1 - //SEG32 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 + //SEG29 [13] phi from plot to plot::@1 + //SEG30 [13] phi (byte) plot::y#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta y - //SEG33 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 + //SEG31 [13] phi (byte*) plot::line#2 = (word) 1236 -- zpptrby1=cowo1 lda #<$4d4 sta line lda #>$4d4 sta line+$1 - //SEG34 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 + //SEG32 [13] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG35 [13] phi from plot::@3 to plot::@1 - //SEG36 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy - //SEG37 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy - //SEG38 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy - //SEG39 plot::@1 + //SEG33 [13] phi from plot::@3 to plot::@1 + //SEG34 [13] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy + //SEG35 [13] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy + //SEG36 [13] phi (byte) plot::i#3 = (byte) plot::i#1 -- register_copy + //SEG37 plot::@1 b1: - //SEG40 [14] phi from plot::@1 to plot::@2 - //SEG41 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 + //SEG38 [14] phi from plot::@1 to plot::@2 + //SEG39 [14] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1 ldy #$0 - //SEG42 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy - //SEG43 [14] phi from plot::@2 to plot::@2 - //SEG44 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy - //SEG45 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy - //SEG46 plot::@2 + //SEG40 [14] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy + //SEG41 [14] phi from plot::@2 to plot::@2 + //SEG42 [14] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy + //SEG43 [14] phi (byte) plot::i#2 = (byte) plot::i#1 -- register_copy + //SEG44 plot::@2 b2: - //SEG47 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby + //SEG45 [15] (byte~) plot::$3 ← (word) 4096 *idx (byte) plot::i#2 [ plot::i#2 plot::line#2 plot::x#2 plot::$3 plot::y#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG48 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby + //SEG46 [16] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::i#2 plot::line#2 plot::x#2 plot::y#2 ] -- zpptrby1_staridx_yby=aby sta (line),y - //SEG49 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby + //SEG47 [17] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::i#1 plot::line#2 plot::x#2 plot::y#2 ] -- xby=_inc_xby inx - //SEG50 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby + //SEG48 [18] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby=_inc_yby iny - //SEG51 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 + //SEG49 [19] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::i#1 plot::x#1 plot::line#2 plot::y#2 ] -- yby_lt_coby1_then_la1 cpy #$10 bcc b2 - //SEG52 plot::@3 - //SEG53 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 + //SEG50 plot::@3 + //SEG51 [20] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::i#1 plot::line#1 plot::y#2 ] -- zpptrby1=zpptrby1_plus_coby1 lda line clc adc #$28 @@ -6287,108 +6253,108 @@ plot: { bcc !+ inc line+$1 !: - //SEG54 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 + //SEG52 [21] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1 dec y - //SEG55 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 + //SEG53 [22] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1_neq_0_then_la1 lda y bne b1 - //SEG56 plot::@return - //SEG57 [23] return [ ] + //SEG54 plot::@return + //SEG55 [23] return [ ] rts } -//SEG58 flip +//SEG56 flip flip: { .label c = 5 .label r = 4 - //SEG59 [24] phi from flip to flip::@1 - //SEG60 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 + //SEG57 [24] phi from flip to flip::@1 + //SEG58 [24] phi (byte) flip::r#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta r - //SEG61 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 + //SEG59 [24] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1 ldy #$f - //SEG62 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 + //SEG60 [24] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG63 [24] phi from flip::@4 to flip::@1 - //SEG64 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy - //SEG65 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy - //SEG66 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy - //SEG67 flip::@1 + //SEG61 [24] phi from flip::@4 to flip::@1 + //SEG62 [24] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy + //SEG63 [24] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy + //SEG64 [24] phi (byte) flip::srcIdx#3 = (byte) flip::srcIdx#1 -- register_copy + //SEG65 flip::@1 b1: - //SEG68 [25] phi from flip::@1 to flip::@2 - //SEG69 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 + //SEG66 [25] phi from flip::@1 to flip::@2 + //SEG67 [25] phi (byte) flip::c#2 = (byte) 16 -- zpby1=coby1 lda #$10 sta c - //SEG70 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy - //SEG71 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy - //SEG72 [25] phi from flip::@2 to flip::@2 - //SEG73 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy - //SEG74 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy - //SEG75 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy - //SEG76 flip::@2 + //SEG68 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#5 -- register_copy + //SEG69 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#3 -- register_copy + //SEG70 [25] phi from flip::@2 to flip::@2 + //SEG71 [25] phi (byte) flip::c#2 = (byte) flip::c#1 -- register_copy + //SEG72 [25] phi (byte) flip::dstIdx#3 = (byte) flip::dstIdx#1 -- register_copy + //SEG73 [25] phi (byte) flip::srcIdx#2 = (byte) flip::srcIdx#1 -- register_copy + //SEG74 flip::@2 b2: - //SEG77 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby + //SEG75 [26] (byte~) flip::$0 ← (word) 4096 *idx (byte) flip::srcIdx#2 [ flip::srcIdx#2 flip::dstIdx#3 flip::$0 flip::c#2 flip::r#2 ] -- aby=cowo1_staridx_xby lda $1000,x - //SEG78 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby + //SEG76 [27] *((word) 4352 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- cowo1_staridx_yby=aby sta $1100,y - //SEG79 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby + //SEG77 [28] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::srcIdx#1 flip::dstIdx#3 flip::c#2 flip::r#2 ] -- xby=_inc_xby inx - //SEG80 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 + //SEG78 [29] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#2 flip::r#2 ] -- yby=yby_plus_coby1 tya clc adc #$10 tay - //SEG81 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 + //SEG79 [30] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1=_dec_zpby1 dec c - //SEG82 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 + //SEG80 [31] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::srcIdx#1 flip::dstIdx#1 flip::c#1 flip::r#2 ] -- zpby1_neq_0_then_la1 lda c bne b2 - //SEG83 flip::@4 - //SEG84 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby + //SEG81 flip::@4 + //SEG82 [32] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#2 ] -- yby=_dec_yby dey - //SEG85 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 + //SEG83 [33] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1=_dec_zpby1 dec r - //SEG86 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 + //SEG84 [34] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ] -- zpby1_neq_0_then_la1 lda r bne b1 - //SEG87 [35] phi from flip::@4 to flip::@3 - //SEG88 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 + //SEG85 [35] phi from flip::@4 to flip::@3 + //SEG86 [35] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG89 [35] phi from flip::@3 to flip::@3 - //SEG90 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy - //SEG91 flip::@3 + //SEG87 [35] phi from flip::@3 to flip::@3 + //SEG88 [35] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy + //SEG89 flip::@3 b3: - //SEG92 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby + //SEG90 [36] (byte~) flip::$4 ← (word) 4352 *idx (byte) flip::i#2 [ flip::i#2 flip::$4 ] -- aby=cowo1_staridx_xby lda $1100,x - //SEG93 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby + //SEG91 [37] *((word) 4096 + (byte) flip::i#2) ← (byte~) flip::$4 [ flip::i#2 ] -- cowo1_staridx_xby=aby sta $1000,x - //SEG94 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby + //SEG92 [38] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby inx - //SEG95 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 + //SEG93 [39] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b3 - //SEG96 flip::@return - //SEG97 [40] return [ ] + //SEG94 flip::@return + //SEG95 [40] return [ ] rts } -//SEG98 prepare +//SEG96 prepare prepare: { - //SEG99 [41] phi from prepare to prepare::@1 - //SEG100 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 + //SEG97 [41] phi from prepare to prepare::@1 + //SEG98 [41] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1 ldx #$0 - //SEG101 [41] phi from prepare::@1 to prepare::@1 - //SEG102 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy - //SEG103 prepare::@1 + //SEG99 [41] phi from prepare::@1 to prepare::@1 + //SEG100 [41] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy + //SEG101 prepare::@1 b1: - //SEG104 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby + //SEG102 [42] *((word) 4096 + (byte) prepare::i#2) ← (byte) prepare::i#2 [ prepare::i#2 ] -- cowo1_staridx_xby=xby txa sta $1000,x - //SEG105 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby + //SEG103 [43] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby inx - //SEG106 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 + //SEG104 [44] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1 cpx #$0 bne b1 - //SEG107 prepare::@return - //SEG108 [45] return [ ] + //SEG105 prepare::@return + //SEG106 [45] return [ ] rts } diff --git a/src/main/java/dk/camelot64/kickc/test/ref/forrangemin.cfg b/src/main/java/dk/camelot64/kickc/test/ref/forrangemin.cfg index 34ab9a35d..48b985f6f 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/forrangemin.cfg +++ b/src/main/java/dk/camelot64/kickc/test/ref/forrangemin.cfg @@ -13,7 +13,7 @@ main::@1: scope:[main] from main main::@1 [4] if((byte) main::i#1!=(byte) 0) goto main::@1 [ main::i#1 ] to:main::@2 main::@2: scope:[main] from main::@1 main::@2 - [5] (byte) main::j#2 ← phi( main::@1/(byte) 100 main::@2/(byte) main::j#1 ) [ main::j#2 ] + [5] (byte) main::j#2 ← phi( main::@2/(byte) main::j#1 main::@1/(byte) 100 ) [ main::j#2 ] [6] *((word) 1280 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] [7] (byte) main::j#1 ← -- (byte) main::j#2 [ main::j#1 ] [8] if((byte) main::j#1!=(byte) 255) goto main::@2 [ main::j#1 ] diff --git a/src/main/java/dk/camelot64/kickc/test/ref/voronoi.cfg b/src/main/java/dk/camelot64/kickc/test/ref/voronoi.cfg index e79b95d04..c4847a9d2 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/voronoi.cfg +++ b/src/main/java/dk/camelot64/kickc/test/ref/voronoi.cfg @@ -138,7 +138,7 @@ findcol::@9: scope:[findcol] from findcol::@1 [68] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@2 [ render::x#2 render::y#2 render::colline#2 findcol::i#12 findcol::x#0 findcol::xp#0 findcol::y#0 findcol::yp#0 findcol::mindiff#10 findcol::mincol#11 numpoints#1 ] to:findcol::@return findcol::@return: scope:[findcol] from findcol::@8 findcol::@9 - [69] (byte) findcol::return#0 ← phi( findcol::@8/(byte) findcol::mincol#2 findcol::@9/(byte) 0 ) [ render::x#2 render::y#2 findcol::return#0 render::colline#2 ] + [69] (byte) findcol::return#0 ← phi( findcol::@9/(byte) 0 findcol::@8/(byte) findcol::mincol#2 ) [ render::x#2 render::y#2 findcol::return#0 render::colline#2 ] [70] return [ render::x#2 render::y#2 findcol::return#0 render::colline#2 ] to:@return findcol::@2: scope:[findcol] from findcol::@1 findcol::@9