public static void undefineExternalSlots(Symbol name) {
    { Cons slots = Stella.NIL;

      { Module module = null;
        Iterator iter000 = Stella.allModules();

        while (iter000.nextP()) {
          module = ((Module)(iter000.value));
          { Slot slot = null;
            Iterator iter001 = Module.allSlots(module, true);
            Cons collect000 = null;

            while (iter001.nextP()) {
              slot = ((Slot)(iter001.value));
              if ((slot.slotName == name) &&
                  slot.slotExternalP) {
                if (collect000 == null) {
                  {
                    collect000 = Cons.cons(slot, Stella.NIL);
                    if (slots == Stella.NIL) {
                      slots = collect000;
                    }
                    else {
                      Cons.addConsToEndOfConsList(slots, collect000);
                    }
                  }
                }
                else {
                  {
                    collect000.rest = Cons.cons(slot, Stella.NIL);
                    collect000 = collect000.rest;
                  }
                }
              }
            }
          }
        }
      }
      { Stella_Object slot = null;
        Cons iter002 = slots;

        for (;!(iter002 == Stella.NIL); iter002 = iter002.rest) {
          slot = iter002.value;
          Slot.destroyExternalSlot(((Slot)(slot)));
        }
      }
    }
  }