public static Cons yieldInitialValueAssignment(StorageSlot slot, Keyword mode) {
    { Stella_Object initialvalueexpression = StorageSlot.yieldInitialValueExpression(slot);
      boolean requiredslotP = slot.requiredP();

      if ((initialvalueexpression != null) &&
          (!(slot.slotName == Stella.SYM_STELLA_NEXT_SWEEP_LIST_OBJECT))) {
        if (mode == Stella.KWD_NULL_VALUE_ONLY) {
          if (requiredslotP ||
              (!Stella_Object.equalConsTreesP(StandardObject.typeToWalkedNullValueTree(slot.typeSpecifier(), slot.type()), initialvalueexpression))) {
            initialvalueexpression = null;
          }
        }
        else if (mode == Stella.KWD_INITIAL_VALUE_ONLY) {
          if (requiredslotP ||
              Stella_Object.equalConsTreesP(StandardObject.typeToWalkedNullValueTree(slot.typeSpecifier(), slot.type()), initialvalueexpression)) {
            initialvalueexpression = null;
          }
        }
        else if (mode == Stella.KWD_FORCE_NULL_VALUE) {
          initialvalueexpression = StandardObject.typeToWalkedNullValueTree(slot.typeSpecifier(), slot.type());
        }
        else if (mode == Stella.KWD_ANY_INITIAL_VALUE) {
          if (requiredslotP) {
            initialvalueexpression = null;
          }
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("`" + mode + "' is not a valid case option");
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
        if (initialvalueexpression != null) {
          return (Cons.list$(Cons.cons(Stella.SYM_STELLA_SETF, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_SLOT_VALUE, Cons.cons(Stella.SYM_STELLA_SELF, Cons.cons(StorageSlot.canonicalSlot(slot).slotName, Cons.cons(((StorageSlot.isContextSensitiveSlotP(slot) ? Cons.list$(Cons.cons(Stella.KWD_CONTEXT_SENSITIVEp, Cons.cons(Stella.SYM_STELLA_FALSE, Cons.cons(Stella.NIL, Stella.NIL)))) : Stella.NIL)).concatenate(Stella.NIL, Stella.NIL), Stella.NIL))))), Cons.cons(initialvalueexpression, Cons.cons(Stella.NIL, Stella.NIL))))));
        }
      }
      return (null);
    }
  }