public static Cons quoteArguments(MethodSlot method, Cons arguments) {
    { List ptypespecs = method.methodParameterTypeSpecifiers();
      int lastparameterindex = ptypespecs.length() - 1;
      StandardObject varargstype = (((BooleanWrapper)(KeyValueList.dynamicSlotValue(method.dynamicSlots, Stella.SYM_STELLA_METHOD_VARIABLE_ARGUMENTSp, Stella.FALSE_WRAPPER))).wrapperValue ? MethodSlot.variableArgumentsType(method) : ((StandardObject)(null)));
      StandardObject ptype = null;

      { ConsIterator it = arguments.allocateIterator();
        int argindex = Stella.NULL_INTEGER;
        int iter000 = 0;

        loop000 : for (;it.nextP(); iter000 = iter000 + 1) {
          argindex = iter000;
          if (!(Stella_Object.surrogateP(it.value) ||
              Stella_Object.keywordP(it.value))) {
            if ((argindex >= lastparameterindex) &&
                (varargstype != null)) {
              ptype = varargstype;
            }
            else {
              ptype = ((StandardObject)(ptypespecs.nth(argindex)));
            }
            if ((it.value == Stella.SYM_STELLA_NULL) ||
                (((ptype == Stella.SGT_STELLA_BOOLEAN) &&
                ((it.value == Stella.SYM_STELLA_TRUE) ||
                 (it.value == Stella.SYM_STELLA_FALSE))) ||
                 (Stella_Object.wrapperP(it.value) &&
                  ((ptype != null) &&
                   StandardObject.subTypeSpecOfP(ptype, Stella.SGT_STELLA_LITERAL))))) {
              continue loop000;
            }
            it.valueSetter(Cons.list$(Cons.cons(Stella.SYM_STELLA_COPY_CONS_TREE, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_QUOTE, Cons.cons(it.value, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL)))));
          }
        }
      }
      return (arguments);
    }
  }