public static void resolveChildrenReferences() {
    if (Stella.$CLASSES_WITH_UNRESOLVED_CHILDREN_REFERENCES$.emptyP() ||
        Stella.$UNFINALIZED_CLASSES$.emptyP()) {
      return;
    }
    { Cons unresolvableclasses = Stella.NIL;

      Stella.$CLASSES_WITH_UNRESOLVED_CHILDREN_REFERENCES$.removeDeletedMembers();
      { Stella_Class renamed_Class = null;
        Cons iter000 = Stella.$CLASSES_WITH_UNRESOLVED_CHILDREN_REFERENCES$.theConsList;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          renamed_Class = ((Stella_Class)(iter000.value));
          Stella_Class.addDirectSubsBackLinks(renamed_Class);
          { boolean foundP000 = false;

            { Surrogate sub = null;
              Cons iter001 = renamed_Class.classDirectSubs.theConsList;

              loop001 : for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
                sub = ((Surrogate)(iter001.value));
                if (!(Surrogate.typeToClass(sub) != null)) {
                  foundP000 = true;
                  break loop001;
                }
              }
            }
            if (foundP000) {
              unresolvableclasses = Cons.cons(renamed_Class, unresolvableclasses);
            }
          }
        }
      }
      Stella.$CLASSES_WITH_UNRESOLVED_CHILDREN_REFERENCES$.clear();
      Stella.$CLASSES_WITH_UNRESOLVED_CHILDREN_REFERENCES$.theConsList = unresolvableclasses;
    }
  }