code: private void switchToBackward() {
          assert((checkDir > 0 && seq == rawSeq) || (checkDir == 0 && pos == start));
          if(checkDir > 0) {
              // Turn around from forward checking.
              limit = segmentLimit = pos;
              if(pos == segmentStart) {
                  start = rawStart;
                  checkDir = -1;  // Check backward.
              } else {  // pos > segmentStart
                  checkDir = 0;  // Stay in FCD segment.
              }
          } else {
              // Reached the start of the FCD segment.
              if(seq == rawSeq) {
                  // The input text segment is FCD, extend it backward.
              } else {
                  // The input text segment needed to be normalized.
                  // Switch to checking backward from it.
                  seq = rawSeq;
                  pos = limit = segmentLimit = segmentStart;
              }
              start = rawStart;
              checkDir = -1;
          }
      }
docs: Switches to backward checking.
  To be called when checkDir > 0 || (checkDir == 0 && pos == start).
  Returns with checkDir < 0 || (checkDir == 0 && pos != start).