public static void clOutputSystemClStructsFile(List classunits) {
    { String outputfile = Stella.makeFileName(Stella.clYieldStructClassFileName(((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())).name), Stella.KWD_LISP, true);
      OutputFileStream outputstream = OutputFileStream.newOutputFileStream(outputfile);
      List classes = List.newList();
      Module currentmodule = ((Module)(Stella.$MODULE$.get()));
      String renamed_Package = null;
      List ensuredpackages = List.list(Stella.NIL);

      { TranslationUnit unit = null;
        Cons iter000 = classunits.theConsList;
        Cons collect000 = null;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          unit = ((TranslationUnit)(iter000.value));
          if (collect000 == null) {
            {
              collect000 = Cons.cons(unit.theObject, Stella.NIL);
              if (classes.theConsList == Stella.NIL) {
                classes.theConsList = collect000;
              }
              else {
                Cons.addConsToEndOfConsList(classes.theConsList, collect000);
              }
            }
          }
          else {
            {
              collect000.rest = Cons.cons(unit.theObject, Stella.NIL);
              collect000 = collect000.rest;
            }
          }
        }
      }
      classes = List.sortClStructClasses(classes);
      if (((Integer)(Stella.$TRANSLATIONVERBOSITYLEVEL$.get())).intValue() >= 1) {
        System.out.println("Writing `" + outputfile + "'...");
      }
      { Object old$Module$000 = Stella.$MODULE$.get();
        Object old$Context$000 = Stella.$CONTEXT$.get();

        try {
          Native.setSpecial(Stella.$MODULE$, ((Module)(Stella.$MODULE$.get())));
          Native.setSpecial(Stella.$CONTEXT$, ((Module)(Stella.$MODULE$.get())));
          if (classes.nonEmptyP()) {
            Native.setSpecial(Stella.$MODULE$, ((Stella_Class)(classes.first())).homeModule());
          }
          else {
            Native.setSpecial(Stella.$MODULE$, Stella.getStellaModule(((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())).cardinalModule, true));
          }
          currentmodule = ((Module)(Stella.$MODULE$.get()));
          OutputStream.clOutputFileHeader(outputstream, outputfile, true);
          { TranslationUnit unit = null;
            Cons iter001 = classunits.theConsList;
            Stella_Class renamed_Class = null;
            Cons iter002 = classes.theConsList;

            for (;(!(iter001 == Stella.NIL)) &&
                      (!(iter002 == Stella.NIL)); iter001 = iter001.rest, iter002 = iter002.rest) {
              unit = ((TranslationUnit)(iter001.value));
              renamed_Class = ((Stella_Class)(iter002.value));
              unit.theObject = renamed_Class;
              unit.annotation = null;
              Native.setSpecial(Stella.$MODULE$, renamed_Class.homeModule());
              if (!(((Module)(Stella.$MODULE$.get())) == currentmodule)) {
                currentmodule = ((Module)(Stella.$MODULE$.get()));
                renamed_Package = ((Module)(Stella.$MODULE$.get())).lispPackage();
                if (!(ensuredpackages.memberP(StringWrapper.wrapString(renamed_Package)))) {
                  ensuredpackages.push(StringWrapper.wrapString(renamed_Package));
                  outputstream.nativeStream.println();
                  OutputStream.clOutputEnsurePackageDefinition(outputstream, renamed_Package);
                }
                outputstream.nativeStream.println();
                OutputStream.clOutputInPackageDeclaration(outputstream, renamed_Package);
              }
              unit.translation = TranslationUnit.clTranslateDefineNativeClassUnit(unit);
              TranslationUnit.clOutputOneUnit(unit, outputstream.nativeStream);
            }
          }

        } finally {
          Stella.$CONTEXT$.set(old$Context$000);
          Stella.$MODULE$.set(old$Module$000);
        }
      }
      outputstream.free();
    }
  }