code: public int getGroupForPrimary(long p) {
          p >>= 16;
          if(p < scriptStarts[1] || scriptStarts[scriptStarts.length - 1] <= p) {
              return -1;
          }
          int index = 1;
          while(p >= scriptStarts[index + 1]) { ++index; }
          for(int i = 0; i < numScripts; ++i) {
              if(scriptsIndex[i] == index) {
                  return i;
              }
          }
          for(int i = 0; i < MAX_NUM_SPECIAL_REORDER_CODES; ++i) {
              if(scriptsIndex[numScripts + i] == index) {
                  return Collator.ReorderCodes.FIRST + i;
              }
          }
          return -1;
      }
docs: Finds the reordering group which contains the primary weight.
  @return the first script of the group, or -1 if the weight is beyond the last group