public static String cppRelativizeHeaderFile(String headerfile, String systemname) {
    systemname = systemname;
    { Object old$Currentsystemdefinition$000 = Stella.$CURRENTSYSTEMDEFINITION$.get();
      Object old$Currentsystemdefinitionsubdirectory$000 = Stella.$CURRENTSYSTEMDEFINITIONSUBDIRECTORY$.get();

      try {
        Native.setSpecial(Stella.$CURRENTSYSTEMDEFINITION$, Stella.getSystemDefinition("stella"));
        Native.setSpecial(Stella.$CURRENTSYSTEMDEFINITIONSUBDIRECTORY$, ((((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())) != null) ? ((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())).directory : null));
        if (((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())) != null) {
          {
            { String directoryfile = Stella.makeFileName("dummy", Stella.KWD_CPP_HEADER, true);

              headerfile = Stella.relativizeFileName(headerfile, Stella.directoryParentDirectory(directoryfile, 2));
            }
          }
        }
        else {
          {
            Stella.STANDARD_WARNING.nativeStream.println("Warning: Can't find a system named stella");
            Stella.STANDARD_WARNING.nativeStream.println();
          }
;
        }

      } finally {
        Stella.$CURRENTSYSTEMDEFINITIONSUBDIRECTORY$.set(old$Currentsystemdefinitionsubdirectory$000);
        Stella.$CURRENTSYSTEMDEFINITION$.set(old$Currentsystemdefinition$000);
      }
    }
    return (headerfile);
  }