*/
unsigned OptPtrLoad5 (CodeSeg* S);
+/* Search for the sequence:
+ *
+ * jsr pushax
+ * ldx #$00
+ * lda yyy
+ * jsr tosaddax
+ * ldy #$00
+ * jsr ldauidx
+ *
+ * and replace it by:
+ *
+ * sta ptr1
+ * stx ptr1+1
+ * ldy yyy
+ * lda (ptr1),y
+ */
+
+unsigned OptPtrLoad6 (CodeSeg* S);
+/* Search for the sequence:
+ *
+ * jsr pushax
+ * ldy xxx
+ * ldx #$00
+ * lda (sp),y
+ * jsr tosaddax
+ * ldy #$00
+ * jsr ldauidx
+ *
+ * and replace it by:
+ *
+ * sta ptr1
+ * stx ptr1+1
+ * ldy xxx
+ * lda (sp),y
+ * tay
+ * lda (ptr1),y
+ */
+
+unsigned OptPtrLoad7 (CodeSeg* S);
+/* Search for the sequence:
+ *
+ * jsr aslax1/shlax1
+ * clc
+ * adc xxx
+ * tay
+ * txa
+ * adc yyy
+ * tax
+ * tya
+ * ldy zzz
+ * jsr ldaxidx
+ *
+ * and replace it by:
+ *
+ * stx tmp1
+ * asl a
+ * rol tmp1
+ * clc
+ * adc xxx
+ * sta ptr1
+ * lda tmp1
+ * adc yyy
+ * sta ptr1+1
+ * ldy zzz
+ * lda (ptr1),y
+ * tax
+ * dey
+ * lda (ptr1),y
+ */
+
+unsigned OptPtrLoad11 (CodeSeg* S);
/* Search for the sequence:
*
* clc
* lda (ptr1),y
*/
-unsigned OptPtrLoad6 (CodeSeg* S);
-/* Search for the sequence:
+unsigned OptPtrLoad12 (CodeSeg* S);
+/* Search for the sequence:
*
* lda regbank+n
* ldx regbank+n+1
*
*/
-unsigned OptPtrLoad7 (CodeSeg* S);
+unsigned OptPtrLoad13 (CodeSeg* S);
/* Search for the sequence:
*
* lda zp
* lda (zp),y
*/
-unsigned OptPtrLoad8 (CodeSeg* S);
+unsigned OptPtrLoad14 (CodeSeg* S);
/* Search for the sequence:
*
* lda zp
* Must execute before OptPtrLoad10!
*/
-unsigned OptPtrLoad9 (CodeSeg* S);
+unsigned OptPtrLoad15 (CodeSeg* S);
/* Search for the sequence:
*
* lda zp
* lda (zp),y
*/
-unsigned OptPtrLoad10 (CodeSeg* S);
+unsigned OptPtrLoad16 (CodeSeg* S);
/* Search for the sequence
*
* ldy ...
* This step must be executed *after* OptPtrLoad1!
*/
-unsigned OptPtrLoad11 (CodeSeg* S);
+unsigned OptPtrLoad17 (CodeSeg* S);
/* Search for the sequence
*
* ldy ...