public static String[] parseShellCommand(Stella_Object command) {
    { Cons parsedcommand = Stella.NIL;
      String[] result = null;

      { Surrogate testValue000 = Stella_Object.safePrimaryType(command);

        if (testValue000 == OntosaurusUtil.SGT_STELLA_CONS) {
          { Cons command000 = ((Cons)(command));

            parsedcommand = command000;
          }
        }
        else if (Surrogate.subtypeOfStringP(testValue000)) {
          { StringWrapper command000 = ((StringWrapper)(command));

            parsedcommand = Stella.splitString(command000.wrapperValue, ' ');
          }
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("parse-shell-command: illegal shell command format: `" + command + "'");
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
      if (false) {
        parsedcommand = Cons.cons(((StringWrapper)(parsedcommand.value)), parsedcommand);
      }
      result = new String[parsedcommand.length()];
      { StringWrapper elt = null;
        Cons iter000 = parsedcommand;
        int i = Stella.NULL_INTEGER;
        int iter001 = 0;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
          elt = ((StringWrapper)(iter000.value));
          i = iter001;
          result[i] = elt.wrapperValue;
        }
      }
      return (result);
    }
  }