public static Cons collectCursorClauses(Cons cursorstree, boolean dontoptimizeP, Object [] MV_returnarray) {
    { GeneralizedSymbol testValue000 = ((GeneralizedSymbol)(cursorstree.value));

      if (testValue000 == Stella.SYM_STELLA_IN) {
        return (Cons.yieldInCursorClauses(cursorstree, dontoptimizeP, MV_returnarray));
      }
      else if (testValue000 == Stella.SYM_STELLA_ON) {
        return (Cons.yieldOnCursorClauses(cursorstree, MV_returnarray));
      }
      else if (testValue000 == Stella.SYM_STELLA_AS) {
        { Cons alliteratorclauses = Stella.NIL;
          Cons allvalueclauses = Stella.NIL;
          Cons allbumpclauses = Stella.NIL;
          Cons continuationtests = Stella.NIL;

          { Stella_Object clause = null;
            Cons iter000 = cursorstree.rest;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              clause = iter000.value;
              { Cons iteratorclauses = null;
                Cons valueclauses = null;
                Cons bumpclauses = null;
                Stella_Object continuationtest = null;

                { Object [] caller_MV_returnarray = new Object[3];

                  iteratorclauses = Cons.collectCursorClauses(((Cons)(clause)), dontoptimizeP, caller_MV_returnarray);
                  valueclauses = ((Cons)(caller_MV_returnarray[0]));
                  bumpclauses = ((Cons)(caller_MV_returnarray[1]));
                  continuationtest = ((Stella_Object)(caller_MV_returnarray[2]));
                }
                alliteratorclauses = alliteratorclauses.concatenate(iteratorclauses, Stella.NIL);
                allvalueclauses = allvalueclauses.concatenate(valueclauses, Stella.NIL);
                allbumpclauses = allbumpclauses.concatenate(bumpclauses, Stella.NIL);
                continuationtests = Cons.cons(continuationtest, continuationtests);
              }
            }
          }
          { Cons _return_temp = alliteratorclauses;

            MV_returnarray[0] = allvalueclauses;
            MV_returnarray[1] = allbumpclauses;
            MV_returnarray[2] = ((continuationtests.length() == 1) ? continuationtests.value : Cons.cons(Stella.SYM_STELLA_AND, continuationtests.reverse().remove(Stella.SYM_STELLA_TRUE).concatenate(Stella.NIL, Stella.NIL)));
            return (_return_temp);
          }
        }
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
    }
  }