public static void collectDirectSuperClasses(Stella_Class renamed_Class, List parents) {
    { List directsupertypes = renamed_Class.classDirectSupers;
      List nondirectparents = List.newList();

      { Surrogate supertype = null;
        Cons iter000 = directsupertypes.theConsList;
        Cons collect000 = null;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          supertype = ((Surrogate)(iter000.value));
          if (((Stella_Class)(supertype.surrogateValue)) != null) {
            if (collect000 == null) {
              {
                collect000 = Cons.cons(((Stella_Class)(supertype.surrogateValue)), Stella.NIL);
                if (parents.theConsList == Stella.NIL) {
                  parents.theConsList = collect000;
                }
                else {
                  Cons.addConsToEndOfConsList(parents.theConsList, collect000);
                }
              }
            }
            else {
              {
                collect000.rest = Cons.cons(((Stella_Class)(supertype.surrogateValue)), Stella.NIL);
                collect000 = collect000.rest;
              }
            }
          }
        }
      }
      { Stella_Class superclass = null;
        Cons iter001 = parents.theConsList;

        for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
          superclass = ((Stella_Class)(iter001.value));
          { Stella_Class othersuperclass = null;
            Cons iter002 = parents.theConsList;

            for (;!(iter002 == Stella.NIL); iter002 = iter002.rest) {
              othersuperclass = ((Stella_Class)(iter002.value));
              if (!(othersuperclass == superclass)) {
                if (superclass.classAllSuperClasses.memberP(othersuperclass)) {
                  nondirectparents.insert(othersuperclass);
                }
              }
            }
          }
        }
      }
      { Stella_Class p = null;
        Cons iter003 = nondirectparents.theConsList;

        for (;!(iter003 == Stella.NIL); iter003 = iter003.rest) {
          p = ((Stella_Class)(iter003.value));
          parents.remove(p);
        }
      }
      nondirectparents.free();
    }
  }