* @return String
   */
  public static String unescapeHtmlString(String input) {
    { int incursor = 0;
      int outcursor = 0;
      int escapestart = Native.string_position(input, '&', incursor);
      int escapeend = -1;
      int inputlength = -1;
      StringBuffer output = null;
      CharacterWrapper character = null;

      loop000 : for (;;) {
        if (escapestart == Stella.NULL_INTEGER) {
          if (output == null) {
            return (input);
          }
          else {
            break loop000;
          }
        }
        escapeend = Native.string_position(input, ';', escapestart);
        if (escapeend == Stella.NULL_INTEGER) {
          if (output == null) {
            return (input);
          }
          else {
            break loop000;
          }
        }
        character = ((CharacterWrapper)(Stella.$HTML_ESCAPE_TABLE$.lookup(StringWrapper.wrapString(Native.string_subsequence(input, escapestart + 1, escapeend)))));
        if (character == null) {
          escapestart = Native.string_position(input, '&', escapeend);
          continue loop000;
        }
        if (output == null) {
          inputlength = input.length();
          output = Stella.makeRawMutableString(inputlength);
        }
        while (incursor < escapestart) {
          edu.isi.stella.javalib.Native.mutableString_nthSetter(output, (input.charAt(incursor)), outcursor);
          incursor = incursor + 1;
          outcursor = outcursor + 1;
        }
        edu.isi.stella.javalib.Native.mutableString_nthSetter(output, (character.wrapperValue), outcursor);
        outcursor = outcursor + 1;
        incursor = escapeend + 1;
        escapestart = Native.string_position(input, '&', escapeend);
      }
      while (incursor < inputlength) {
        edu.isi.stella.javalib.Native.mutableString_nthSetter(output, (input.charAt(incursor)), outcursor);
        incursor = incursor + 1;
        outcursor = outcursor + 1;
      }
      return (Native.string_subsequence(output.toString(), 0, outcursor));
    }
  }