+static const char* IsRegVar (const StackOpData* D)
+/* If the value pushed is that of a register variable, return the name of the
+ * entry in the register bank. Otherwise return NULL.
+ */
+{
+ CodeEntry* P;
+
+ if (D->PushIndex >= 2 &&
+ (P = D->PrevEntry) != 0 &&
+ P->OPC == OP65_LDX &&
+ P->AM == AM65_ZP &&
+ strncmp (P->Arg, "regbank+", 7) == 0 &&
+ isdigit (P->Arg[8]) &&
+ (P = CS_GetEntry (D->Code, D->PushIndex-2)) != 0 &&
+ P->OPC == OP65_LDA &&
+ P->AM == AM65_ZP &&
+ strncmp (P->Arg, "regbank+", 7) == 0 &&
+ isdigit (P->Arg[8])) {
+ /* Ok, it loads the register variable */
+ return P->Arg;
+ } else {
+ return 0;
+ }
+}
+
+
+