public static Cons evaluateRemainingArguments(LogicObject predicatevalue, Cons arguments) {
    { Cons evaluatedarguments = Stella.NIL;

      if ((predicatevalue != null) &&
          Stella_Object.isaP(predicatevalue, Logic.SGT_LOGIC_NAMED_DESCRIPTION)) {
        { List variabletypes = ((NamedDescription)(predicatevalue)).ioVariableTypes;

          { Surrogate type = null;
            Cons iter000 = variabletypes.rest();

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              type = ((Surrogate)(iter000.value));
              { Stella_Object head000 = arguments.value;

                arguments = arguments.rest;
                { Stella_Object arg = head000;

                  if (arg != null) {
                    evaluatedarguments = Cons.cons(Logic.evaluateTypedArgument(arg, type), evaluatedarguments);
                  }
                }
              }
            }
          }
          { Stella_Object arg = null;
            Cons iter001 = arguments;

            for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
              arg = iter001.value;
              evaluatedarguments = Cons.cons(Logic.evaluateTypedArgument(arg, ((Surrogate)(variabletypes.last()))), evaluatedarguments);
            }
          }
          return (evaluatedarguments.reverse());
        }
      }
      else {
        {
          { Stella_Object arg = null;
            Cons iter002 = arguments;
            Cons collect000 = null;

            for (;!(iter002 == Stella.NIL); iter002 = iter002.rest) {
              arg = iter002.value;
              if (collect000 == null) {
                {
                  collect000 = Cons.cons(Logic.evaluateTerm(arg), Stella.NIL);
                  if (evaluatedarguments == Stella.NIL) {
                    evaluatedarguments = collect000;
                  }
                  else {
                    Cons.addConsToEndOfConsList(evaluatedarguments, collect000);
                  }
                }
              }
              else {
                {
                  collect000.rest = Cons.cons(Logic.evaluateTerm(arg), Stella.NIL);
                  collect000 = collect000.rest;
                }
              }
            }
          }
          return (evaluatedarguments);
        }
      }
    }
  }