public static Cons yieldStandardDynamicSlotValueSetterTree(StorageSlot slot, Stella_Object objectref, Stella_Object valueref, StandardObject returntype) {
    { Symbol slotname = StorageSlot.canonicalSlot(slot).slotName;
      boolean literalslotP = Slot.slotValueIsBareLiteralP(slot);
      Cons settertree = null;

      if (literalslotP) {
        settertree = Cons.list$(Cons.cons(Stella.SYM_STELLA_SET_DYNAMIC_SLOT_VALUE, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_DYNAMIC_SLOTS, Cons.cons(objectref, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_BQUOTE, Cons.cons(slotname, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(valueref, Cons.cons(Cons.cons(Surrogate.lookupLiteralTypeInfo(slot.type(), Stella.KWD_NULL_WRAPPER), Stella.NIL), Stella.NIL))))));
      }
      else {
        settertree = Cons.list$(Cons.cons(Stella.SYM_STELLA_SET_DYNAMIC_SLOT_VALUE, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_DYNAMIC_SLOTS, Cons.cons(objectref, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_BQUOTE, Cons.cons(slotname, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(valueref, Cons.cons(Cons.cons(Stella.SYM_STELLA_NULL, Stella.NIL), Stella.NIL))))));
      }
      if (Stella.walkingExpressionP()) {
        if (literalslotP) {
          settertree = Cons.list$(Cons.cons(Stella.SYM_STELLA_WRAPPER_VALUE, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_SAFE_CAST, Cons.cons(settertree, Cons.cons(Cons.cons(Surrogate.typeToSymbol(slot.type().typeToWrappedType()), Stella.NIL), Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL))));
        }
        else {
          settertree = Cons.yieldDownCastTree(Cons.walkAConsTree(settertree, new Object[1]), returntype);
        }
      }
      return (settertree);
    }
  }