public static GlobalVariable defineStellaGlobalVariableFromParseTree(Cons tree, String stringifiedsource, Object [] MV_returnarray) {
    { Stella_Object typetree = tree.rest.rest.value;
      Stella_Object initialvaluetree = tree.fourth();
      Cons optionstree = tree.nthRest(4);
      boolean specialP = tree.value == Stella.SYM_STELLA_DEFSPECIAL;
      boolean constantP = tree.value == Stella.SYM_STELLA_DEFCONSTANT;
      boolean noinitialvalueP = false;
      GlobalVariable global = GlobalVariable.newGlobalVariable();
      GlobalVariable internedglobal = null;

      if ((tree.length() <= 3) ||
          (Stella.getQuotedTree("((:DOCUMENTATION :PUBLIC? :AUXILIARY?) \"/STELLA\")", "/STELLA").memberP(initialvaluetree) &&
           (((optionstree.length()) % 2) == 1))) {
        noinitialvalueP = true;
        initialvaluetree = (specialP ? Stella.KWD_UNBOUND_SPECIAL_VARIABLE : null);
        optionstree = tree.nthRest(3);
      }
      global.variableName = ((Symbol)(tree.rest.value.permanentify()));
      global.variableStringifiedSource = stringifiedsource;
      internedglobal = GlobalVariable.internGlobalVariable(global);
      GlobalVariable.recordVariableHomeModule(internedglobal);
      if (noinitialvalueP &&
          (!specialP)) {
        if (constantP) {
          { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

            try {
              Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
              Stella.signalTranslationError();
              if (!(Stella.suppressWarningsP())) {
                Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                {
                  Stella.STANDARD_ERROR.nativeStream.println();
                  Stella.STANDARD_ERROR.nativeStream.println(" Missing value in constant declaration.");
                }
;
              }

            } finally {
              Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
            }
          }
        }
        else {
          { Object old$PrintreadablyP$001 = Stella.$PRINTREADABLYp$.get();

            try {
              Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
              Stella.signalTranslationError();
              if (!(Stella.suppressWarningsP())) {
                Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                {
                  Stella.STANDARD_ERROR.nativeStream.println();
                  Stella.STANDARD_ERROR.nativeStream.println(" Missing initial value in variable declaration.");
                }
;
              }

            } finally {
              Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$001);
            }
          }
        }
        { GlobalVariable _return_temp = internedglobal;

          MV_returnarray[0] = initialvaluetree;
          return (_return_temp);
        }
      }
      if (!(global == internedglobal)) {
        { GlobalVariable _return_temp = internedglobal;

          MV_returnarray[0] = initialvaluetree;
          return (_return_temp);
        }
      }
      typetree = typetree.yieldTypeSpecifier();
      StandardObject.validateTypeSpecifier(((StandardObject)(typetree)), null, true);
      if (Stella_Object.typeP(typetree)) {
        global.variableType = ((Surrogate)(typetree));
      }
      else {
        {
          KeyValueList.setDynamicSlotValue(global.dynamicSlots, Stella.SYM_STELLA_VARIABLE_TYPE_SPECIFIER, ((StandardObject)(typetree)), null);
          global.variableType = StandardObject.typeSpecToBaseType(((StandardObject)(typetree)));
        }
      }
      global.variableSpecialP = specialP;
      global.variableConstantP = constantP;
      if (!(optionstree == Stella.NIL)) {
        { PropertyList options = PropertyList.newPropertyList();

          options.thePlist = optionstree;
          { Stella_Object key = null;
            Stella_Object value = null;
            Cons iter000 = options.thePlist;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest.rest) {
              key = iter000.value;
              value = iter000.rest.value;
              { Keyword testValue000 = ((Keyword)(key));

                if (testValue000 == Stella.KWD_DOCUMENTATION) {
                  global.documentation = ((StringWrapper)(value)).wrapperValue;
                }
                else if (testValue000 == Stella.KWD_PUBLICp) {
                  global.variablePublicP = BooleanWrapper.coerceWrappedBooleanToBoolean(Stella_Object.coerceToBoolean(value));
                }
                else if (testValue000 == Stella.KWD_AUXILIARYp) {
                  global.variableAuxiliaryP = BooleanWrapper.coerceWrappedBooleanToBoolean(Stella_Object.coerceToBoolean(value));
                }
                else {
                  if (!(Stella_Object.runOptionHandlerP(global, ((Keyword)(key)), value))) {
                    { Object old$PrintreadablyP$002 = Stella.$PRINTREADABLYp$.get();

                      try {
                        Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                        Stella.signalTranslationWarning();
                        if (!(Stella.suppressWarningsP())) {
                          Stella.printErrorContext(">> WARNING: ", Stella.STANDARD_WARNING);
                          {
                            Stella.STANDARD_WARNING.nativeStream.println();
                            Stella.STANDARD_WARNING.nativeStream.println(" Skipping invalid variable option `" + Stella_Object.deUglifyParseTree(key) + "'");
                            Stella.STANDARD_WARNING.nativeStream.println("in the definition of variable `" + global.variableName + "'.");
                          }
;
                        }

                      } finally {
                        Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$002);
                      }
                    }
                  }
                }
              }
            }
          }
          options.thePlist = null;
        }
      }
      { GlobalVariable _return_temp = global;

        MV_returnarray[0] = initialvaluetree;
        return (_return_temp);
      }
    }
  }