public static void cppOutputTypedEntity(Stella_Object type, Stella_Object entity, Stella_Object initialvalue) {
    { boolean arraytypeP = Stella_Object.cppTranslatedArrayTypeP(type);

      if (arraytypeP) {
        { String translatedtype = null;
          String translatedentity = null;

          { Surrogate testValue000 = Stella_Object.safePrimaryType(type);

            if (testValue000 == Stella.SGT_STELLA_CONS) {
              { Cons type000 = ((Cons)(type));

                if (!(type000.value == Stella.SYM_STELLA_CPP_TYPE)) {
                  type000 = Cons.cons(Stella.SYM_STELLA_CPP_TYPE, type000);
                }
                { String result000 = null;

                  { Object old$CurrentStream$000 = Stella.$CURRENT_STREAM$.get();

                    try {
                      Native.setSpecial(Stella.$CURRENT_STREAM$, OutputStringStream.newOutputStringStream());
                      Stella_Object.cppOutputStatement(type000);
                      result000 = ((OutputStringStream)(((OutputStream)(Stella.$CURRENT_STREAM$.get())))).theStringReader();

                    } finally {
                      Stella.$CURRENT_STREAM$.set(old$CurrentStream$000);
                    }
                  }
                  translatedtype = result000;
                }
              }
            }
            else if (Surrogate.subtypeOfStringP(testValue000)) {
              { StringWrapper type000 = ((StringWrapper)(type));

                translatedtype = type000.wrapperValue;
              }
            }
            else {
              { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
              }
            }
          }
          { Surrogate testValue001 = Stella_Object.safePrimaryType(entity);

            if (testValue001 == Stella.SGT_STELLA_CONS) {
              { Cons entity000 = ((Cons)(entity));

                { String result001 = null;

                  { Object old$CurrentStream$001 = Stella.$CURRENT_STREAM$.get();

                    try {
                      Native.setSpecial(Stella.$CURRENT_STREAM$, OutputStringStream.newOutputStringStream());
                      Stella_Object.cppOutputStatement(entity000);
                      result001 = ((OutputStringStream)(((OutputStream)(Stella.$CURRENT_STREAM$.get())))).theStringReader();

                    } finally {
                      Stella.$CURRENT_STREAM$.set(old$CurrentStream$001);
                    }
                  }
                  translatedentity = result001;
                }
              }
            }
            else if (Surrogate.subtypeOfStringP(testValue001)) {
              { StringWrapper entity000 = ((StringWrapper)(entity));

                translatedentity = entity000.wrapperValue;
              }
            }
            else {
              { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

                stream001.nativeStream.print("`" + testValue001 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream001.theStringReader()).fillInStackTrace()));
              }
            }
          }
          ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print(Stella.cppGenerateArrayTypedEntity(translatedentity, translatedtype));
        }
      }
      else {
        { Surrogate testValue002 = Stella_Object.safePrimaryType(type);

          if (testValue002 == Stella.SGT_STELLA_CONS) {
            { Cons type000 = ((Cons)(type));

              if (!(type000.value == Stella.SYM_STELLA_CPP_TYPE)) {
                type000 = Cons.cons(Stella.SYM_STELLA_CPP_TYPE, type000);
              }
              Stella_Object.cppOutputStatement(type000);
            }
          }
          else if (Surrogate.subtypeOfStringP(testValue002)) {
            { StringWrapper type000 = ((StringWrapper)(type));

              ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print(type000.wrapperValue + " ");
            }
          }
          else {
            { OutputStringStream stream002 = OutputStringStream.newOutputStringStream();

              stream002.nativeStream.print("`" + testValue002 + "' is not a valid case option");
              throw ((StellaException)(StellaException.newStellaException(stream002.theStringReader()).fillInStackTrace()));
            }
          }
        }
        { Surrogate testValue003 = Stella_Object.safePrimaryType(entity);

          if (testValue003 == Stella.SGT_STELLA_CONS) {
            { Cons entity000 = ((Cons)(entity));

              Stella_Object.cppOutputStatement(entity000);
            }
          }
          else if (Surrogate.subtypeOfStringP(testValue003)) {
            { StringWrapper entity000 = ((StringWrapper)(entity));

              ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print(entity000.wrapperValue);
            }
          }
          else {
            { OutputStringStream stream003 = OutputStringStream.newOutputStringStream();

              stream003.nativeStream.print("`" + testValue003 + "' is not a valid case option");
              throw ((StellaException)(StellaException.newStellaException(stream003.theStringReader()).fillInStackTrace()));
            }
          }
        }
      }
      if (initialvalue != null) {
        ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print(" = ");
        Stella_Object.cppOutputStatement(initialvalue);
      }
    }
  }