public static boolean parametersAlignedP(Cons clause1, Cons clause2, List vars) {
    { Stella_Object var = null;
      Cons iter000 = vars.theConsList;

      for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
        var = iter000.value;
        if (!(clause1.position(var, 0) == clause2.position(var, 0))) {
          return (false);
        }
      }
    }
    { Stella_Object p1 = null;
      Cons iter001 = clause1.rest;
      Stella_Object p2 = null;
      Cons iter002 = clause2.rest;

      for (;(!(iter001 == Stella.NIL)) &&
                (!(iter002 == Stella.NIL)); iter001 = iter001.rest, iter002 = iter002.rest) {
        p1 = iter001.value;
        p2 = iter002.value;
        if (Stella_Object.consP(p1)) {
          if ((!Stella_Object.consP(p2)) ||
              (!Logic.parametersAlignedP(((Cons)(p1)), ((Cons)(p2)), vars))) {
            return (false);
          }
        }
        else {
          if (((!Logic.variableArgP(p1)) ||
              (!Logic.variableArgP(p2))) &&
              (!Stella_Object.eqlP(p1, p2))) {
            return (false);
          }
        }
      }
    }
    return (true);
  }